Octocode MCP is an MCP server that enables AI agents and developers to perform evidence-first code research across both local codebases and external repositories. Backed by a high-performance Rust engine, it connects LLMs to local directories, GitHub repositories, pull requests, commits, and npm packages using a unified toolkit. Software engineers and automated coding assistants use Octocode MCP to execute semantic and AST searches, inspect directory trees, perform precise code reads, and resolve language server protocol diagnostics or call hierarchies. By focusing on targeted reads, automatic code minification across more than 70 programming languages, and built-in secret redaction, the server provides compact, token-efficient context rather than massive context dumps. It allows AI models to systematically locate relevant symbols, evaluate implementation patterns across mega-repos, and verify code logic with concrete file and line anchors before applying modifications or generating documentation.
Category: Developer Tools & Code Intelligence
Tags: codebase, code search, context, repository, semantic search
Follow these steps to install and configure Octocode MCP for your MCP client. 1. Ensure you have Node.js version 20.12 or higher installed on your system. 2. Add the server to your MCP client configuration (such as Cursor, VS Code, Windsurf, or Claude Desktop) using the npx runner: json { "octocode": { "command": "npx", "type": "stdio", "args": ["@octocodeai/mcp@latest"] } } 3. For Claude Code, add the server using the CLI: bash claude mcp add-json octocode --scope user '{"command":"npx","type":"stdio","args":["octocode-mcp@latest"]}' 4. Optionally authenticate GitHub to access private repositories and increase API limits by running npx octocode auth login in your terminal.
Part of MCP Servers
You can install Octocode MCP in MCP-compatible clients by configuring an stdio server entry with the command npx and the arguments array containing @octocodeai/mcp@latest or octocode-mcp@latest. It requires Node.js version 20.12 or newer. You can also run npx octocode install or authenticate GitHub credentials using npx octocode auth login.
Octocode MCP enables AI coding assistants to conduct code research across local folders and remote GitHub repositories. It provides AST search, ripgrep matching, directory browsing, precise file region extraction, and LSP navigation including definitions and call hierarchies. It also offers automatic secret redaction and code minification to reduce LLM context usage.
Octocode MCP works with any client supporting the Model Context Protocol over stdio. Supported clients include Cursor, VS Code, VS Code Insiders, Windsurf, Kiro, Goose, LM Studio, and Claude Code. It can also be operated as a standalone terminal CLI.
No, a GitHub account is not strictly required. Octocode MCP can operate locally against any cloned repository on your filesystem using its built-in search, LSP, and AST tools. However, logging into GitHub via the CLI unlocks access to private repositories and higher GitHub API rate limits.