Repository navigation
Add Model Context Protocol detectable by HTTP headers - #537
Open
cristianovisk wants to merge 1 commit into
Open
cristianovisk wants to merge 1 commit into
cristianovisk wants to merge 1 commit into
Conversation
Signals defined by the MCP specification and seen on public remote MCP servers (GET on the endpoint, no client): - WWW-Authenticate resource_metadata pointing at /.well-known/oauth-protected-resource/mcp (MCP authorization spec, RFC 9728 path-suffixed form for the /mcp resource) - Mcp-Session-Id, MCP-Protocol-Version in CORS allow/expose headers - Mcp-Session-Id response header (streamable HTTP transport) - ReadMe-hosted MCP servers' plain-text reply to non-MCP clients The root-form resource_metadata (no /mcp suffix) is left out because it is generic RFC 9728 and not specific to MCP. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RxeXL9qpfwePxHkfXFEssF
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds Model Context Protocol (cat 112 Artificial Intelligence,
oss): https://modelcontextprotocol.ioMCP is an open protocol that connects AI applications to external tools and data sources. A remote MCP server exposes an HTTP endpoint, usually
/mcp. A plain GET on that endpoint, without an MCP client, already returns signals defined by the MCP specification.Patterns and sources
headers.WWW-Authenticateresource_metadata="…/.well-known/oauth-protected-resource/mcp/?"WWW-Authenticatepointing at its RFC 9728 Protected Resource Metadata. The/mcppath suffix is the MCP resource.headers.Access-Control-Allow-Headers/Access-Control-Expose-Headers\bmcp-(?:session-id|protocol-version)\bMcp-Session-IdandMCP-Protocol-Versionare header names defined by the MCP spec, Transportsheaders.Mcp-Session-Idtext^This URL can only be accessed with a MCP client\.$The two pattern warnings from
pr_validator(no domain or brand name) are expected. A protocol has no vendor domain, so every pattern is anchored to an identifier from the MCP spec or to the exact full-body message instead:resource_metadatapattern requires the/mcpresource suffix. The root form (/.well-known/oauth-protected-resourcealone) is generic RFC 9728 and was deliberately left out.Sites using it (GET on the MCP endpoint)
Out of 32 public MCP endpoints probed, 20 match. The rest only expose generic signals, such as root-form
resource_metadataor a bare JSON-RPC 405, which were left out on purpose.False-positive check: OAuth-protected APIs that are not MCP match nothing: api.github.com, graph.microsoft.com, api.stripe.com, www.googleapis.com, api.linear.app, api.notion.com, slack.com/api, api.atlassian.com.
Other
python3 scripts/check.pypasses (0 errors, 2 warnings explained above).🤖 Generated with Claude Code
https://claude.ai/code/session_01RxeXL9qpfwePxHkfXFEssF