Class McpProtocol
java.lang.Object
dev.tachyonmcp.core.protocol.mcp.v2025_11_25.McpProtocol
- All Implemented Interfaces:
Protocol
Protocol implementation for the MCP protocol version 2025-11-25.
Registered via META-INF/services/dev.tachyonmcp.core.protocol.Protocol.
Accepts client requests for versions 2024-11-05 through 2025-11-25 and negotiates up to this implementation's version (2025-11-25).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionendpoint()HTTP endpoint path this protocol is served on, e.g.Protocol family name, e.g.booleanmatches(io.netty.handler.codec.http.HttpRequest request) Returnstruewhen this implementation can handle the given HTTP request.Request mapper for this protocol version.Response mapper for this protocol version.Server's negotiated version string, e.g.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface dev.tachyonmcp.core.protocol.Protocol
createInteractionContext, priority, supportsSessions
-
Field Details
-
VERSION
- See Also:
-
-
Constructor Details
-
McpProtocol
public McpProtocol()
-
-
Method Details
-
endpoint
Description copied from interface:ProtocolHTTP endpoint path this protocol is served on, e.g."/mcp". -
familyName
Description copied from interface:ProtocolProtocol family name, e.g."mcp".- Specified by:
familyNamein interfaceProtocol
-
versionString
Description copied from interface:ProtocolServer's negotiated version string, e.g."2025-11-25". Used for version comparison: ISO-date format ensures lexicographic order is chronological.- Specified by:
versionStringin interfaceProtocol
-
matches
public boolean matches(io.netty.handler.codec.http.HttpRequest request) Description copied from interface:ProtocolReturnstruewhen this implementation can handle the given HTTP request. POST requests are matched by endpoint ANDMCP-Protocol-Versionheader compatibility; other methods (GET for SSE, DELETE for session close, OPTIONS) are matched by endpoint only. -
responseMapper
Description copied from interface:ProtocolResponse mapper for this protocol version.- Specified by:
responseMapperin interfaceProtocol
-
requestMapper
Description copied from interface:ProtocolRequest mapper for this protocol version.- Specified by:
requestMapperin interfaceProtocol
-