diff options
| author | N. Taylor Mullen <[email protected]> | 2025-05-16 17:19:00 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-16 17:19:00 -0700 |
| commit | c09bad93932b9611340c007447f325991a9329b1 (patch) | |
| tree | d6f62c6775132de415bff0b70d548a4eac913da4 /docs/cli | |
| parent | 7f7f2cd47ead1997abae089baae75325883be211 (diff) | |
Docs: Update MCP server configuration (#396)
Diffstat (limited to 'docs/cli')
| -rw-r--r-- | docs/cli/configuration.md | 22 |
1 files changed, 19 insertions, 3 deletions
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"] + } + } } ``` |
