SEP-2166: Out-of-Band Resource Access via HTTPS URLs#2166
Open
abrookins wants to merge 2 commits intomodelcontextprotocol:mainfrom
Open
SEP-2166: Out-of-Band Resource Access via HTTPS URLs#2166abrookins wants to merge 2 commits intomodelcontextprotocol:mainfrom
abrookins wants to merge 2 commits intomodelcontextprotocol:mainfrom
Conversation
Contributor
|
FYI @SamMorrowDrums since this touches on your past feedback. |
Proposes adding optional httpUrl and httpUrlExpiresAt fields to the Resource interface, enabling MCP servers to provide direct HTTPS access URLs alongside the canonical MCP resource URI. This allows resources to be accessed both through MCP (via resources/read) and directly via HTTPS by processes that may not have an authenticated MCP client connection, such as code executing in sandboxed environments.
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.
Proposes adding optional
httpUrlandhttpUrlExpiresAtfields to the Resource interface, enabling MCP servers to provide direct HTTPS access URLs alongside the canonical MCP resource URI.This allows resources to be accessed both through MCP (via
resources/read) and directly via HTTPS by processes that may not have an authenticated MCP client connection, such as code executing in sandboxed environments.Motivation and Context
Large tool outputs create context overhead when passed through LLM conversations. While Anthropic's "Code Execution with MCP" pattern allows agents to reduce this overhead by executing code that calls MCP tools directly, this requires the execution environment to have an authenticated MCP client connection, which sandboxes and subprocesses may lack.
This proposal enables servers to provide HTTPS URLs that any HTTP client can fetch, bridging the gap between MCP-connected contexts and disconnected execution environments.
Related discussions:
Resource.uriScopeto enable direct reads #607: Resource.uriScope (closed — needs SEP)How Has This Been Tested?
easy-mcp-proxy implements this pattern using a custom response format. The proxy caches large tool outputs, generates signed HTTPS URLs with expiration, and returns preview text plus retrieval URLs to clients. The pattern works well used with Claude Desktop (using the "All domains" allow list for sandbox access) and coding agents such as Augment Code. If this SEP is accepted, easy-mcp-proxy would be updated to use the standardized fields.
Breaking Changes
None. Both fields are optional additions to the existing
Resourceinterface.Types of changes
Checklist
AI Disclosure
This SEP was drafted with AI assistance (Augment Code). The problem definition, use cases, and technical approach were developed collaboratively with the author providing direction and review.