Octocode MCP
AI-powered code assistant that provides advanced search and discovery capabilities across GitHub and NPM ecosystems, helping users understand code patterns, implementations, and connections between repositories.
README
Octocode MCP
The Perfect AI Code Assistant - Advanced Search & Discovery Across GitHub
<div> <img src="./assets/logo.png" width="400px">
</div>
🌐 For More Details - octocode.ai
📚 For Technical Details - Technical Summary
🐳 For Docker Setup - Docker Guide
The perfect code assistant that can help understand anything. Transform your AI assistant into an expert code researcher with instant access to millions of repositories and packages across GitHub and npm ecosystems.
Instead of manually browsing repositories, ask questions like:
- "How did React implement concurrent rendering?"
- "Show me authentication patterns in Next.js applications"
- "Find examples of how to use this specific API"
- "What's the architecture of this library?"
- "How do I use this MCP tool effectively?"
🌟 Featured On
modelcontextprotocol - Official Community MCP Server
Community Collections
MCP Directories & Tools
🎯 Who Is This For?
For Developers
Navigate complex multi-repo architectures, understand organizational issues at scale, and generate custom documentation on-demand from real code examples. Create contextual documentation directly in your IDE, or ask OctoCode to learn from any repository and implement similar patterns in your current project.
For Product & Engineering Managers
Gain unprecedented visibility into application behavior through semantic code search, track development progress across teams, and understand the real implementation behind product features.
For Security Researchers
Discover security patterns, vulnerabilities, and compliance issues across both public and private repositories with advanced pattern matching and cross-codebase analysis.
For Large Organizations
Dramatically increase development velocity by enabling teams to instantly learn from existing codebases, understand cross-team implementations, and replicate proven patterns—transforming institutional knowledge into actionable development acceleration.
🚀 Key Benefits
Zero-Configuration Setup - Works with existing GitHub CLI authentication, no personal access tokens needed
Enterprise-Ready Security - Respects organizational permissions with content sanitization
AI Token Optimization - Reduces AI costs by through intelligent content processing
Cross-Platform Excellence - Native Windows PowerShell support with automatic path detection
Universal Access - Works seamlessly with public, private, and organization repositories
Quick Start 🚀
1. Install Prerequisites
macOS/Linux:
# Install Node.js 18.12+
brew install node
# Install GitHub CLI
brew install gh
Windows:
# Install using WinGet (recommended)
winget install Microsoft.PowerShell # PowerShell 7+ for better security
winget install GitHub.cli
winget install OpenJS.NodeJS
# Or using Chocolatey
choco install powershell-core nodejs github-cli
# Or using Scoop
scoop install gh nodejs
2. Authenticate
# Login to GitHub (opens browser)
gh auth login
# Login to NPM (for package research)
npm login
3. Add to Claude Desktop
# For Claude Desktop users
claude mcp add octocode npx 'octocode-mcp@latest'
Or Add to MCP Configuration Manually
{
"octocode-mcp": {
"command": "npx",
"args": ["octocode-mcp"]
}
}
That's it! Octocode automatically works with your organization's private repositories.
🐳 Docker Support
Run Octocode MCP in a Docker container while maintaining full GitHub CLI authentication. Perfect for consistent environments and deployment.
🛠️ What You Can Do
Deep Project Research & Analysis
- Issue Search & Analysis: Understand project challenges, feature requests, and bug patterns
- Commit History Research: Trace feature implementations and bug fixes across time
- Pull Request & Code Review Analysis: Access actual code diffs and understand development workflows
- Project Progress Tracking: Monitor development velocity and team collaboration patterns
Core GitHub Research
- Repository Discovery: Find repositories by topic, language, and activity
- Code Search: Find exact patterns and implementations across millions of repositories
- Cross-Repository Flow Understanding: Connect related changes across multiple repositories
- Repository Architecture: Navigate and understand project structures
Package Ecosystem Tools
- NPM Package Discovery: Analyze Node.js packages with comprehensive metadata
- Python Package Integration: Explore PyPI packages with cross-ecosystem comparison
- Package Analysis: Deep-dive into versions, dependencies, and repository connections
Advanced Research Capabilities
- Code Pattern Discovery: Identify implementation patterns and best practices
- Security & Compliance Research: Search for security patterns across codebases
- Team Collaboration Analysis: Understand code review processes and team dynamics
- Real-time Documentation: Generate custom docs from live code for any topic
📚 For detailed technical architecture, tool specifications, and implementation details, see Technical Summary
DXT Extension 📦
This project is available as a Desktop Extension (DXT) for easy installation in AI applications like Claude Desktop.
Quick DXT Setup
# Install dependencies
yarn install
# Build the DXT package
yarn dxt:pack
The generated octocode-mcp.dxt file can be installed in Claude Desktop by simply clicking on it.
DXT Scripts:
yarn dxt:validate- Validate the manifest.json fileyarn dxt:pack- Build and package the extensionyarn dxt:release- Full release pipeline (build → pack → sign → verify)
Best Practices 💡
Ask Natural Questions:
- "How does authentication work in this project?"
- "What libraries implement this pattern?"
- "Show me NPM packages that solve X problem"
- "How has this approach evolved over time?"
Let AI Guide Discovery:
- Start with broad queries - the system will intelligently narrow down
- Trust the smart fallbacks - automatic retry with alternatives
- Build on previous searches - maintain context for deeper exploration
- Works everywhere - public, private, and organization repositories
Troubleshooting 🔧
Cross-Platform Commands:
# Check GitHub CLI status
gh auth status
# Re-authenticate if needed
gh auth logout && gh auth login
# Check NPM access
npm whoami
Windows-Specific:
# Check PowerShell version (7+ recommended)
$PSVersionTable.PSVersion
# Test executable detection
where.exe gh
where.exe npm
Common Solutions:
- No results? Try broader search terms
- Private repos not found? Check
gh auth statusfor organization membership - Windows issues? Install PowerShell 7+ for better security
- Permission errors? Check executable permissions and PATH configuration
Security & Privacy 🛡️
Local-First Architecture
- 🏠 100% Local - Runs entirely on your machine
- 🚫 Zero Data Collection - No telemetry or data transmission
- 🔑 Safe Authentication - Uses GitHub CLI OAuth, no personal tokens needed
Enterprise Security
- 🛡️ Content Protection - Input validation and content sanitization
- 🔐 Secret Detection - Automatic detection and redaction of sensitive data patterns
- ⚪ Safe Commands Only - Pre-approved GitHub CLI and NPM commands only
📚 For comprehensive security architecture details, see Technical Summary
Background 💭
This project started as a personal tool while working at Wix, born from the challenge of navigating large codebases and keeping up with rapidly evolving technology landscapes. What began as a side project evolved into the perfect code assistant that can help understand anything.
The goal: make code exploration as intelligent as having a senior developer guide you through any codebase.
License 📄
MIT License - See LICENSE for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。