- Home
- MCP servers
- Claude Gemini
Claude Gemini
- python
0
GitHub Stars
python
Language
5 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"jamiewonderchild-claude-gemini-mcp": {
"command": "python3",
"args": [
"/Users/jamiearonson/Documents/claude-gemini-integration/mcp_server.py"
],
"env": {
"MCP_PORT": "8080"
}
}
}
}You can run an MCP server to let Claude Code and Gemini CLI collaborate in real time. This server enables startable collaborative sessions, in-session consultation, and retrieval of full conversation history, while handling rate limits and preserving context across interactions.
How to use
You interact with the MCP server through your MCP client integrated in Claude Code. Start a new collaboration with Gemini on a topic, then ask Gemini questions or provide context to continue the discussion. Retrieve the full collaboration history at any time to review ideas and decisions. The server preserves context within a session so Gemini remembers prior interactions as you iterate.
How to install
Prerequisites: Python 3.8 or newer, the pip package installer, Claude Desktop, and the Gemini CLI with a valid API key.
Step 1: Clone the integration repository and enter the project directory.
git clone <repository_url>
cd claude-gemini-integration
Step 2: Create and activate a Python virtual environment to manage dependencies.
python3 -m venv venv
source venv/bin/activate
Step 3: Install the required Python packages.
pip install -r requirements.txt
Step 4: Start the collaborative server. Run the server in the background so Claude Code can communicate with Gemini.
cd /Users/jamiearonson/Documents/claude-gemini-integration
source venv/bin/activate
python tools/mcp/collaborative-server.py &
Verify the server is running by checking its health endpoint.
curl http://localhost:8080/health
Step 5: Configure Claude Desktop to use the MCP server. Add a configuration block to claude_desktop_config.json that points to the local MCP server and sets the port.
{
"mcpServers": {
"gemini-collaboration": {
"command": "python3",
"args": ["/Users/jamiearonson/Documents/claude-gemini-integration/mcp_server.py"],
"env": {
"MCP_PORT": "8080"
}
}
}
}
Additional setup guidance
Restart Claude Desktop after editing the configuration so the new MCP server is loaded.
After restarting, open a new Claude Code session and verify the MCP tools are available. You should see tools for starting a collaboration, consulting Gemini, and retrieving collaboration history.
Troubleshooting
Tools are not available in Claude Code? Ensure Claude Desktop was fully restarted after modifying claude_desktop_config.json. Verify the config file exists at the correct path and the JSON is valid. Confirm the command and absolute path in the mcpServers block are correct.
Collaborative server connection issues? Check if the server is running and listening on the expected port. If not, restart it as described in Step 4. Ensure no port conflicts on port 8080.
Gemini CLI issues? Verify Gemini CLI installation with gemini --version and ensure your Gemini API key is configured and accessible.
Testing
You can verify MCP client and server functionality with the provided test script. Activate the virtual environment and run the tests.
cd /Users/jamiearonson/Documents/claude-gemini-integration
source venv/bin/activate
python test_mcp.py
Notes
This MCP setup enables real-time, context-preserving collaboration between Claude Code and Gemini CLI, supporting iterative problem solving and seamless workflow within your Claude environment.
Available tools
start_gemini_collaboration
Start a new collaborative conversation with Gemini and establish a persistent session to exchange ideas and context.
consult_gemini
Ask Gemini questions or provide context during an active collaboration to receive Gemini's input and suggestions.
get_collaboration_history
Retrieve the full transcript of the current collaboration for review and reference.