René's URL Explorer Experiment


Title: SEP: Namespaces using URIs · Issue #1292 · modelcontextprotocol/modelcontextprotocol · GitHub

Open Graph Title: SEP: Namespaces using URIs · Issue #1292 · modelcontextprotocol/modelcontextprotocol

X Title: SEP: Namespaces using URIs · Issue #1292 · modelcontextprotocol/modelcontextprotocol

Description: SEP: Namespaces using URIs Preamble Title: Namespaces using URIs Author: Tapan Chugh (@chughtapan); Huge acknowledgements to everyone from #334 Type: Standards Track Status: Proposal Created: 2025-08-02 Abstract Managing a large number o...

Open Graph Description: SEP: Namespaces using URIs Preamble Title: Namespaces using URIs Author: Tapan Chugh (@chughtapan); Huge acknowledgements to everyone from #334 Type: Standards Track Status: Proposal Created: 2025-...

X Description: SEP: Namespaces using URIs Preamble Title: Namespaces using URIs Author: Tapan Chugh (@chughtapan); Huge acknowledgements to everyone from #334 Type: Standards Track Status: Proposal Created: 2025-...

Opengraph URL: https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1292

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SEP: Namespaces using URIs","articleBody":"# SEP: Namespaces using URIs\n\n## Preamble\n\n**Title:** Namespaces using URIs  \n**Author:** Tapan Chugh (@chughtapan); Huge acknowledgements to everyone from #334  \n**Type:** Standards Track  \n**Status:** Proposal  \n**Created:** 2025-08-02  \n\n## Abstract\n\nManaging a large number of tools and resources at scale is a problem that several in the MCP community have recently experienced and attempted to mitigate. While the namespaces proposal (#334) attempted to solve the problem, the maintainers' recommendation was that URIs are better suited for hierarchical aggregation.\n\nThis SEP provides that feature using two key contributions:\n1. Adding URIs for resources/tools in addition to prompts\n2. Adding URI-prefix based filtering to all list methods\n\nReference Implementation: https://github.com/modelcontextprotocol/python-sdk/pull/1230\n\n## Motivation\n\nThere are several key motivations for adding hierarchical addressing and filtering for MCP types:\n\n**Tool Explosion**: More tools than the model can handle (hard limits)\n- Servers exposing 100s of tools overwhelm LLM context windows\n- No standard way to organize or filter tools by purpose\n\n**Context Degradation**: Tool count within limits but causes issues anyway\n- Every tool in context reduces available tokens for actual work\n- Models struggle to select among many similar tools\n\n**Name Conflicts**: Different servers have identical names\n- Common names like `search`, `read`, `list` cause collisions\n- Current prefixing workarounds (`github_search`) don't scale\n\nPlease see #334 for a more detailed discussion. There are also several related questions and proposals from the community (see: #1280, #1275, #204, #1279) and several others. The original namespaces proposal was rejected with a recommendation that URIs are the preferred approach for handling hierarchies. This SEP offers that implementation.\n\n## Specification\n\nThe specification changes are:\n\n1. All MCP server capabilities (resources, tools, prompts) have URI fields. The `mcp://` prefix is reserved for the protocol's internal usage and cannot be used by resources. URIs are optional for tools and prompts but will be auto-generated.\n\n2. URI-prefix based filtering is added as an optional capability for all list methods (`list_tools`, `list_resources`, etc.) in addition to existing pagination implementation.\n\n### Type Changes\n\n```python\nclass Tool:\n    name: str  # from BaseMetadata\n    uri: AnyUrl  # NEW: required but auto-generated as mcp://tools/{name}\n```\n\n```python\nclass Prompt:\n    name: str  # from BaseMetadata\n    uri: AnyUrl  # NEW: required but auto-generated as mcp://prompts/{name}\n```\n\n```python\nclass Resource(BaseMetadata):\n    name: str  # from BaseMetadata\n    uri: AnyUrl  # already exists\n\n# NEW: Added validator to prevent resources using mcp://\n@model_validator(mode=\"after\")\ndef validate_uri_scheme(self) -\u003e \"Resource\":\n    # Prevent resources from using mcp://\n```\n\n### Request Changes\n\n```python\n# Before\nclass PaginatedRequestParams(RequestParams):\n    cursor: Cursor | None = None\n\nclass PaginatedRequest(Request[PaginatedRequestParams | None, MethodT])\nclass PaginatedResult(Result)\n```\n\n```python\n# After\nclass ListFilters(BaseModel):\n    uri_paths: list[AnyUrl] | None = None  # Filter by multiple URI prefixes\n\nclass ListRequestParams(RequestParams):\n    filters: ListFilters | None = None\n    cursor: Cursor | None = None\n```\n\nThis enables queries like:\n- List all math tools: `filters: { uri_paths: [\"mcp://tools/math/\"] }`\n- List multiple groups: `filters: { uri_paths: [\"mcp://tools/math/\", \"mcp://tools/string/\"] }`\n\nAll list requests now support prefix filtering:\n- `ListResourcesRequest`\n- `ListToolsRequest`\n- `ListPromptsRequest`\n- `ListResourceTemplatesRequest`\n\n### Group Discovery\n\nThis SEP proposes the use of standard URIs for discovering available groups:\n\n```\nmcp://groups/tools      # Returns available tool groups\nmcp://groups/prompts    # Returns available prompt groups\nmcp://groups/resources  # Returns available resource groups\n```\n\nThese URIs can be further organized into directories/pages as server requirements scale.\n\n## Rationale\n\n- The choice of URIs for tools and prompts is pragmatic: it allows clients and users to only learn and navigate a single type of hierarchy, and not add additional overhead with new concepts.\n- For dealing with challenges like tool name clashes (e.g., adding proxies) URIs solve the issue trivially. For dealing with scale, hierarchical aggregation and filtering presents an initial choice. Other concepts (e.g., groups, toolsets) are implementable on top of this and helpful for deterministic search.\n- This SEP does not dictate how LLMs should discover tools automatically. While hierarchies are helpful, #322 and the broader search tools discussion is more appropriate there.\n\n### Design Decisions\n\n1. **URI Scheme**: Using `mcp://` prevents conflicts with HTTP/file URLs\n2. **Auto-generation**: Tools and prompts get automatic URIs from names for backward compatibility\n3. **Resources require explicit URIs**: Prevents accidental namespace pollution\n4. **Multiple path filters**: More flexible than single prefix, enables cross-group queries\n5. **Backward compatible**: Name-based lookups continue to work\n\n### Design Alternatives\n\nWhile adding URI fields directly into Tool and Prompt classes leads to some duplication:\n1. Moving URIs directly into BaseMetadata would require making URIs optional, since other classes also inherit from BaseMetadata. Current choice keeps it required at the protocol layer.\n2. Creating a new base class with URI just for the target classes might be better in the long term for adding new capabilities, but not considered to keep this SEP more contained.\n\n### Comparison with Issue #1300 (Groups and Tags)\n\n[Issue #1300](https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1300) proposes a different approach to the same problem:\n\n| **Aspect** | **This Proposal (URIs)** | **Issue #1300 (Groups/Tags)** |\n|------------|--------------------------|------------------------------|\n| Approach | Hierarchical URIs | Flat groups + tags |\n| Scalability | Arbitrary hierarchy depth | Two-level hierarchy (groups / tools) |\n| Filtering | URI path prefixes | Group/tag membership |\n| Conflicts | Prevented by URI uniqueness | Still possible within groups |\n\nKey differences:\n- **Hierarchical vs Flat**: URIs provide unlimited hierarchy; groups/tags are essentially flat\n- **Consistency**: URIs unify tools, prompts, and resources; groups/tags only proposed for tools\n- **Identity vs Metadata**: URIs are part of identity; groups/tags are separate metadata.\n\nTags are complementary to URIs filters and could provide cross-cutting concerns (e.g., `#experimental`, `#deprecated`).\n\n### Prior Art and References\n\n- **DNS/Internet Naming**: Hierarchical system that enabled internet scale\n- **REST API Design**: Hierarchical paths for intuitive navigation\n- **Kubernetes**: API groups and namespaces organize resources\n\n\n## Backward Compatibility\n\nThese changes are fully backward compatible for client code. Although URIs for prompts and tools are now required, SDKs can automatically generate these using names. Existing name-based lookups continue to work without changes.\n\n## Reference Implementation\n\n**Python SDK**: https://github.com/modelcontextprotocol/python-sdk/pull/1230\n- Complete implementation with tests\n- Hierarchical organization example\n- URI validation and filtering\n\n**TypeScript SDK**: Implementation in progress\n\n## Example Usage\n\n### Server Implementation\n\n```python\n@mcp.tool(uri=\"mcp://tools/math/add\")\ndef add(a: float, b: float) -\u003e float:\n    \"\"\"Add two numbers.\"\"\"\n    return a + b\n\n@mcp.tool(uri=\"mcp://tools/string/reverse\")\ndef reverse(text: str) -\u003e str:\n    \"\"\"Reverse a string.\"\"\"\n    return text[::-1]\n```\n\n### Group Discovery Resource\n\n```python\n@mcp.resource(\"mcp://groups/tools\")\ndef get_tool_groups() -\u003e str:\n    return json.dumps({\n        \"groups\": [\n            {\"name\": \"math\", \"uri_paths\": [\"mcp://tools/math/\"]},\n            {\"name\": \"string\", \"uri_paths\": [\"mcp://tools/string/\"]}\n        ]\n    })\n```\n\n### Client Usage\n\n```python\n# List math tools only\ntools = await client.list_tools(\n    filters={\"uri_paths\": [\"mcp://tools/math/\"]}\n)\n\n# Call by name (backward compatible)\nresult = await client.call_tool(\"add\", {\"a\": 5, \"b\": 3})\n\n# Call by URI (explicit namespace)\nresult = await client.call_tool(\"mcp://tools/math/add\", {\"a\": 5, \"b\": 3})\n```\n\n## Security Implications\n\nNone identified. The `mcp://` scheme will be reserved for protocol use, preventing confusion for users.\n\n## Future Extensions\n\nThis URI foundation enables:\n- **Versioning**: `mcp://tools/math/add/v2`\n- **Permissions**: ACLs based on URI paths\n- **Federation**: Cross-server references\n- **Additional Filters**: Orthogonal categorization","author":{"url":"https://github.com/chughtapan","@type":"Person","name":"chughtapan"},"datePublished":"2025-08-03T00:57:43.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":6},"url":"https://github.com/1292/modelcontextprotocol/issues/1292"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:af26e86e-ff1f-5445-e2c2-f48e9d23f9ec
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idB676:141347:1EBDF18:28FBC22:6A5BD41A
html-safe-nonce3809215d864f3a983024b284d8b316e8c74c1cac38f85bac9aff45695993c511
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNjc2OjE0MTM0NzoxRUJERjE4OjI4RkJDMjI6NkE1QkQ0MUEiLCJ2aXNpdG9yX2lkIjoiMTc0NTU1MDcwNjAzMDEzODM5NCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacef37ee702de2c8f8b20847f115eb0402bce54425638cfaf24b3f906ff1306a2d
hovercard-subject-tagissue:3286557719
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/modelcontextprotocol/1292/issue_layout
twitter:imagehttps://opengraph.githubassets.com/b95875e086ae0f2c1064d7e562f70b1197dc39201e6e6cc0d06452c085d01fad/modelcontextprotocol/modelcontextprotocol/issues/1292
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/b95875e086ae0f2c1064d7e562f70b1197dc39201e6e6cc0d06452c085d01fad/modelcontextprotocol/modelcontextprotocol/issues/1292
og:image:altSEP: Namespaces using URIs Preamble Title: Namespaces using URIs Author: Tapan Chugh (@chughtapan); Huge acknowledgements to everyone from #334 Type: Standards Track Status: Proposal Created: 2025-...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamechughtapan
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
go-importgithub.com/modelcontextprotocol/modelcontextprotocol git https://github.com/modelcontextprotocol/modelcontextprotocol.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862570523
octolytics-dimension-repository_nwomodelcontextprotocol/modelcontextprotocol
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862570523
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/modelcontextprotocol
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release9c975978430e9ad293956f2bbdaf153b1bd84a99
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1292#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fmodelcontextprotocol%2Fissues%2F1292
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fmodelcontextprotocol%2Fissues%2F1292
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=modelcontextprotocol%2Fmodelcontextprotocol
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1292
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1292
Reloadhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1292
Please reload this pagehttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1292
modelcontextprotocol https://github.com/modelcontextprotocol
modelcontextprotocolhttps://github.com/modelcontextprotocol/modelcontextprotocol
Notifications https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Fork 1.7k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Star 8.6k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fmodelcontextprotocol
Code https://github.com/modelcontextprotocol/modelcontextprotocol
Issues 113 https://github.com/modelcontextprotocol/modelcontextprotocol/issues
Pull requests 80 https://github.com/modelcontextprotocol/modelcontextprotocol/pulls
Discussions https://github.com/modelcontextprotocol/modelcontextprotocol/discussions
Actions https://github.com/modelcontextprotocol/modelcontextprotocol/actions
Projects https://github.com/modelcontextprotocol/modelcontextprotocol/projects
Models https://github.com/modelcontextprotocol/modelcontextprotocol/models
Security and quality 0 https://github.com/modelcontextprotocol/modelcontextprotocol/security
Insights https://github.com/modelcontextprotocol/modelcontextprotocol/pulse
Code https://github.com/modelcontextprotocol/modelcontextprotocol
Issues https://github.com/modelcontextprotocol/modelcontextprotocol/issues
Pull requests https://github.com/modelcontextprotocol/modelcontextprotocol/pulls
Discussions https://github.com/modelcontextprotocol/modelcontextprotocol/discussions
Actions https://github.com/modelcontextprotocol/modelcontextprotocol/actions
Projects https://github.com/modelcontextprotocol/modelcontextprotocol/projects
Models https://github.com/modelcontextprotocol/modelcontextprotocol/models
Security and quality https://github.com/modelcontextprotocol/modelcontextprotocol/security
Insights https://github.com/modelcontextprotocol/modelcontextprotocol/pulse
SEP: Namespaces using URIshttps://github.com/modelcontextprotocol/modelcontextprotocol/issues/1292#top
SEPhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22SEP%22
enhancementNew feature or requesthttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22enhancement%22
proposalSEP proposal without a sponsor.https://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22proposal%22
https://github.com/chughtapan
chughtapanhttps://github.com/chughtapan
on Aug 3, 2025https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1292#issue-3286557719
@chughtapanhttps://github.com/chughtapan
#334https://github.com/modelcontextprotocol/modelcontextprotocol/pull/334
#334https://github.com/modelcontextprotocol/modelcontextprotocol/pull/334
modelcontextprotocol/python-sdk#1230https://github.com/modelcontextprotocol/python-sdk/pull/1230
#334https://github.com/modelcontextprotocol/modelcontextprotocol/pull/334
#1280https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1280
#1275https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1275
#204https://github.com/modelcontextprotocol/modelcontextprotocol/issues/204
#1279https://github.com/modelcontextprotocol/modelcontextprotocol/pull/1279
[RFC] Search #322https://github.com/modelcontextprotocol/modelcontextprotocol/pull/322
#1300https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1300
Issue #1300https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1300
#1300https://github.com/modelcontextprotocol/modelcontextprotocol/issues/1300
modelcontextprotocol/python-sdk#1230https://github.com/modelcontextprotocol/python-sdk/pull/1230
SEPhttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22SEP%22
enhancementNew feature or requesthttps://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22enhancement%22
proposalSEP proposal without a sponsor.https://github.com/modelcontextprotocol/modelcontextprotocol/issues?q=state%3Aopen%20label%3A%22proposal%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.