pub mod client;
pub mod error;
pub mod pool;
pub mod protocol;
pub mod retry;
pub mod rmcp_adapter;
pub mod server;
pub mod types;
pub mod validation;
pub use client::{CacheConfig, McpClient, McpPingError, McpPingResult, ResponseCacheStats};
pub use error::{McpError, Result};
pub use pool::McpClientPool;
pub use protocol::{JsonRpcError, JsonRpcNotification, JsonRpcRequest, JsonRpcResponse};
pub use retry::{is_retryable_mcp_error, retry_mcp_call, McpRetryConfig};
pub use types::{
ContentBlock, McpConfig, McpErrorCode, ResourceContent, ToolCallRequest, ToolCallResult,
ToolDefinition,
};
pub use validation::{
CacheStats, CachedSchema, ErrorEnhancer, McpValidator, ToolSchemaCache, ValidationConfig,
ValidationError, ValidationErrorKind, ValidationResult,
};
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct McpConfigInline {
pub command: String,
#[serde(default)]
pub args: Vec<String>,
#[serde(default)]
pub env: rustc_hash::FxHashMap<String, String>,
pub cwd: Option<String>,
}
pub(crate) const CONNECT_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(20);
pub(crate) const MCP_CALL_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(60);
pub(crate) const RECONNECT_TIMEOUT: std::time::Duration = std::time::Duration::from_secs(30);