Octocode MCP
Lets your AI agent search and read code on GitHub and on your computer with evidence, using fewer tokens.
957 stars on GitHubby bgauryy (Octocode)License MITUpdated 19 days ago
How to install
This MCP is local: it runs on your computer.
It works in apps installed on your PC (Claude Desktop, Claude Code, Cursor, VS Codeβ¦). Choose your app:
Paste in the terminal:
claude mcp add octocode -- npx -y octocode-mcp
What to fill in
| Name | What it is | Required |
|---|---|---|
GITHUB_TOKEN | GitHub Personal Access Token. Optional - authenticate via GitHub CLI (gh auth login) for automatic token management, or set this token manually for CI/CD environments. | No |
Ready! Now test it
Restart the app and paste one of these requests in the chat:
Find how popular libraries implement retry logic and show me the exact lines.
Show me all callers of the authenticate function in my project.
What it is
Octocode is a code research tool for AI agents. It searches and reads both your local code and external code on GitHub and npm, including repositories, pull requests, commits and issues. It also uses language servers and structural search to follow definitions and references. A built-in Rust engine keeps results small and removes secrets before the model sees them.
What it can do
ghSearchCode: search code across GitHubghGetFileContent: read a GitHub file or part of itghViewRepoStructure: browse a repository's directory treeghSearchPullRequests: search or read pull requestslocalSearchCode: search local code, including structural searcheslspGetSemantics: find definitions, references and call hierarchynpmSearch: search npm packagesghCloneRepo: clone a repository for local analysis
When to use
- βΊWhen you want your agent to find how other projects on GitHub solve a problem before it changes your code
- βΊWhen you want to trace who calls a function across a large codebase
- βΊWhen you want to review a pull request or see the commit that introduced a bug
What you need
Skills that pair well
MCP or skill?
The MCP gives the agent the hands. The skill teaches the right way to use them. Together, the result is better and uses fewer tokens.
smart-exploreSearches code intelligently and efficiently. It helps understand code structure, find functions, and explore projects without reading everything.githubLets your agent check GitHub pull requests and CI runs, read failed build logs, and query repository data with the gh tool.make-repo-contributionEnsures code contributions follow project rules. It helps create issues, commits, and pull requests correctly, following the repository's documentation.Frequently asked questions
Is it free and open source?
The readme does not state a price. It runs from npx and has a free GitHub login option; it does not say more about licensing in the text given.
Do I need a GitHub account?
Not required. It is optional but unlocks private repositories and higher API rate limits.
How many tools does it have?
The full catalog has 17 tools. By default MCP registers 8; flags such as ENABLE_LOCAL=true and ENABLE_CLONE=true add more.
Is it safe to send my code through it?
The readme says every byte sent to the model is scanned and secrets are redacted first.
Can I use it without MCP?
Yes. The same tools run as a command line program with npx octocode.
Which editors can install it in one click?
Cursor, VS Code, Windsurf, Kiro, Goose and LM Studio have install links. Claude Code uses a claude mcp add-json command.
If it does not work
- βΊCheck that Node.js 20.12 or newer is installed.
- βΊRun npx octocode status to verify which GitHub token is active.
- βΊIf local tools are missing, set ENABLE_LOCAL=true in the server env; for cloning set ENABLE_CLONE=true.
5 new skills a week. 1 minute to read.