← Back to directory
O

Octocode MCP - AI Context Platform

Community
Evidence-first code research for AI agents
Category
Dev Tools #60 of 438
Stars
★ 950 Very popular
Transport
stdio (local process)
Runtime
Node.js 20.12+
Credentials
Optional API key
License
MIT
Last commit
Tools
12
64FMRS · C

The supplied materials describe an active stdio MCP server at version 16.2.0 under the MIT license, providing GitHub, local filesystem, npm, LSP, and OQL code-research capabilities.

Strongest · Documentation 15/20 Weakest · Reliability 10/20

Reliability
10/20
Security and permissions
14/20
Maintenance
12/20
Documentation
15/20
Setup experience
13/20
Why each score
Reliability 10/20
The manifest declares stdio transport, an npm package, and the README describes initialization and a tool catalog, so the happy path is plausible. However, the manifest repository and package name octocode-mcp differ from the README’s primary @octocodeai/mcp package, and the supplied material contains no CI, commit, test, or MCP handshake evidence. Those gaps reduce confidence; under the static calibration, the score is capped below 12.
Security and permissions 14/20
The material states that GitHub credentials use environment variables, the gh CLI, or encrypted storage, with GITHUB_TOKEN marked secret. It also describes local path restrictions, sensitive-file blocking, input/output scanning, allowlisted command arguments, and clone functionality disabled by default for MCP. These support a relatively strong security design. However, the claims are primarily README assertions without auditable implementation or data-flow tests, and the required GitHub scopes repo, read:user, and read:org are broad, so full marks are not justified.
Maintenance 12/20
The project is marked unarchived, provides an MIT license, identifies version 16.2.0, and links to a clear GitHub repository and documentation structure, indicating an update path. The supplied material does not show commit cadence, release history, dependency maintenance, vulnerability response, or maintainer governance. Issue count and stars are discovery signals only and add no points, so the score remains moderate.
Documentation 15/20
The README covers CLI and MCP installation, several mainstream client configurations, authentication, tool purposes, configuration precedence, path and clone controls, language support, security, architecture, documentation links, and troubleshooting, with many examples. Deductions apply because the manifest and README disagree on package and repository identity, complete tool schemas and operational limits or costs are not included in the supplied material, and several security and capability claims are not source-auditable here. Full marks are therefore not warranted.
Setup experience 13/20
The project provides npx launch commands, Claude Code and several mainstream client configurations, and multiple GitHub authentication options. The setup path is generally clear. Points are deducted for inconsistent package/version references, reliance on latest in primary install examples, incomplete runtime and platform prerequisites, and the absence of real connection or CI evidence; under static calibration, the score remains at or below 15.

Static review · not runListed 2026-07-29

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesUses the network

Best for

  • AI agents and developers conducting evidence-first code research.
  • Teams analyzing both local workspaces and GitHub repositories.
  • Code review, refactoring, and architecture work requiring semantic navigation, structural search, and compact context.

Not for

  • Users seeking browser automation, cloud storage, collaboration, or database operations.
  • Environments that cannot grant local workspace or GitHub access.
  • Clients requiring a transport other than stdio.

Required permissions

  • Local tools can access paths permitted by configuration; local tools are enabled by default.
  • GitHub tools require GitHub authentication; personal access tokens support repo, read:user, and read:org scopes.
  • When cloning is enabled, the server accesses GitHub repositories and uses a local cache.

Risks and side effects

  • Local tools may read code and files within permitted paths; the server blocks many sensitive files and directories.
  • GitHub tokens are sensitive credentials and should be supplied through environment variables or secure credential management, never committed to version control.
  • Secret scanning and automatic redaction may reduce returned-content completeness.
  • Enabling repository cloning expands local caching and external repository data handling.

Setup

Before you start

Runtime:Node.js 20.12+

