diff options
Diffstat (limited to 'docs/tools')
| -rw-r--r-- | docs/tools/mcp-server.md | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/tools/mcp-server.md b/docs/tools/mcp-server.md index ebce6160..0be9a34b 100644 --- a/docs/tools/mcp-server.md +++ b/docs/tools/mcp-server.md @@ -87,6 +87,7 @@ Each server configuration supports the following properties: #### Optional - **`args`** (string[]): Command-line arguments for Stdio transport +- **`headers`** (object): Custom HTTP headers when using `httpUrl` - **`env`** (object): Environment variables for the server process. Values can reference environment variables using `$VAR_NAME` or `${VAR_NAME}` syntax - **`cwd`** (string): Working directory for Stdio transport - **`timeout`** (number): Request timeout in milliseconds (default: 600,000ms = 10 minutes) @@ -166,6 +167,24 @@ Each server configuration supports the following properties: } ``` +#### HTTP-based MCP Server with Custom Headers + +```json +{ + "mcpServers": { + "httpServerWithAuth": { + "httpUrl": "http://localhost:3000/mcp", + "headers": { + "Authorization": "Bearer your-api-token", + "X-Custom-Header": "custom-value", + "Content-Type": "application/json" + }, + "timeout": 5000 + } + } +} +``` + ## Discovery Process Deep Dive When the Gemini CLI starts, it performs MCP server discovery through the following detailed process: |
