JSPM

gcmcp

0.1.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q56349F
  • License MIT

Interactive MCP servers switcher for Gemini CLI (~/.gemini/settings.json)

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gcmcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    gcmcp

    Interactive CLI to toggle Gemini CLI (~/.gemini/settings.json) mcpServers on/off.

    • Disabled entries are not deleted, but moved to a sidecar JSON next to the settings file, e.g. ~/.gemini/settings.json.disabled.json, so you can re‑enable them anytime. This avoids conflicts when using multiple settings files.
    • ESM + TypeScript, single‑file bundle via tsup (no source map in package).

    Requirements

    • Node.js >= 20

    Install

    Use via npx (once published):

    npx gcmcp

    Or run locally from source (see Development below).

    Usage

    Interactive toggle UI (default):

    gcmcp                       # launch interactive checklist UI

    Subcommands:

    gcmcp ls                    # list enabled servers (use --all or --disabled)
    gcmcp enable <id>           # move <id> from disabled list to enabled
    gcmcp disable <id>          # move <id> from enabled to disabled list
    gcmcp diff                  # show current enabled/disabled state
    gcmcp diff --compose a,b    # preview changes if only a,b are enabled

    Options:

    • --dry-run to show changes without writing files (supported by toggle/enable/disable).

    Paths

    • Settings: ~/.gemini/settings.json (override with GEMINI_SETTINGS_PATH).
    • Disabled list: <settings path>.disabled.json (sidecar next to settings; JSON map of id -> definition).

    Development

    Install deps and build:

    npm i
    npm run build  # TypeScript -> single ESM at dist/index.js

    Run locally:

    node dist/index.js
    node dist/index.js ls --all
    node dist/index.js enable <id>
    node dist/index.js disable <id>

    Quality checks:

    npm run typecheck   # TypeScript type checking (no emit)
    npm run lint        # ESLint on .ts/.tsx
    npm run validate    # typecheck + lint + tests

    Tests (Vitest):

    npm test

    Publishing (npm)

    WSL-friendly login options:

    # 1) Device flow (no browser auto-open)
    npm login --auth-type=web --browser=none
    
    # 2) Legacy (if your org allows)
    # npm login --auth-type=legacy

    Or create a classic token on npmjs.com and use a per-project .npmrc:

    cp .npmrc.example .npmrc
    export NPM_TOKEN=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

    Pre-flight and publish:

    npm run validate
    npm version patch   # or minor / major
    npm publish --access public

    Notes:

    • prepack builds automatically; published files are limited to dist and README.md.
    • Engines require Node >= 20.

    Notes

    • The tool never edits server definitions; it only moves entries between enabled (settings.json.mcpServers) and disabled (disabled.json).
    • A single backup is written as <settings path>.gcmcp.bak (overwritten each time).