
Octocode
Research code like a senior staff engineer: GitHub, local FS, and LSP intelligence wired into your AI assistant.
Add to your client
Copy the config for your MCP client and paste it into its config file.
npx octocode-cli installPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"octocode": {
"command": "npx",
"args": [
"octocode-mcp@latest"
]
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Node.js (pulled in automatically by Homebrew when installing the CLI)
- GitHub authentication for the GitHub-backed tools (run `octocode login` for the GitHub OAuth device flow)
About Octocode
Octocode researches code locally and externally and turns it into verifiable evidence your AI can search, read, and trace. It wires 14 research tools — across GitHub, your local filesystem (ripgrep + file/dir browsing), LSP-level code intelligence (go-to-definition, find references, call hierarchy), and npm/PyPI package resolution — into your AI assistant via MCP, or runs the same tools from the terminal as a CLI.
Tools & capabilities (14)
githubSearchCodeSearch code across GitHub repositories.
githubSearchRepositoriesSearch for GitHub repositories.
githubSearchPullRequestsSearch and explore GitHub pull requests.
githubGetFileContentRead file contents from a GitHub repository.
githubViewRepoStructureView the file/directory structure of a GitHub repository.
githubCloneRepoClone a GitHub repository locally.
localSearchCodeSearch code in your local codebase using ripgrep.
localFindFilesFind files in your local codebase.
localGetFileContentRead file contents from your local filesystem.
localViewStructureView the structure of a local directory.
lspGotoDefinitionLSP-level Go to Definition for compiler-level code understanding.
lspFindReferencesLSP-level Find References across the codebase.
lspCallHierarchyLSP-level Call Hierarchy to trace call flows.
packageSearchResolve npm / PyPI packages to their source repositories.
When to use it
- Deep agent research and codebase exploration grounded in verifiable evidence
- Finding real implementations and usage patterns across public and private GitHub repos
- Tracing code flow with LSP go-to-definition, find references, and call hierarchy
- Planning and PR review backed by code search and references
- Resolving npm/PyPI packages to their source repositories
Security notes
GitHub authentication is required for the GitHub-backed tools. Auth is handled via a GitHub OAuth device flow (`octocode login`), with `--hostname` support for GitHub Enterprise. The repo ships a standalone `octocode-security-utils` package. Local tools (ripgrep search, file reading, LSP) operate on your local filesystem.
Octocode FAQ
How do I install Octocode as an MCP server?
Run `npx octocode-cli install` for the interactive installer (handles GitHub OAuth, MCP config, and skills), or add the manual `mcpServers` block with command `npx` and args `["octocode-mcp@latest"]` to your MCP configuration file. Pass `--ide <client>` for a non-interactive install.
Which AI clients are supported?
Cursor, Claude Code, Claude Desktop, Windsurf, Zed, Trae, Antigravity, Kiro, Codex, Opencode, Gemini CLI, Goose, and VS Code Cline / Roo / Continue.
Do I need GitHub authentication?
Yes, for the GitHub-backed tools. Run `octocode login` to start a GitHub OAuth device flow; use `--hostname` for GitHub Enterprise.
Can I use the same tools without an MCP server?
Yes. The CLI exposes the same 14 tools from the terminal, e.g. `octocode tools localSearchCode --queries '{"path":".","pattern":"TODO"}'`.
Alternatives to Octocode
Compare all alternatives →Microsoft's official browser-automation MCP using Playwright's accessibility tree (no vision model).
Up-to-date, version-specific library documentation injected into your coding agent.
LSP-powered coding agent toolkit: semantic symbol search, references and structural edits.
Compare Octocode with: