JSPM

  • Created
  • Published
  • Downloads 1759
  • Score
    100M100P100Q108828F
  • License MIT

Model Context Protocol (MCP) server for advanced GitHub repository analysis, code discovery, and npm package exploration. Provides AI assistants with powerful tools to search, analyze, and understand codebases across GitHub and npm ecosystems.

Package Exports

  • octocode-mcp
  • octocode-mcp/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (octocode-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Octocode MCP - AI-Powered GitHub Intelligence

Transform your AI assistant into a code research expert

Octocode Logo

Version License Node.js Version Ask DeepWiki X/Twitter

Local Setup

For local development:

# 1. Authenticate with GitHub
gh auth login

# 2. Add to your MCP configuration
{
  "mcpServers": {
    "octocode": {
      "command": "npx",
      "args": ["octocode-mcp"]
    }
  }
}

That's it! Start asking your AI assistant about GitHub repositories and code.

What can Octocode do?

Search & analyze millions of GitHub repositories - Find real implementations, analyze code patterns, extract knowledge from commits and PRs, and connect packages to their source code automatically.

📋 Requirements

  • Node.js >= 18.12.0 - Download here
  • GitHub Authentication - GitHub CLI (recommended) or Personal Access Token

🔧 Alternative Setup Options

Need a different setup? Choose your preferred method:

GitHub Token (for Windows/CI/Production)

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

Enterprise Setup

{
  "mcpServers": {
    "octocode": {
      "command": "npx", 
      "args": ["octocode-mcp"],
      "env": {
        "GITHUB_TOKEN": "ghp_xxxxxxxxxxxx",
        "GITHUB_ORGANIZATION": "your-org"
      }
    }
  }
}

📚 Need detailed setup help?

🔗 AI Assistant Integration

Claude Desktop setup:

claude mcp add -s user octocode npx 'octocode-mcp@latest'

Octocode works with any MCP-compatible AI assistant.

🚀 What You Can Do

🔍 Code Research & Discovery

  • Search millions of repositories for real implementations and patterns
  • Analyze code structure and explore directory trees
  • Track development history through commits and pull requests
  • Connect packages to source - bridge NPM/PyPI packages to their repositories

🎯 Example Use Cases

"Show me authentication patterns in React applications"
"Find TypeScript implementations of rate limiting"
"How does Stripe handle webhooks in their SDK?"
"Compare database migration patterns across frameworks"

🏢 Enterprise Features

For organizations: audit logging, access controls, rate limiting, and compliance features. Enterprise Setup Guide

🛠️ Available Tools

Tool Name Description Default Type
githubSearchCode Search code across GitHub repositories ✅ Yes Search
githubGetFileContent Fetch file content from GitHub repositories ✅ Yes Content
githubViewRepoStructure View GitHub repository structure and navigation ✅ Yes Content
githubSearchRepositories Search and discover GitHub repositories ✅ Yes Search
githubSearchCommits Search GitHub commits and change history ❌ No History
githubSearchPullRequests Search GitHub pull requests and code reviews ❌ No History
packageSearch Search NPM and Python package registries ❌ No NPM

Default tools are automatically enabled and provide core GitHub research functionality. Non-default tools can be enabled using the configuration options below.

⚙️ Configuration & Advanced Setup

Most common settings:

export GITHUB_TOKEN="ghp_xxxxxxxxxxxx"              # GitHub token
export TOOLS_TO_RUN="githubSearchCode,packageSearch" # Run ONLY these tools (exclusive)
export ENABLE_TOOLS="additionalTool1,additionalTool2" # Add non-default tools  
export DISABLE_TOOLS="unwantedTool1,unwantedTool2"    # Disable default tools
export BETA="1"                                      # Enable experimental features

⚠️ Important: TOOLS_TO_RUN cannot be used together with ENABLE_TOOLS/DISABLE_TOOLS. When TOOLS_TO_RUN is set, it runs ONLY the specified tools, ignoring all other tool configuration.

📚 For complete configuration options:

🚨 Troubleshooting

Common Issues:

📚 Documentation & Help

Resource Purpose
🌐 octocode.ai Tutorials, community & latest updates
📚 Usage Guide Examples and best practices
🔐 Authentication Setup for all auth methods
🛠️ Tool Reference Complete API reference
🏗️ Architecture System design overview

Need help? GitHub IssuesDiscordoctocode.ai


Built with ❤️ for developers

WebsiteGitHubNPMDiscord