From 6743d20de262338750f9b9046606222812915877 Mon Sep 17 00:00:00 2001 From: Ryan Crabbe Date: Thu, 5 Feb 2026 10:50:45 -0800 Subject: [PATCH] docs: add trailing slash to /mcp endpoint URLs The /mcp endpoint requires a trailing slash because the MCP server is mounted as a sub-application using app.mount(). Starlette's mount behavior causes a 307 redirect from /mcp to /mcp/, which many MCP clients fail to handle. Updates documentation examples to use /mcp/ consistently. --- README.md | 2 +- docs/my-website/docs/mcp.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 77adddf897..e7701b5cf9 100644 --- a/README.md +++ b/README.md @@ -203,7 +203,7 @@ curl -X POST 'http://0.0.0.0:4000/v1/chat/completions' \ { "mcpServers": { "LiteLLM": { - "url": "http://localhost:4000/mcp", + "url": "http://localhost:4000/mcp/", "headers": { "x-litellm-api-key": "Bearer sk-1234" } diff --git a/docs/my-website/docs/mcp.md b/docs/my-website/docs/mcp.md index d63b55ee29..564a054aae 100644 --- a/docs/my-website/docs/mcp.md +++ b/docs/my-website/docs/mcp.md @@ -632,7 +632,7 @@ import asyncio config = { "mcpServers": { "mcp_group": { - "url": "http://localhost:4000/mcp", + "url": "http://localhost:4000/mcp/", "headers": { "x-mcp-servers": "dev_group", # assume this gives access to github, zapier and deepwiki "x-litellm-api-key": "Bearer sk-1234",