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 CHANGED
@@ -1,6 +1,6 @@
1
- # Octocode MCP - Enterprise-Ready GitHub Intelligence
1
+ # Octocode MCP
2
2
 
3
- **AI-Powered GitHub Analysis for Developers and Organizations**
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
  [![Version](https://img.shields.io/badge/version-4.0.3-blue.svg)](./package.json)
19
19
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](./package.json)
20
- [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.12.0-brightgreen)](https://nodejs.org/)
21
20
  [![X/Twitter](https://img.shields.io/badge/X-Follow%20@guy__bary-1DA1F2.svg?logo=x&logoColor=white)](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
- ๐Ÿ“š Complete User Guide โ†’
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.** Built for both individual developers and enterprise organizations, it provides:
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
- ## ๐Ÿ“‹ Prerequisites
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
- - **Node.js** >= 18.12.0 (required) - [Download here](https://nodejs.org/)
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
- ## ๐Ÿš€ Quick Start (Simple)
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
- ```bash
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
- # 2) Run Octocode
68
- npx octocode-mcp
69
- ```
58
+ ## โšก Quick Start
70
59
 
71
- For complete authentication setup including OAuth, GitHub Apps, and enterprise features, see the authentication guides below.
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
- ## ๐Ÿ” Authentication & Configuration
66
+ ### Authentication Options
67
+ Octocode supports flexible GitHub authentication with smart fallback:
74
68
 
75
- Octocode is an **MCP Server** that requires GitHub authentication. Choose your setup:
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
- ### ๐ŸŽ Local Development (macOS with GitHub CLI)
78
- ```bash
79
- # 1. Install and authenticate with [GitHub CLI](https://cli.github.com/)
80
- gh auth login
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
- ```json
85
- {
86
- "mcpServers": {
87
- "octocode": {
88
- "command": "npx",
89
- "args": ["octocode-mcp"]
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
- ### ๐ŸŒ Hosted/Production & Windows (GitHub Token)
96
- ```bash
97
- # 1. Create Personal Access Token at: https://github.com/settings/tokens
98
- # Scopes needed: repo, read:user, read:org
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
- "mcpServers": {
105
- "octocode": {
106
- "command": "npx",
107
- "args": ["octocode-mcp"],
108
- "env": {
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
- ### ๐Ÿข Enterprise Setup
117
- For organizations with advanced security, audit logging, and OAuth 2.0 authentication:
155
+ ### Authentication Fallback Chain
118
156
 
119
- ```json
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
- **Enterprise Features:**
137
- - **Organization Controls** - Restrict access to organization members
138
- - **OAuth 2.0 & GitHub Apps** - Advanced authentication workflows
139
- - **Audit Logging** - Complete compliance and security tracking
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
- ## ๐Ÿ”— AI Assistant Integration
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
- claude mcp add -s user octocode npx 'octocode-mcp@latest'
171
+ yarn install && yarn dxt:pack
155
172
  ```
156
173
 
157
- **Other MCP-Compatible Assistants:**
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
- ### GitHub Analysis Tools
163
- - **๐Ÿ” Code Search** - Semantic code discovery across repositories with bulk operations
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
- ### Package Discovery
171
- - **๐Ÿ“ฆ NPM Package Search** - Comprehensive npm registry exploration
172
- - **๐Ÿ Python Package Search** - PyPI package discovery with repository links
173
- - **๐Ÿ”— Repository Linking** - Automatic connection between packages and source code
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
- ### Enterprise Security
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
- ## ๐Ÿšจ Troubleshooting & Help
188
+ Run Octocode MCP in a containerized environment with full GitHub authentication support. Perfect for consistent deployments and team environments.
183
189
 
184
- **Common Issues:**
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
- ## ๐Ÿ“š Documentation
192
+ ## ๐Ÿ›ก๏ธ Security & Privacy
190
193
 
191
- ### Quick Links
192
- - ๐Ÿ“š **[Complete User Guide](./docs/USAGE_GUIDE.md)** - Examples and best practices
193
- - ๐Ÿ” **[Authentication Guide](./docs/AUTHENTICATION.md)** - Complete setup for all authentication methods
194
- - โšก **[Quick Setup Reference](./docs/AUTHENTICATION_QUICK_REFERENCE.md)** - 30-second authentication setup
195
- - ๐Ÿ—๏ธ **[Technical Architecture](./docs/SUMMARY.md)** - System design and implementation
196
- - ๐Ÿ› ๏ธ **[Tool Schemas](./docs/TOOL_SCHEMAS.md)** - Complete API reference
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
- MIT License - see [LICENSE.md](LICENSE.md) for details.
201
+ > **๐Ÿ“š [View complete security architecture โ†’](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-mcp/docs/SUMMARY.md)**
201
202
 
202
- ## ๐Ÿ“ž Support
203
+ ---
203
204
 
204
- - **๐Ÿ“š Documentation**: [Complete guides and API reference](./docs/)
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
- <div align="center">
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**