Skip to main content

Cross-platform command-line tool for managing MCP (Model Context Protocol) servers across editors

Project description

MCP Commander Logo

MCP Commander

A convenient command-line tool to manage MCP (Model Context Protocol) servers across different code editors.

PyPI Version License: Apache-2.0 Python Code Style: Black Pytest Build Status Coverage CLI Commands Type Checking

๐Ÿš€ Features

Core MCP Operations

  • Multi-Editor Support: Manage MCP servers for Claude Code, Claude Desktop, Cursor, and VS Code
  • Flexible Server Management: Add, remove, and list servers across all or specific editors
  • Status Monitoring: Check configuration file status and server counts
  • Rich CLI Interface: Colorized output with tables and status indicators

Advanced Management

  • ๐Ÿ” Auto-Discovery: Automatically discover all MCP configurations on your system
  • ๐ŸŒ Add-All Command: Install servers to ALL discovered MCP configurations at once
  • ๐Ÿ“Š Status Dashboard: Comprehensive status overview of all editor configurations
  • โš™๏ธ Configuration Validation: Pydantic-based configuration validation and error handling

Developer Experience

  • Type Safety: Full type hints and mypy compatibility
  • Error Handling: Detailed error messages with actionable guidance
  • Extensible: Easy to add support for new editors and MCP clients
  • Testing: Comprehensive test coverage with pytest

๐Ÿ“ฆ Installation

Option 1: From PyPI (Recommended)

# Install globally
pip install mcp-commander

# Or using pipx for isolated installation
pipx install mcp-commander

Option 2: From Git Repository

# Install directly from GitHub
pip install git+https://github.com/nmindz/mcp-commander.git

# Or clone and install
git clone https://github.com/nmindz/mcp-commander.git
cd mcp-commander
pip install .

Option 3: Development Installation

git clone https://github.com/nmindz/mcp-commander.git
cd mcp-commander
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -e .

Option 4: Direct Execution (No Installation Required)

# Clone repository
git clone https://github.com/nmindz/mcp-commander.git
cd mcp-commander

# Install dependencies only
pip install -r requirements-dev.txt

# Method A: Using run.py script
python run.py --help
python run.py list

# Method B: Using shell wrapper
./mcp.sh --help
./mcp.sh discover

# Method C: Using Python module syntax (cleanest)
PYTHONPATH="src:$PYTHONPATH" python -m mcpcommander --help
PYTHONPATH="src:$PYTHONPATH" python -m mcpcommander status

Requirements

  • Python 3.12 or higher
  • Works on macOS, Windows, and Linux

๐Ÿ’ก Getting Help

Contextual Examples

Use --help --verbose (or --help -v) to see practical examples for any command:

# Show detailed help with examples
mcp add --help --verbose
mcp add-editor --help --verbose
mcp status --help --verbose

# Regular help (without examples)
mcp add --help

Configuration Examples

View all transport configuration examples:

# Show all transport examples
mcp examples

# Show examples with usage instructions
mcp examples --verbose

๐Ÿ’ป Commands

๐Ÿ” Discovery and Status

# Discover all MCP configurations on your system
mcp discover

# Check status of all editor configurations
mcp status

# List available editors
mcp editors

๐Ÿ“ Server Management

# List all configured servers
mcp list

# List servers for a specific editor
mcp list claude-code

# Add server to specific editor
mcp add myserver "npx @modelcontextprotocol/server-filesystem /tmp" claude-code

# Add server to all configured editors
mcp add myserver "npx @modelcontextprotocol/server-filesystem /tmp"

๐ŸŒ NEW: Add to All Discovered Configurations

# Automatically discover and install to ALL MCP configurations
mcp add-all myserver "npx @modelcontextprotocol/server-filesystem /tmp"

# Works with JSON configurations too
mcp add-all myserver '{"command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"]}'

๐Ÿ—‘๏ธ Server Removal

# Remove server from all configured editors
mcp remove myserver

# Remove server from specific editor
mcp remove myserver cursor

โ„น๏ธ Help and Version

# Show help
mcp --help

# Show version
mcp version

Configuration

MCP Commander automatically manages its configuration in platform-specific user directories:

  • Windows: %APPDATA%/mcpCommander/config.json
  • macOS: ~/Library/Application Support/mcpCommander/config.json
  • Linux: ~/.config/mcpCommander/config.json

When you first run any command, mcpCommander will automatically:

  1. Create the user config directory
  2. Migrate any existing config.json from the repository
  3. Create a default config if none exists

The configuration defines which editors are supported and where their configuration files are located:

{
  "editors": {
    "claude-code": {
      "config_path": "~/.claude.json",
      "jsonpath": "mcpServers"
    },
    "claude-desktop": {
      "config_path": "~/Library/Application Support/Claude/claude_desktop_config.json",
      "jsonpath": "mcpServers"
    },
    "cursor": {
      "config_path": "~/.cursor/mcp.json",
      "jsonpath": "mcpServers"
    }
  }
}

Adding New Editors

To add support for a new editor, simply add an entry to the editors object in config.json:

