Gemini TutorialSAFE
Building MCP Servers with Google Gemini
Overview
From the repository's own README, as read at the audited commit. Badges and raw HTML are left out.
This repository contains the complete code for the tutorial on building Model Context Protocol (MCP) servers with Google's Gemini 2.0 model, as described in this blog post.
What is Model Context Protocol (MCP)?
MCP is an open standard developed by Anthropic that enables AI models to seamlessly access external tools and resources. It creates a standardized way for AI models to interact with tools, access the internet, run code, and more, without needing custom integrations for each tool or model.
Key benefits include:
- Interoperability: Any MCP-compatible model can use any MCP-compatible tool
- Modularity: Add or update tools without changing model integrations
- Standardization: Consistent interface reduces integration complexity
- Separation of Concerns: Clean division between model capabilities and tool functionality
Project Overview
This tutorial demonstrates how to:
- Build a complete MCP server with Brave Search integration
- Connect it to Google's Gemini 2.0 model
- Create a flexible architecture for AI-powered applications
Getting Started
Prerequisites
- Bun (for fast TypeScript execution)
- Brave Search API key
- Google API key for Gemini access
Installation
# Clone the repository git clone https://github.com/GuiBibeau/mcp-gemini-tutorial.git cd mcp-tutorial # Install dependencies bun install
Environment Setup
Create a .env file with your API keys:
BRAVE_API_KEY="your_brave_api_key" GOOGLE_API_KEY="your_google_api_key"
Usage
Running the Basic Client
bun examples/basic-client.ts
Running the Gemini Integration
bun examples/gemini-tool-function.ts
Project Structure
src/- Core implementation of the MCP server and toolsexamples/- Example clients demonstrating how to use the MCP servertests/- Test files for the project
Tools Imple
c2a2714b5dffOBSERVED · 2026-10-09Connect
Built from this server's own package name, version and transport as found in its source — not copied from anyone's documentation, so it cannot drift against a page we do not control. Replace the environment placeholders with a token scoped to the least it needs.
claude mcp add mcp-tutorial --env BRAVE_API_KEY=${BRAVE_API_KEY} --env GOOGLE_API_KEY=${GOOGLE_API_KEY} -- npx -y mcp-tutorial{
"mcpServers": {
"mcp-tutorial": {
"command": "npx",
"args": [
"-y",
"mcp-tutorial"
],
"env": {
"BRAVE_API_KEY": "${BRAVE_API_KEY}",
"GOOGLE_API_KEY": "${GOOGLE_API_KEY}"
}
}
}
}Exposed tools (2)
2 read · 0 write · 0 destructive.
| Tool | Risk | Description |
|---|---|---|
brave_local_search | read | Search for local businesses and places using Brave Search API |
brave_web_search | read | Search the web using Brave Search API |
Trust audit
SAFEgrade B · trust 89/100 Nothing in the source contradicts what it says it does. Grade A is reserved for packages that have also passed the behavioural sandbox.
| Layer | What it checks | Result |
|---|---|---|
| L0 | Provenance & inventory | WARN |
| L1 | Static analysis of the code | PASS |
| L2 | Instruction surface (what it tells the agent) | PASS |
| L3 | Class-specific surface | PASS |
| L4 | Behavioural (sandbox) | SKIPPED |
What the source does
- Filesystem
- none-observed
- Network
- declared (4 observation(s))
- Shell
- none-observed
- Dependencies
- not all pinned
- Secrets in source
- none-found
Findings (3)
bun.lockb
@google/generative-ai, @modelcontextprotocol/sdk, @types/bun
Gates applied: no_behavioural_pass, no_license.
c2a2714b5dfffull audit observations/trust-audit/mcp-server/guibibeau__gemini-tutorial.json · Report an issue / request a re-scanAudit history
Every audit this server has had. A grade with a past is a grade somebody is still checking.
| Date | Source | Verdict | Grade | Score | Change |
|---|---|---|---|---|---|
| 2026-10-09 | c2a2714b5dff | SAFE | B | 89 | first audit |
Questions
What is the Gemini Tutorial MCP server?
Building MCP Servers with Google Gemini
What tools does Gemini Tutorial expose?
2 in total: 2 read-only, 0 that write, and 0 that can delete or overwrite. Every one is listed on this page with its risk.
Is Gemini Tutorial safe to connect to an agent?
The audit found nothing in the source that contradicts what it says it does, and graded it B (89/100). Grade A is held back for packages that have also passed a sandboxed behavioural run, which is why a clean server reads B.
What credentials does Gemini Tutorial need?
It reads BRAVE_API_KEY and GOOGLE_API_KEY from the environment. Give it a token scoped to the least it needs — an agent that can be talked into calling a tool can be talked into calling it with your credentials.
How does Gemini Tutorial run?
It speaks stdio, so it runs as a local process your client starts. It is published on npm as mcp-tutorial.
How current is this page?
The grade is for one exact copy of the source (c2a2714b5dff), read on 2026-10-09. The repository is watched and re-audited when it changes.