JUHE API Marketplace
bgauryy avatar
MCP Server

octocode-mcp

An AI code assistant for advanced search and discovery across GitHub repositories.

674
GitHub Stars
1/17/2026
Last Updated
MCP Server Configuration
1{
2 "name": "octocode",
3 "command": "npx",
4 "args": [
5 "octocode-mcp@latest"
6 ]
7}
JSON7 lines
  1. Home
  2. MCP Servers
  3. octocode-mcp

README Documentation

Octocode Logo

A Model Context Protocol (MCP) server enabling AI assistants to search, analyze, and extract insights from millions of GitHub repositories with enterprise-grade security and token efficiency.

Ask DeepWiki Trust Score



Install in Cursor


✨ Featured On


Table of Contents

  • Quick Start
  • Overview
  • GitHub Tools
  • Local Tools
  • Commands
  • Octocode CLI
  • Installation Guide
  • Documentation
  • Examples
  • Community
  • License

Quick Start

Option 1: Octocode CLI (Recommended)

npx octocode-cli

→ Interactive menu for GitHub auth, MCP installation, and AI skills

Option 2: One-Click Install

Install in Cursor

Option 3: Manual Configuration

{
  "mcpServers": {
    "octocode": {
      "command": "npx",
      "args": ["octocode-mcp@latest"]
    }
  }
}

Overview

Octocode is an agentic code research platform that bridges the gap between AI assistants and real-world code implementations. By providing structured access to GitHub's vast repository ecosystem, it enables AI systems to learn from production codebases rather than relying solely on training data.

Core Capabilities

CapabilityImplementationBenefit
Code DiscoveryMulti-dimensional search across repositories, code, and pull requestsFind relevant implementations in seconds
Context ExtractionSmart content retrieval with pattern matching and line-range targetingGet exactly the context you need
Token OptimizationAdvanced minification strategies (50+ language support)30-70% reduction in token consumption
SecurityAutomatic secrets detection and content sanitizationEnterprise-grade data protection
Progressive ResearchWorkflow-driven exploration (Discover → Explore → Analyze)Deep understanding of complex systems
Access ControlGitHub permission-based access to public and private repositoriesOrganization-wide code research

Packages

PackagenpmDescription
octocode-mcpCore MCP server: GitHub API, local filesystem tools, LSP code intelligence
octocode-cliInteractive CLI for IDE setup, skills marketplace, MCP management
octocode-vscodeVS Code MarketplaceVS Code extension for OAuth and multi-editor sync
octocode-sharedInternalShared utilities for credentials and session management

GitHub Tools

Five specialized tools for comprehensive GitHub code research:

šŸ” githubSearchCode

Find code implementations across repositories

FeatureDescription
Content SearchFind code inside files by keywords (AND logic)
Path SearchDiscover files/directories by name (25x faster)
Smart FilteringScope by repository, path, file extension, or popularity
Context-Rich ResultsReturns code snippets with surrounding context
• "How do popular repos implement OAuth?"
• "Search for React custom hooks in vercel repos"
• "Find error handling patterns in Express apps"

šŸ“š githubSearchRepositories

Discover repositories by topics and keywords

FeatureDescription
Topic-Based DiscoverySearch by exact GitHub topics (most precise)
Keyword SearchFind repos by name, description, or README content
Quality FiltersFilter by stars, language, size, activity
• "Discover TypeScript CLI tools with >1000 stars"
• "Find all React state management libraries"
• "List all repos from microsoft with topic 'ai'"

šŸ—‚ļø githubViewRepoStructure

Explore repository directory structure

FeatureDescription
Directory TreeVisual representation of folder structure
Depth ControlExplore 1 level (overview) or 2 levels (detailed)
Path TargetingNavigate directly to specific directories
• "Show me the structure of facebook/react"
• "Explore src/ directory in a monorepo"

šŸ“„ githubGetFileContent

Read file contents with smart extraction

FeatureDescription
Pattern MatchingExtract sections matching specific patterns with context
Line Range ReadingRead specific line ranges for efficiency
Content MinificationAutomatic optimization for token efficiency
• "Get the validateUser function from auth.ts"
• "Read lines 100-150 from the API handler"

šŸ”€ githubSearchPullRequests

Analyze pull requests, changes, and discussions

FeatureDescription
PR DiscoverySearch by state, author, labels, dates
Direct AccessFetch specific PR by number (10x faster)
Code DiffsInclude full diff content to see what changed
DiscussionsAccess comment threads and review discussions
• "Show recent merged PRs about authentication"
• "Find PRs discussing the API redesign with comments"

Local Tools

Octocode Local provides local filesystem research with LSP-powered code intelligence.

Install in Cursor

{
  "mcpServers": {
    "octocode-local": {
      "command": "npx",
      "args": ["octocode-mcp-local@latest"]
    }
  }
}

Filesystem Tools

ToolDescriptionExample
šŸ“ localViewStructureExplore directory structure with depth control"Show src/ with depth 2"
šŸ” localSearchCodeFast pattern search (ripgrep-powered)"Search for 'useAuth' in TypeScript files"
šŸ“‚ localFindFilesFind files by metadata (name, time, size)"Find files modified in the last 7 days"
šŸ“„ localGetFileContentRead files with smart extraction"Show the validateUser function"

LSP Tools (Code Intelligence)

ToolDescriptionExample
šŸŽÆ lspGotoDefinitionNavigate to symbol definitions"Go to the definition of handleSubmit"
šŸ”— lspFindReferencesFind all usages of a symbol"Find all references to validateToken"
🌳 lspCallHierarchyTrace function call relationships"Who calls the authenticate function?"

Research Workflows

Discovery:    localViewStructure → localSearchCode → localGetFileContent
Semantic:     localSearchCode → lspGotoDefinition → lspFindReferences
Flow Analysis: localSearchCode → lspCallHierarchy(incoming) → lspCallHierarchy(outgoing)

šŸ‘‰ Full LSP Documentation →


Commands

Intelligent prompt commands that enhance your research workflow:

/research - Expert Code & Product Research

Deep code discovery, documentation analysis, pattern identification, and bug investigation.

When to use:

  • Understanding repository workflows and technical implementations
  • Cross-repository flow analysis and microservices tracing
  • Bug investigation and root cause analysis
  • Pattern discovery across multiple repos
/research How does React's useState hook work internally?
/research Compare state management approaches: Redux vs Zustand vs Jotai
/research Why is the payment webhook failing? Trace the error through payment-service

/plan - Research, Plan & Implement Complex Tasks

Your AI architect for complex development work. Breaks down tasks, researches patterns, guides execution.

When to use:

  • Building new features with research-backed architecture
  • Complex refactoring with migration planning
  • Learning new technologies incrementally
/plan Build a real-time chat application with WebSocket support
/plan Migrate our authentication from JWT to OAuth2
/plan Implement a plugin system for our CLI tool

/review_pull_request - Comprehensive PR Review

Args: prUrl (required) - GitHub Pull Request URL

Expert-level PR review with Defects-First mindset. Analyzes:

  • Defects & Bugs: Logic errors, edge cases, race conditions
  • Security Issues: Injection vulnerabilities, auth bypasses
  • Performance: N+1 queries, memory leaks
  • Code Quality: Complexity, maintainability, test coverage
/review_pull_request prUrl: https://github.com/facebook/react/pull/12345

/review_security - Security Audit

Args: repoUrl (required) - GitHub repository URL

Comprehensive security analysis. Analyzes:

  • Authentication & Authorization: Auth flows, session management
  • Input Validation: Injection points, sanitization
  • Secrets Management: Hardcoded credentials, API keys
  • Dependencies: Known vulnerabilities, supply chain risks
/review_security repoUrl: https://github.com/your-org/your-repo

šŸ’” Pro Tip: Combine /research and /plan — research existing patterns first, then plan your implementation.


Octocode CLI

One-command setup for Octocode, MCP servers, and AI skills across all your IDEs.

Octocode CLI

npx octocode-cli@latest
FeatureDescription
Multi-IDE SupportCursor, VS Code, Claude Desktop, Windsurf, and more
Skills Marketplace7+ community sources with 170+ skills
MCP Registry50+ curated MCP servers ready to install
GitHub AuthBrowser-based OAuth or GitHub CLI integration
šŸ™ Octocode MCP        - Install/sync Octocode across IDEs
🧠 Manage System Skills - Browse marketplace, install & manage skills  
⚔ Manage System MCP    - Add popular MCP servers to your setup

Learn More: CLI Documentation | What are Skills?


Installation Guide

Prerequisites

  • Node.js >= 18.12.0 (or use standalone binary)
  • GitHub Authentication: GitHub CLI (recommended) or Personal Access Token

Authentication Methods

GitHub CLI (Recommended)

Advantages: Automatic token management, works with 2FA, supports SSO

# macOS
brew install gh

# Windows
winget install --id GitHub.cli

# Linux - See https://github.com/cli/cli/blob/trunk/docs/install_linux.md

# Authenticate
gh auth login

Then use the standard configuration (no GITHUB_TOKEN needed).

Personal Access Token

When to use: CI/CD environments, automation, or if GitHub CLI isn't available

  1. Create a token at github.com/settings/tokens
  2. Select scopes: repo, read:user, read:org
  3. Add to your MCP configuration:
{
  "mcpServers": {
    "octocode": {
      "command": "npx",
      "args": ["octocode-mcp@latest"],
      "env": {
        "GITHUB_TOKEN": "ghp_your_token_here"
      }
    }
  }
}

Security Tip: Never commit tokens to version control.

GitHub Enterprise

Add the GITHUB_API_URL environment variable:

{
  "mcpServers": {
    "octocode": {
      "command": "npx",
      "args": ["octocode-mcp@latest"],
      "env": {
        "GITHUB_TOKEN": "your_token",
        "GITHUB_API_URL": "https://github.company.com/api/v3"
      }
    }
  }
}

IDE-Specific Setup

Cursor

One-click: Install in Cursor

Manual: Go to Cursor Settings → MCP → Add new MCP Server. Use command npx octocode-mcp@latest.

Project-specific: Create .cursor/mcp.json in your project root with the standard config.

VS Code

One-click:

CLI:

code --add-mcp '{"name":"octocode","command":"npx","args":["octocode-mcp@latest"]}'
Claude Desktop / Claude Code

Claude Code CLI:

claude mcp add octocode npx octocode-mcp@latest

Claude Desktop: Follow the MCP install guide, use the standard config.

Amp

VS Code settings.json:

"amp.mcpServers": {
  "octocode": {
    "command": "npx",
    "args": ["octocode-mcp@latest"]
  }
}

Amp CLI:

amp mcp add octocode -- npx octocode-mcp@latest
Codex

CLI:

codex mcp add octocode npx "octocode-mcp@latest"

Config file (~/.codex/config.toml):

[mcp_servers.octocode]
command = "npx"
args = ["octocode-mcp@latest"]
Goose

One-click: Install in Goose

Manual: Go to Advanced settings → Extensions → Add custom extension. Use type STDIO, command npx octocode-mcp@latest.

LM Studio

One-click: Add MCP Server octocode to LM Studio

Manual: Go to Program → Install → Edit mcp.json. Use the standard config.

Other IDEs (Cline, Gemini CLI, Kiro, opencode, Qodo Gen, Warp, Windsurf, Zed)

All use the standard configuration:

{
  "mcpServers": {
    "octocode": {
      "command": "npx",
      "args": ["octocode-mcp@latest"]
    }
  }
}

See each IDE's MCP documentation for the specific config file location.

Verify Installation

  1. Restart your MCP client completely
  2. Check connection status:
    • Cursor: Green dot in Settings → Tools & Integrations → MCP Tools
    • Claude Desktop: Check for "octocode" in available tools
    • VS Code: Verify in GitHub Copilot settings
  3. Test: Search GitHub for React hooks implementations

Documentation

ResourceDescription
Configuration GuideEnvironment variables and server configuration
Authentication GuideSetup instructions and troubleshooting
GitHub Tools ReferenceFull GitHub tools documentation
Local Tools ReferenceFull local tools documentation
LSP ToolsCode intelligence features

Examples

ThreeJS Implementation Quality Comparison

Interactive Demo

Side-by-side comparison showing Generic AI vs Octocode-Enhanced AI implementation quality:

  • Performance optimizations from high-performance projects
  • Proper resource management patterns
  • Industry-standard error handling

Deep Technical Research

YouTube: React Hooks Internals

Progressive research workflow demonstration:

  1. Repository discovery (React source)
  2. Structure exploration (hooks implementation)
  3. Code analysis (internal mechanisms)
  4. Comprehensive explanation with code references

Community

Get Support

  • GitHub Discussions: Ask questions, share ideas
  • GitHub Issues: Report bugs, request features

Show Your Support

If Octocode helps your AI development workflow:

  • ⭐ Star the repository on GitHub
  • šŸ“£ Share on social media with #OctocodeMCP

License

MIT - See LICENSE for details.

Quick Install

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.aiFeatured on ShowMeBestAI
Copyright Ā© 2026 JUHEDATA HK LIMITED - All rights reserved