Octocode MCP MCP Server

A server for semantic code search and context generation across public and private repositories using LLMs.

Local serverstdio

What is the Octocode MCP MCP server?

Most developer tooling work still happens through a UI a human drives. Octocode MCP MCP server moves it into the conversation instead. A server for semantic code search and context generation across public and private repositories using LLMs.

The short version

Evidence from your local workspace and external sources (GitHub repos, PRs, npm). One toolset: ripgrep + AST search, trees, precise reads, and LSP - as a CLI or MCP server, backed by a Rust engine for fast, token-efficient results across single files or mega-repos.

  • Smart GitHub workflows. — Parallel bulk queries and built-in next-step hints keep the agent on the cheapest path: search broadly, read narrowly, trace semantically. Each result points to the natural follow-up
  • No GitHub required. — Even without GitHub, clone any repository locally and point Octocode's local tools (search, structural AST, LSP, content) at it for the same evidence-first research
  • Reads the shape, not the noise. — Code is minified and skeletonized on the fly across 70+ languages, so an agent grasps a 100 KB file in a few hundred tokens instead of spending its context on boilerplate
  • Fast and self-contained. — Search, parsing, semantic navigation, and redaction run in one prebuilt Rust engine: quick on a laptop or a mega-repo, with no extra toolchain to install
  • Safe by default. — Every byte returned to the model is scanned and secrets redacted first (see Security)

The tools it exposes

The server publishes 14 tools. What each one is for:

  • Skills — npx octocode skill list|install|check|info|remove for bundled Octocode skills
  • ghSearchCode — Code and path search across GitHub by owner, repo, path, filename, extension, and match filters. Accepts 1 to 5 parallel queries
  • ghGetFileContent — Read a GitHub file or region: full file, line range, match slice, or paginated chars
  • ghViewRepoStructure — Browse a repository's directory tree, plus opt-in repo enrichments
  • ghSearchRepos — Discover repositories by keywords, owner, topic, language, stars, updated, license, visibility
  • ghSearchPullRequests — Search pull requests, or deep-read one PR: files, patches, comments, reviews, commits
  • ghSearchIssues — Search issues, or read one issue's body and comments
  • ghSearchCommits — Walk a repo's commit history, or compare two refs (base+head)
  • ghListReleases — List releases + latest, with opt-in assets. Opt-in (ENABLE_RELEASES=true)
  • ghSearchDiscussions — Search a repo's Discussions (Q&A, RFCs, announcements) via GraphQL. Opt-in (ENABLE_DISCUSSIONS=true)
  • ghCloneRepo — Clone a repo or sparse subtree into the local cache for local/LSP analysis. Opt-in on MCP (ENABLE_CLONE=true; CLI on by default)
  • localSearchCode — Local code/text search returning file and line anchors. mode:"structural" runs Octocode AST shape queries (pattern or rule)

Getting it running

octocode on npm is all you need. Most clients run it directly, so configuration is a few lines and a restart.

How it compares

Plenty of developer tooling servers cover similar ground. The differences that matter in practice are scope of access and how much setup stands between you and a working tool call. Octocode MCP's toolset — Skills, ghSearchCode, ghGetFileContent and 11 more — is a fair guide to whether it matches your workflow.

SyncDev reviews every entry in this directory against the project's own documentation before publishing, and revisits them as servers change.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 14 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Octocode MCP.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
Skillsnpx octocode skill list|install|check|info|remove for bundled Octocode skills
ghSearchCodeCode and path search across GitHub by owner, repo, path, filename, extension, and match filters. Accepts 1 to 5 parallel queries.
ghGetFileContentRead a GitHub file or region: full file, line range, match slice, or paginated chars.
ghViewRepoStructureBrowse a repository's directory tree, plus opt-in repo enrichments.
ghSearchReposDiscover repositories by keywords, owner, topic, language, stars, updated, license, visibility.
ghSearchPullRequestsSearch pull requests, or deep-read one PR: files, patches, comments, reviews, commits.
ghSearchIssuesSearch issues, or read one issue's body and comments.
ghSearchCommitsWalk a repo's commit history, or compare two refs (base+head).
ghListReleasesList releases + latest, with opt-in assets. **Opt-in** (ENABLE_RELEASES=true).
ghSearchDiscussionsSearch a repo's Discussions (Q&A, RFCs, announcements) via GraphQL. **Opt-in** (ENABLE_DISCUSSIONS=true).
ghCloneRepoClone a repo or sparse subtree into the local cache for local/LSP analysis. **Opt-in** on MCP (ENABLE_CLONE=true; CLI on by default).
localSearchCodeLocal code/text search returning file and line anchors. mode:"structural" runs Octocode AST shape queries (pattern or rule).
localViewStructureBrowse a local directory tree: depth, filters, pagination, metadata.
localFindFilesFind local files and directories by name, path, regex, extension, size, time, permissions, type.

How to install the Octocode MCP MCP server

{
  "mcpServers": {
    "github-com-bgauryy-octocode": {
      "command": "npx",
      "args": ["-y", "octocode"]
    }
  }
}

Add to claude_desktop_config.json, then restart Claude Desktop.

Example prompts to try

  • Use Octocode MCP to Skills.
  • Use Octocode MCP to ghSearchCode.
  • Use Octocode MCP to ghGetFileContent.

Frequently asked questions

It connects Octocode MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 14 tools (Skills, ghSearchCode, ghGetFileContent, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Octocode MCP directly.