Skip to content

Manage MCP server configs across Claude, Gemini & other AI systems. Interactive CLI for server enable/disable, preset management & config sync.

License

Notifications You must be signed in to change notification settings

holstein13/mcp-config-manager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

95 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

cat > README.md << 'EOF'

MCP Config Manager

A cross-platform utility for managing Model Context Protocol (MCP) server configurations across Claude, Gemini, Codex, and other AI systems.

Based on the battle-tested mcp_toggle.py script with enhanced architecture and GUI interface.

Python License Platform GUI

πŸŽ‰ Project Status

βœ… GUI is FULLY FUNCTIONAL!

The graphical interface is complete and working with all major features operational. The application provides a modern, user-friendly way to manage MCP servers without touching JSON files.

πŸš€ Current Features

βœ… Fully Implemented

  • πŸ–₯️ Graphical User Interface - Modern cross-platform GUI with PyQt6/tkinter
  • πŸ“ Server Configuration Editor - Edit server configurations directly in the GUI
  • πŸ”§ Field Editor System - Dynamic field editing with real-time validation
  • πŸ” Project Discovery - Automatically discover MCP servers from project .claude.json files
  • πŸ—‘οΈ Bulk Server Deletion - Delete multiple servers with confirmation dialog
  • βž• Enhanced Server Addition - Add servers with improved JSON validation and cleanup
  • πŸ’Ύ Advanced Backup System - Organized backups in dedicated directory with GUI integration
  • πŸ”„ Server Restore - Restore servers from backup files including disabled servers
  • Interactive CLI Management - Full-featured interactive mode for server management
  • Multi-Client Support - Manages .claude.json, .gemini/settings.json, and Codex configuration files
  • Server Enable/Disable - Toggle servers on/off without losing configurations
  • Master Checkbox - Bulk select/deselect all servers at once
  • Configuration Syncing - Synchronize servers between Claude, Gemini, and Codex
  • Automatic Backups - Timestamped backups before any changes
  • Preset Management - Save and load project-specific configurations
  • Quick Preset Modes - Minimal, web dev, fullstack, and testing presets
  • JSON Server Addition - Add new servers by pasting JSON configurations
  • Cross-Platform Support - Works on Windows, macOS, and Linux
  • Command Line Interface - Full CLI with individual commands
  • Configuration Validation - Validate config file structure
  • Visual Status Indicators - Clear enabled/disabled status with colors
  • Keyboard Shortcuts - Professional keyboard navigation (Ctrl+S to save, Esc to cancel)
  • Visual Polish - Blue selection highlights, orange unsaved indicators, red validation errors

🚧 Next Features (Planning Phase)

  • Tkinter Support - Alternative GUI backend for systems without Qt
  • Health Monitoring - Real-time server connection status
  • Import/Export - Backup and restore entire configurations

πŸš€ Quick Install (Recommended)

One-command installation:

curl -fsSL https://raw.githubusercontent.com/holstein13/mcp-config-manager/master/install.sh | bash

The installer will:

  • βœ… Check system requirements automatically
  • πŸ“ Ask where to install (with smart defaults)
  • 🐍 Set up isolated Python environment
  • πŸ”— Add mcp command to your PATH
  • πŸ–₯️ Create desktop shortcuts (Linux)
  • πŸ—‘οΈ Provide easy uninstall option

Quick Start After Installation

# Launch GUI (recommended)
mcp gui
# or use the alias
mcp-gui

# Interactive CLI mode
mcp interactive

# Check status
mcp status

# Show all options
mcp --help

# Uninstall easily
mcp uninstall

πŸ“¦ Manual Installation

Click to expand manual installation steps

Prerequisites

  • Python 3.8 or higher
  • Claude Code CLI, Gemini CLI, and/or Codex installed
  • PyQt6 (optional, for better GUI experience): pip install PyQt6

Clone and Install

git clone https://github.com/holstein13/mcp-config-manager.git
cd mcp-config-manager
pip install -e .

# Optional: Install PyQt6 for better GUI experience
pip install PyQt6

Development Setup

# Set up development environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements-dev.txt
pip install -e .

# Run tests
pytest

πŸš€ Usage

GUI Mode (NEW! - Recommended)

Launch the graphical interface:

mcp-config-manager gui

macOS: Create a Native .app Bundle

For easier launching on macOS, you can create a native .app bundle that can be double-clicked, added to your Dock, or launched via Spotlight:

# Install py2app (one-time setup)
pip install py2app

# Build the .app bundle (from project root)
./build_app.sh

# Or manually:
python3 scripts/build/setup_app.py py2app --dist-dir artifacts/dist

# The app will be created in artifacts/dist/
# You can then:
# 1. Double-click "MCP Config Manager.app" to launch
# 2. Drag it to /Applications for system-wide access
# 3. Add it to your Dock for quick access

Note: The .app bundle is completely self-contained with Python and all dependencies bundled. After code changes, rebuild the app with the same command above.

The GUI provides:

  • πŸ–₯️ Visual server list with checkboxes
  • β˜‘ Master checkbox for bulk operations (☐/β˜‘/⊟ states)
  • πŸ“ Server Detail Editor - Click any server to edit its configuration
  • πŸ”§ Dynamic Field Editors - Smart editors for each field type:
    • Text fields for strings and commands
    • Number fields with validation
    • Boolean toggles for true/false values
    • Array editors for list management
    • Object editors for nested configurations
  • πŸ” Project Discovery:
    • Discover button scans for project .claude.json files
    • Automatically finds MCP servers in your projects
    • Smart duplicate detection and consolidation
    • Location-aware server management (Global vs Project)
  • βœ… Real-time Validation - Immediate feedback on configuration errors
  • 🎨 Visual Feedback:
    • Blue highlights for selected servers
    • Orange indicators for unsaved changes
    • Red borders for validation errors
    • Empty state guidance when no server selected
  • πŸ’Ύ Backup & Restore:
    • Backup button creates timestamped backups
    • Restore button lists and restores previous backups
    • Automatic backups before any changes
  • πŸ”„ Mode switching between Claude/Gemini/Codex/All
  • πŸ’Ύ Save button with visual feedback
  • βž• Add new servers via JSON with enhanced validation
  • πŸ—‘οΈ Bulk delete servers with confirmation
  • πŸ’Ύ Quick backup and restore with GUI feedback
  • πŸ“ Preset management dialog
  • ⌨️ Full keyboard shortcuts (Ctrl+S to save, Esc to cancel)

Interactive CLI Mode

Launch the command-line interactive interface:

mcp-config-manager interactive

This gives you the complete interface from the original mcp_toggle.py script with:

  • βœ…/❌ Visual server status
  • πŸ”„ Real-time mode switching (Claude/Gemini/Codex/All)
  • πŸ“ Preset management
  • βž• Add servers by pasting JSON
  • 🎯 Quick preset modes (minimal, web dev, etc.)

Command Line Usage

# Show current status
mcp-config-manager status

# Enable/disable specific servers
mcp-config-manager enable server-name
mcp-config-manager disable server-name

# Bulk operations
mcp-config-manager enable-all
mcp-config-manager disable-all

# Backup and restore
mcp-config-manager backup           # Create timestamped backup
mcp-config-manager restore backup-file.json   # Restore from backup

# Server management
mcp-config-manager add-server server-name config.json  # Add server from file
mcp-config-manager delete-server server-name           # Delete server permanently

# Apply preset modes
mcp-config-manager preset minimal    # Only context7 + browsermcp
mcp-config-manager preset webdev     # + playwright
mcp-config-manager preset fullstack  # + supabase, clerk, railway

# Validate configurations
mcp-config-manager validate ~/.claude.json

Working with Modes

The tool supports four modes:

  • Claude only (--mode claude) - Only manages .claude.json
  • Gemini only (--mode gemini) - Only manages .gemini/settings.json
  • Codex only (--mode codex) - Only manages Codex configurations
  • All (synced) (--mode all) - Keeps all configs synchronized

πŸ–ΌοΈ Screenshots

GUI Interface

MCP Config Manager GUI

The MCP Config Manager GUI showing server configuration editing with visual feedback

Interactive Mode

πŸ”§ MCP Config Manager - Interactive Mode
==================================================

πŸ“Š Current Status:
------------------------------
Mode: πŸ”„ All CLIs (synced)

βœ… ACTIVE servers (will run):
  [1] context7
  [2] browsermcp
  [3] playwright