{
  "editors": {
    "new-editor": {
      "config_path": "/path/to/editor/config.json",
      "jsonpath": "mcpServers"
    }
  }
}

The jsonpath field supports simple dot notation for nested JSON paths (e.g., "config.mcpServers").

File Structure

mcpCommander/
โ”œโ”€โ”€ config.json          # Editor configuration
โ”œโ”€โ”€ mcp_manager.py       # Main Python script
โ”œโ”€โ”€ mcp                  # Shell wrapper script
โ””โ”€โ”€ README.md           # This file

Examples

Managing your JIRA MCP server

# Add JIRA server to all editors
mcp add jira-mcp "~/Projects/me/jira-mcp/server.py"

# List all configured servers
mcp list

# Remove from just Cursor
mcp remove jira-mcp cursor

# Check what's configured
mcp status

Adding a server with complex configuration

mcp add filesystem '{"command": "npx", "args": ["-y", "@modelcontextprotocol/server-filesystem", "~/Documents"]}'

๐Ÿ› ๏ธ Development

Local Development Setup

# Clone the repository
git clone https://github.com/nmindz/mcp-commander.git
cd mcp-commander

# Create virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install with development dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

# Run linting and formatting
black src/ tests/
flake8 src/ tests/
mypy src/

Project Structure

mcp-commander/
โ”œโ”€โ”€ src/mcpcommander/          # Main package
โ”‚   โ”œโ”€โ”€ core/                  # Core business logic
โ”‚   โ”œโ”€โ”€ cli/                   # Command-line interface
โ”‚   โ”œโ”€โ”€ utils/                 # Utilities and helpers
โ”‚   โ””โ”€โ”€ schemas/               # Pydantic schemas
โ”œโ”€โ”€ tests/                     # Test suite
โ”‚   โ”œโ”€โ”€ unit/                  # Unit tests
โ”‚   โ”œโ”€โ”€ integration/           # Integration tests
โ”‚   โ””โ”€โ”€ e2e/                   # End-to-end tests
โ”œโ”€โ”€ docs/                      # Documentation
โ””โ”€โ”€ scripts/                   # Automation scripts

Requirements

  • Python 3.12 or higher
  • Cross-platform (macOS, Windows, Linux)
  • Rich CLI output with colorized formatting

๐Ÿ†• What's New in v2.0

๐Ÿ” Auto-Discovery System

  • Automatically finds all MCP configurations on your system
  • Supports Claude Code, Claude Desktop, Cursor, VS Code, and more
  • Cross-platform detection (macOS, Windows, Linux)

๐ŸŒ Add-All Command

# One command to rule them all!
mcp add-all my-server "npx @modelcontextprotocol/server-filesystem /tmp"
  • Discovers ALL MCP configurations automatically
  • Installs server to every found configuration
  • Detailed success/failure reporting with colors

๐Ÿ“Š Enhanced CLI Experience

  • Rich table formatting for server listings
  • Colorized status indicators (โœ…โŒโš ๏ธ)
  • Comprehensive error messages with actionable guidance
  • Verbose logging options for debugging

๐Ÿ—๏ธ Modern Architecture

  • Enterprise-grade error handling with custom exceptions
  • Type safety with comprehensive type hints
  • Extensive test coverage (85%+)
  • Modern Python packaging with pyproject.toml

๐Ÿ”ง Troubleshooting

Common Issues

  • Configuration not found: Run mcp discover to see all available MCP configurations
  • Permission errors: Ensure you have write access to editor configuration directories
  • JSON validation errors: Use mcp status to check configuration file integrity
  • Server conflicts: Use mcp list to see existing servers before adding new ones

Debug Mode

# Enable verbose output for debugging
mcp add-all myserver "command" --verbose
mcp list --verbose

Getting Help

# Comprehensive help for any command
mcp --help
mcp add-all --help

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mcp_commander-0.1.0.tar.gz (174.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mcp_commander-0.1.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file mcp_commander-0.1.0.tar.gz.

File metadata

  • Download URL: mcp_commander-0.1.0.tar.gz
  • Upload date:
  • Size: 174.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_commander-0.1.0.tar.gz
Algorithm Hash digest
SHA256 01cc916c5cc7e0f0a6ce321e337512f77a39b9f6682b9738abd8819125fc8c90
MD5 15a975f00ba0343edf24a93f2e85425b
BLAKE2b-256 a316fe5646c921c939554ec7cd462ec9ea3773ee1bafa4e1c3328e4c3ffffea1

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_commander-0.1.0.tar.gz:

Publisher: release.yml on nmindz/mcp-commander

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mcp_commander-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mcp_commander-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for mcp_commander-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 55cd224f6ff1d523db08c96a315a164fdf87d385510f471a14c7d8e716de168f
MD5 cfaa338e5385e1df8091c3fef2c92ab4
BLAKE2b-256 0f03f2798bc24f9c342583a006179bff85adca5b019cd972c9fe13af350c00c0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mcp_commander-0.1.0-py3-none-any.whl:

Publisher: release.yml on nmindz/mcp-commander

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page