From c09bad93932b9611340c007447f325991a9329b1 Mon Sep 17 00:00:00 2001 From: "N. Taylor Mullen" Date: Fri, 16 May 2025 17:19:00 -0700 Subject: Docs: Update MCP server configuration (#396) --- docs/cli/configuration.md | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) (limited to 'docs/cli') diff --git a/docs/cli/configuration.md b/docs/cli/configuration.md index 3401668d..b887ebf7 100644 --- a/docs/cli/configuration.md +++ b/docs/cli/configuration.md @@ -51,8 +51,16 @@ When you create a `.gemini/settings.json` file for project-specific settings, or - Custom command for executing tool calls (if applicable to your setup). - Must take function name as first argument and function arguments as JSON on `stdin` - Must return JSON result of funcation call on `stdout`. -- **`mcpServerCommand`** (string, advanced): - - Custom command for starting an MCP server with custom tools. +- **`mcpServers`** (object, advanced): + - Configures connections to one or more Model-Context Protocol (MCP) servers for discovering and using custom tools. + - This is an object where each key is a server name and the value is an object defining the server's parameters: + - `command` (string, required): The command to execute to start the MCP server. + - `args` (array of strings, optional): Arguments to pass to the command. + - `env` (object, optional): Environment variables to set for the server process. + - `cwd` (string, optional): The working directory in which to start the server. + - Example: `"mcpServers": { "myServer": { "command": "python", "args": ["mcp_server.py", "--port", "8080"], "cwd": "./mcp_tools" } }` + - **`mcpServerCommand`** (string, advanced, **deprecated**): + - Legacy setting for configuring a single MCP server. Please use `mcpServers` instead for better flexibility and support for multiple servers. ### Example `settings.json`: @@ -62,7 +70,15 @@ When you create a `.gemini/settings.json` file for project-specific settings, or "sandbox": "docker", "toolDiscoveryCommand": "bin/get_tools", "toolCallCommand": "bin/call_tool", - "mcpServerCommand": "bin/mcp_server.py" + "mcpServers": { + "mainServer": { + "command": "bin/mcp_server.py" + }, + "anotherServer": { + "command": "node", + "args": ["mcp_server.js", "--verbose"] + } + } } ``` -- cgit v1.2.3