by bgauryy
Code research platform for AI agents; find, understand, and prove context across your code and all of GitHub, in a fraction of the tokens. One toolset, MCP or CLI
# Add to your Claude Code skills
git clone https://github.com/bgauryy/octocodeoctocode is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by bgauryy. Code research platform for AI agents; find, understand, and prove context across your code and all of GitHub, in a fraction of the tokens. One toolset, MCP or CLI. It has 972 GitHub stars.
octocode's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/bgauryy/octocode" and add it to your Claude Code skills directory (see the Installation section above).
octocode is primarily written in Rust. It is open-source under bgauryy on GitHub, so you can review or fork the full source.
Yes. AgentsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh octocode against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
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
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
npx -y octocode-mcp install --enable-local true and choose a client, or name one, as in npx -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 presetsnpx -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 tokenFrom 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
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.
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 | structureSearch finds files, localSearch finds text, and localFetch reads the matching lines. |
CLI default · MCP opt-in |
| Follow a symbol | astSearch matches code by syntax. lspSearch finds definitions, references and callers. |
CLI default · MCP opt-in |
| Read GitHub code | ghSearchRepo finds repositories. ghSearchCode finds code on the default branch. ghStructure browses a tree at a ref, and ghGetFileContent reads a file there. |
Default |
| Trace a change | ghSearchHistory finds commits, pull requests and issues. ghGetHistoryItem opens their patches or discussions and compares revisions. |
Default |
| Look up a package | artifactSearch resolves a package version to registry metadata, dependencies and upstream source when available. |
Default |
| Explore dependencies | graphBuild creates a snapshot. graphQuery finds importers, cycles and files a change can affect. |
Graph package CLI; its MCP server serves build_graph and query_graph |
| Search a GitHub repository locally | ghCloneRepo returns a checkout path for local tools. Requires Git and persistent storage. |
CLI default · MCP opt-in |
| Check known vulnerabilities | securityCheck looks up advisories for a package version, repository or commit and reports affected ranges and known fixes. |
CLI default · MCP opt-in |
| Read by meaning | clasify answers questions about files, images and web pages, or filters search results 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
| Ask your agent | How it can check the answer |
|---|---|
| "Who calls this function?" | Find its declaration with localSearch or astSearch. Give the file, line and symbol to lspSearch, then use localFetch to read a returned call site. |
| "What could break if we change this module?" | Run graphBuild on the project, then graphQuery on that snapshot for importers or impact. Read the affected code before deciding what to test. |
| "Which change introduced this behavior in our dependency?" | Give artifactSearch the locked version. For GitHub source, browse the release ref with ghStructure, read the file at the returned commit with ghGetFileContent, then follow ghSearchHistory to the patch in ghGetHistoryItem. |
| "Does this advisory affect the version we ship?" | Pass the package ecosystem, name and locked version to securityCheck. Check the advisory's affected range and any fixed version against the lockfile. |
| "Which docs or screenshots explain retries?" | Give clasify a localFetch or ghGetFileContent source for a file or image, a URL for a web page, or a supported search query with a predicate. Follow next.read when offered to inspect the evidence. |
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
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 oct