From 10c704ccb960b55a2a277334373c332ac0c4fa6e Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Sat, 5 Jul 2025 21:24:09 -0700 Subject: [PATCH] docs release notes --- docs/my-website/docs/mcp.md | 3 +- .../release_notes/v1.74.0-stable/index.md | 84 +++++++++++++++++++ 2 files changed, 85 insertions(+), 2 deletions(-) diff --git a/docs/my-website/docs/mcp.md b/docs/my-website/docs/mcp.md index efa51be8665..66017667966 100644 --- a/docs/my-website/docs/mcp.md +++ b/docs/my-website/docs/mcp.md @@ -180,8 +180,7 @@ You can choose to access specific MCP servers and only list their tools using th - Limit tool access to one or more specific MCP servers - Control which tools are available in different environments or use cases -The header accepts either: -1. A comma-separated list of server names: `"Zapier_Gmail,Server2,Server3"` +The header accepts a comma-separated list of server names: `"Zapier_Gmail,Server2,Server3"` Notes: - Server names with spaces should be replaced with underscores diff --git a/docs/my-website/release_notes/v1.74.0-stable/index.md b/docs/my-website/release_notes/v1.74.0-stable/index.md index aa3c02affc7..e3608710aac 100644 --- a/docs/my-website/release_notes/v1.74.0-stable/index.md +++ b/docs/my-website/release_notes/v1.74.0-stable/index.md @@ -50,6 +50,90 @@ pip install litellm==1.74.0.post1 ### MCP Gateway: Segregate MCP tools +MCP Server Segregation is now supported on LiteLLM. This means you can specify the `x-mcp-servers` header to specify which servers to list tools from. This is useful when you want to request tools from only a subset of configured servers — enabling curated toolsets and cleaner control. + +#### Usage + + + + +```bash title="cURL Example with Server Segregation" showLineNumbers +curl --location 'https://api.openai.com/v1/responses' \ +--header 'Content-Type: application/json' \ +--header "Authorization: Bearer $OPENAI_API_KEY" \ +--data '{ + "model": "gpt-4o", + "tools": [ + { + "type": "mcp", + "server_label": "litellm", + "server_url": "/mcp", + "require_approval": "never", + "headers": { + "x-litellm-api-key": "Bearer YOUR_LITELLM_API_KEY", + "x-mcp-servers": "Zapier_Gmail" + } + } + ], + "input": "Run available tools", + "tool_choice": "required" +}' +``` + +In this example, the request will only have access to tools from the "Zapier_Gmail" MCP server. + + + + + +```bash title="cURL Example with Server Segregation" showLineNumbers +curl --location '/v1/responses' \ +--header 'Content-Type: application/json' \ +--header "Authorization: Bearer $LITELLM_API_KEY" \ +--data '{ + "model": "gpt-4o", + "tools": [ + { + "type": "mcp", + "server_label": "litellm", + "server_url": "/mcp", + "require_approval": "never", + "headers": { + "x-litellm-api-key": "Bearer YOUR_LITELLM_API_KEY", + "x-mcp-servers": "Zapier_Gmail,Server2" + } + } + ], + "input": "Run available tools", + "tool_choice": "required" +}' +``` + +This configuration restricts the request to only use tools from the specified MCP servers. + + + + + +```json title="Cursor MCP Configuration with Server Segregation" showLineNumbers +{ + "mcpServers": { + "LiteLLM": { + "url": "/mcp", + "headers": { + "x-litellm-api-key": "Bearer $LITELLM_API_KEY", + "x-mcp-servers": "Zapier_Gmail,Server2" + } + } + } +} +``` + +This configuration in Cursor IDE settings will limit tool access to only the specified MCP server. + + + + ### Team / Key Based Logging on UI