Configure Gemini MCP server - check status and get setup instructions
Diagnoses and fixes Gemini MCP server connectivity issues with step-by-step troubleshooting.
/plugin marketplace add rohenaz/gemcp/plugin install gemcp@b-open-ioHelp the user get the Gemini MCP server working. Follow these diagnostic steps:
First, check if gemini tools are available. Look for mcp__gemini__gemini_generate, mcp__gemini__gemini_messages, and mcp__gemini__gemini_image in your available tools.
If you see these tools, the server is working. Tell the user and stop here.
Run this command to verify the API key is set:
echo "GEMINI_API_KEY is ${GEMINI_API_KEY:+set (${#GEMINI_API_KEY} chars)}"
If NOT set, provide setup instructions:
Get an API Key:
Add to Shell Profile:
echo 'export GEMINI_API_KEY="your-api-key-here"' >> ~/.zshrc
source ~/.zshrc
Then restart Claude Code.
If API key is set but server still fails, test it directly:
GEMINI_API_KEY="$GEMINI_API_KEY" bunx @bopen-io/gemcp 2>&1 &
sleep 2
kill %1 2>/dev/null
Should output "Gemini MCP server running". If it exits silently or errors, proceed to Step 4.
Stale cached versions cause connection failures. Clear them:
rm -rf ~/.bun/install/cache/@bopen-io/gemcp*
Then test again with Step 3. If it works, restart Claude Code.
If still failing, do a complete reset:
# Clear all caches
rm -rf ~/.bun/install/cache/@bopen-io/gemcp*
bun pm cache rm
# Install globally to prime the cache
bun add -g @bopen-io/gemcp
# Verify it works
GEMINI_API_KEY="$GEMINI_API_KEY" gemcp &
sleep 2
kill %1 2>/dev/null
After this works, restart Claude Code. The plugin should now connect.
Verify the plugin is installed:
cat ~/.claude/plugins/installed_plugins.json | grep -A5 gemcp
If not found, install the plugin:
/plugin marketplace add b-open-io/claude-plugins
/plugin install gemcp@b-open-io