Octocode MCP
This server provides evidence-first code research tools for local workspaces, GitHub repositories, and package registries.
Search local files by content and metadata, inspect directory structure, and read file ranges or pattern matches.
Search GitHub repositories, code, and pull requests, browse repository structure, and fetch file contents or download directories.
Navigate code semantically with LSP tools for definitions, references, and incoming/outgoing call hierarchies.
Look up npm and Python packages to resolve package metadata, repository links, dependencies, and versions.
Run batched queries with structured results, pagination, hints, and error/rate-limit details.
Integration for supporting the developer through the Buy Me a Coffee platform
Provides deep search and discovery across GitHub repositories, enabling access to code, issues, pull requests, and commit histories from both public and private repositories while respecting organizational permissions
Provides specialized search capabilities for Next.js applications, particularly for finding authentication patterns and implementation examples
Enables package discovery and analysis in the Node.js ecosystem, with capabilities to research metadata, dependencies, and repository connections
Allows exploration of Python packages with cross-ecosystem comparison capabilities
Offers targeted research into React's implementation details, including specific features like concurrent rendering
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., "@Octocode MCP find popular React component libraries with TypeScript support"
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.
Octocode
Octocode helps you answer questions about code and show where the answer came from. Trace a caller to its source line, find the pull request behind a change, or check whether an advisory affects the version in your lockfile. Use the same tools in your coding agent over MCP or from the terminal.
Install · Tools · Workflows · Configuration · Skills
Install
One npm package, octocode-mcp, is both the MCP server and the CLI: an MCP client runs it bare, and npx -y octocode-mcp <command> runs a CLI command. It requires Node.js 24.15 or later. Prebuilt binaries cover macOS on Apple Silicon or Intel, Linux on x64 or ARM64 (glibc, or musl such as Alpine), and Windows on x64 or ARM64. Native installation
Connect your agent over MCP
Add Octocode to your client: run
npx -y octocode-mcp install --enable-local trueand choose a client, or name one, as innpx -y octocode-mcp install --ide cursor --enable-local true. Without--enable-local true, the server lists only the GitHub and package tools. To pick a whole tool set instead, add--preset full(every tool),--preset local(local tools only) or--preset github(GitHub tools only). Tool presetsSign in to GitHub:
npx -y octocode-mcp auth login. Without a token, GitHub tools run anonymously, with no code search or private repositories. Sign-in steps · Other ways to add a tokenRestart the client. In a project with a README, ask "Use Octocode to read the first line of README.md." The answer quotes that line.
Run the CLI
From a project with a README, run this command. The output includes the README's first line.
npx -y octocode-mcp localFetch '{"queries":[{"path":"README.md","ranges":[{"startLine":1,"endLine":1}]}]}'Run npx -y octocode-mcp --help for every command. GitHub code search and private repositories need a sign-in: npx -y octocode-mcp auth login; npx -y octocode-mcp auth status shows the account in use. GitHub authentication
One-click installs
The IDE buttons (Cursor, VS Code, VS Code Insiders, Windsurf, Kiro) add the local tools with the GitHub and package tools: their server entry sets OCTOCODE_ENABLE_LOCAL=true. Goose and LM Studio are chat apps that open no project, so their buttons add the GitHub and package tools only; to add the local tools there, run npx -y octocode-mcp config set local.enabled true. After any button, sign in with npx -y octocode-mcp auth login and restart the client.
Related MCP server: MCP Indexer
Tools
17 tools. With default settings you get 7 tools over MCP and 14 in the CLI. Set OCTOCODE_ENABLE_LOCAL=true in the MCP server entry to add the local tools, or choose a whole set with OCTOCODE_TOOLS_PRESET (full, local, github), which then overrides every other tool setting. Tool presets Both interfaces use the same tool names and JSON inputs.
Task | Tools | Availability |
Find and read local code |
| CLI default · MCP opt-in |
Follow a symbol |
| CLI default · MCP opt-in |
Read GitHub code |
| Default |
Trace a change |
| Default |
Look up a package |
| Default |
Explore dependencies |
| Graph package CLI; its MCP server serves |
Search a GitHub repository locally |
| CLI default · MCP opt-in |
Check known vulnerabilities |
| CLI default · MCP opt-in |
Read by meaning |
| Provider key on both |
Run npx -y octocode-mcp schema to list the tools available in your CLI. For a tool's inputs and examples, try npx -y octocode-mcp schema localFetch --view variants. Tool reference
How an agent uses Octocode
Ask your agent | How it can check the answer |
"Who calls this function?" | Find its declaration with |
"What could break if we change this module?" | Run |
"Which change introduced this behavior in our dependency?" | Give |
"Does this advisory affect the version we ship?" | Pass the package ecosystem, name and locked version to |
"Which docs or screenshots explain retries?" | Give |
For repeated searches across a remote repository, run ghCloneRepo once and give its returned path to local tools. For a paged result, follow the returned next call to reach the remaining evidence. Graph examples · Classification examples and request budgets · Reading paged results
Configuration
Run npx -y octocode-mcp config list to see effective settings, defaults and sources. Octocode reads project settings from .octocode/ in its launch directory. CLI and MCP share user settings in the Octocode home, normally ~/.octocode/. Run npx -y octocode-mcp config home to see its location.
To enable | Do this once for your user |
Local tools in MCP |
|
Graph tools in MCP | Add the Octocode Graph MCP server, with local tools on |
Repository cloning in MCP |
|
Advisory lookups in MCP |
|
Classification in CLI and MCP |
|
Restart MCP after a settings change. Settings, scopes and workspace permissions · Which GitHub token wins
Security
Local tools enforce workspace path rules and redact recognized secrets from text. GitHub and registry lookups contact their respective services. Classification sends selected evidence, including supplied image pixels, to your configured provider. Fresh evaluations can incur charges. Security and advisory requests · Storage and caches · Privacy
Skills
Skills give your agent a workflow for a task. Run npx -y octocode-mcp skill list to see the bundled skills and their installation status. To add code research to a Codex project, run this from its root.
npx -y octocode-mcp skill install octocode-research --platform codex --project-dir .What you want to do | Public skills |
Get set up and investigate code | |
Explore dependencies and visualize a repository | |
Evaluate ideas and design changes | octocode-brainstorming, octocode-engineer, octocode-rfc-generator, octocode-generate |
Review, test and document code | octocode-pr-review, octocode-test-plan, octocode-roast, octocode-clean-agentic-code, octocode-documentation |
Research the web or operate a browser | |
Build agent workflows and coordinate work | octocode-agentic, octocode-skills, octocode-workflows, octocode-orchestrator, octocode-messages-proxy |
Skill descriptions and installation options
Documentation
User guides and reference · CLI · MCP client setup · Tool catalog · Language support
VS Code extension · Claude Code plugin · Codex plugin · Benchmarks · Contributing · MIT license
Available Tools
13 toolsgithubGetFileContentAIdempotent
Read GitHub file or download directory [EXTERNAL: GitHub API]
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
githubSearchCodeARead-onlyIdempotent
Search GitHub code [EXTERNAL: GitHub API]
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
githubSearchPullRequestsARead-onlyIdempotent
Search GitHub Pull Requests [EXTERNAL: GitHub API]
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
githubSearchRepositoriesARead-onlyIdempotent
Search GitHub repositories [EXTERNAL: GitHub API]
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
githubViewRepoStructureARead-onlyIdempotent
Display GitHub repo structure [EXTERNAL: GitHub API]
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
localFindFilesARead-onlyIdempotent
Find files by metadata [LOCAL: filesystem]
Config/docs: localGetFileContent directly
Faster than content search (metadata indexing)
excludeDir for noise (node_modules, dist, .git)
Time: '7d', '2h', '30m'
path="/workspace/src", name="*.ts", modifiedWithin="7d"
path="/workspace", iname="readme", type="f"
path="/workspace", sizeGreater="10M", excludeDir=["node_modules"]
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
localGetFileContentARead-onlyIdempotent
Read file content [LOCAL: filesystem]
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
localSearchCodeARead-onlyIdempotent
Search code patterns [LOCAL: ripgrep] - START HERE for code questions
Without LSP:
localGetFileContent(matchString) for context
lineHint is 1-indexed (first line = 1)
filesOnly=true for fast discovery
type filter (ts, js, py) faster than globs
path="/workspace/src", pattern="function handleAuth", type="ts"
path="/workspace", pattern="export.*UserService", perlRegex=true
path="/workspace", pattern="TODO", filesOnly=true
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
localViewStructureARead-onlyIdempotent
View directory structure [LOCAL: filesystem]
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
lspCallHierarchyARead-onlyIdempotent
Trace function call relationships [LOCAL: LSP]
REQUIRES lineHint - call localSearchCode FIRST to get line number
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
lspFindReferencesARead-onlyIdempotent
Find all usages of a symbol [LOCAL: LSP]
REQUIRES lineHint - call localSearchCode FIRST to get line number
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
lspGotoDefinitionARead-onlyIdempotent
Navigate to symbol definition [LOCAL: LSP]
REQUIRES lineHint - call localSearchCode FIRST to get line number
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
packageSearchARead-onlyIdempotent
Find NPM/Python packages [EXTERNAL: npm/PyPI]
Inputs: queries (required), responseCharOffset, responseCharLength. Returns: results, responsePagination
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 13 tools
Each tool targets a distinct operation: GitHub tools for remote repo actions (get file, search code, search PRs, search repos, view structure), local tools for filesystem actions (find files, get file content, search code, view structure), LSP tools for semantic analysis (goto definition, find references, call hierarchy), and a separate package search tool. There is no overlap in purpose.
All tool names follow a consistent camelCase pattern with a prefix indicating domain (github, local, lsp) followed by a verb-noun combination (e.g., githubGetFileContent, localSearchCode, lspGotoDefinition). The naming is predictable and intuitive.
13 tools is well-scoped for a server that combines GitHub API exploration (5 tools), local filesystem analysis (4 tools), LSP-based code navigation (3 tools), and package search (1 tool). Each tool serves a clear purpose and contributes to the overall functionality without bloat.
The tool set covers the complete lifecycle for code exploration and analysis: discovery (search repos, view structure, find files), content access (get file content, search code), semantic navigation (goto definition, find references, call hierarchy), and package lookup. There are no obvious gaps for the server's stated purpose.
Maintenance
Related MCP Connectors
Search, read and explain your GitHub repositories: code, symbols, imports, history and ownership.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Provide AI-powered real-time analysis and intelligence on NPM packages, including security, depend…
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Related MCP Servers
- AlicenseCqualityDmaintenanceA free, open-source service that transforms GitHub projects into MCP endpoints, enabling AI assistants to access and understand project documentation without any setup.328,542Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables semantic code search across multiple repositories using natural language queries. Provides intelligent code discovery, symbol lookups, and cross-repo dependency analysis for AI coding agents.MIT
- AlicenseAqualityAmaintenanceA local-first codebase intelligence tool that enables AI assistants to research codebases using semantic search, multi-hop relationship discovery, and structural parsing. It allows users to extract architectural patterns and institutional knowledge across 30+ programming languages through an MCP-compatible interface.22,894 PyPI1,469MIT
- AlicenseNot gradedqualityDmaintenanceProvides semantic code search and code insights via a knowledge graph, enabling AI to understand, navigate, and modify complex projects with deep dependency and architecture analysis.MIT