TurboMCP CLI
CLI for MCP servers with complete protocol support
Table of Contents
Overview
turbomcp-cli is a command-line interface for the Model Context Protocol, built on the turbomcp-client library. It provides complete MCP protocol coverage with rich, multi-format output and smart transport auto-detection.
Features
- 🎯 Complete MCP Protocol - All operations: tools, resources, prompts, completions, sampling, logging
- 🔧 Tool Management - List, call, and export tool schemas
- 📦 Resource Access - List, read, and subscribe to MCP resources
- 💬 Prompt Operations - List and execute prompts with arguments
- 🌐 Multi-Transport - STDIO (child process), TCP, Unix sockets, HTTP SSE, WebSocket
- 🚀 Smart Auto-Detection - Automatically detects transport from URL format
- 🎨 Rich Output - Human, JSON, YAML, and table formats with colored output
- 🛡️ Built on Core Libraries - Uses
turbomcp-clientandturbomcp-transport - ⚡ Error Handling - Comprehensive error handling with actionable suggestions
Installation
From Crates.io
# Install latest stable version
# Install specific version
From Source
Quick Start
# List tools from a server
# Call a tool with arguments
# Get server information
# List resources
# Work with prompts
Usage
)
)
)
)
)
)
)
Connection Options
Commands that connect to a server accept these flags (via flattened Connection):
--transport <KIND>- Force transport:stdio,http,ws,tcp,unix(auto-detected if omitted)--url <URL>- Server URL (env:MCP_URL, default:http://localhost:8080/mcp)--command <COMMAND>- Command to execute for STDIO transport, overrides--url(env:MCP_COMMAND)--auth <AUTH>- Bearer token or API key (env:MCP_AUTH)--timeout <SECONDS>- Connection timeout in seconds (default:30)
Use the global -f, --format json flag (not --json) to emit JSON output.
Commands
tools list - List Available Tools
List all tools available from an MCP server.
# List tools from HTTP server
# List tools from WebSocket server
# List tools from STDIO server
Example Output:
Available Tools:
- calculator_add: Add two numbers together
- file_read: Read contents of a file
- search_web: Search the web for information
Total: 3 tools
tools call - Call a Tool
Execute a specific tool on the MCP server.
# Call a tool with JSON parameters (HTTP)
# Call a tool via WebSocket
# Call a tool via STDIO
Example Output:
tools schema - Print Tool Schemas
Print the JSON input schema for one tool (by name) or all tools to stdout.
# Print schemas for all tools (HTTP)
# Print schema for a single tool
# Schemas from a STDIO server
tools export - Export Schemas to a Directory
Write each tool's input schema as a separate <tool>.json file inside an output
directory. The directory is created if needed; tool names are sanitized to
prevent path traversal, and output paths are validated so that symlink-based
escapes outside the directory are rejected at file creation time.
# Export every schema into ./schemas/
# Export from a STDIO server
Transport Support
The CLI supports five transports. Use --transport to force one, or rely on
URL-based auto-detection:
HTTP / HTTPS (SSE)
WebSocket
TCP
Unix Domain Socket
STDIO (child process)
# Using --command option
Transport Auto-Detection:
http://,https://→ HTTP/SSE transportws://,wss://→ WebSocket transporttcp://→ TCP transportunix://→ Unix socket transport--commandoption → STDIO transport (spawns a child process)
Examples
# List tools from HTTP server
# Call calculator tool via STDIO
# Export all schemas to a directory via WebSocket
# Test STDIO server with authentication, emitting JSON
Roadmap
Planned: Secure Credential Storage
Status: Not yet implemented
Modern CLI best practices mandate using OS-native credential stores for storing long-lived tokens:
| Platform | Credential Store |
|---|---|
| macOS | Keychain |
| Windows | DPAPI / Credential Manager |
| Linux | libsecret / Secret Service |
Planned commands:
# Future: Secure login flow
# Future: Use stored credentials automatically
# Future: Logout / clear credentials
Current workaround: Pass tokens via --auth flag or environment variables:
This feature will be implemented using the keyring crate for cross-platform credential storage.
Related Tools
- turbomcp - Main TurboMCP framework
- turbomcp-server - Server implementation
- turbomcp-client - Client implementation
- turbomcp-transport - Transport protocols
License
Licensed under the MIT License.
Part of the TurboMCP Rust SDK for the Model Context Protocol.