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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Octoswitchlist open PRs on ApiCartOps/demo and open issues on acme-corp/api"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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: GitHub MCP Server
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
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
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with GitHub through OAuth-authenticated operations including starting authorization flows, listing repositories, and creating issues using stored access tokens.1MIT
- AlicenseAqualityNot gradedmaintenanceEnables AI agents to interact with GitHub repositories through the GitHub REST API for managing files, issues, and repository metadata. It supports both read operations like searching code and write operations such as creating repositories and updating issue comments.9-
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with GitHub repositories, issues, pull requests, code, and more through a comprehensive set of tools.-
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to interact with GitHub, providing tools to list and get repository details using a personal access token.101 npmISC