Octoswitch
Provides tools for interacting with GitHub across multiple named accounts, including listing accounts, repos, issues, and pull requests; fetching files; searching issues; and creating repos, issues, comments, and pull requests, with calls routed to the appropriate GitHub token.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
An MCP server and CLI for GitHub that manages multiple accounts (personal, work, orgs) and routes each call to the right token. It speaks plain MCP over stdio, so it works with any MCP-capable agent: Claude Code and Desktop, Cursor, GitHub Copilot (VS Code), Windsurf, Cline, Gemini CLI, Codex CLI, opencode, Continue, Hermes Agent, Zed and others.
Not affiliated with or endorsed by GitHub.
Why
Most GitHub MCP setups use one token. This keeps several named accounts and picks one per call:
an explicit
accountargument (name or GitHub login), elsethe account whose login matches the repo owner (
ApiCartOps/demouses theApiCartOpsaccount), elsethe default account.
Related MCP server: ghmux
Setup
git clone https://github.com/ApiCartOps/github-multi-mcp.git octoswitch
cd octoswitch
npm install
npm link # puts the `octoswitch` command on your PATH
octoswitch add personal --default
octoswitch add work
octoswitch list NAME LOGIN
* personal alice (default)
work acme-corpWithout npm link, run node src/cli.js in place of octoswitch.
add asks for the token at a hidden prompt (or reads it from an env var with --token-env=VAR), checks it against GitHub and stores the login. Tokens are never passed on the command line, never printed, and never returned by any tool. They are stored in ~/.octoswitch/accounts.json (file mode 600).
Use a fine-grained or classic personal access token per account. For org repos the token must be allowed by the org.
Connect it to your agent
octoswitch agents # what is supported, and what looks installed
octoswitch install cursor # or: claude-code, vscode, codex, gemini-cli, ... or: all
octoswitch install cursor --dry-run
octoswitch config hermes # print the snippet instead of editing anythinginstall merges one entry into the agent's user-level MCP config and leaves everything else in the file alone. It refuses to touch a file it cannot parse (for example JSON with comments) and prints the snippet instead. uninstall <agent> removes it. Restart the agent afterwards.
Agent | Id | What |
Claude Code |
|
|
Claude Desktop |
|
|
Cursor |
|
|
VS Code / GitHub Copilot |
|
|
Windsurf |
|
|
Cline |
|
|
Gemini CLI |
|
|
opencode |
|
|
Codex CLI |
|
|
Continue |
|
|
Hermes Agent |
| prints a YAML snippet for |
Zed |
| prints a snippet for |
anything else |
| prints the standard |
Config locations differ between versions of these tools, so check the printed path if an agent does not pick it up. Use --npx to register npx -y octoswitch mcp instead of a path to this checkout (once published), and --name=NAME to use a different server name.
Project instructions
octoswitch init # AGENTS.md, plus any of CLAUDE.md / GEMINI.md / copilot / cursor rule that already exist
octoswitch init --all # write all fiveThis adds a short, marked block telling the agent to use the gh_* tools and to confirm the account before any write. Re-running updates the block in place. AGENTS.md is read by Codex, Cursor, Copilot, Windsurf, opencode, Zed and others; the other files cover Claude Code (CLAUDE.md), Gemini CLI (GEMINI.md), GitHub Copilot (.github/copilot-instructions.md) and Cursor (.cursor/rules/octoswitch.mdc).
What it exposes
Tools (all agents):
Read | Write (act on a real account; agents are told to confirm first) |
|
|
Server instructions: the same guidance as above is sent in the MCP initialize response, so clients that surface it need no extra setup.
Prompts (commands, for clients that support MCP prompts): gh_accounts, gh_triage, gh_review_pr, gh_new_issue. They take one optional argument such as owner/repo or owner/repo 42.
Resource: octoswitch://accounts (names and logins only).
Claude Code extras (installed by install claude-code): the octoswitch skill in ~/.claude/skills/ and the slash commands /gh-accounts, /gh-triage, /gh-review-pr, /gh-new-issue in ~/.claude/commands/. The sources live in content/, including a standard SKILL.md you can copy into any agent that supports Agent Skills.
CLI reference
Command | Description |
| Add or replace an account |
| Show accounts (no tokens) |
| Set the default account |
| Remove an account |
| List supported agents |
| Register the server with an agent |
| Remove it |
| Print the snippet |
| Write project instruction files |
| Run as an MCP server over stdio |
Test
npm testRuns against a fake GitHub API with temporary config and home folders; no real accounts or agent configs are touched.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Operate GitHub from your AI assistant: repos, PRs, issues, Actions. Previews and read-only mode.
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Access the GitHub API, enabling file operations, repository management, search functionality, and…
Manage repositories, users, releases, and automate GitHub workflows
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with GitHub repositories, issues, pull requests, code, and more through a comprehensive set of tools.-
- AlicenseNot gradedqualityCmaintenanceEnables agents to operate multiple GitHub accounts safely from one interface: choosing the right identity per repository, committing and pushing with correct credentials and egress proxy lanes, and running all queries or mutations through a serialized, backoff-retrying API gateway that respects rate limits. It also covers account management, token and quota checks, and executing arbitrary gh commands as a chosen account.MIT
- AlicenseAqualityCmaintenanceEnables AI agents to automate account operations through natural language, exposing ten tools that create repositories, issues, commits and branches, list repositories, issues and commits, comment on and close issues, and diagnose token scopes and rate limits. Validation with Zod, retries with exponential backoff, and error translation into plain language keep the workflow reliable from any MCP-compatible host.10489 npmMIT
- AlicenseNot gradedqualityAmaintenanceA gateway that lets an agent read repositories, issues, and pull requests across multiple GitHub user and organization accounts, with a separate token per owner selected automatically server-side so credentials are never exposed to the client. Optional writes such as creating issues are off by default and require per-request administrator approval.497 npmMIT