Skip to content

Conversation

@ikhoon
Copy link
Contributor

@ikhoon ikhoon commented Nov 11, 2025

Motivation:

Implemented only the transport layer using the official Java SDK for MCP.
https://github.com/modelcontextprotocol/java-sdk

Modifications:

TBU

Result:

TBU

Motivation:

We can easily implement other protocols such as MCP on top of
`JsonRpcService` by adding SSE support.

Modifications:

- Reorganized JSON-RPC message data types so that `JsonRpcHandler`
  can handle `JsonRpcResponse` and `JsonRpcNotifcation`.
  - Introduced `JsonRpcMessage` as the root interface of JSON-RPC
    messages.
- `JsonRpcStreamableResponse` is newly added to allow writing multiple
  JSON-RPC messages before emitting a final response.
  - The streamable response is converted to SSE by `JsonRpcService`.
- `JsonRpcExceptionHandler` is added to recover an exception into a
  `JsonRpcResponse`.
- Renamed `JsonRpcHandler` into `JsonRpcMehtodHandler` and the orignal
  interface is used as a global handler to process any JSON-RPC
  messages.
- `JsonRpcStatusFunction` maps a `JsonRpcError` into an HTTP status.

Result:

- Several handlers have been added to customize the behavior of JsonRpcService.
- You can now stream JSON-RPC messages over server-sent events.
@ikhoon ikhoon added this to the 1.34.0 milestone Nov 12, 2025
@codecov
Copy link

codecov bot commented Nov 13, 2025

Codecov Report

❌ Patch coverage is 69.57087% with 234 lines in your changes missing coverage. Please review.
⚠️ Please upload report for BASE (json-rpc@3ce41df). Learn more about missing BASE report.

Files with missing lines Patch % Lines
.../mcp/ArmeriaStreamableServerTransportProvider.java 64.25% 57 Missing and 17 partials ⚠️
...corp/armeria/common/jsonrpc/JsonRpcParameters.java 55.73% 17 Missing and 10 partials ⚠️
...server/ai/mcp/ArmeriaStatelessServerTransport.java 57.44% 16 Missing and 4 partials ⚠️
...inecorp/armeria/server/jsonrpc/JsonRpcService.java 85.07% 7 Missing and 13 partials ⚠️
...armeria/common/jsonrpc/DefaultJsonRpcResponse.java 69.23% 4 Missing and 8 partials ⚠️
...eria/common/jsonrpc/JsonRpcStreamableResponse.java 27.27% 7 Missing and 1 partial ⚠️
...meriaStreamableServerTransportProviderBuilder.java 46.15% 7 Missing ⚠️
...ria/common/jsonrpc/DefaultJsonRpcNotification.java 56.25% 2 Missing and 5 partials ⚠️
...server/jsonrpc/DefaultJsonRpcExceptionHandler.java 41.66% 5 Missing and 2 partials ⚠️
...mmon/jsonrpc/DefaultJsonRpcStreamableResponse.java 73.91% 3 Missing and 3 partials ⚠️
... and 12 more
Additional details and impacted files
@@             Coverage Diff             @@
##             json-rpc    #6492   +/-   ##
===========================================
  Coverage            ?   74.12%           
  Complexity          ?    23252           
===========================================
  Files               ?     2091           
  Lines               ?    87051           
  Branches            ?    11426           
===========================================
  Hits                ?    64528           
  Misses              ?    17050           
  Partials            ?     5473           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant