JUHE API Marketplace
bgauryy avatar
MCP Server

octocode-mcp

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

472
GitHub Stars
10/2/2025
Last Updated
MCP Server Configuration
1{
2 "name": "octocode",
3 "command": "npx",
4 "args": [
5 "octocode-mcp@latest"
6 ]
7}
JSON7 lines

README Documentation

Octocode MCP - Smart Assistant for Code Context Creation

The missing piece for AI agents that need quality code context. Transform any AI assistant into a code research expert that enriches context for better code handling, documentation, and complex ecosystem solutions.

Octocode Logo

Ask DeepWiki Trust Score

🎯 Why Octocode MCP?

Octocode MCP closes the code‑context gap by giving AI assistants secure, real-time access to public/private code anywhere so they reason from real implementations and have a better, more quality context.

🚀 Core capabilities

  • 🌍 context generation from code anywhere
  • 🔍 Smart semantic code discovery
  • 🌟 Learn and search anything from top public repositories
  • 🧭 Discover anything from complex multi‑repo scenarios
  • 🏗️ Ecosystem‑aware solutions across stacks and orgs
  • 📚 Docs and example enrichment from production code
  • 🔄 Progressive research flows for deep understanding

💡 Ideal for

  • Code creation, complex bug fixes, architecture insight, documentation, learning, and navigating large codebases...

🚀 Quick Setup

Prerequisites

  • Node.js >= 18.12.0
  • GitHub Authentication (choose one method below)

Authentication Setup

Option 1: GitHub CLI (Recommended)

# Install GitHub CLI if needed
# macOS: brew install gh
# Windows: winget install --id GitHub.cli

# Authenticate
gh auth login

Option 2: Personal Access Token

  1. Create token at GitHub Settings → Personal Access Tokens
  2. Required scopes: repo, read:user, read:org

MCP Configuration

Add to your AI assistant's MCP configuration:

With GitHub CLI:

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

With Personal Access Token:

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

That's it! Your AI assistant can now search and analyze GitHub repositories.

🛠️ Available Research Tools

ToolPurposeDefaultDescription
githubSearchCodeCode DiscoverySearch code across repositories with semantic queries
githubSearchRepositoriesRepository DiscoveryFind repositories by topic, language, or description
githubViewRepoStructureStructure AnalysisExplore repository file structure and navigation
githubGetFileContentContent AccessFetch specific files or code sections with context
githubSearchPullRequestsHistory AnalysisAnalyze pull requests and code changes

Default tools are automatically enabled. Non-default tools require configuration (see Advanced Setup below).

🎯 Real-World Context Creation Examples

Code Creation Context:

"I need to implement OAuth2 in my Node.js app - show me real implementations"
→ Finds proven OAuth2 patterns → Analyzes security practices → Provides implementation context

Complex Ecosystem Solutions:

"How do large organizations handle microservices communication?"
→ Discovers enterprise patterns → Examines real architectures → Explains design decisions

Documentation Enhancement:

"Find real examples of GraphQL error handling for my API docs"
→ Searches GraphQL implementations → Extracts error patterns → Provides documentation examples

Best Practices Discovery:

"What are the current best practices for React state management in 2024?"
→ Analyzes modern React apps → Compares state solutions → Identifies trending patterns

See the dramatic difference in AI assistant capability: 🎯 Live Demo: ThreeJS Code Creation Comparison

This interactive comparison shows how Octocode MCP transforms AI assistants from providing generic code suggestions to delivering expert-level, context-rich implementations with real-world patterns and best practices.

📺 Examples

Example 1: Deep code research with Octocode

  • Prompt:
Explain deeply how React hooks work under the hood, using information from code and documents.
Provide a technical explanation, covering both basic and advanced concepts.
Do a deep research

Example 2: Learn about AI Agents using Octocode

  • Goal: Create context for agents creation
  • Video: YouTube

Example 3: Review PRs using Octocode

⚙️ Advanced Configuration

Tool Selection

# Run only specific tools (exclusive mode)
export TOOLS_TO_RUN="githubSearchCode,githubSearchRepositories"

# Enable additional tools (additive mode) 
export ENABLE_TOOLS="githubSearchPullRequests"

# Disable specific default tools
export DISABLE_TOOLS="githubViewRepoStructure"

# Enable experimental features
export BETA="1"

Note: TOOLS_TO_RUN cannot be combined with ENABLE_TOOLS/DISABLE_TOOLS.

Enterprise Features

  • Content Sanitization: Automatic detection and redaction of sensitive data
  • Smart Token Management: Efficient content reduction for large codebases
  • Access Control: Uses your GitHub permissions (public/private repositories)
  • Rate Limiting: Built-in GitHub API rate limit handling

📚 Documentation & Resources

ResourceDescription
🌐 octocode.aiOfficial website
📺 YouTube ChannelVideo tutorials and demos
📚 Usage Guide20+ examples and best practices
🔐 Authentication GuideComplete setup and enterprise features
🔧 Tool SchemasComplete API reference for all tools
🏗️ Architecture OverviewSystem design and performance details
🧰 octocode-utilsUtility library for token-efficient minification and helpers used by Octocode

🌟 Featured On

Official Community MCP Server

modelcontextprotocol/servers

Community Collections

  • punkpeye/awesome-mcp-servers
  • appcypher/awesome-mcp-servers
  • wong2/awesome-mcp-servers
  • Puliczek/awesome-mcp-security

MCP Directories & Tools

💬 Support & Community


Built with ❤️ for developers

WebsiteGitHubNPMDiscord

Quick Install

Quick Actions

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.