bgauryy/octocode
MCP server and CLI for tracing code across local workspaces and GitHub
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Octocode packages a stdio MCP server and a CLI in the same octocode-mcp npm distribution. The interfaces share tool names and JSON inputs. Both use user settings under ~/.octocode/ by default and read project settings from .octocode/ in the launch directory. The monorepo includes Yarn configuration and a lockfile, and its root manifest requires Node.js 24.15 or later for the npm path; standalone binaries provide a separate runtime option.
The tool set lets an agent narrow a search before retrieving evidence: find a file or symbol, then fetch the relevant lines, or resolve a GitHub ref before fetching source. Paged responses can carry a next call for the remaining results. Graph analysis lives in a separate package: its CLI builds and queries snapshots, and its MCP server exposes build_graph and query_graph. To use Graph over MCP, enable local tools and add that server separately.
Key Capabilities & Differentiators
Octocode lists 17 tools overall, with 7 available by default over MCP and 14 in the CLI. Locally, structureSearch locates files, localSearch matches text, astSearch matches syntax, and lspSearch finds definitions, references, and callers. localFetch retrieves line ranges so the agent can verify a call site without pulling in the entire file.
On GitHub, code search targets the default branch, while tree browsing and file reads can target a specific ref. History tools connect code to commits, pull requests, issues, patches, and discussions. artifactSearch resolves a version to registry metadata, dependencies, and upstream source when available; securityCheck reports advisory ranges and known fixes. Graph snapshots can reveal importers, cycles, and potentially affected files. Optional clasify adds provider-backed analysis of selected text, images, or web pages.
Trade-offs & Limitations
For a one-off text search in one checkout, ripgrep is simpler. GitHub’s web UI is often enough when you already know the repository or pull request. Octocode earns its place when an agent repeatedly needs to connect a local finding to a locked package version, source at a specific ref, and the patch behind a change. The extra integration work is real: MCP and CLI expose different defaults, presets override individual switches, and anonymous GitHub access excludes code search and private repositories.
Local installation does not make every path offline. GitHub and registry queries contact their respective services, and clasify sends selected evidence, including image pixels when supplied, to the configured provider. Fresh evaluations can incur charges. Workspace path rules and redaction of recognized secrets are useful controls, not guarantees that all sensitive material is removed. The repository is MIT-licensed; that license does not govern access to private repositories or third-party services.
Hardware & Deployment Guide
For npm, use Node.js 24.15 or later. A standalone binary avoids that prerequisite; builds are available for macOS on Apple Silicon and Intel, Linux on x64 and ARM64 with glibc or musl, and Windows on x64 and ARM64. Run npx -y octocode-mcp install --enable-local true to configure a client with workspace tools, and npx -y octocode-mcp auth login if you need GitHub code search or private repositories. Use config list to inspect effective settings and restart the MCP client after changes.
For local-only MCP use, select the local preset rather than just adding local tools to the default set. Graph-based workflows require the additional Graph server, while clone-based workflows need Git and persistent storage. Release 8.0.0 introduced local filesystem research, 9.1.0 added standalone distribution, and 9.1.1 added a release workflow. There is no specified GPU requirement for core code research; measure disk use for retained checkouts and profile graph builds on representative repositories.
octocode-mcp provides both a stdio MCP server and a CLI with shared tool names and JSON inputs.full, local, and github presets override individual tool settings.astSearch matches syntax, lspSearch finds definitions, references, and callers, and localFetch retrieves exact line ranges.artifactSearch starts from a package version; GitHub tools inspect a specific ref and retrieve patches or discussions.clasify sends selected evidence to an external provider.Engineering teams whose coding agents routinely need line-level evidence from local code, upstream versions, and pull requests to investigate debugging or dependency questions.
Most work is one-off search in a single checkout, or policy requires GitHub and provider-backed classification features to work without any external requests.
Quick Start & Installation
npx -y octocode-mcp localFetch '{"queries":[{"path":"README.md","ranges":[{"startLine":1,"endLine":1}]}]}'
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| octocode ★ | 974 | +6 | Rust | MIT | MCP server and CLI for tracing code across local workspaces and GitHub |
| graphify | 156.8k | +2.4k | Python | Apache-2.0 | Local AST graphs for dependency tracing, with CLI and MCP access. |
| codebase-memory-mcp | 49.6k | +335 | C | MIT | A local code graph for tracing code, docs, and infrastructure via MCP. |
| taste-skill | 125.3k | +2.9k | JavaScript | MIT | An agent skill for directing company website design and checking builds in a bro |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/bgauryy/octocode.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about octocode
Do the CLI and MCP server require separate installations?
octocode-mcp serves both roles. An MCP client launches it as a stdio server; in a shell, append a CLI subcommand. The core interfaces share tool names, JSON inputs, and user settings, but expose different tools by default. Dependency graph queries use the separate Graph package, whose MCP server exposes build_graph and query_graph.What runtime and hardware should I budget for?
Can we use it commercially or distribute it in an internal toolchain?
When is Octocode worth adding alongside ripgrep and GitHub’s web interface?
rg is the simpler choice. If you already know the repository or PR, GitHub’s web interface may be enough. Octocode adds value when a coding agent needs to move from local call sites to a locked dependency version, upstream source, and the patch behind a change without switching interfaces.Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy