Octocode MCP logo

Octocode MCP

by bgauryy

Researches local code, GitHub repositories, pull requests, issues, commits, and npm packages through MCP.

Install Octocode MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "bgauryy-octocode-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "octocode"
      ],
      "env": {
        "ENABLE_CLONE": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y octocode

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 1mo ago.

Overview

bgauryy/octocode-mcp MCP server gives AI agents tools for researching local projects, GitHub data, and npm packages. It combines code search, precise file reads, repository browsing, AST-shaped queries, dead-code detection, and LSP-based semantic navigation through an MCP interface. GitHub operations can search repositories, code, pull requests, issues, commits, releases, and discussions, while optional cloning brings remote code into the local analysis workflow. Reach for it when an agent needs evidence from source code or project history rather than a general web lookup.

Use cases

  • Search GitHub implementations before changing local code
  • Trace definitions, references, callers, and callees with LSP
  • Review pull requests with files, patches, comments, and commits
  • Find likely dead code across a local repository
  • Compare npm packages with their source repositories

Key features

  • GitHub code, repository, issue, PR, commit, release, and Discussion search
  • Local text, AST, file, structure, and dead-code analysis
  • LSP semantic navigation and diagnostics
  • Repository cloning and sparse subtree analysis
  • Paginated, targeted file reads with result redaction

Tools17

What Octocode MCP lets your agent do. Expand a tool for its parameters.

Self-reported~533 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

20/20 checks healthy over the last 79d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 10d ago via OSV.dev · octocode (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars955Stargazers on the source repository.
npm downloads628Package downloads in the last 30 days.
Last commit7d agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Tools exposed17Callable tools this server registers over MCP.
Directory activity9 viewsConfig copies, upvotes, and views on AllMCPs.

How Octocode MCP works

What the bgauryy/octocode-mcp MCP server does

The bgauryy/octocode-mcp MCP server exposes one research-oriented toolset for local code, GitHub, and npm. It is intended for questions that require inspecting source, tracing changes, or comparing implementation patterns across repositories. Results are designed to provide compact context with file and line anchors rather than returning an entire codebase at once.

The server supports both external and local research. GitHub tools can search code, repositories, pull requests, issues, commits, releases, and Discussions. npm search returns package metadata and the related source repository, allowing an agent to move from package discovery to GitHub inspection. Local tools work against files and directories available to the process.

How it works

The MCP process uses the same toolset and Rust-backed engine as the project’s CLI. A client starts the server over stdio with Node.js and sends tool calls using MCP. The tool catalog includes broad search operations followed by narrower reads, such as retrieving only a matched file region, line range, or character page.

Local code search can use ordinary text matching or structural AST queries. LSP operations provide semantic navigation such as definitions, references, callers, callees, call hierarchies, symbols, hover information, type relationships, implementations, and diagnostics. A repository can also be cloned into the local cache for local and LSP analysis; cloning is enabled by default in the CLI but must be enabled for MCP.

These behaviors are part of the shared engine described by the project.

Setup and configuration

The documented prerequisite is Node.js 20.12 or newer. The MCP configuration runs the package with npx:

config.json
{
  "command": "npx",
  "type": "stdio",
  "args": ["octocode-mcp@latest"]
}

The bgauryy/octocode-mcp MCP server can be added through client-specific installation links for Cursor and Windsurf, or through the project’s general installation flow. For direct execution, the project’s own CLI is started with npx octocode; its tools can be invoked as CLI commands as well as through MCP.

GitHub authentication is optional. Logging in with the CLI can unlock private repositories and higher GitHub API rate limits.

Tools and capabilities

  • Search GitHub code with owner, repository, path, filename, extension, and match filters; up to five queries can run in parallel.
  • Read complete or selected GitHub and local file content using ranges, matches, or pagination.
  • Browse repository trees and local directory structures with filtering and pagination.
  • Search repositories, pull requests, issues, commits, npm packages, and GitHub Discussions.
  • Inspect a pull request or issue in depth, including related files, patches, comments, reviews, commits, and issue comments.
  • Compare GitHub commit references and inspect releases, including optional release assets.
  • Clone repositories or sparse subtrees for local analysis when ENABLE_CLONE=true is set for MCP.
  • Run local text or AST searches, find files, identify likely dead code, and use LSP semantic queries.

Limitations and notes

Release and Discussion tools are opt-in. Repository cloning is also opt-in for MCP and requires ENABLE_CLONE=true; the CLI enables cloning by default. GitHub authentication is not required for basic operation, but unauthenticated access may not provide private-repository access or the higher rate limits available after login.

The package configuration shown in the README uses octocode-mcp@latest; the repository name and package name should not be assumed to identify a different distribution.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Octocode MCP

Run it through Node.js with `npx -y octocode-mcp@latest`, then add the command as a stdio MCP server. Node.js 20.12 or newer is listed as a prerequisite.

The README provides one-click MCP installation links for both Cursor and Windsurf.

No. GitHub authentication is optional, but logging in can enable private-repository access and higher API rate limits.

Set `ENABLE_CLONE=true` for MCP. Cloning is enabled by default when using the CLI.

Yes. It provides local search, file and directory browsing, file reads, dead-code analysis, AST-shaped queries, and LSP semantic tools.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewOctocode MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/bgauryy-octocode-mcp?style=directory)](https://allmcps.com/mcp/bgauryy-octocode-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/bgauryy-octocode-mcp"><img src="https://allmcps.com/api/badge/bgauryy-octocode-mcp?style=directory" alt="Octocode MCP on AllMCPs" /></a>