turbomcp-core
Core MCP types and primitives - no_std compatible for WASM targets.
Overview
This crate provides the foundational types for the Model Context Protocol (MCP) that can be used in no_std environments including WebAssembly. It is part of the TurboMCP v3.0 architecture.
Features
std(default): Enable standard library supportrich-errors: Enable UUID-based error tracking (requiresstd)wasm: Enable WASM-specific optimizations
no_std Usage
[]
= { = "3.0", = false }
What's Included
- Types: Core MCP types (Tool, Resource, Prompt, Content, Capabilities)
- Error: Unified
McpErrortype with JSON-RPC code mapping - JSON-RPC: JSON-RPC 2.0 request/response types
Example
use ;
use ;
// Create a tool definition
let tool = new
.with_description
.with_input_schema;
// Handle errors
Architecture
This crate is the foundation of the TurboMCP v3 architecture:
turbomcp-core (no_std)
└── turbomcp-protocol (async runtime)
└── turbomcp-server
└── turbomcp-client
License
MIT