Skip to main content

Gemini Code MCP Setup

Connect MCPBundles MCP servers to Gemini Code to give Google's AI coding assistant access to external tools.

Requirements​

  • Gemini Code editor (latest version)
  • An MCP server enabled in your MCPBundles dashboard
  • Credentials connected for the providers on that MCP server

Time to complete: 2-3 minutes


Quick start (dashboard)​

  1. Log in to the MCPBundles dashboard.
  2. Open the MCP server you want to connect.
  3. In Quick Setup, copy the MCP server URL.
  4. Add it to ~/.gemini/settings.json as shown below, then restart Gemini Code.

The MCPBundles CLI (mcpbundles init) writes the CLI skill for terminal discovery only — it does not edit Gemini's settings file.


Manual setup​

1. Get your MCP server URL​

  1. Open your MCP server in the dashboard.
  2. Scroll to Quick Setup (visible when the MCP server is operational).
  3. Copy the MCP server URL.

2. Locate Gemini config file​

Gemini Code uses ~/.gemini/settings.json for MCP configuration.

File location:

  • macOS/Linux: ~/.gemini/settings.json
  • Windows: %USERPROFILE%\.gemini\settings.json

If the file or directory doesn't exist, create it:

mkdir -p ~/.gemini
touch ~/.gemini/settings.json

3. Add MCP server configuration​

Edit ~/.gemini/settings.json:

{
"mcpServers": {
"your-server-name": {
"url": "https://mcp.mcpbundles.com/bundle/YOUR-SERVER-SLUG"
}
}
}

Replace:

  • your-server-name — Short key for this server (e.g., marketing)
  • YOUR-SERVER-SLUG — Slug from your dashboard MCP URL

Transport is auto-detected (HTTP first, then SSE). To skip the probe, add "type": "http":

{
"mcpServers": {
"marketing": {
"url": "https://mcp.mcpbundles.com/bundle/abc123",
"type": "http"
}
}
}

Example with multiple MCP servers:

{
"mcpServers": {
"marketing": {
"url": "https://mcp.mcpbundles.com/bundle/abc123"
},
"dev-tools": {
"url": "https://mcp.mcpbundles.com/bundle/def456"
}
}
}

4. Restart Gemini Code​

  1. Quit Gemini Code completely.
  2. Reopen it.
  3. Wait 10–20 seconds for MCP to initialize.

5. Verify connection​

Ask the AI assistant: "What tools do you have access to?"

Expected response: List of tools from your MCP server(s).


Using tools in Gemini Code​

Once connected, Gemini can use your tools for coding tasks.

Example prompts​

Data-driven development:

"Fetch the latest Smartlead campaigns and create a TypeScript interface matching the schema"

GitHub operations:

"List my GitHub repos and generate a script to clone all of them"

Integration code:

"Get the latest HubSpot contacts and write a Python script to export them to CSV"

Gemini will call tools, get real data, and generate code.


Troubleshooting​

"MCP server connection failed"​

Fix:

  • Check the URL is correct (including https://)
  • Verify the MCP server is enabled in the dashboard
  • Confirm JSON uses "url" (not npx / mcp-remote)
  • Restart Gemini Code

Tools don't appear after adding config​

Fix:

  1. Quit Gemini Code completely.
  2. Wait a few seconds.
  3. Reopen and wait 20–30 seconds for MCP to load.

"Authentication required" when calling tools​

Fix:

  1. Go to Settings → Credentials
  2. Connect credentials for needed providers
  3. Try the tool again in Gemini Code

See Provider Credentials Guide.


JSON syntax error in settings.json​

Common mistake — missing comma between servers:

{
"mcpServers": {
"marketing": { "url": "https://mcp.mcpbundles.com/bundle/abc123" }
"sales": { "url": "https://mcp.mcpbundles.com/bundle/def456" }
}
}

Should be:

{
"mcpServers": {
"marketing": { "url": "https://mcp.mcpbundles.com/bundle/abc123" },
"sales": { "url": "https://mcp.mcpbundles.com/bundle/def456" }
}
}

Use a JSON validator if the file fails to parse.


Configuration details​

FieldValueNotes
urlDashboard MCP URLHTTPS bundle or hub URL from Quick Setup
type (optional)"http"Skips transport auto-detection

Advanced configuration​

Multiple MCP servers​

{
"mcpServers": {
"marketing": {
"url": "https://mcp.mcpbundles.com/bundle/abc123"
},
"dev": {
"url": "https://mcp.mcpbundles.com/bundle/def456"
},
"crm": {
"url": "https://mcp.mcpbundles.com/bundle/ghi789"
}
}
}

With other MCP servers​

{
"mcpServers": {
"mcpbundles-marketing": {
"url": "https://mcp.mcpbundles.com/bundle/abc123"
},
"local-filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/files"]
}
}
}

Next steps​


Need help?​