T

octocode-mcp

Created Oct 19, 2025 by bgauryy

Language:

Typescript

Stars:

0

Forks:

0

README

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.

MCP Community Server Ask DeepWiki Trust Score


✨ Featured On

MCP Official Servers Awesome MCP Servers


Table of Contents


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

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

Capability Implementation Benefit
Code Discovery Multi-dimensional search across repositories, code, and pull requests Find relevant implementations in seconds
Context Extraction Smart content retrieval with pattern matching and line-range targeting Get exactly the context you need
Token Optimization Advanced minification strategies (50+ language support) 30-70% reduction in token consumption
Security Automatic secrets detection and content sanitization Enterprise-grade data protection
Progressive Research Workflow-driven exploration (Discover → Explore → Analyze) Deep understanding of complex systems
Access Control GitHub permission-based access to public and private repositories Organization-wide code research

Packages

Package npm Description
octocode-mcp npm Core MCP server: GitHub API, local filesystem tools, LSP code intelligence
octocode-cli npm Interactive CLI for IDE setup, skills marketplace, MCP management
octocode-vscode VS Code Marketplace VS Code extension for OAuth and multi-editor sync
octocode-shared Internal Shared utilities for credentials and session management

GitHub Tools

Five specialized tools for comprehensive GitHub code research:

🔍 githubSearchCode

Find code implementations across repositories

Feature Description
Content Search Find code inside files by keywords (AND logic)
Path Search Discover files/directories by name (25x faster)
Smart Filtering Scope by repository, path, file extension, or popularity
Context-Rich Results Returns 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

Feature Description
Topic-Based Discovery Search by exact GitHub topics (most precise)
Keyword Search Find repos by name, description, or README content
Quality Filters Filter 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

Feature Description
Directory Tree Visual representation of folder structure
Depth Control Explore 1 level (overview) or 2 levels (detailed)
Path Targeting Navigate directly to specific directories
• "Show me the structure of facebook/react"
• "Explore src/ directory in a monorepo"

📄 githubGetFileContent

Read file contents with smart extraction

Feature Description
Pattern Matching Extract sections matching specific patterns with context
Line Range Reading Read specific line ranges for efficiency
Content Minification Automatic 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

Feature Description
PR Discovery Search by state, author, labels, dates
Direct Access Fetch specific PR by number (10x faster)
Code Diffs Include full diff content to see what changed
Discussions Access 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.

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

Filesystem Tools

Tool Description Example
📁 localViewStructure Explore directory structure with depth control "Show src/ with depth 2"
🔍 localSearchCode Fast pattern search (ripgrep-powered) "Search for 'useAuth' in TypeScript files"
📂 localFindFiles Find files by metadata (name, time, size) "Find files modified in the last 7 days"
📄 localGetFileContent Read files with smart extraction "Show the validateUser function"

LSP Tools (Code Intelligence)

Tool Description Example
🎯 lspGotoDefinition Navigate to symbol definitions "Go to the definition of handleSubmit"
🔗 lspFindReferences Find all usages of a symbol "Find all references to validateToken"
🌳 lspCallHierarchy Trace 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.

npx octocode-cli@latest
Feature Description
Multi-IDE Support Cursor, VS Code, Claude Desktop, Windsurf, and more
Skills Marketplace 7+ community sources with 170+ skills
MCP Registry 50+ curated MCP servers ready to install
GitHub Auth Browser-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

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:

Manual: Go to Cursor SettingsMCPAdd 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 settingsExtensionsAdd custom extension. Use type STDIO, command npx octocode-mcp@latest.

LM Studio

One-click: Add MCP Server octocode to LM Studio

Manual: Go to ProgramInstallEdit 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

Resource Description
Configuration Guide Environment variables and server configuration
Authentication Guide Setup instructions and troubleshooting
GitHub Tools Reference Full GitHub tools documentation
Local Tools Reference Full local tools documentation
LSP Tools Code 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

Show Your Support

If Octocode helps your AI development workflow:

  • Star the repository on GitHub
  • 📣 Share on social media with #OctocodeMCP

Privacy & Telemetry

Octocode collects de-identified telemetry data to improve the tool, including command usage and error rates. We never collect source code, environment variables, or PII.

You can opt-out at any time:

export OCTOCODE_TELEMETRY_DISABLED=1

For full details, please read our Privacy Policy and Terms of Usage.


License

This project is licensed under the MIT License.

Copyright © 2026 Octocode AI.

See LICENSE for details.

Last updated: Oct 19, 2025

More MCP servers built with Typescript

Vue.js

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

By vuejs 209.9K
Excalidraw

Virtual whiteboard for sketching hand-drawn like diagrams

By excalidraw 114.9K
Angular

Deliver web apps with confidence 🚀

By angular 99.7K