A PowerShell script to easily manage Model Context Protocol (MCP) servers for the Gemini CLI. Add, remove, enable, disable, and view your MCP server configurations with simple commands.
- List Servers: View active and disabled MCP servers.
- Enable/Disable: Quickly toggle servers on or off without deleting them.
- Add/Remove: Add new servers or permanently delete them.
- Auto-Detection: Automatically finds your Gemini CLI
settings.jsonfile. - Safe: Creates a backup of your settings before making any changes.
- Validation & Repair: Checks for and offers to fix corrupted configuration files.
- PowerShell 5.1 or higher.
- Gemini CLI installed.
- Clone this repository or download the
mcp-manager.ps1script. - Place the script in a directory included in your system's
PATHto make it accessible from anywhere. - Ensure the script is executable by running:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
The script is straightforward to use. Here are the available commands:
Lists all active and disabled MCP servers.
mcp-manager listSimulated Output:
╔══════════════════════════════════════╗
║ ACTIVE MCP SERVERS ║
╚══════════════════════════════════════╝
• filesystem [ACTIVE]
Command: npx
Args: -y @modelcontextprotocol/server-filesystem
╔══════════════════════════════════════╗
║ DISABLED MCP SERVERS ║
╚══════════════════════════════════════╝
• chrome-devtools [DISABLED]
Command: npx
Args: -y @gemini-cli/chrome-mcp-server
Adds a new server to your active configuration.
mcp-manager add playwright npx -y @executeautomation/playwright-mcp-serverPermanently deletes a server from your configuration (active or disabled).
mcp-manager remove playwrightDisables an active server by moving it to settings.disabled.json. Gemini CLI will not use disabled servers.
mcp-manager disable filesystemEnables a disabled server by moving it back to the main settings.json.
mcp-manager enable filesystemChecks the status (active/disabled) and configuration of a specific server.
mcp-manager status filesystemDisplays the full help message with all commands and examples.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. Please make sure to update tests as appropriate.
This project is licensed under the MIT License.