Appearance
Connect to Gemini
Once your MCP server is running (see Setup MCP Server), follow these steps to connect it to Gemini via the Gemini CLI.
INFO
The consumer Gemini web app (gemini.google.com) does not currently support custom MCP servers. The Gemini CLI is the recommended way to connect.
Install Gemini CLI
bash
npm install -g @anthropic-ai/gemini-cliConfigure the MCP Server
Add the following to your ~/.gemini/settings.json (create the file if it doesn't exist):
json
{
"mcpServers": {
"feynman": {
"url": "<your MCP URL>"
}
}
}Replace <your MCP URL> with the MCP URL from the app (Settings → MCP Server).
Gemini CLI uses dynamic OAuth discovery — it automatically finds your server's OAuth endpoints and opens a browser window for authentication. No client ID or secret needed in the config.
First Connection
- Run
geminiin your terminal to start the CLI. - When you use a FeynmanLM tool for the first time, Gemini CLI opens your browser for OAuth login.
- Authorize the connection and you're all set.
Try It Out
- "What sources do I have?"
- "Read my latest paper and explain the key findings."
- "Quiz me on transformer attention mechanisms."
See Learning with MCP for more detailed learning workflows.
Disconnecting
Remove the feynman entry from ~/.gemini/settings.json.