Skip to content

Feat/mcp stdio transport#79

Merged
eskenazit merged 2 commits intomainfrom
feat/mcp-stdio-transport
Mar 3, 2026
Merged

Feat/mcp stdio transport#79
eskenazit merged 2 commits intomainfrom
feat/mcp-stdio-transport

Conversation

@jlouvel
Copy link
Contributor

@jlouvel jlouvel commented Mar 2, 2026

Add stdio transport to MCP server adapter for local IDE integration
(VS Code, Cursor, Windsurf, Claude Desktop, JetBrains).

Stdio transport:

  • Extract McpProtocolDispatcher for transport-agnostic JSON-RPC dispatch
  • Add StdioJsonRpcHandler for stdin/stdout newline-delimited JSON-RPC
  • Extend McpServerAdapter to branch on transport (http|stdio)
  • Refactor JettyMcpStreamableHandler to delegate to McpProtocolDispatcher
  • Add transport field to McpServerSpec with schema validation
  • Update capability-schema.json with conditional port requirement

Bug fixes:

  • Fix entity double-read in McpToolHandler by buffering response text
    before output mapping, preventing null fallback on stream exhaustion

@jlouvel jlouvel requested a review from eskenazit March 2, 2026 23:14
@jlouvel jlouvel self-assigned this Mar 2, 2026
@jlouvel
Copy link
Contributor Author

jlouvel commented Mar 2, 2026

@eskenazit This PR add a "transport" field which would need to be documented in the Markdown version of the spec as well.

This would be great to get this merged in the tech preview as it is the most common way to add local MCP tools to an IDE for developers, not requiring a running HTTP server for localhost purpose

@eskenazit
Copy link
Contributor

FYI, thanks to your PR we discovered the json strucutre github action to validate the schema was not running. A PR to fix it is on it way =)

jlouvel added 2 commits March 3, 2026 08:21
Add stdio transport to MCP server adapter for local IDE integration
(VS Code, Cursor, Windsurf, Claude Desktop, JetBrains).

Stdio transport:
- Extract McpProtocolDispatcher for transport-agnostic JSON-RPC dispatch
- Add StdioJsonRpcHandler for stdin/stdout newline-delimited JSON-RPC
- Extend McpServerAdapter to branch on transport (http|stdio)
- Refactor JettyMcpStreamableHandler to delegate to McpProtocolDispatcher
- Add transport field to McpServerSpec with schema validation
- Update capability-schema.json with conditional port requirement

Bug fixes:
- Fix entity double-read in McpToolHandler by buffering response text
  before output mapping, preventing null fallback on stream exhaustion
@jlouvel jlouvel force-pushed the feat/mcp-stdio-transport branch from fb5f555 to c13014b Compare March 3, 2026 13:21
@jlouvel
Copy link
Contributor Author

jlouvel commented Mar 3, 2026

@eskenazit Thanks Thomas, PR updated

Copy link
Contributor

@eskenazit eskenazit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@eskenazit eskenazit merged commit 86377ea into main Mar 3, 2026
3 checks passed
@eskenazit eskenazit deleted the feat/mcp-stdio-transport branch March 3, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants