Module prelude

Module prelude 

Source
Expand description

Prelude module for convenient imports

This module re-exports the most commonly used types for building applications with the TurboMCP CLI library.

§Example

use turbomcp_cli::prelude::*;

#[tokio::main]
async fn main() -> CliResult<()> {
    let cli = Cli::parse();
    let executor = CommandExecutor::new(
        OutputFormat::Json,
        true,
        false
    );
    executor.execute(cli.command).await
}

Re-exports§

pub use crate::Cli;
pub use crate::CliError;
pub use crate::CliResult;
pub use crate::CommandExecutor;
pub use crate::Commands;
pub use crate::CompletionCommands;
pub use crate::Connection;
pub use crate::ErrorCategory;
pub use crate::Formatter;
pub use crate::LogLevel;
pub use crate::OutputFormat;
pub use crate::PromptCommands;
pub use crate::RefType;
pub use crate::ResourceCommands;
pub use crate::SamplingCommands;
pub use crate::ServerCommands;
pub use crate::ToolCommands;
pub use crate::TransportKind;
pub use crate::run;

Structs§

Client
The core MCP client implementation
ClientBuilder
Builder for configuring and creating MCP clients

Traits§

Parser
Parse command-line arguments into Self.

Derive Macros§

Parser
Generates the Parser implementation.