Skip to content

iquantecho/sgtzim

Repository files navigation

SgtZim

A small terminal UI for turning MCP servers on and off across multiple AI tools from one place.

SgtZim automatically discovers your local MCP config files, shows the configured servers in a simple interactive list, and lets you toggle them on or off without hand-editing JSON, TOML, or YAML files.

Why SgtZim?

Managing MCP servers across multiple tools gets tedious fast. Different clients store MCP settings in different file formats, use different enable/disable conventions, and often require repetitive manual edits.

SgtZim gives you one lightweight TUI to:

  • Pick the AI tool you want to manage.
  • See every configured MCP server for that tool.
  • Toggle servers on or off with the keyboard.
  • Save the updated config back to disk.

The name is inspired by Sergeant Zim from Starship Troopers — a strict, no-nonsense enforcer who keeps the system in shape.

Features

  • Terminal-first interactive UI.
  • Keyboard-driven navigation.
  • Auto-discovery of standard OS-specific config paths.
  • Fallback support for custom centralized config directories.
  • Per-tool MCP server toggling.
  • Multi-format config support.
  • Writes changes directly back to the source config files.
  • Lightweight single-script Node.js implementation.

Supported tools

SgtZim currently auto-detects and supports these tools:

Tool Format Windows macOS Linux
gemini-cli JSON ~/.gemini/ ~/.gemini/ ~/.gemini/
codex-cli TOML ~/.codex/ ~/.codex/ ~/.codex/
Hermes YAML ~/.hermes/ ~/.hermes/ ~/.hermes/
Kilo JSON %APPDATA%\kilo\ ~/Library/Application Support/kilo/ ~/.config/kilo/
Antigravity JSON %APPDATA%\Antigravity\User\ ~/Library/Application Support/Antigravity/User/ ~/.config/Antigravity/User/

(Note: SgtZim only displays tools in its menu if it successfully finds an existing configuration file for them on your system).

How it works

When you launch the script, it:

  1. Enables raw terminal input mode.
  2. Scans your system for default configuration paths of known AI tools.
  3. Shows a menu of the tools it successfully found.
  4. Loads the selected tool's MCP config.
  5. Extracts MCP server names and current enabled state.
  6. Lets you move with arrow keys and toggle with Space.
  7. Saves the updated state back to the config file when you press Enter.

Each supported tool uses a small parser/updater pair in the script so the same UI can work across different file formats.

Controls

Tool selection screen

  • / — Move through discovered tools.
  • Enter — Select a tool.
  • q or Ctrl+C — Quit.

Server configuration screen

  • / — Move through MCP servers.
  • Space — Toggle selected server on/off.
  • Enter — Save changes.
  • q or Ctrl+C — Cancel without saving.

Installation

Prerequisites

  • Node.js 18+ recommended.
  • A terminal that supports raw input mode.

Usage via npx

You can run SgtZim directly without installing it globally:

npx sgtzim

Global installation

npm install -g sgtzim
sgtzim

Custom Configuration Directories

If you prefer to keep all your MCP configs centrally located (e.g., symlinked into a single folder), you can pass that folder's path as an argument to SgtZim. SgtZim will look for files matching the standard names (gemini-mcp-server-enablement.json, codex-config.toml, kilo.json, etc.) in that directory:

sgtzim /path/to/your/central/configs

Example workflow

  1. Run npx sgtzim.
  2. Select codex-cli from the auto-discovered list.
  3. Toggle one or more MCP servers.
  4. Press Enter to save.
  5. Reopen your AI tool if needed so it reloads the updated config.

Configuration behavior

SgtZim currently updates MCP state using each tool's native convention:

  • gemini-cli: updates enabled on each server object.
  • codex-cli: rewrites the enabled = true/false value inside each mcp_servers block.
  • Hermes: updates enabled: values inside the mcp_servers YAML section.
  • Kilo: updates enabled on each server object inside the mcp block.
  • Antigravity: removes disabled when enabling a server and sets disabled: true when disabling one.

Limitations

  • The current implementation assumes the config files already exist.
  • Parsing is format-specific and relies on the expected file structure being present.
  • The script is focused on enable/disable management, not creating new MCP server definitions.
  • Some tools may need a restart before they pick up changed configs.

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors