drio
Open app

MCP with Gemini Tutorial

Source

Building MCP Servers with Google Gemini

Catalog onlyCatalog onlySTDIO

Overview

The MCP with Gemini Tutorial is a comprehensive guide for building Model Context Protocol (MCP) servers using Google's Gemini 2.0 model, enabling seamless integration of AI models with external tools and resources.

To use the tutorial, clone the repository, install the necessary dependencies, set up your environment with API keys, and run the provided example clients to see the MCP server in action.

  • Detailed instructions for building an MCP server with Brave Search integration. - Example clients demonstrating the use of the MCP server. - Modular architecture allowing easy addition of new tools.
  1. Building AI-powered applications that require external tool integration.
  2. Creating custom tools for specific functionalities within the MCP framework.
  3. Enhancing AI models with real-time data access through the MCP server.

Add to your AI client

Use these steps to connect MCP with Gemini Tutorial in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "mcp-gemini-tutorial-guibibeau": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-gemini-tutorial-guibibeau"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "mcp-gemini-tutorial-guibibeau": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-gemini-tutorial-guibibeau"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "mcp-gemini-tutorial-guibibeau": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-gemini-tutorial-guibibeau"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "mcp-gemini-tutorial-guibibeau": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-gemini-tutorial-guibibeau"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "mcp-gemini-tutorial-guibibeau": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-gemini-tutorial-guibibeau"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "mcp-gemini-tutorial-guibibeau": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-mcp-gemini-tutorial-guibibeau"
      ]
    }
  }
}

FAQ

What is Model Context Protocol (MCP)?

MCP is an open standard that allows AI models to access external tools and resources seamlessly.

What are the prerequisites for this tutorial?

You need Bun for TypeScript execution, Brave Search API key, and Google API key for Gemini access.

Can I add my own tools to the MCP server?

Yes! You can define new tools, implement their functionality, and register them with the MCP server.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":3683,"uuid":"a9ec8c56-4479-46d8-b9bf-6f3da051493c","name":"mcp-gemini-tutorial","title":"MCP with Gemini Tutorial","description":"Building MCP Servers with Google Gemini","avatar_url":"https://avatars.githubusercontent.com/u/22625602?v=4","created_at":"2025-03-21T02:39:00.223Z","updated_at":"2025-03-21T02:51:50.007Z","status":"created","author_name":"GuiBibeau","author_avatar_url":"https://avatars.githubusercontent.com/u/22625602?v=4","tags":"mcp,gemini,tutorial","category":"research-and-data","is_featured":false,"sort":1,"url":"https://github.com/GuiBibeau/mcp-gemini-tutorial","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"0\",\"license\":\"\",\"language\":\"TypeScript\",\"is_official\":false,\"latest_commit_time\":\"2025-03-20 22:11:49\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]