Skip to content
Skillpedia
● Free and open sourceπŸ’» LocalπŸ”“ No API keyProgramming

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

NameWhat it isRequired
GITHUB_TOKENGitHub 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 GitHub
  • ghGetFileContent: read a GitHub file or part of it
  • ghViewRepoStructure: browse a repository's directory tree
  • ghSearchPullRequests: search or read pull requests
  • localSearchCode: search local code, including structural searches
  • lspGetSemantics: find definitions, references and call hierarchy
  • npmSearch: search npm packages
  • ghCloneRepo: 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

Node.js 20.12 or newer. A GitHub login (npx octocode auth login) is optional and unlocks private repositories and higher rate limits. Local tools and cloning need extra flags on MCP.

Skills that pair well

⭐ Skillpedia MCP Β· freeYour agent finds the right skill on its ownInstall our MCP and your agent searches 15,000+ skills whenever it needs one.Install for free β†’

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.