GITHUB_TOKEN optionalsecret GitHub Personal Access Token created at github.com/settings/tokens with repo, read:user, read:org scopes; optional if you use npx octocode auth login or gh auth login instead.
OCTOCODE_TOKEN optionalsecret GitHub token read first in the OCTOCODE_TOKEN > GH_TOKEN > GITHUB_TOKEN priority order; set it in the environment.
GH_TOKEN optionalsecret Alternative GitHub token source, used after OCTOCODE_TOKEN.
Other optional settings (5)
ENABLE_LOCAL optional Set to true to enable local filesystem and LSP tools on the MCP server (off by default on MCP).
ENABLE_CLONE optional Set to true to enable the ghCloneRepo tool on the MCP server (off by default on MCP).
WORKSPACE_ROOT optional Absolute root for resolving relative local paths; defaults to cwd.
ALLOWED_PATHS optional Extra path allowlist for local access; empty means home directory only.
GITHUB_API_URL optional GitHub API endpoint, defaults to https://api.github.com; use /api/v3 for GitHub Enterprise.

Start the server with npx octocode-mcp@latest using stdio and add the supplied JSON configuration to an MCP client. GitHub tools require authentication through npx octocode auth login, GitHub CLI, or OCTOCODE_TOKEN, GH_TOKEN, or GITHUB_TOKEN. Repository cloning is disabled by default for MCP and requires ENABLE_CLONE=true.

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

Shown for Cursor. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

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

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Check that it works

Run npx octocode status to confirm the token source, then check that tools like ghSearchCode and ghGetFileContent appear in your client's tool list; asking the assistant to 'search my current directory for authenticate' proves the search path works.

Troubleshooting

  1. Run npx octocode status to check authentication and setup.
  2. If GitHub queries fail, check Octocode login status, GitHub CLI authentication, or token environment variables.
  3. For local-read failures, check WORKSPACE_ROOT, ALLOWED_PATHS, and path permissions.
  4. If cloning is unavailable, check whether ENABLE_CLONE=true is set.
  5. For Node.js issues, run npx node-doctor check --json.

Things to try

Once connected, you can ask your AI assistant things like:

  • Use ghSearchCode to find useCallback usage in facebook/react and show file paths with line numbers
  • Read package. from vercel/next.js on GitHub and show just the dependencies section
  • Show me the repository structure of octocat/Hello-World
  • Search npm for a YAML parsing package and tell me its source repository

Tools 12

ghSearchCode read-only
Search GitHub code and paths by owner, repository, path, filename, extension, and match filters.
ghGetFileContent read-only
Read a GitHub file or region, including full files, line ranges, match slices, and paginated content.
ghViewRepoStructure read-only
Browse a GitHub repository directory tree.
ghSearchRepos read-only
Discover repositories by keywords, owner, topic, language, stars, forks, size, dates, license, and visibility.
ghHistoryResearch
Search pull request history or deeply read one pull request's files, patches, comments, reviews, and commits.
localSearchCode read-only
Search local code or text and run AST structural queries.
localViewStructure read-only
Browse a local directory tree with depth, filters, and pagination.
localFindFiles read-only
Find local files and directories by name, path, regular expression, extension, size, time, permissions, or type.
Show 4 more tools
localGetFileContent read-only
Read a local file or region by exact slice, match string, line range, or pagination.
npmSearch read-only
Look up npm packages and return metadata plus their GitHub source repository.
lspGetSemantics read-only
Use LSP to retrieve definitions, references, callers, callees, call hierarchy, hover data, symbols, and type relationships.
oqlSearch
Run OQL queries across code, content, structure, files, semantics, repositories, packages, pull requests, commits, diffs, and research targets.

Use cases

Verify local or GitHub code evidence before making changes.
Trace definitions, references, call relationships, and code structure with AST and LSP tools.
Research pull requests, commits, npm packages, and implementation patterns across repositories.
Create minified, skeletonized, or paginated context for large files.

Supported clients

Cursor
VS Code
VS Code Insiders
Windsurf
Kiro
Goose
LM Studio
Claude Code

Listed from the project's documentation, not tested by this site.

Overview

Octocode MCP exposes code research tools to AI assistants over stdio. It supports GitHub and local code search, repository structure browsing, precise file reads, AST structural matching, LSP semantic navigation, npm package search, pull request history research, and OQL queries. The MCP server and CLI share a Rust-backed engine for minification, structural extraction, pagination, and secret scanning.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 63.3k · Tools 2 Compare with this →

Source revision c265e3f94131 Data synced 2026-10-19 Read the FMRS scoring method