René's URL Explorer Experiment


Title: Stateless server handler throws exception instead of returning JSON-RPC -32601 (Method not found) for not registered capabilities · Issue #784 · modelcontextprotocol/java-sdk · GitHub

Open Graph Title: Stateless server handler throws exception instead of returning JSON-RPC -32601 (Method not found) for not registered capabilities · Issue #784 · modelcontextprotocol/java-sdk

X Title: Stateless server handler throws exception instead of returning JSON-RPC -32601 (Method not found) for not registered capabilities · Issue #784 · modelcontextprotocol/java-sdk

Description: Bug description In the stateless server path (DefaultMcpStatelessServerHandler), when a request is received for a method that does not have a registered handler, the server currently throws an McpError exception instead of returning a JS...

Open Graph Description: Bug description In the stateless server path (DefaultMcpStatelessServerHandler), when a request is received for a method that does not have a registered handler, the server currently throws an McpE...

X Description: Bug description In the stateless server path (DefaultMcpStatelessServerHandler), when a request is received for a method that does not have a registered handler, the server currently throws an McpE...

Opengraph URL: https://github.com/modelcontextprotocol/java-sdk/issues/784

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Stateless server handler throws exception instead of returning JSON-RPC -32601 (Method not found) for not registered capabilities","articleBody":"**Bug description**\nIn the stateless server path (`DefaultMcpStatelessServerHandler`), when a request is received for a method that does not have a registered handler, the server currently throws an `McpError` exception  instead of returning a JSON-RPC response with an error code. This is inconsistent with the stateful/session server implementations (`McpServerSession`, etc.), which respond with the standard JSON-RPC error -32601 (Method not found).\n\n**Environment**\nModelContextProtocol Java SDK, stateless/server mode.\n\n**Steps to reproduce**\n1. Start a stateless MCP server instance (e.g., without advertising or registering a resources or prompts capability).\n2. Send a request with method: \"resources/list\" (or another method for which the handler is not registered).\n3. Exception is thrown instead of returning a JSON-RPC response with a \"Method not found\" error\n\n**Expected behavior**\nStateless server should respond to any unknown/unregistered method with the standard JSON-RPC -32601 \"Method not found\" error, to be consistent with other server implementations in the SDK and with JSON-RPC specification.\n\n**Minimal Complete Reproducible example**\n\nMinimal Spring AI reproducer:\n\n```java\npackage com.example.demo;\n\nimport org.springaicommunity.mcp.annotation.McpTool;\nimport org.springaicommunity.mcp.annotation.McpToolParam;\nimport org.springframework.boot.SpringApplication;\nimport org.springframework.boot.autoconfigure.SpringBootApplication;\nimport org.springframework.stereotype.Component;\n\n@SpringBootApplication\npublic class DemoApplication {\n\n    public static void main(String[] args) {\n        SpringApplication.run(DemoApplication.class, args);\n    }\n\n    @Component\n    public static class DemoTools {\n\n        @McpTool\n        public String hello(@McpToolParam String name) {\n            return \"Hello, \" + name;\n        }\n\n    }\n}\n\n```\n\n```yaml\nspring:\n  ai:\n    mcp:\n      server:\n        enabled: true\n        type: sync\n        protocol: stateless\n        annotation-scanner:\n          enabled: true\n        streamable-http:\n          mcp-endpoint: /mcp\n        capabilities:\n          completion: false\n          prompt: false\n          resource: false\n          tool: true\n```\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cproject xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd\"\u003e\n    \u003cmodelVersion\u003e4.0.0\u003c/modelVersion\u003e\n    \u003cparent\u003e\n        \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n        \u003cartifactId\u003espring-boot-starter-parent\u003c/artifactId\u003e\n        \u003cversion\u003e4.0.2\u003c/version\u003e\n        \u003crelativePath/\u003e \u003c!-- lookup parent from repository --\u003e\n    \u003c/parent\u003e\n\n    \u003cgroupId\u003ecom.example\u003c/groupId\u003e\n    \u003cartifactId\u003edemo\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.1-SNAPSHOT\u003c/version\u003e\n    \u003cname\u003edemo\u003c/name\u003e\n    \u003cdescription\u003eDemo project for Spring Boot\u003c/description\u003e\n\n    \u003cproperties\u003e\n        \u003cjava.version\u003e21\u003c/java.version\u003e\n        \u003cspring-ai.version\u003e2.0.0-M2\u003c/spring-ai.version\u003e\n    \u003c/properties\u003e\n\n    \u003cdependencyManagement\u003e\n        \u003cdependencies\u003e\n            \u003cdependency\u003e\n                \u003cgroupId\u003eorg.springframework.ai\u003c/groupId\u003e\n                \u003cartifactId\u003espring-ai-bom\u003c/artifactId\u003e\n                \u003cversion\u003e${spring-ai.version}\u003c/version\u003e\n                \u003ctype\u003epom\u003c/type\u003e\n                \u003cscope\u003eimport\u003c/scope\u003e\n            \u003c/dependency\u003e\n            \u003cdependency\u003e\n                \u003cgroupId\u003eio.modelcontextprotocol.sdk\u003c/groupId\u003e\n                \u003cartifactId\u003emcp-bom\u003c/artifactId\u003e\n                \u003cversion\u003e0.17.2\u003c/version\u003e\n                \u003ctype\u003epom\u003c/type\u003e\n                \u003cscope\u003eimport\u003c/scope\u003e\n            \u003c/dependency\u003e\n        \u003c/dependencies\u003e\n    \u003c/dependencyManagement\u003e\n\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.springframework.ai\u003c/groupId\u003e\n            \u003cartifactId\u003espring-ai-starter-mcp-server\u003c/artifactId\u003e\n        \u003c/dependency\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.springframework.ai\u003c/groupId\u003e\n            \u003cartifactId\u003espring-ai-starter-mcp-server-webmvc\u003c/artifactId\u003e\n        \u003c/dependency\u003e\n\n        \u003cdependency\u003e\n            \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n            \u003cartifactId\u003espring-boot-starter-test\u003c/artifactId\u003e\n            \u003cscope\u003etest\u003c/scope\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n\n    \u003cbuild\u003e\n        \u003cplugins\u003e\n            \u003cplugin\u003e\n                \u003cgroupId\u003eorg.springframework.boot\u003c/groupId\u003e\n                \u003cartifactId\u003espring-boot-maven-plugin\u003c/artifactId\u003e\n            \u003c/plugin\u003e\n        \u003c/plugins\u003e\n    \u003c/build\u003e\n\u003c/project\u003e\n```\n\nRunning a `resources/list` command against this server returns a JSON stack trace instead of a JSON-RPC response:\n\n```\n$ curl -H \"Accept: application/json, text/event-stream\" -H \"Content-Type: application/json\" -X POST http://localhost:8080/mcp -d '{\"jsonrpc\": \"2.0\", \"method\": \"resources/list\", \"id\": 1}' | jq\n{\n  \"cause\": null,\n  \"jsonRpcError\": null,\n  \"localizedMessage\": \"Failed to handle request: Missing handler for request type: resources/list\",\n  \"message\": \"Failed to handle request: Missing handler for request type: resources/list\",\n  \"stackTrace\": [\n    {\n      \"classLoaderName\": \"app\",\n      \"className\": \"io.modelcontextprotocol.server.transport.WebMvcStatelessServerTransport\",\n      \"fileName\": \"WebMvcStatelessServerTransport.java\",\n      \"lineNumber\": 126,\n      \"methodName\": \"handlePost\",\n      \"moduleName\": null,\n      \"moduleVersion\": null,\n      \"nativeMethod\": false\n    },\n    {\n      \"classLoaderName\": \"app\",\n      \"className\": \"org.springframework.web.servlet.function.support.HandlerFunctionAdapter\",\n      \"fileName\": \"HandlerFunctionAdapter.java\",\n      // ...\n    },\n    // ...\n  ],\n  \"suppressed\": []\n}\n```","author":{"url":"https://github.com/maff","@type":"Person","name":"maff"},"datePublished":"2026-02-12T20:04:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":4},"url":"https://github.com/784/java-sdk/issues/784"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b3840dc0-7314-6e7a-f616-413f9d1d8a91
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC13E:13C9B5:9A262E:CD66FF:6A5B5A62
html-safe-nonced14189ca3e0614303dfabe701cda49e070df3a281c0c69cc5cd5f340e429441e
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMTNFOjEzQzlCNTo5QTI2MkU6Q0Q2NkZGOjZBNUI1QTYyIiwidmlzaXRvcl9pZCI6IjEzNDgxNTM2OTAxMjIwNTAxNDYiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac19b8c175d31f6359c095dce8e235ebdf657941d606cec99af6b67621e5ee66be
hovercard-subject-tagissue:3933758233
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/java-sdk/784/issue_layout
twitter:imagehttps://opengraph.githubassets.com/c2581cdc6e054183a96c2ca21b39ad528afc941781a64fa1b91dbc75b9bc5e4e/modelcontextprotocol/java-sdk/issues/784
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/c2581cdc6e054183a96c2ca21b39ad528afc941781a64fa1b91dbc75b9bc5e4e/modelcontextprotocol/java-sdk/issues/784
og:image:altBug description In the stateless server path (DefaultMcpStatelessServerHandler), when a request is received for a method that does not have a registered handler, the server currently throws an McpE...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamemaff
hostnamegithub.com
expected-hostnamegithub.com
None5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b
turbo-cache-controlno-preview
go-importgithub.com/modelcontextprotocol/java-sdk git https://github.com/modelcontextprotocol/java-sdk.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id919609219
octolytics-dimension-repository_nwomodelcontextprotocol/java-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id919609219
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/java-sdk
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/java-sdk/issues/784#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fjava-sdk%2Fissues%2F784
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%2Fjava-sdk%2Fissues%2F784
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%2Fjava-sdk
Reloadhttps://github.com/modelcontextprotocol/java-sdk/issues/784
Reloadhttps://github.com/modelcontextprotocol/java-sdk/issues/784
Reloadhttps://github.com/modelcontextprotocol/java-sdk/issues/784
Please reload this pagehttps://github.com/modelcontextprotocol/java-sdk/issues/784
modelcontextprotocol https://github.com/modelcontextprotocol
java-sdkhttps://github.com/modelcontextprotocol/java-sdk
Notifications https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fjava-sdk
Fork 978 https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fjava-sdk
Star 3.6k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fjava-sdk
Code https://github.com/modelcontextprotocol/java-sdk
Issues 133 https://github.com/modelcontextprotocol/java-sdk/issues
Pull requests 147 https://github.com/modelcontextprotocol/java-sdk/pulls
Discussions https://github.com/modelcontextprotocol/java-sdk/discussions
Actions https://github.com/modelcontextprotocol/java-sdk/actions
Projects https://github.com/modelcontextprotocol/java-sdk/projects
Models https://github.com/modelcontextprotocol/java-sdk/models
Security and quality 2 https://github.com/modelcontextprotocol/java-sdk/security
Insights https://github.com/modelcontextprotocol/java-sdk/pulse
Code https://github.com/modelcontextprotocol/java-sdk
Issues https://github.com/modelcontextprotocol/java-sdk/issues
Pull requests https://github.com/modelcontextprotocol/java-sdk/pulls
Discussions https://github.com/modelcontextprotocol/java-sdk/discussions
Actions https://github.com/modelcontextprotocol/java-sdk/actions
Projects https://github.com/modelcontextprotocol/java-sdk/projects
Models https://github.com/modelcontextprotocol/java-sdk/models
Security and quality https://github.com/modelcontextprotocol/java-sdk/security
Insights https://github.com/modelcontextprotocol/java-sdk/pulse
Bughttps://github.com/modelcontextprotocol/java-sdk/issues?q=type:"Bug"
Stateless server handler throws exception instead of returning JSON-RPC -32601 (Method not found) for not registered capabilitieshttps://github.com/modelcontextprotocol/java-sdk/issues/784#top
https://github.com/Kehrlann
bugSomething isn't workinghttps://github.com/modelcontextprotocol/java-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
2.0.1https://github.com/modelcontextprotocol/java-sdk/milestone/32
https://github.com/maff
maffhttps://github.com/maff
on Feb 12, 2026https://github.com/modelcontextprotocol/java-sdk/issues/784#issue-3933758233
Kehrlannhttps://github.com/Kehrlann
bugSomething isn't workinghttps://github.com/modelcontextprotocol/java-sdk/issues?q=state%3Aopen%20label%3A%22bug%22
Bughttps://github.com/modelcontextprotocol/java-sdk/issues?q=type:"Bug"
2.0.1No due datehttps://github.com/modelcontextprotocol/java-sdk/milestone/32
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.