Replies: 1 comment
-
It seems like this test class would help to establish whether the async tool call is using an asynchronous thread, but it seems like the test class that exercises this may have been refactored out (or at least renamed) in recent versions - https://github.com/modelcontextprotocol/java-sdk/blob/main/mcp-core/src/test/java/io/modelcontextprotocol/server/transport/McpTestServletFilter.java |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Question Category
Your Question
When instantiating an async MCP server and requesting a tool, I expected the server to execute the tool call in an asynchronous thread. It appears that the call is being handled in a servlet thread instead.
I took a look at the call stack when the call handler was being invoked and I spotted this line -
java-sdk/mcp-core/src/main/java/io/modelcontextprotocol/server/transport/HttpServletStreamableServerTransportProvider.java
Line 487 in 95323b3
Is the async MCP server truly async? What does it mean for the server to be async if the tool calls are blocking on the servlet thread? Am I misunderstanding the intention of this design?
Beta Was this translation helpful? Give feedback.
All reactions