octocode-mcp 4.0.6-alpha.2 โ 4.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +132 -142
- package/dist/index.js +1 -1
- package/package.json +12 -8
- package/CHANGELOG.md +0 -1229
- package/dist/authenticationManager-CrmdzMxf.js +0 -2
- package/dist/authenticationManager-Kpd_LWhv.js +0 -2
- package/dist/githubAppManager-BO9Rn-xp.js +0 -2
- package/dist/githubAppManager-DnVRVIZZ.js +0 -2
- package/dist/index-Cp_zxJpu.js +0 -2
- package/dist/index-y3dHKznB.js +0 -2
- package/dist/mcpAuthProtocol-TckyQ85U.js +0 -2
- package/dist/mcpAuthProtocol-e9g8U0Ix.js +0 -2
- package/dist/oauthManager-BM1opDp6.js +0 -2
- package/dist/oauthManager-BizPpeT2.js +0 -2
- package/dist/security/auditLogger.js +0 -2
- package/dist/security/policyManager.js +0 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
# Octocode MCP
|
|
1
|
+
# Octocode MCP
|
|
2
2
|
|
|
3
|
-
**AI-Powered GitHub
|
|
3
|
+
**AI-Powered GitHub Intelligence for Code Research & Discovery**
|
|
4
4
|
|
|
5
5
|
<div align="center">
|
|
6
6
|
<a href="https://github.com/modelcontextprotocol/servers">
|
|
@@ -17,203 +17,193 @@
|
|
|
17
17
|
|
|
18
18
|
[](./package.json)
|
|
19
19
|
[](./package.json)
|
|
20
|
-
[](https://nodejs.org/)
|
|
21
20
|
[](https://x.com/guy_bary)
|
|
22
21
|
|
|
23
22
|
</div>
|
|
24
23
|
|
|
24
|
+
|
|
25
25
|
<div align="center">
|
|
26
26
|
<a href="https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-mcp/docs/USAGE_GUIDE.md"
|
|
27
27
|
style="font-size: 1.2em; font-weight: bold; text-decoration: none;">
|
|
28
|
-
|
|
28
|
+
Go To User Guide โ
|
|
29
29
|
</a>
|
|
30
30
|
</div>
|
|
31
31
|
|
|
32
32
|
## What is Octocode?
|
|
33
33
|
|
|
34
|
-
**Octocode transforms your AI assistant into a code research expert.**
|
|
34
|
+
**Octocode transforms your AI assistant into a code research expert.** Instead of just writing code, your AI can now:
|
|
35
35
|
|
|
36
|
-
### ๐ For Individual Developers
|
|
37
36
|
- **๐ Search millions of repositories** for real implementations
|
|
38
37
|
- **๐ Analyze code patterns** from production codebases
|
|
39
38
|
- **๐ Extract knowledge** from commits, PRs, and issues
|
|
39
|
+
- **๐ข Access private repositories** for organizational intelligence
|
|
40
40
|
- **๐ Connect packages** to their source code automatically
|
|
41
|
-
- **โก Zero-config setup** with GitHub CLI integration
|
|
42
|
-
|
|
43
|
-
### ๐ข For Organizations & Enterprises
|
|
44
|
-
- **๐ Enterprise security** with comprehensive audit logging
|
|
45
|
-
- **๐ฅ Organization access controls** with team-based permissions
|
|
46
|
-
- **๐ Rate limiting** and security monitoring
|
|
47
|
-
- **๐ Compliance-ready** features (SOC 2, GDPR)
|
|
48
|
-
- **๐ Progressive enhancement** - enterprise features activate only when configured
|
|
49
|
-
- **โฌ๏ธ 100% backward compatibility** - no breaking changes for existing users
|
|
50
41
|
|
|
51
42
|
Built on the **Model Context Protocol (MCP)**, Octocode provides AI assistants with 8 specialized tools for GitHub repository analysis, code discovery, and package exploration.
|
|
52
43
|
|
|
53
|
-
|
|
44
|
+
> **The Problem**: AI assistants are great at writing code but struggle with understanding existing codebases and finding proven patterns.
|
|
45
|
+
>
|
|
46
|
+
> **The Solution**: Octocode makes any codebase instantly accessible and comprehensible to AI assistants.
|
|
54
47
|
|
|
55
|
-
|
|
56
|
-
- **GitHub Authentication** (choose one):
|
|
57
|
-
- **GitHub CLI** (recommended for local development) - [Install here](https://cli.github.com/)
|
|
58
|
-
- **GitHub Personal Access Token** (required for enterprise/CI) - [Create here](https://github.com/settings/tokens)
|
|
59
|
-
- **AI Assistant** (Claude Desktop, or any MCP-compatible assistant)
|
|
48
|
+
## ๐ Documentation
|
|
60
49
|
|
|
61
|
-
|
|
50
|
+
### Quick Links
|
|
51
|
+
- ๐ **[Usage Guide](./docs/USAGE_GUIDE.md)** - Complete guide with examples and best practices
|
|
52
|
+
- ๐๏ธ **[Technical Architecture](./docs/SUMMARY.md)** - Detailed system architecture and implementation
|
|
53
|
+
- ๐ ๏ธ **[Tool Schemas](./docs/TOOL_SCHEMAS.md)** - Complete API reference and tool specifications
|
|
54
|
+
- ๐ **[Octocode Ecosystem](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode/README.md)** - Explore the complete Octocode suite
|
|
62
55
|
|
|
63
|
-
|
|
64
|
-
# 1) Authenticate with GitHub (recommended)
|
|
65
|
-
gh auth login
|
|
56
|
+
> ๐ก **Pro Tip:** Understanding the tool schemas will significantly improve your Octocode effectiveness.
|
|
66
57
|
|
|
67
|
-
|
|
68
|
-
npx octocode-mcp
|
|
69
|
-
```
|
|
58
|
+
## โก Quick Start
|
|
70
59
|
|
|
71
|
-
|
|
60
|
+
### Prerequisites
|
|
61
|
+
- **Node.js** v20+ (check with `node --version`)
|
|
62
|
+
- **GitHub Authentication** (Personal Access Token or GitHub CLI)
|
|
63
|
+
- **NPM** (Optional, enhances package research capabilities)
|
|
64
|
+
- **AI Assistant** (Claude Desktop, or any MCP-compatible assistant)
|
|
72
65
|
|
|
73
|
-
|
|
66
|
+
### Authentication Options
|
|
67
|
+
Octocode supports flexible GitHub authentication with smart fallback:
|
|
74
68
|
|
|
75
|
-
|
|
69
|
+
1. **[GitHub CLI](https://cli.github.com/)** (Recommended for local development) - Run `gh auth login` for seamless authentication
|
|
70
|
+
2. **[Personal Access Token](https://github.com/settings/tokens)** (Recommended for Windows & hosted environments) - Set `GITHUB_TOKEN` or `GH_TOKEN` environment variable
|
|
71
|
+
3. **Authorization Header** (For API integrations) - Set `Authorization` environment variable with `Bearer {{token}}` format
|
|
76
72
|
|
|
77
|
-
###
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
73
|
+
### Performance Optimizations
|
|
74
|
+
- **NPM Integration**: Automatically enhances package research when NPM is available
|
|
75
|
+
|
|
76
|
+
*For CI/CD environments:*
|
|
77
|
+
```bash
|
|
78
|
+
# As environment variable
|
|
79
|
+
export NPM_TOKEN=your_token_here
|
|
80
|
+
|
|
81
|
+
# Then in .npmrc:
|
|
82
|
+
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
- **PyPI Integration**: Discovers Python package repository URLs for comprehensive analysis
|
|
86
|
+
|
|
87
|
+
## ๐ Installation
|
|
88
|
+
|
|
89
|
+
### ๐ Quick Configuration
|
|
90
|
+
|
|
91
|
+
#### **Option 1: GitHub CLI Authentication** ๐ข *Recommended*
|
|
92
|
+
*Best for Mac and local development*
|
|
93
|
+
|
|
94
|
+
1. **Install and authenticate with GitHub CLI:**
|
|
95
|
+
```bash
|
|
96
|
+
# Install GitHub CLI (if not already installed)
|
|
97
|
+
# macOS: brew install gh
|
|
98
|
+
# Windows: winget install GitHub.cli
|
|
99
|
+
|
|
100
|
+
# Authenticate
|
|
101
|
+
gh auth login
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
2. **Add to your MCP configuration:**
|
|
105
|
+
```json
|
|
106
|
+
{
|
|
107
|
+
"octocode": {
|
|
108
|
+
"command": "npx",
|
|
109
|
+
"args": ["octocode-mcp"]
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
```
|
|
113
|
+
> ๐ก **Tip:** This method provides seamless, secure access to your GitHub resources without managing tokens.
|
|
81
114
|
|
|
82
|
-
|
|
115
|
+
---
|
|
83
116
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
117
|
+
#### **Option 2: Personal Access Token**
|
|
118
|
+
*Best for Windows, CI/CD, or hosted environments*
|
|
119
|
+
|
|
120
|
+
1. **Create a GitHub token:**
|
|
121
|
+
- Go to [GitHub Settings โ Personal Access Tokens](https://github.com/settings/tokens)
|
|
122
|
+
- Generate a new token with appropriate permissions
|
|
123
|
+
|
|
124
|
+
2. **Add to your MCP configuration:**
|
|
125
|
+
```json
|
|
126
|
+
{
|
|
127
|
+
"octocode": {
|
|
128
|
+
"command": "npx",
|
|
129
|
+
"args": ["octocode-mcp"],
|
|
130
|
+
"env": {
|
|
131
|
+
"GITHUB_TOKEN": "your_github_token_here"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
```
|
|
94
136
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
#### **Option 3: Authorization Header Format**
|
|
140
|
+
*Best for API integrations and templated configurations*
|
|
99
141
|
|
|
100
|
-
# 2. Add to your MCP configuration:
|
|
101
|
-
```
|
|
102
142
|
```json
|
|
103
143
|
{
|
|
104
|
-
"
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
"
|
|
109
|
-
"GITHUB_TOKEN": "ghp_xxxxxxxxxxxx"
|
|
110
|
-
}
|
|
144
|
+
"octocode": {
|
|
145
|
+
"command": "npx",
|
|
146
|
+
"args": ["octocode-mcp"],
|
|
147
|
+
"env": {
|
|
148
|
+
"Authorization": "Bearer your_github_token_here"
|
|
111
149
|
}
|
|
112
150
|
}
|
|
113
151
|
}
|
|
114
152
|
```
|
|
153
|
+
> ๐ก **Note:** Supports template formats like `Bearer {{GH_TOKEN}}` for dynamic token injection.
|
|
115
154
|
|
|
116
|
-
###
|
|
117
|
-
For organizations with advanced security, audit logging, and OAuth 2.0 authentication:
|
|
155
|
+
### Authentication Fallback Chain
|
|
118
156
|
|
|
119
|
-
|
|
120
|
-
{
|
|
121
|
-
"mcpServers": {
|
|
122
|
-
"octocode": {
|
|
123
|
-
"command": "npx",
|
|
124
|
-
"args": ["octocode-mcp"],
|
|
125
|
-
"env": {
|
|
126
|
-
"GITHUB_TOKEN": "ghp_xxxxxxxxxxxx",
|
|
127
|
-
"GITHUB_ORGANIZATION": "your-org",
|
|
128
|
-
"AUDIT_ALL_ACCESS": "true",
|
|
129
|
-
"RATE_LIMIT_API_HOUR": "5000"
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
```
|
|
157
|
+
Octocode uses an intelligent authentication system that tries multiple methods in priority order:
|
|
135
158
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
- **Rate Limiting** - Configurable API usage limits
|
|
159
|
+
1. **`GITHUB_TOKEN`** - Primary GitHub token environment variable
|
|
160
|
+
2. **`GH_TOKEN`** - Alternative GitHub token environment variable
|
|
161
|
+
3. **GitHub CLI Token** - Automatically extracted from `gh auth login` session
|
|
162
|
+
4. **`Authorization` Header** - Extracts token from Bearer format (`Bearer {{token}}`), supporting template variables
|
|
141
163
|
|
|
142
|
-
๐ **Enterprise Documentation:**
|
|
143
|
-
- **[Enterprise Setup Guide](./docs/AUTHENTICATION.md#-enterprise-features)** - Organization policies, audit logging, and security configuration
|
|
144
|
-
- **[OAuth 2.0 Integration](./docs/AUTHENTICATION.md#-oauth-20-integration)** - How OAuth authentication works for organizations
|
|
145
164
|
|
|
146
|
-
### ๐ Complete Authentication Guides
|
|
147
|
-
- **[30-Second Setup](./docs/AUTHENTICATION_QUICK_REFERENCE.md)** - Quick reference for all authentication methods
|
|
148
|
-
- **[Complete Authentication Guide](./docs/AUTHENTICATION.md)** - Detailed setup for OAuth, GitHub Apps, and enterprise features
|
|
149
165
|
|
|
150
|
-
##
|
|
166
|
+
## ๐ฆ DXT Extension
|
|
167
|
+
|
|
168
|
+
**Desktop Extension (DXT)** for one-click installation in Claude Desktop.
|
|
151
169
|
|
|
152
|
-
**Quick Setup with Claude CLI:**
|
|
153
170
|
```bash
|
|
154
|
-
|
|
171
|
+
yarn install && yarn dxt:pack
|
|
155
172
|
```
|
|
156
173
|
|
|
157
|
-
|
|
158
|
-
Octocode follows the standard Model Context Protocol, making it compatible with any MCP-enabled AI assistant.
|
|
159
|
-
|
|
160
|
-
## ๐ Core Features
|
|
174
|
+
Install the generated `octocode-mcp.dxt` file by clicking on it in Claude Desktop.
|
|
161
175
|
|
|
162
|
-
###
|
|
163
|
-
|
|
164
|
-
- **๐ Repository Analysis** - Structure exploration and metadata extraction
|
|
165
|
-
- **๐ Pull Request Search** - Find PRs by criteria with optional diff analysis
|
|
166
|
-
- **๐ Commit Search** - Track changes and development history
|
|
167
|
-
- **๐ File Content Retrieval** - Access files with context and smart minification
|
|
168
|
-
- **๐๏ธ Repository Structure** - Explore directory trees with intelligent filtering
|
|
176
|
+
### Enterprise/Production Deployment
|
|
177
|
+
**Ideal for:** Team environments, Docker containers, CI/CD pipelines, hosted AI services
|
|
169
178
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
179
|
+
| Feature | Details |
|
|
180
|
+
|---------|---------|
|
|
181
|
+
| **Authentication** | GitHub Personal Access Tokens or GitHub App tokens |
|
|
182
|
+
| **Rate Limits** | 5,000 requests/hour (higher with GitHub Apps) |
|
|
183
|
+
| **Access Control** | Managed by token scope and permissions |
|
|
184
|
+
| **Setup** | Configure `GITHUB_TOKEN` environment variable |
|
|
174
185
|
|
|
175
|
-
|
|
176
|
-
- **๐ Audit Logging** - Comprehensive event tracking and compliance reporting
|
|
177
|
-
- **๐ฅ Organization Controls** - Team-based access and membership validation
|
|
178
|
-
- **โก Rate Limiting** - Configurable limits for API, auth, and token requests
|
|
179
|
-
- **๐ Token Security** - Encrypted storage and automatic rotation support
|
|
180
|
-
- **๐ Policy Enforcement** - MFA requirements and repository access controls
|
|
186
|
+
## ๐ณ Docker Support
|
|
181
187
|
|
|
182
|
-
|
|
188
|
+
Run Octocode MCP in a containerized environment with full GitHub authentication support. Perfect for consistent deployments and team environments.
|
|
183
189
|
|
|
184
|
-
**
|
|
185
|
-
- **"No GitHub token found"** โ See [Authentication Quick Reference](./docs/AUTHENTICATION_QUICK_REFERENCE.md)
|
|
186
|
-
- **Rate limiting/Enterprise setup** โ See [Complete Authentication Guide](./docs/AUTHENTICATION.md)
|
|
187
|
-
- **MCP configuration help** โ See examples above or [Complete Authentication Guide](./docs/AUTHENTICATION.md)
|
|
190
|
+
**[โ Complete Docker Setup Guide](./docker/README.Docker.md)**
|
|
188
191
|
|
|
189
|
-
##
|
|
192
|
+
## ๐ก๏ธ Security & Privacy
|
|
190
193
|
|
|
191
|
-
###
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
197
|
-
|
|
198
|
-
## ๐ License
|
|
194
|
+
### Enterprise-Grade Security
|
|
195
|
+
- **๐ก๏ธ Advanced Content Protection** - Multi-layer input validation and intelligent content sanitization
|
|
196
|
+
- **๐ Comprehensive Secret Detection** - Automatic detection and redaction of API keys, tokens, and credentials
|
|
197
|
+
- **โช Safe Commands Only** - Pre-approved GitHub CLI and NPM commands with parameter validation
|
|
198
|
+
- **๐งน Malicious Content Filtering** - Automatic detection and sanitization of harmful code patterns
|
|
199
|
+
- **๐ Security Pattern Analysis** - Built-in vulnerability and compliance issue identification
|
|
199
200
|
|
|
200
|
-
|
|
201
|
+
> **๐ [View complete security architecture โ](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-mcp/docs/SUMMARY.md)**
|
|
201
202
|
|
|
202
|
-
|
|
203
|
+
---
|
|
203
204
|
|
|
204
|
-
|
|
205
|
-
- **๐ Issues**: [GitHub Issues](https://github.com/bgauryy/octocode-mcp/issues)
|
|
206
|
-
- **๐ข Enterprise Support**: [Contact us](mailto:enterprise@octocode.ai)
|
|
207
|
-
- **๐ฌ Community**: [Discord](https://discord.gg/octocode)
|
|
205
|
+
## ๐ License
|
|
208
206
|
|
|
209
|
-
|
|
207
|
+
MIT License - See [LICENSE](./LICENSE.md) for details.
|
|
210
208
|
|
|
211
|
-
|
|
212
|
-
<p>Built with โค๏ธ for the developer community</p>
|
|
213
|
-
<p>
|
|
214
|
-
<a href="https://octocode.ai">Website</a> โข
|
|
215
|
-
<a href="https://github.com/bgauryy/octocode-mcp">GitHub</a> โข
|
|
216
|
-
<a href="https://www.npmjs.com/package/octocode-mcp">NPM</a> โข
|
|
217
|
-
<a href="https://discord.gg/octocode">Discord</a>
|
|
218
|
-
</p>
|
|
219
|
-
</div>
|
|
209
|
+
**Made with โค๏ธ by the Octocode team**
|