#[cfg(feature = "mcp")]
pub mod simple;
#[cfg(feature = "mcp")]
pub mod minimal;
#[cfg(feature = "mcp")]
pub mod bridge;
#[cfg(feature = "mcp-full-protocol")]
pub use rmcp;
#[cfg(feature = "mcp")]
pub mod types;
#[cfg(feature = "mcp")]
pub mod config;
#[cfg(feature = "mcp")]
pub mod error;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub mod client;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub mod server;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub mod transport;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub mod transport_enhanced;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub mod websocket;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub mod tcp;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub mod transport_factory;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub mod tool_adapter;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub mod registry;
#[cfg(feature = "mcp")]
pub use config::{McpConfig, McpServerConfig, McpTransportConfig};
#[cfg(feature = "mcp")]
pub use error::McpError;
#[cfg(feature = "mcp")]
pub use simple::*;
#[cfg(feature = "mcp")]
pub use minimal::*;
#[cfg(feature = "mcp")]
pub use bridge::*;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub use client::McpClient;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub use server::{
CoderLibServer, ServerConfig, ResourceProvider, PromptTemplate,
FileSystemResourceProvider, MemoryResourceProvider, MemoryResource
};
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub use transport_enhanced::{
EnhancedTransportConfig, EnhancedTransport, TransportStats, TransportError
};
#[cfg(all(feature = "mcp", feature = "websocket", feature = "mcp-full-protocol"))]
pub use websocket::{WebSocketTransport, WebSocketServer, WebSocketClient};
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub use tcp::{TcpTransport, TcpServer, TcpClient};
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub use transport_factory::{
TransportFactory, TransportFactoryConfig, ClientTransport, ServerTransport, TransportManager
};
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub use tool_adapter::McpToolAdapter;
#[cfg(all(feature = "mcp", feature = "mcp-full-protocol"))]
pub use registry::McpRegistry;
#[cfg(not(feature = "mcp"))]
#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct McpConfig;
#[cfg(not(feature = "mcp"))]
impl Default for McpConfig {
fn default() -> Self {
Self
}
}
#[cfg(not(feature = "mcp"))]
pub struct McpRegistry;
#[cfg(not(feature = "mcp"))]
impl McpRegistry {
pub fn new(_config: McpConfig) -> Self {
Self
}
pub async fn start_all_servers(&mut self) -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}
pub async fn register_tools_with_registry(&self, _tool_registry: &mut crate::tools::ToolRegistry) -> Result<(), Box<dyn std::error::Error>> {
Ok(())
}
}