❌ DISABLED servers (won't run):
  [d1] supabase
  [d2] clerk

πŸ“‹ Actions:
  [1-N]  Disable active server
  [d1-N] Enable disabled server
  [a]    Enable ALL
  [n]    Disable ALL
  [m]    Minimal (context7 + browsermcp)
  [w]    Web dev (+ playwright)
  [+]    βž• Add new MCP server
  [p]    πŸ“ Preset management
  [c]    πŸ”„ Change CLI mode
  [s]    Save and exit
  [q]    Quit without saving

Action: 

πŸ› οΈ Development

Project Structure

src/mcp_config_manager/
β”œβ”€β”€ core/
β”‚   β”œβ”€β”€ config_manager.py    # Main configuration management
β”‚   β”œβ”€β”€ server_manager.py    # Server enable/disable logic
β”‚   └── presets.py          # Preset management
β”œβ”€β”€ parsers/
β”‚   β”œβ”€β”€ claude_parser.py    # Claude config parsing
β”‚   β”œβ”€β”€ gemini_parser.py    # Gemini config parsing
β”‚   └── base_parser.py      # Parser interface
β”œβ”€β”€ utils/
β”‚   β”œβ”€β”€ backup.py           # Backup functionality
β”‚   β”œβ”€β”€ sync.py             # Config synchronization
β”‚   └── file_utils.py       # File path utilities
β”œβ”€β”€ gui/                    # GUI components
β”‚   β”œβ”€β”€ main_window.py      # Main application window
β”‚   β”œβ”€β”€ controllers/        # GUI-library bridge
β”‚   β”‚   └── server_controller.py
β”‚   β”œβ”€β”€ widgets/           # UI components
β”‚   β”‚   β”œβ”€β”€ server_list.py
β”‚   β”‚   β”œβ”€β”€ server_details_panel.py
β”‚   β”‚   └── field_editors/  # Dynamic field editors
β”‚   β”‚       β”œβ”€β”€ base.py
β”‚   β”‚       β”œβ”€β”€ text.py
β”‚   β”‚       β”œβ”€β”€ number.py
β”‚   β”‚       β”œβ”€β”€ boolean.py
β”‚   β”‚       β”œβ”€β”€ array.py
β”‚   β”‚       └── object.py
β”‚   └── dialogs/           # Modal dialogs
└── cli.py                 # Command line interface

Field Editor System

The field editor system provides dynamic, type-specific editors for server configuration fields:

Architecture

  • Base Editor (field_editors/base.py): Abstract base class defining the interface
  • Type-Specific Editors: Specialized editors for each data type
  • Factory Pattern: FieldEditorFactory creates appropriate editor based on field type
  • Validation: Real-time validation with visual feedback

Supported Field Types

  1. Text Editor - Single/multi-line text fields for strings and commands
  2. Number Editor - Integer/float fields with min/max validation
  3. Boolean Editor - Checkbox for true/false values
  4. Array Editor - List management with add/remove/reorder capabilities
  5. Object Editor - Nested object editing with key-value pairs

Visual Feedback

  • Orange Border - Field has been modified (unsaved changes)
  • Red Border - Validation error with 2px width
  • Light Red Background - Additional error indication (#FFF5F5)
  • Tooltip - Error message on hover for invalid fields

Usage Example

# The ServerDetailsPanel automatically creates appropriate editors
field_editor = FieldEditorFactory.create_editor(
    field_name="command",
    field_value="npx @modelcontextprotocol/server-sqlite",
    field_type="string",
    parent=self
)

# Connect signals for change tracking
field_editor.value_changed.connect(self.on_field_changed)
field_editor.validation_error.connect(self.on_validation_error)

Core API Functions

The following new functions have been added across recent commits:

ConfigManager (core/config_manager.py)

  • create_backup() - Create timestamped backups and return GUI-compatible results
  • add_server() - Add a server with the interface expected by ServerController
  • Enhanced error handling - Improved error reporting for GUI integration

ServerManager (core/server_manager.py)

  • add_server_with_name() - Add server with explicit name and configuration
  • delete_server() - Permanently delete servers from configurations and storage
  • update_server_config() - Update existing server configurations
  • Enhanced mode support - Better handling of 'claude', 'gemini', 'codex', 'all' modes

Backup System (utils/backup.py)

  • backup_all_configs() - Create organized backups in dedicated directory
  • list_backups() - List available backup files by type
  • restore_backup() - Restore configurations from backup files
  • Organized storage - Backups now stored in dedicated backups/ directory

GUI Controllers (gui/controllers/server_controller.py)

  • add_server() - GUI integration for server addition
  • delete_servers() - Bulk deletion with confirmation dialog
  • Enhanced event handling - Better signal/slot management for GUI updates

New Dialog Components

  • DeleteServersDialog - Bulk deletion with safety confirmations
  • Enhanced AddServerDialog - JSON validation and cleanup features
  • BackupRestoreDialog - GUI for backup and restore operations

JSON Processing Enhancements

  • JSON cleanup - Remove comments and fix malformed JSON in AddServerDialog
  • Enhanced validation - Better error reporting for invalid JSON configurations
  • Batch processing - Support for adding multiple servers from single JSON input

Development Setup

# Clone the repository
git clone https://github.com/holstein13/mcp-config-manager
cd mcp-config-manager

# Set up development environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements-dev.txt
pip install -e .

# Run tests
pytest

# Run the application
mcp-config-manager interactive

πŸ“ File Locations

  • Claude config: ~/.claude.json
  • Gemini config: ~/.gemini/settings.json
  • Codex config: ~/.codex.json
  • Presets: ~/.mcp_presets.json
  • Disabled servers: ~/.mcp_disabled_servers.json (in user's home directory)
  • Organized backups: ~/Documents/MCP Config Manager/backups/ with timestamped files:
    • claude-backup-YYYYMMDD_HHMMSS.json
    • gemini-backup-YYYYMMDD_HHMMSS.json
    • disabled-backup-YYYYMMDD_HHMMSS.json
  • Legacy backups: ~/.claude.json.backup.YYYYMMDD_HHMMSS

πŸ—ΊοΈ Roadmap

βœ… Phase 1: Core Functionality - COMPLETE

  • Interactive CLI interface
  • Multi-client support (Claude + Gemini)
  • Server enable/disable with storage
  • Configuration synchronization
  • Automatic backups
  • Preset management
  • JSON server addition
  • Command line interface

βœ… Phase 2: GUI Development - COMPLETE

  • Cross-platform GUI framework (PyQt6/tkinter)
  • Main server management window with checkboxes
  • Master checkbox for bulk operations
  • Preset management dialog
  • Settings and configuration dialogs
  • Add server via JSON paste
  • Keyboard shortcuts and professional UX
  • Visual status indicators and feedback

🚧 Phase 3: Polish & Platform Testing - IN PROGRESS

Current focus:

  • βœ… macOS platform testing and optimization
  • ⏳ Windows platform testing
  • ⏳ Linux platform testing
  • ⏳ Performance optimization for large server lists
  • ⏳ PyInstaller packaging

πŸ“‹ Phase 4: Advanced Features - IN PROGRESS

Completed:

  • βœ… Server Detail View - Click server name to edit configuration in side panel
  • βœ… Field Editors - Visual editors for each configuration field type
  • βœ… Real-time Validation - Immediate feedback on configuration changes

Next features:

  • Health Monitoring - Real-time server connection status
  • Import/Export - Backup and restore configurations

πŸš€ Phase 5: Distribution

  • Packaged installers (Windows MSI, macOS DMG, Linux AppImage)
  • Auto-updater mechanism
  • Plugin architecture for extensions
  • IDE integrations (VS Code, IntelliJ, etc.)

🎯 Migration from Original Script

If you're using the original mcp_toggle.py script:

  • Your configs are preserved - The tool uses the same file locations
  • Your presets carry over - ~/.mcp_presets.json is used directly
  • Same functionality - All original features are available in interactive mode
  • Enhanced capabilities - Plus new CLI commands and better error handling

🀝 Contributing

We welcome contributions! The original mcp_toggle.py script was a fantastic foundation, and we're building on that success.

Areas for Contribution

  • 🎨 GUI Development - Help build the cross-platform interface
  • πŸ” Server Discovery - Auto-detect available MCP servers
  • πŸ§ͺ Testing - Add test coverage for all components
  • πŸ“š Documentation - Improve guides and examples
  • πŸ› Bug Reports - Found an issue? Let us know!

πŸ“„ License

MIT License - see LICENSE file for details.

πŸ™ Acknowledgments

  • Original mcp_toggle.py script that inspired this project
  • The Anthropic team for developing the Model Context Protocol
  • The open source community for feedback and contributions

Ready to get started? Run mcp-config-manager interactive and experience the full power of MCP server management!

About

Manage MCP server configs across Claude, Gemini & other AI systems. Interactive CLI for server enable/disable, preset management & config sync.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published