Skip to main content

Crate camel_component_mcp

Crate camel_component_mcp 

Source
Expand description

camel-component-mcp — Model Context Protocol (MCP) component for rust-camel.

First-class MCP support (scheme mcp:) with dual roles: the Consumer (server) role — a shared Streamable-HTTP listener serving tool and resource routes — and the Producer (client) role — mcp:call / mcp:read dispatch to remote MCP servers. Protocol baseline is 2026-07-28 (stateless Discover lifecycle: no sessions, no Mcp-Session-Id; a legacy initialize offer is answered fail-closed with -32022 unless it offers the baseline version). The rmcp SDK is confined to src/adapter/ (ADR-0020 pattern).

Re-exports§

pub use bundle::McpBundle;
pub use component::McpComponent;
pub use registry::McpServerRegistry;

Modules§

adapter
rmcp adapter boundary (ADR-0020): the only module that touches the rmcp SDK.
bundle
MCP component bundle — owns the mcp TOML config key (ComponentBundle).
client
Client-role MCP client trait + server map.
component
MCP component — factory for mcp: endpoints (scheme "mcp").
config
MCP configuration types (per-item config channel, ADR-0038).
consumer
MCP server-role Consumer — bridges registry-dispatched tool invocations and resource reads into the route’s Pipeline (Task 2.4; kernel migration Task 2.6).
endpoint
MCP endpoint — both mcp: roles on one Endpoint type.
error
Error taxonomy for MCP component operations.
headers
Header constants for the MCP component.
producer
MCP producer — the client-role Tower Service<Exchange> for mcp:call and mcp:read.
registry
Process-global registry mapping a bind address to its single shared MCP Streamable-HTTP listener (spec: MCP server shared listener registry).
types
Component-local MCP boundary types (Camel-shaped, adapter-agnostic).