feat(protocols): implement MCP JSON-RPC transport layer
Add complete MCP protocol implementation: - mcp_types.rs: JSON-RPC types, initialize, tools, resources, prompts - mcp_transport.rs: Stdio-based transport with split mutexes for stdin/stdout - McpServerConfig builders for npx/node/python MCP servers - Full McpClient trait implementation for tools/resources/prompts - Add McpError variant to ZclawError Transport supports: - Starting MCP server processes via Command - JSON-RPC 2.0 request/response over stdio - Length-prefixed message framing - Tool listing and invocation - Resource listing and reading - Prompt listing and retrieval Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,12 @@ pub enum ZclawError {
|
||||
|
||||
#[error("Internal error: {0}")]
|
||||
Internal(String),
|
||||
|
||||
#[error("Export error: {0}")]
|
||||
ExportError(String),
|
||||
|
||||
#[error("MCP error: {0}")]
|
||||
McpError(String),
|
||||
}
|
||||
|
||||
/// Result type alias for ZCLAW operations
|
||||
|
||||
Reference in New Issue
Block a user