Crate mcp_execution_core

Crate mcp_execution_core 

Source
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§

ServerConfig
MCP server configuration with command, arguments, and environment.
ServerConfigBuilder
Builder for constructing ServerConfig instances.
ServerId
Server identifier (newtype over String).
ToolName
Tool name identifier (newtype over String).

Enums§

Error
Main error type for MCP Code Execution.
TransportType
Transport type for MCP server communication.

Functions§

validate_server_config
Validates a ServerConfig for safe subprocess execution.

Type Aliases§

Result
Result type alias for MCP operations.