- Explore MCP Servers
- claude-mcp-manager
Claude Mcp Manager
What is Claude Mcp Manager
claude-mcp-manager is a command-line tool designed for macOS that allows users to define, manage, and switch between different configurations of MCP servers for the Claude Desktop application.
Use cases
Use cases include managing different server configurations for development, testing, and production environments, as well as sharing configurations among team members without exposing sensitive information.
How to use
To use claude-mcp-manager, install it via the command: curl -fsSL https://raw.githubusercontent.com/BLTGV/claude-mcp-manager/main/install.sh | sh. After installation, you can define server configurations and activate profiles to switch between them easily.
Key features
Key features include the ability to create named profiles for server configurations, automatic updates to the main Claude config file, and the use of environment variables for managing sensitive credentials securely.
Where to use
claude-mcp-manager is primarily used in software development environments, particularly for developers working with the Claude Desktop application on macOS.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Claude Mcp Manager
claude-mcp-manager is a command-line tool designed for macOS that allows users to define, manage, and switch between different configurations of MCP servers for the Claude Desktop application.
Use cases
Use cases include managing different server configurations for development, testing, and production environments, as well as sharing configurations among team members without exposing sensitive information.
How to use
To use claude-mcp-manager, install it via the command: curl -fsSL https://raw.githubusercontent.com/BLTGV/claude-mcp-manager/main/install.sh | sh. After installation, you can define server configurations and activate profiles to switch between them easily.
Key features
Key features include the ability to create named profiles for server configurations, automatic updates to the main Claude config file, and the use of environment variables for managing sensitive credentials securely.
Where to use
claude-mcp-manager is primarily used in software development environments, particularly for developers working with the Claude Desktop application on macOS.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Claude MCP Manager
A command-line tool for macOS to define, manage, and switch between different sets of mcpServers configurations (profiles) for the Claude Desktop application.
Goal
The Claude desktop app stores its configuration, including the mcpServers endpoints, in a JSON file at ~/Library/Application Support/Claude/claude_desktop_config.json. This tool allows you to define individual server configurations and group them into named profiles (e.g., ‘default’, ‘work’, ‘experimental’). Activating a profile updates the mcpServers block in the main Claude config file with the servers defined in that profile, automatically restarting Claude to apply the changes. By separating server definitions and utilizing environment variables for secrets (see “How it Works”), you can easily share server configurations or commit profiles to version control without exposing sensitive credentials.
Quick Install (Recommended)
Run the following command in your macOS terminal:
curl -fsSL https://raw.githubusercontent.com/BLTGV/claude-mcp-manager/main/install.sh | sh
This downloads and executes the installer script, which handles dependency checks, copying files, and setting up the command-line tool.
Requirements
- macOS: The script relies on macOS-specific paths and commands (
pgrep,kill,open). It will not work on Windows or Linux. - jq: The script uses
jqfor JSON processing. Install via Homebrew:brew install jq. - bash: Requires a reasonably modern version of bash (>= 3.2) for features like regex matching (
=~). Standard macOS bash is sufficient.
Installation
Manual Installation
- Clone the repository or download the source code.
- Navigate to the project directory in your terminal.
- Make the installer executable:
chmod +x install.sh - Run the installer:
./install.sh- The script will attempt to install to
/usr/local/lib/claude-mcp-managerand create a symlink in/usr/local/bin. This might requiresudoif you don’t have write permissions. - If
/usr/localis not writable, it will fall back to$HOME/.local/liband$HOME/.local/bin. - The installer will notify you if the chosen
bindirectory is not in your$PATHand provide instructions to add it.
- The script will attempt to install to
How it Works
- Configuration Directory: Stores all data in
~/.config/claude/. - Servers Directory: Individual server definitions are stored as
.jsonfiles in~/.config/claude/servers/. - Profiles Directory: Profiles, which contain lists of server names, are stored as
.jsonfiles in~/.config/claude/profiles/.- Each profile file looks like:
{\"servers\": [\"server1_name\", \"server2_name\"]}
- Each profile file looks like:
- Target File: The script modifies the
mcpServerskey within the official Claude config file:~/Library/Application Support/Claude/claude_desktop_config.json. - Secrets (
.envfile): You can store sensitive values (like API keys) in~/.config/claude/.env. Server definition files can reference these using placeholders like{{ENV:YOUR_API_KEY}}or{{DOTENV:YOUR_API_KEY}}. These are resolved when a profile is activated. - Tracking (
loadedfile): The script keeps track of the name of the currently active profile in~/.config/claude/loaded. - Backup (
last.json): Before applying a new profile, the script saves the currentmcpServersblock from the target file into~/.config/claude/last.json, allowing easy rollback using thelastcommand. - First Run: The installer runs
claude-mcp-manager server listto ensure the config directories are created upon successful installation.
Usage
claude-mcp-manager <command | profile_name | option>
Primary Commands
<profile_name>: Activate the specified profile. Reads server definitions listed in the profile, resolves secrets, constructs themcpServersblock, backs up the current block in the main config, writes the new block, and restarts Claude.last: Restore themcpServersblock that was active before the last profile activation (fromlast.json) and restart Claude.server <subcommand>: Manage server definitions. Runclaude-mcp-manager server helpfor details.profile <subcommand>: Manage profiles. Runclaude-mcp-manager profile helpfor details.
Server Subcommands (claude-mcp-manager server ...)
list: List available server definition files found in~/.config/claude/servers/.show <name>: Display the JSON content of the specified server definition file.add <name> --file <path>: Add a new server definition by copying the content from<path>.add <name> --json '{\"key\":\"value\"}': Add a new server definition using the provided JSON string.edit <name>: Open the specified server definition file in your$EDITOR(or default like vim/nano).remove <name>: Delete the specified server definition file (prompts for confirmation).extract [--profile <name>]: Read themcpServersblock from the main Claude config, save each server as a separate file in~/.config/claude/servers/. Optionally, create or update the specified profile<name>to list all extracted servers.
Profile Subcommands (claude-mcp-manager profile ...)
list: List available profile files found in~/.config/claude/profiles/.show <name>: List the server names contained within the specified profile file and indicate if the corresponding server definition file exists.create <name>: Create a new, empty profile file.copy <src> <dest>: Copy an existing profile file to a new name.edit <name>: Open the specified profile file in your$EDITOR(or default like vim/nano) to manually edit the server list.add <profile> <server...>: Add one or more server names to the specified profile’s"servers"array.remove <profile> <server...>: Remove one or more server names from the specified profile’s"servers"array.delete <name>: Delete the specified profile file (prompts for confirmation).
Options
help, -h, --help: Show the main help message.version, -v: Show the script version.
Acknowledgements
This project was built utilizing claude-task-master, an AI-driven task management system by Eyal Toledano (@eyaltoledano) and Ralph Ecom (@RalphEcom), to define, manage, and implement the features described above.
Shell Completion (Optional)
Tab completion is available for Bash and Zsh shells.
First, ensure claude-mcp-manager is installed and accessible in your PATH.
Bash
- Install
bash-completion@2: If you haven’t already, install the latest bash completion system using Homebrew:brew install bash-completion@2 - Add to
.bash_profile: Follow the instructions printed bybrew info bash-completion@2to add the necessary line to your~/.bash_profile(or~/.bashrc). It usually looks like this:# Add the following line (or similar) to ~/.bash_profile export BASH_COMPLETION_COMPAT_DIR="$(brew --prefix)/etc/bash_completion.d" [[ -r "$(brew --prefix)/etc/profile.d/bash_completion.sh" ]] && . "$(brew --prefix)/etc/profile.d/bash_completion.sh" - Generate and Install Script: Run the following command to generate the completion script and place it in the correct directory:
# Determine the completion directory COMPLETION_DIR="$(brew --prefix)/etc/bash_completion.d" # Ensure the directory exists mkdir -p "$COMPLETION_DIR" # Generate the script claude-mcp-manager completion bash > "${COMPLETION_DIR}/claude-mcp-manager" - Reload Shell: Open a new terminal window or run
source ~/.bash_profile.
Zsh
Zsh has built-in completion support.
- Ensure
compinit: Make sure your~/.zshrcfile includesautoload -U compinit && compinitsomewhere (usually near the beginning or end). - Choose a Completion Directory: Zsh completions are typically stored in a directory listed in your
$fpathvariable. A common user-specific location is~/.zsh/completion. Create it if it doesn’t exist:mkdir -p ~/.zsh/completion - Add Directory to
fpath: Ensure this directory is added to your Zsh function path in your~/.zshrcbefore callingcompinit:# Add near the top of ~/.zshrc fpath=(~/.zsh/completion $fpath) # ... other zsh config ... # Ensure compinit is loaded autoload -U compinit && compinit - Generate and Install Script: Run the following command to generate the completion script. Note the filename starts with an underscore (
_):claude-mcp-manager completion zsh > ~/.zsh/completion/_claude-mcp-manager - Reload Shell: Open a new terminal window or run
source ~/.zshrc.
After installation, you should be able to use tab completion for commands, subcommands, profile names, and server names.
Uninstall
To uninstall, run the following command:
claude-mcp-manager uninstall
This will remove the script and the command symlink. It will ask for confirmation first.
To also remove the configuration directory (~/.config/claude), which contains all your profiles, server definitions, logs, and the .env file (potentially containing secrets), use:
claude-mcp-manager uninstall --remove-config
Warning: Removing the configuration directory is permanent and requires a separate confirmation.
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.










