(feat): make the root URL the primary MCP endpoint#78
Conversation
Greptile SummaryThis PR promotes
Confidence Score: 5/5Safe to merge — the changes are self-consistent, backward-compatible, and well-tested. Both the auth and HTTP layers are updated together coherently: the new root endpoint, the alias, the dual-audience token acceptance, and the path-scoped 401 challenges all line up. Route ordering in Starlette correctly places specific well-known paths before the catch-all No files require special attention. Important Files Changed
Reviews (1): Last reviewed commit: "(feat): make the root URL the primary MC..." | Re-trigger Greptile |
Problem
The hosted Appwrite MCP server is currently configured and documented at
https://mcp.appwrite.io/mcp. We want the shorter origin URL,https://mcp.appwrite.io/, to be the primary endpoint while still supporting the conventional/mcppath.Change
/and/mcpwithout redirects.OAuth behavior
The root and
/mcpURLs each return a 401 challenge pointing to metadata whoseresourceexactly matches the requested endpoint:/→/.well-known/oauth-protected-resource/mcp→/.well-known/oauth-protected-resource/mcpBoth resource audiences identify the same hosted service and are accepted by the shared token verifier.
Verification