component-shape-mcp
component-shape-mcp provides typed JSON Schema, strict argument decoding, shared tool registries, structured results, composed servers, and stdio support for Rust applications that expose component contracts through MCP. It is the protocol-facing crate in the component-shape project; applications own authorization, domain validation, and handler policy.
Overview
- Derive
McpToolInputfor named tool arguments with strict field decoding. - Use
McpJsonSchemafor nested schemas andMcpToolValuefor values that pair a schema with a decoder. - Register typed handlers in
McpToolRegistryand return structured results. - Install a reusable registry with
McpServer::from_tool_registry, or compose tools, resources, and prompts directly inMcpServer.