TurboMCP CLI
Comprehensive command-line tools for developing, testing, debugging, and deploying MCP servers with world-class developer experience.
Overview
turbomcp-cli
provides a complete toolkit for MCP server development. From initial scaffolding to production deployment, the CLI handles server testing, protocol debugging, performance benchmarking, schema validation, and configuration management.
Key Features
๐งช Server Testing & Validation
- Comprehensive testing - Full MCP protocol compliance validation
- Tool validation - Automated testing of tool functionality and schemas
- Resource testing - URI template validation and resource access testing
- Integration testing - End-to-end workflow validation
- Performance testing - Load testing and benchmarking capabilities
๐ง Protocol Debugging
- Message inspection - Real-time JSON-RPC message logging and analysis
- Protocol validation - MCP specification compliance checking
- Schema debugging - JSON schema validation and error reporting
- Transport debugging - Connection and transport-layer troubleshooting
๐ Performance & Benchmarking
- Load testing - Configurable concurrent request testing
- Latency analysis - Request/response timing analysis
- Throughput measurement - Messages per second benchmarking
- Memory profiling - Resource usage analysis and optimization
๐ Schema Management
- Schema export - Extract JSON schemas from MCP servers
- Schema validation - Validate schemas against MCP specification
- Documentation generation - Automatic API documentation from schemas
- Schema comparison - Diff and compatibility checking between versions
Installation
From Crates.io
# Install latest stable version
# Install specific version
# Install with all features
From Source
Binary Releases
Download pre-built binaries from GitHub Releases.
Commands
Server Testing
tools-list
- List Available Tools
# List tools via STDIO transport
# List tools via HTTP transport
# List tools with detailed schemas
# Output as JSON
Example Output:
Available Tools:
calculator/add - Add two numbers
Parameters:
a: number (required) - First number
b: number (required) - Second number
file/read - Read file contents
Parameters:
path: string (required) - File path to read
encoding: string (optional) - File encoding (default: utf8)
Found 2 tools
tools-call
- Execute Tools
# Call a tool with parameters
# Call tool with file input
# Call tool with timeout
resources-list
- List Available Resources
# List all resources
# Filter resources by URI pattern
# Include resource templates
resources-read
- Read Resource Content
# Read a specific resource
# Read multiple resources
# Read with content type detection
Server Validation
server-test
- Comprehensive Server Testing
# Run full server test suite
# Test specific categories
# Generate test report
# Run with custom test configuration
Example Test Config (test-config.toml
):
[]
= "30s"
= 3
[]
# Test all tools automatically
= true
# Custom tool tests
[[]]
= "calculator/add"
= { = 5, = 3 }
= 8
[]
= true
# Test specific URI patterns
= ["file://*", "http://*"]
[]
= 10
= "60s"
validate
- Protocol Compliance
# Validate MCP compliance
# Validate with specific MCP version
# Validate and fix common issues
Schema Management
schema-export
- Export Schemas
# Export all schemas
# Export specific tool schemas
# Export with documentation
schema-validate
- Validate Schemas
# Validate schemas against MCP specification
# Validate and show detailed errors
Performance & Benchmarking
benchmark
- Performance Testing
# Basic benchmark
# Concurrent request benchmark
# Tool-specific benchmark
Example Benchmark Output:
TurboMCP Benchmark Results
==========================
Server: ./my-server (stdio)
Duration: 60s
Concurrent Connections: 10
Results:
Total Requests: 15,429
Successful: 15,429 (100.0%)
Failed: 0 (0.0%)
Requests/sec: 257.15 (avg)
Response Time: 38.9ms (avg)
Percentiles:
50th: 32ms
95th: 78ms
99th: 156ms
99.9th: 312ms
Memory Usage:
Peak RSS: 12.3 MB
Average: 8.7 MB
profile
- Resource Profiling
# Memory profiling
# CPU profiling
Development Tools
scaffold
- Project Scaffolding
# Create new MCP server project
# Create advanced server with features
# Add tools to existing server
dev
- Development Server
# Run development server with hot reload
# Development server with debugging
Configuration Management
config
- Configuration Management
# Generate default configuration
# Validate configuration
# Show effective configuration
Example Configuration (turbomcp.toml
):
[]
= "my-mcp-server"
= "1.0.0"
= "stdio"
[]
= true
= true
= true
[]
= "30s"
= 10
= ["tools", "resources", "initialization"]
[]
= "60s"
= 5
= "100MB"
[]
= true
= true
= true
Transport Support
STDIO Transport
# Direct command execution
# With arguments
# With working directory
HTTP Transport
# Basic HTTP connection
# With authentication
# With custom headers
WebSocket Transport
# WebSocket connection
# Secure WebSocket
TCP Transport
# TCP connection
# With connection timeout
Unix Socket Transport
# Unix socket connection
# With permissions
Output Formats
JSON Output
# JSON output for tools
|
# Pretty-printed JSON
Table Output
# Table format (default)
# Custom table columns
CSV Output
# CSV export
# Custom CSV delimiter
Advanced Usage
Batch Operations
# Run multiple commands from file
# Example commands.txt:
# tools-list --transport stdio --command "./server1"
# tools-list --transport stdio --command "./server2"
# benchmark --transport stdio --command "./server1" --duration 30s
Pipeline Integration
# Use with CI/CD pipelines
# Health check integration
Custom Scripts
# Run custom test scripts
# JavaScript test script example (test-suite.js):
);
);
);
);
);
);
Configuration Files
Global Configuration
# Location: ~/.config/turbomcp/config.toml
Project Configuration
# Location: ./turbomcp.toml (project root)
Integration Examples
CI/CD Pipeline
# .github/workflows/mcp-test.yml
name: MCP Server Tests
on:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install TurboMCP CLI
run: cargo install turbomcp-cli
- name: Build server
run: cargo build --release
- name: Test MCP server
run: |
turbomcp-cli validate \
--transport stdio \
--command "./target/release/my-server" \
--exit-code
- name: Benchmark server
run: |
turbomcp-cli benchmark \
--transport stdio \
--command "./target/release/my-server" \
--duration 30s \
--report benchmark.json
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: test-results
path: |
benchmark.json
Docker Integration
FROM rust:1.89 as builder
# Install TurboMCP CLI
RUN cargo install turbomcp-cli
# Build server
COPY . /app
WORKDIR /app
RUN cargo build --release
# Test server during build
RUN turbomcp-cli validate \
--transport stdio \
--command "./target/release/server" \
--exit-code
FROM debian:bookworm-slim
COPY --from=builder /app/target/release/server /usr/local/bin/
COPY --from=builder /usr/local/cargo/bin/turbomcp-cli /usr/local/bin/
# Health check using CLI
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 \
CMD turbomcp-cli health-check \
--transport stdio \
--command "/usr/local/bin/server" \
--timeout 5s \
--exit-code
ENTRYPOINT ["/usr/local/bin/server"]
Development
Building from Source
Running Tests
# Unit tests
# Integration tests
# Test with different transports
Related Tools
- turbomcp - Main TurboMCP framework
- turbomcp-server - Server implementation
- turbomcp-client - Client implementation
- turbomcp-transport - Transport protocols
External Resources
- MCP Specification - Official protocol specification
- Claude Desktop - AI assistant with MCP support
- JSON-RPC 2.0 - Underlying RPC protocol
License
Licensed under the MIT License.
Part of the TurboMCP high-performance Rust SDK for the Model Context Protocol.