Octocode 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 Server?

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)

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
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 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

A server for semantic code search and context generation across public and private repositories using LLMs. Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.