René's URL Explorer Experiment


Title: fix: allow opting out of Mcp-Param-* validation (avoids a full tools/list per tools/call) by KaiyiQuan · Pull Request #3599 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: fix: allow opting out of Mcp-Param-* validation (avoids a full tools/list per tools/call) by KaiyiQuan · Pull Request #3599 · modelcontextprotocol/python-sdk

X Title: fix: allow opting out of Mcp-Param-* validation (avoids a full tools/list per tools/call) by KaiyiQuan · Pull Request #3599 · modelcontextprotocol/python-sdk

Description: Fixes #3565. Problem On the 2026-07-28 HTTP path, every tools/call with arguments runs the server's full tools/list handler before dispatch (_mcp_param_rejection → _tool_input_schema) to resolve the called tool's inputSchema for Mcp-Param-* header validation. There is no way to opt out, and it runs even when no tool declares x-mcp-header. For a server whose tools/list is expensive — e.g. a gateway aggregating several backend MCP servers where listing fans out per-user credentials — this is a large per-call cost on every single tools/call. Change Add an explicit opt-out on the lowlevel Server: Server(..., mcp_param_validation=False, ...) When False, the schema-resolving tools/list walk is skipped entirely and tools/call dispatches directly. Default remains True, so every existing Mcp-Param-* validation behavior is unchanged (missing-header rejection, mismatch rejection, orphan/duplicate header rejection all still fire). The McpServer wrapper delegates to the same app, so the flag is honored there too. Tests test_modern_tools_call_skips_tools_list_when_mcp_param_validation_opted_out: with the flag off, an argument-bearing tools/call returns 200 and the tools/list handler is never invoked (list_calls == 0). test_modern_tools_call_runs_tools_list_by_default_for_validation: with the flag on (default), the missing-header rejection for an annotated argument still returns 400 HEADER_MISMATCH. Full suite: 5893 passed.

Open Graph Description: Fixes #3565. Problem On the 2026-07-28 HTTP path, every tools/call with arguments runs the server's full tools/list handler before dispatch (_mcp_param_rejection → _tool_input_schema) to resolv...

X Description: Fixes #3565. Problem On the 2026-07-28 HTTP path, every tools/call with arguments runs the server's full tools/list handler before dispatch (_mcp_param_rejection → _tool_input_schema) to re...

Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/3599

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:369aa407-3a84-16ad-56cd-a93f0ea8019e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB928:2BE220:17F6E47:2000324:6B01492D
html-safe-nonceadecd056fb117430d2b803a2bd5f0b6497ab49351daf5a7d89d543a03b85513f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCOTI4OjJCRTIyMDoxN0Y2RTQ3OjIwMDAzMjQ6NkIwMTQ5MkQiLCJ2aXNpdG9yX2lkIjoiNzQ0MDU0OTY5MzA4NjI5MjkzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1421ee14ae68fe746b43ed9b311b44f1f20aaf9721669c744d391e7cae21c454
hovercard-subject-tagpull_request:4691409694
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/3599/files
twitter:imagehttps://avatars.githubusercontent.com/u/156817180?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/156817180?s=400&v=4
og:image:altFixes #3565. Problem On the 2026-07-28 HTTP path, every tools/call with arguments runs the server's full tools/list handler before dispatch (_mcp_param_rejection → _tool_input_schema) to resolv...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonecc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862584018
octolytics-dimension-repository_nwomodelcontextprotocol/python-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862584018
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/python-sdk
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release8c77c9e8439031ad54c75a250694842892f693e1
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/pull/3599/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F3599%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
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
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://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
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fpull%2F3599%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3599/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3599/files
Reloadhttps://github.com/modelcontextprotocol/python-sdk/pull/3599/files
modelcontextprotocolhttps://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Codehttps://github.com/modelcontextprotocol/python-sdk
Issues315 (315)https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests112 (112)https://github.com/modelcontextprotocol/python-sdk/pulls
Actionshttps://github.com/modelcontextprotocol/python-sdk/actions
Projectshttps://github.com/modelcontextprotocol/python-sdk/projects
Security and quality12 (12)https://github.com/modelcontextprotocol/python-sdk/security
Insightshttps://github.com/modelcontextprotocol/python-sdk/insights
Sign up for GitHub https://github.com/signup?return_to=%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2Fnew%2Fchoose
KaiyiQuanhttps://github.com/KaiyiQuan
modelcontextprotocol:mainhttps://github.com/modelcontextprotocol/python-sdk/tree/main
KaiyiQuan:fix/3565-mcp-param-validation-optouthttps://github.com/KaiyiQuan/python-sdk/tree/fix/3565-mcp-param-validation-optout
Conversation 2 https://github.com/modelcontextprotocol/python-sdk/pull/3599
Commits 1 https://github.com/modelcontextprotocol/python-sdk/pull/3599/commits
Checks 30 https://github.com/modelcontextprotocol/python-sdk/pull/3599/checks
Files changed https://github.com/modelcontextprotocol/python-sdk/pull/3599/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3599/files
fix: allow opting out of Mcp-Param-* validation (avoids a full tools/list per tools/call) https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#top
Show all changes 1 commit https://github.com/modelcontextprotocol/python-sdk/pull/3599/files
91eb1b4 fix: allow opting out of Mcp-Param-* validation KaiyiQuan Sep 30, 2026 https://github.com/modelcontextprotocol/python-sdk/pull/3599/commits/91eb1b485e6f825e2c7da85a757056b251db9bf0
Clear filters https://github.com/modelcontextprotocol/python-sdk/pull/3599/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3599/files
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3599/files
_streamable_http_modern.py https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-c5e06136c127a1503b8eab18375355c38ceb7e71b5a1c04b36ebf2fbc3d9067d
server.py https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
test_streamable_http_modern.py https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-1e3c8aa3513b03c2ac6b7534d2b3a45dcbf59ef32f158028e9cc2fff0760893f
src/mcp/server/_streamable_http_modern.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-c5e06136c127a1503b8eab18375355c38ceb7e71b5a1c04b36ebf2fbc3d9067d
View file https://github.com/KaiyiQuan/python-sdk/blob/91eb1b485e6f825e2c7da85a757056b251db9bf0/src/mcp/server/_streamable_http_modern.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3599/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-c5e06136c127a1503b8eab18375355c38ceb7e71b5a1c04b36ebf2fbc3d9067d
https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-c5e06136c127a1503b8eab18375355c38ceb7e71b5a1c04b36ebf2fbc3d9067d
src/mcp/server/lowlevel/server.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
View file https://github.com/KaiyiQuan/python-sdk/blob/91eb1b485e6f825e2c7da85a757056b251db9bf0/src/mcp/server/lowlevel/server.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3599/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-b21bf5e21c058ccfddb404c209f2d4288e4f32b121111ffc9d466638631d13e4
tests/server/test_streamable_http_modern.pyhttps://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-1e3c8aa3513b03c2ac6b7534d2b3a45dcbf59ef32f158028e9cc2fff0760893f
View file https://github.com/KaiyiQuan/python-sdk/blob/91eb1b485e6f825e2c7da85a757056b251db9bf0/tests/server/test_streamable_http_modern.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/modelcontextprotocol/python-sdk/pull/3599/{{ revealButtonHref }}
https://github.com/modelcontextprotocol/python-sdk/pull/3599/files#diff-1e3c8aa3513b03c2ac6b7534d2b3a45dcbf59ef32f158028e9cc2fff0760893f
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/pull/3599/files
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.