mcp_execution_core/
lib.rs

1//! Core types, traits, and errors for MCP Code Execution.
2//!
3//! This crate provides the foundational types and abstractions used across
4//! all other crates in the MCP execution workspace.
5//!
6//! # Architecture
7//!
8//! The core consists of:
9//! - Strong domain types (`ServerId`, `ToolName`)
10//! - Error hierarchy with contextual information
11//! - Server configuration with security validation
12//! - Command validation utilities
13//!
14//! # Examples
15//!
16//! ```
17//! use mcp_execution_core::{ServerConfig, ServerId};
18//!
19//! // Create a server configuration
20//! let config = ServerConfig::builder()
21//!     .command("docker".to_string())
22//!     .arg("run".to_string())
23//!     .env("LOG_LEVEL".to_string(), "debug".to_string())
24//!     .build();
25//!
26//! // Server ID
27//! let server_id = ServerId::new("github");
28//! ```
29
30#![deny(unsafe_code)]
31#![warn(missing_docs, missing_debug_implementations)]
32
33mod command;
34mod error;
35mod server_config;
36mod types;
37
38pub mod cli;
39
40// Re-export error types
41pub use error::{Error, Result};
42
43// Re-export domain types
44pub use types::{ServerId, ToolName};
45
46// Re-export server configuration types
47pub use server_config::{ServerConfig, ServerConfigBuilder, TransportType};
48
49// Re-export command validation
50pub use command::validate_server_config;