# Repository Briefing: bgauryy/octocode
> Source: https://repoforai.com/repo/bgauryy/octocode (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/bgauryy/octocode
- **Official Docs / Website**: https://octocode.ai/
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: Rust
- **License**: MIT
- **Engineering Health**: A (82/100 · Maintenance 35/35 · Adoption 16/25 · Releases 11/20 · License 20/20)
- **Latest Release**: 9.1.1 (2025-12-15) — https://github.com/bgauryy/octocode/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: MCP, CLI
- **Momentum**: 974 ★ total (+2 24h / +6 7d) · 80 forks
- **Topics**: `agent`, `ai`, `ai-agents`, `ai-tools`, `claude-ai`, `code-intelligence`, `code-search`, `context`, `cursor`, `cursor-ai`, `development`, `github`
- **When to Use**: Best for: Engineering teams whose coding agents routinely need line-level evidence from local code, upstream versions, and pull requests to investigate debugging or dependency questions. Skip if: 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.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Interface: `octocode-mcp` provides both a stdio MCP server and a CLI with shared tool names and JSON inputs.
- Tool exposure: 17 tools overall; defaults expose 7 over MCP and 14 in the CLI. `full`, `local`, and `github` presets override individual tool settings.
- Local evidence: `astSearch` matches syntax, `lspSearch` finds definitions, references, and callers, and `localFetch` retrieves exact line ranges.
- Upstream provenance: `artifactSearch` starts from a package version; GitHub tools inspect a specific ref and retrieve patches or discussions.
- Dependency graph: The separate Graph package builds snapshots and queries importers, cycles, and potentially affected files.
- Data boundary: Local tools enforce workspace path rules and redact recognized secrets; optional `clasify` sends selected evidence to an external provider.
```

## Quick Start / Clone
```bash
npx -y octocode-mcp localFetch '{"queries":[{"path":"README.md","ranges":[{"startLine":1,"endLine":1}]}]}'
```
