Expand description
Core types, traits, and errors for MCP Code Execution.
This crate provides the foundational types and abstractions used across all other crates in the MCP execution workspace.
§Architecture
The core consists of:
- Strong domain types (
ServerId,ToolName) - Error hierarchy with contextual information
- Server configuration with security validation
- Command validation utilities
§Examples
use mcp_execution_core::{ServerConfig, ServerId};
// Create a server configuration
let config = ServerConfig::builder()
.command("docker".to_string())
.arg("run".to_string())
.env("LOG_LEVEL".to_string(), "debug".to_string())
.build();
// Server ID
let server_id = ServerId::new("github");Modules§
- cli
- CLI-specific types and utilities.
Structs§
- Server
Config - MCP server configuration with command, arguments, and environment.
- Server
Config Builder - Builder for constructing
ServerConfiginstances. - Server
Id - Server identifier (newtype over String).
- Tool
Name - Tool name identifier (newtype over String).
Enums§
- Error
- Main error type for MCP Code Execution.
- Transport
Type - Transport type for MCP server communication.
Functions§
- validate_
server_ config - Validates a
ServerConfigfor safe subprocess execution.
Type Aliases§
- Result
- Result type alias for MCP operations.