Skip to main content

Crate hyperlane_plugin_mcp

Crate hyperlane_plugin_mcp 

Source
Expand description

hyperlane-plugin-mcp

Model Context Protocol (MCP) Streamable HTTP server plugin for Hyperlane with XxHash3_64 tool/resource/prompt registries, sharded TTL session management with high-entropy IDs, Origin validation, and an opt-in ServerHook.

Structs§

McpHook
Opt-in ServerHook serving MCP Streamable HTTP (POST / DELETE) on the configured endpoint.
McpPlugin
Process-wide McpPlugin registry holding McpServerConfig and McpRegistry.
McpPrompt
Metadata describing one registered MCP prompt template.
McpPromptArgument
Metadata describing one prompt argument.
McpRegistry
Thread-safe registry of MCP tools, resources, prompts, and sharded active client sessions.
McpResource
Metadata describing one readable MCP resource.
McpResourceContent
Content returned by reading one MCP resource.
McpServerConfig
Configuration for an MCP Streamable HTTP server endpoint.
McpTool
Metadata describing one registered MCP tool.
McpToolResult
Result returned by an MCP tool invocation.

Enums§

McpDispatchOutcome
Outcome returned by crate::McpRegistry::handle_json_bytes for HTTP transport translation.
McpError
Errors returned by MCP tool, resource, prompt, or protocol handlers.

Constants§

DEFAULT_MCP_ENDPOINT
Default MCP Streamable HTTP endpoint path.
DEFAULT_MCP_MAX_BODY_SIZE
Default maximum incoming JSON-RPC request body size (1 MiB).
DEFAULT_MCP_MAX_SESSIONS
Default maximum concurrent MCP sessions stored in memory.
DEFAULT_MCP_PROTOCOL_VERSION
Default MCP protocol revision advertised during initialize.
DEFAULT_MCP_SESSION_TTL_MS
Default MCP session idle TTL in milliseconds (30 minutes).
MCP_SESSION_ID_HEADER
HTTP header carrying the negotiated MCP session identifier.

Type Aliases§

McpPromptFuture
Boxed Send future returned by an async MCP prompt renderer.
McpPromptHandler
Thread-safe async MCP prompt handler receiving optional prompt arguments JSON.
McpResourceFuture
Boxed Send future returned by an async MCP resource reader.
McpResourceHandler
Thread-safe async MCP resource reader receiving the requested URI.
McpToolFuture
Boxed Send future returned by an async MCP tool handler.
McpToolHandler
Thread-safe async MCP tool handler receiving tool arguments JSON.