mcp-cli-0.3.0 is not a library.
mcp-cli
Interactive CLI debugger and TUI for MCP (Model Context Protocol) servers.
Overview
mcp-cli provides a powerful terminal-based interface for debugging and testing MCP servers. It features:
- Interactive TUI: Beautiful terminal interface built with Ratatui
- Real-time Discovery: Automatic discovery of tools, resources, and prompts
- Advanced Search: Fuzzy search across all capabilities with instant results
- Response Viewer: Multiple view modes for inspecting server responses
- Parameter Forms: Dynamic forms for tool/prompt parameter input
- Session Management: Automatic session handling and reconnection
Installation
From crates.io
From source
Usage
The CLI tool is named mcp-probe and provides multiple commands:
Debug Mode (TUI)
Launch the interactive TUI for debugging an MCP server:
# Connect to stdio server
# Connect to HTTP SSE server
# Connect to HTTP streaming server
Export Configuration
Export discovered capabilities to various formats:
# Export to JSON
# Export to YAML
Validate Server
Validate an MCP server implementation:
TUI Features
Navigation
- Tab: Switch between panels
- ↑/↓: Navigate lists and menus
- Enter: Select/activate items
- Esc: Go back or close dialogs
- Q: Quit application
Capabilities Browser
- Categories View: Browse tools (🔧), resources (📁), and prompts (💬)
- Detailed Lists: Paginated view of capabilities with descriptions
- Parameter Detection: Automatic detection of required/optional parameters
Advanced Search
- Instant Search: Press
/to open search, results appear as you type - Fuzzy Matching: Handles typos and partial matches
- Multiple Criteria: Search by name, description, keywords
- Relevance Scoring: Results ranked by match quality
Response Viewer
- Multiple View Modes: Formatted, Raw JSON, Tree View, Summary
- Scrolling Support: Full horizontal and vertical scrolling
- Response History: View responses from previous tool calls
- Quick Access: Press
Rto view latest response
Parameter Forms
- Dynamic Forms: Automatically generated from tool/prompt schemas
- Type Validation: Input validation based on parameter types
- Required/Optional: Clear indication of required vs optional fields
- Auto-edit Mode: Start typing immediately without pressing Enter
Configuration
Create a configuration file at ~/.config/mcp-probe/config.yaml:
# Default transport configuration
transport:
type: "stdio"
command: "python"
args:
working_dir: "/path/to/server"
# Environment variables
environment:
DEBUG: "true"
API_KEY: "your-api-key"
# UI preferences
ui:
theme: "dark"
page_size: 10
auto_scroll: true
# Logging configuration
logging:
level: "info"
file: "mcp-probe.log"
Examples
Testing a GitHub MCP Server
# Connect to GitHub MCP server
# In the TUI:
# 1. Press '/' to search
# 2. Type "repo" to find repository-related tools
# 3. Select a tool and fill in parameters
# 4. Press Tab to execute
# 5. Press 'R' to view the response
Debugging a Custom Server
# Connect with debug logging
RUST_LOG=debug
# The TUI will show:
# - All discovered capabilities
# - Real-time protocol messages
# - Detailed error information
# - Session state tracking
Development
Building from Source
Running Tests
Code Formatting
Linting
Contributing
Contributions are welcome! Please see the main repository for contribution guidelines.
License
This project is licensed under the MIT License - see the LICENSE file for details.