Lightweight MCP Manager - A lightweight CLI tool to manage your Claude MCP servers
Toggle Model Context Protocol (MCP) servers on and off without losing your configurations. Perfect for managing multiple MCP servers and quickly switching between different setups.
- π― Interactive UI - Intuitive checkbox interface for toggling servers
- πΎ Configuration Preservation - Disabled servers are safely stored, not deleted
- β‘ Fast Switching - Quickly enable/disable servers without editing JSON files
- π Bulk Operations - Toggle all servers or invert selection with a single key
- π¨ Color-Coded Status - Visual indicators for active (β) and disabled (β) servers
- π‘οΈ Safe Defaults - Never overwrites your existing configurations
npm install -g lmcpnpx lmcpgit clone https://github.com/loneexile/lmcp.git
cd lmcp
pnpm install
pnpm build
pnpm link --globalSimply run the command:
lmcpYou'll see an interactive interface:
β― lmcp
MCP Server Manager
Select which MCP servers should be active in Claude:
? Toggle MCP servers (active servers will be in ~/.claude.json):
β―β β github (active)
β β context7 (active)
β― β playwright (disabled)
β― β postgres (disabled)
β― β docker-mcp (disabled)
ββ navigate β’ space select β’ a all β’ i invert β’ β submit
| Key | Action |
|---|---|
β β |
Navigate through servers |
Space |
Toggle individual server |
a |
Toggle all servers |
i |
Invert current selection |
Enter |
Apply changes |
Ctrl+C |
Cancel without changes |
lmcp manages two configuration files:
~/.claude.json- Contains your active MCP servers (loaded by Claude)~/.lmcp.json- Stores disabled servers (preserved but not loaded)
When you toggle a server:
- β
Enabled β Server config moved to
~/.claude.json - β Disabled β Server config moved to
~/.lmcp.json
Your server configurations are never deleted, just moved between files. This means you can freely experiment with different server combinations without losing your setup.
# 1. Run lmcp
lmcp
# 2. Use spacebar to select which servers should be active
# For example, enable only 'github' and 'context7'
# 3. Press Enter to apply
# Output:
β Enabled: github
β Enabled: context7
β Disabled: playwright
β Disabled: postgres
Configuration updated successfully!
Active servers: 2
Disabled servers: 2Quickly enable only one server to test its functionality:
lmcp # Disable all except the one you want to testMaintain separate sets of servers for different environments:
- Development: Enable debugging and testing servers
- Production: Enable only essential, stable servers
Claude loads faster with fewer servers. Disable unused servers to improve startup time.
When Claude behaves unexpectedly, disable all servers and enable them one-by-one to identify the problematic server.
Comprehensive documentation is available in the /docs directory:
- Architecture Guide - System design, component diagrams, and data flow
- API Reference - Complete function and type documentation
- Contributing Guide - Development setup and coding standards
- Quick Reference - Fast lookup for common tasks
- Node.js 16 or higher
- Claude Desktop with an existing
~/.claude.jsonconfiguration file - MCP Servers already configured in
~/.claude.json
lmcp/
βββ src/
β βββ index.ts # CLI entry point
β βββ config.ts # Configuration file handlers
β βββ manager.ts # Server toggle logic
β βββ ui.ts # Interactive UI
β βββ types.ts # TypeScript types
βββ openspec/ # OpenSpec documentation
βββ package.json
βββ README.md
# Clone the repository
git clone https://github.com/loneexile/lmcp.git
cd lmcp
# Install dependencies
pnpm install
# Run in development mode
pnpm dev
# Build for production
pnpm build
# Link for local testing
pnpm link --globalpnpm build # Compile TypeScript
pnpm dev # Run in development mode
pnpm lint # Run Biome linter
pnpm lint:fix # Fix linting issues
pnpm format # Format code with Biome
pnpm typecheck # Type check without buildingThis project uses:
- TypeScript with strict mode
- Biome for linting and formatting
- Tab indentation and double quotes
Cause: No ~/.claude.json or ~/.lmcp.json files exist
Solution: Make sure you have Claude Desktop installed and at least one MCP server configured. See Claude MCP documentation for setup instructions.
Cause: Claude needs to be restarted to reload configurations
Solution: Quit and restart Claude Desktop after making changes.
Cause: Insufficient permissions to read/write config files
Solution:
# Check file permissions
ls -la ~/.claude.json ~/.lmcp.json
# Fix permissions if needed (macOS/Linux)
chmod 644 ~/.claude.json ~/.lmcp.jsonContributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
Inspired by claude-ext by Jacob Wang.
Built for the Claude Desktop and Model Context Protocol ecosystem.
Made with β€οΈ by LoneExile