octocode-mcp 2.3.24 β 2.3.26
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 +99 -199
- package/dist/index.js +16 -16
- package/manifest.json +8 -8
- package/package.json +4 -7
package/README.md
CHANGED
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
# Octocode MCP
|
|
2
2
|
|
|
3
|
-
**The Perfect AI Code Assistant - Advanced Search & Discovery Across GitHub
|
|
3
|
+
**The Perfect AI Code Assistant - Advanced Search & Discovery Across GitHub**
|
|
4
4
|
|
|
5
5
|
<div>
|
|
6
6
|
<img src="./assets/logo.png" width="400px">
|
|
7
7
|
|
|
8
|
-
[](./package.json)
|
|
9
9
|
[](./package.json)
|
|
10
10
|
[](https://modelcontextprotocol.io/)
|
|
11
11
|
[](https://buymeacoffee.com/bgauryy)
|
|
12
12
|
|
|
13
13
|
</div>
|
|
14
14
|
|
|
15
|
+
## π For More Details - [octocode.ai](https://octocode.ai)
|
|
16
|
+
## π For Technical Details - [Technical Summary](./docs/summary.md)
|
|
15
17
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
**The perfect code assistant that can help understand anything.** Octocode provides AI-powered advanced search with heuristic discovery and smart fallbacks to understand connections between repositories and NPM packages across any privilege level you have.
|
|
18
|
+
**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.
|
|
20
19
|
|
|
21
20
|
Instead of manually browsing repositories, ask questions like:
|
|
22
21
|
- *"How did React implement concurrent rendering?"*
|
|
@@ -25,17 +24,45 @@ Instead of manually browsing repositories, ask questions like:
|
|
|
25
24
|
- *"What's the architecture of this library?"*
|
|
26
25
|
- *"How do I use this MCP tool effectively?"*
|
|
27
26
|
|
|
28
|
-
##
|
|
27
|
+
## π Featured On
|
|
28
|
+
|
|
29
|
+
### modelcontextprotocol - Official Community MCP Server
|
|
30
|
+
[](https://github.com/modelcontextprotocol/servers)
|
|
31
|
+
|
|
32
|
+
### Community Collections
|
|
33
|
+
[](https://github.com/punkpeye/awesome-mcp-servers)
|
|
34
|
+
[](https://github.com/appcypher/awesome-mcp-servers)
|
|
35
|
+
|
|
36
|
+
### MCP Directories & Tools
|
|
37
|
+
[](https://mcp.so/server/octocode/bgauryy)
|
|
38
|
+
[](https://www.pulsemcp.com/servers/bgauryy-octocode)
|
|
39
|
+
[](https://devtool.io/tool/octocode-mcp)
|
|
40
|
+
|
|
41
|
+
## π― Who Is This For?
|
|
42
|
+
|
|
43
|
+
### For Developers
|
|
44
|
+
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.
|
|
45
|
+
|
|
46
|
+
### For Product & Engineering Managers
|
|
47
|
+
Gain unprecedented visibility into application behavior through semantic code search, track development progress across teams, and understand the real implementation behind product features.
|
|
48
|
+
|
|
49
|
+
### For Security Researchers
|
|
50
|
+
Discover security patterns, vulnerabilities, and compliance issues across both public and private repositories with advanced pattern matching and cross-codebase analysis.
|
|
51
|
+
|
|
52
|
+
### For Large Organizations
|
|
53
|
+
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.
|
|
54
|
+
|
|
55
|
+
## π Key Benefits
|
|
56
|
+
|
|
57
|
+
**Zero-Configuration Setup** - Works with existing GitHub CLI authentication, no personal access tokens needed
|
|
58
|
+
|
|
59
|
+
**Enterprise-Ready Security** - Respects organizational permissions with content sanitization
|
|
29
60
|
|
|
30
|
-
**
|
|
61
|
+
**AI Token Optimization** - Reduces AI costs by through intelligent content processing
|
|
31
62
|
|
|
32
|
-
**
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
- **π Connection Intelligence** - Maps NPM packages to repositories with commit SHA integration and cross-tool data sharing
|
|
36
|
-
- **π Universal Access** - Works seamlessly with public, private, and organization repositories using GitHub CLI permissions
|
|
37
|
-
- **β‘ LLM Optimized** - Advanced content minification, intelligent caching, and parallel processing reduces token usage by 80-90%
|
|
38
|
-
- **π₯οΈ Cross-Platform Excellence** - Native Windows PowerShell support with automatic path detection and custom installation paths
|
|
63
|
+
**Cross-Platform Excellence** - Native Windows PowerShell support with automatic path detection
|
|
64
|
+
|
|
65
|
+
**Universal Access** - Works seamlessly with public, private, and organization repositories
|
|
39
66
|
|
|
40
67
|
## Quick Start π
|
|
41
68
|
|
|
@@ -64,11 +91,6 @@ choco install powershell-core nodejs github-cli
|
|
|
64
91
|
scoop install gh nodejs
|
|
65
92
|
```
|
|
66
93
|
|
|
67
|
-
**Manual Installation:**
|
|
68
|
-
- Node.js: https://nodejs.org/
|
|
69
|
-
- GitHub CLI: https://github.com/cli/cli#installation
|
|
70
|
-
- PowerShell 7+: https://github.com/PowerShell/PowerShell#installation
|
|
71
|
-
|
|
72
94
|
### 2. Authenticate
|
|
73
95
|
```bash
|
|
74
96
|
# Login to GitHub (opens browser)
|
|
@@ -78,13 +100,13 @@ gh auth login
|
|
|
78
100
|
npm login
|
|
79
101
|
```
|
|
80
102
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
103
|
+
### 3. Add to Claude Desktop
|
|
104
|
+
```bash
|
|
105
|
+
# For Claude Desktop users
|
|
106
|
+
claude mcp add octocode npx 'octocode-mcp@latest'
|
|
107
|
+
```
|
|
86
108
|
|
|
87
|
-
###
|
|
109
|
+
### Or Add to MCP Configuration Manually
|
|
88
110
|
```json
|
|
89
111
|
{
|
|
90
112
|
"octocode-mcp": {
|
|
@@ -96,36 +118,38 @@ npm login
|
|
|
96
118
|
|
|
97
119
|
**That's it!** Octocode automatically works with your organization's private repositories.
|
|
98
120
|
|
|
99
|
-
|
|
121
|
+
## π οΈ What You Can Do
|
|
100
122
|
|
|
101
|
-
|
|
102
|
-
- **
|
|
103
|
-
- **
|
|
104
|
-
- **
|
|
105
|
-
- **
|
|
123
|
+
### Deep Project Research & Analysis
|
|
124
|
+
- **Issue Search & Analysis**: Understand project challenges, feature requests, and bug patterns
|
|
125
|
+
- **Commit History Research**: Trace feature implementations and bug fixes across time
|
|
126
|
+
- **Pull Request & Code Review Analysis**: Access actual code diffs and understand development workflows
|
|
127
|
+
- **Project Progress Tracking**: Monitor development velocity and team collaboration patterns
|
|
106
128
|
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
129
|
+
### Core GitHub Research
|
|
130
|
+
- **Repository Discovery**: Find repositories by topic, language, and activity
|
|
131
|
+
- **Code Search**: Find exact patterns and implementations across millions of repositories
|
|
132
|
+
- **Cross-Repository Flow Understanding**: Connect related changes across multiple repositories
|
|
133
|
+
- **Repository Architecture**: Navigate and understand project structures
|
|
111
134
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
135
|
+
### Package Ecosystem Tools
|
|
136
|
+
- **NPM Package Discovery**: Analyze Node.js packages with comprehensive metadata
|
|
137
|
+
- **Python Package Integration**: Explore PyPI packages with cross-ecosystem comparison
|
|
138
|
+
- **Package Analysis**: Deep-dive into versions, dependencies, and repository connections
|
|
139
|
+
|
|
140
|
+
### Advanced Research Capabilities
|
|
141
|
+
- **Code Pattern Discovery**: Identify implementation patterns and best practices
|
|
142
|
+
- **Security & Compliance Research**: Search for security patterns across codebases
|
|
143
|
+
- **Team Collaboration Analysis**: Understand code review processes and team dynamics
|
|
144
|
+
- **Real-time Documentation**: Generate custom docs from live code for any topic
|
|
115
145
|
|
|
116
|
-
|
|
117
|
-
- **WinGet**: `%LOCALAPPDATA%\Microsoft\WindowsApps\gh.exe`
|
|
118
|
-
- **Scoop**: `%USERPROFILE%\scoop\apps\gh\current\bin\gh.exe`
|
|
119
|
-
- **Chocolatey**: `%PROGRAMDATA%\chocolatey\bin\gh.exe`
|
|
120
|
-
- **MSI**: `%PROGRAMFILES%\GitHub CLI\gh.exe`
|
|
146
|
+
> **π For detailed technical architecture, tool specifications, and implementation details, see [Technical Summary](./docs/summary.md)**
|
|
121
147
|
|
|
122
148
|
## DXT Extension π¦
|
|
123
149
|
|
|
124
150
|
This project is available as a **Desktop Extension (DXT)** for easy installation in AI applications like Claude Desktop.
|
|
125
151
|
|
|
126
|
-
###
|
|
127
|
-
|
|
128
|
-
**Building the DXT Package:**
|
|
152
|
+
### Quick DXT Setup
|
|
129
153
|
|
|
130
154
|
```bash
|
|
131
155
|
# Install dependencies
|
|
@@ -133,146 +157,26 @@ yarn install
|
|
|
133
157
|
|
|
134
158
|
# Build the DXT package
|
|
135
159
|
yarn dxt:pack
|
|
136
|
-
|
|
137
|
-
# Validate the manifest
|
|
138
|
-
yarn dxt:validate
|
|
139
|
-
|
|
140
|
-
# View package information
|
|
141
|
-
yarn dxt:info
|
|
142
|
-
|
|
143
|
-
# Sign the package (optional)
|
|
144
|
-
yarn dxt:sign
|
|
145
160
|
```
|
|
146
161
|
|
|
162
|
+
The generated `octocode-mcp.dxt` file can be installed in Claude Desktop by simply clicking on it.
|
|
163
|
+
|
|
147
164
|
**DXT Scripts:**
|
|
148
165
|
- `yarn dxt:validate` - Validate the manifest.json file
|
|
149
|
-
- `yarn dxt:pack` - Build and package the extension
|
|
150
|
-
- `yarn dxt:
|
|
151
|
-
- `yarn dxt:sign` - Sign the package with a self-signed certificate
|
|
152
|
-
- `yarn dxt:verify` - Verify the signature of a signed package
|
|
153
|
-
|
|
154
|
-
**The DXT package includes:**
|
|
155
|
-
- Compiled MCP server (`dist/index.js`)
|
|
156
|
-
- Extension manifest (`manifest.json`)
|
|
157
|
-
- Package metadata (`package.json`)
|
|
158
|
-
- Logo and assets (`assets/logo.png`)
|
|
159
|
-
- Documentation (`README.md`)
|
|
160
|
-
|
|
161
|
-
**Building DXT from Source:**
|
|
162
|
-
To build the DXT package locally from this repository:
|
|
163
|
-
```bash
|
|
164
|
-
# Clone the repository
|
|
165
|
-
git clone https://github.com/bgauryy/octocode-mcp.git
|
|
166
|
-
cd octocode-mcp
|
|
167
|
-
|
|
168
|
-
# Install dependencies and build
|
|
169
|
-
yarn install
|
|
170
|
-
yarn build
|
|
171
|
-
yarn dxt:pack
|
|
172
|
-
```
|
|
173
|
-
|
|
174
|
-
The generated `octocode-mcp.dxt` file can then be installed in Claude Desktop (just click on it and it will open claude desktop with the extension)
|
|
175
|
-
|
|
176
|
-
## Core Features π οΈ
|
|
177
|
-
|
|
178
|
-
### π§ **AI-Powered Intelligence**
|
|
179
|
-
- **Advanced Search Strategies** - Multi-modal search with exact/term modes and progressive complexity reduction
|
|
180
|
-
- **Connection Mapping** - Automatically links NPM packages to GitHub repositories with URL extraction
|
|
181
|
-
- **Cross-Reference Analysis** - Discovers implementation patterns across projects with commit SHA integration
|
|
182
|
-
- **Progressive Refinement** - AI-guided search with contextual suggestions and smart fallback chains
|
|
183
|
-
- **Context-Aware Discovery** - Understands relationships between repositories, packages, commits, and issues
|
|
184
|
-
|
|
185
|
-
### π **Commit SHA Integration**
|
|
186
|
-
- **Time Travel Code Viewing** - View files from specific commits and pull requests using SHA references
|
|
187
|
-
- **PR Code Analysis** - Fetch commit data with file changes for precise code comparison
|
|
188
|
-
- **Historical Implementation** - Compare code evolution across versions with diff analysis
|
|
189
|
-
- **Cross-Tool Integration** - Commit SHAs work seamlessly across search, fetch, and analysis tools
|
|
190
|
-
|
|
191
|
-
### β‘ **Performance Optimization**
|
|
192
|
-
- **Smart Content Selection** - Extracts targeted line ranges with configurable context
|
|
193
|
-
- **Advanced Minification** - Language-aware compression preserving structure and meaning
|
|
194
|
-
- **Intelligent Caching** - Generated cache keys with automatic invalidation
|
|
195
|
-
- **Parallel Processing** - Concurrent API calls for enhanced content fetching
|
|
196
|
-
- **Token Efficiency** - 80-90% reduction in LLM token usage through optimization
|
|
197
|
-
|
|
198
|
-
## Available Tools
|
|
199
|
-
|
|
200
|
-
**10 specialized tools** working together intelligently:
|
|
201
|
-
|
|
202
|
-
### π **Discovery & Navigation**
|
|
203
|
-
- **Repository Search** - Multi-modal search with quality filters, URL extraction, and private repository support
|
|
204
|
-
- **Package Search** - NPM ecosystem discovery with deduplication and framework detection
|
|
205
|
-
- **Repository Structure** - Smart branch detection with path validation and enhanced fallbacks
|
|
206
|
-
|
|
207
|
-
### π» **Code Analysis**
|
|
208
|
-
- **Code Search** - Advanced search with exact/term modes, progressive strategies, and text match optimization
|
|
209
|
-
- **File Content Fetching** - Intelligent retrieval with partial access, minification, and smart branch fallbacks
|
|
210
|
-
- **Package Analysis** - Detailed NPM package inspection with export structure and GitHub integration
|
|
211
|
-
|
|
212
|
-
### π **Development Activity**
|
|
213
|
-
- **Commit Search** - Multi-modal search with content fetching and SHA integration for file viewing
|
|
214
|
-
- **Pull Request Search** - Dual search modes with commit data and cross-tool SHA integration
|
|
215
|
-
- **Issue Search** - Rich filtering with parallel content fetching and advanced metrics
|
|
216
|
-
|
|
217
|
-
### π οΈ **System Integration**
|
|
218
|
-
- **API Status Check** - Central authentication validation with organization discovery and smart error handling
|
|
219
|
-
|
|
220
|
-
### π **Latest Features**
|
|
221
|
-
- **Windows PowerShell Support (v2.3.24)** - Native PowerShell Core integration with automatic path detection
|
|
222
|
-
- **Custom Path Support (v2.3.24)** - Environment variables for custom GitHub CLI and NPM installations
|
|
223
|
-
- **Enhanced Security Architecture (v2.3.24)** - Implements GitHub CLI's security best practices with safe path resolution
|
|
224
|
-
- **Commit SHA Integration** - View files from specific commits and pull requests
|
|
225
|
-
- **Progressive Search Strategies** - AI-guided complexity reduction with contextual suggestions
|
|
226
|
-
- **Cross-Tool Data Sharing** - Seamless integration with shared data formats and relationship mapping
|
|
227
|
-
- **Advanced Error Recovery** - Context-aware suggestions and smart fallback chains
|
|
228
|
-
- **Performance Optimization** - Token efficiency, intelligent caching, and parallel processing
|
|
229
|
-
|
|
230
|
-
## Security & Privacy π‘οΈ
|
|
231
|
-
|
|
232
|
-
### Local-First Architecture
|
|
233
|
-
- **π 100% Local** - Runs entirely on your machine
|
|
234
|
-
- **π« Zero Data Collection** - No telemetry or data transmission
|
|
235
|
-
- **π Safe Token Usage** - Uses GitHub CLI authentication, no personal access tokens needed
|
|
236
|
-
|
|
237
|
-
### Multi-Layer Security Protection
|
|
238
|
-
- **π‘οΈ Input Sanitization** - Comprehensive validation of all user inputs with Zod schemas
|
|
239
|
-
- **π Content Sanitization** - Automatic detection and redaction of 1100+ secret patterns
|
|
240
|
-
- **β‘ Prompt Injection Defense** - Advanced pattern detection prevents malicious prompt manipulation
|
|
241
|
-
- **π¨ Malicious Content Detection** - Real-time scanning for suspicious patterns and code
|
|
242
|
-
- **π Output Sanitization** - All responses are filtered and sanitized before delivery
|
|
243
|
-
|
|
244
|
-
### Command Execution Security
|
|
245
|
-
- **βͺ Allowlisted Commands Only** - Pre-approved safe commands (GitHub CLI & NPM only)
|
|
246
|
-
- **π‘οΈ Argument Sanitization** - Prevents shell injection attacks with proper escaping
|
|
247
|
-
- **β
Pre-execution Validation** - Every command is validated before execution
|
|
248
|
-
- **π§ Controlled Environment** - Cross-platform secure shell execution
|
|
249
|
-
- **β±οΈ Timeout Protection** - Prevents resource exhaustion with configurable timeouts
|
|
250
|
-
|
|
251
|
-
### Windows Security Enhancements (v2.3.24+)
|
|
252
|
-
- **π PowerShell Core Priority** - Uses PowerShell 7+ for enhanced security over Windows PowerShell
|
|
253
|
-
- **π‘οΈ Safe Path Resolution** - Prevents Windows security vulnerability where current directory is searched
|
|
254
|
-
- **π Custom Path Validation** - Validates custom executable paths to prevent injection attacks
|
|
255
|
-
- **β
Absolute Path Requirements** - Custom paths must be absolute for security compliance
|
|
256
|
-
- **π¨ Executable Validation** - Verifies file existence and accessibility before execution
|
|
257
|
-
- **π§ Platform-Specific Escaping** - Dedicated argument escaping for PowerShell, CMD, and Unix shells
|
|
258
|
-
|
|
259
|
-
### Secret & Credential Protection
|
|
260
|
-
- **π Comprehensive Detection** - Detects API keys, tokens, private keys, and credentials
|
|
261
|
-
- **π Smart Masking** - Preserves readability while redacting sensitive information
|
|
262
|
-
- **π’ Enterprise Ready** - Handles AWS, Google Cloud, Azure, and 100+ service patterns
|
|
263
|
-
- **π Real-time Processing** - Secrets are detected and masked in real-time during content processing
|
|
166
|
+
- `yarn dxt:pack` - Build and package the extension
|
|
167
|
+
- `yarn dxt:release` - Full release pipeline (build β pack β sign β verify)
|
|
264
168
|
|
|
265
169
|
## Best Practices π‘
|
|
266
170
|
|
|
267
|
-
**
|
|
268
|
-
-
|
|
269
|
-
-
|
|
270
|
-
-
|
|
271
|
-
-
|
|
171
|
+
**Ask Natural Questions:**
|
|
172
|
+
- "How does authentication work in this project?"
|
|
173
|
+
- "What libraries implement this pattern?"
|
|
174
|
+
- "Show me NPM packages that solve X problem"
|
|
175
|
+
- "How has this approach evolved over time?"
|
|
272
176
|
|
|
273
|
-
**
|
|
274
|
-
-
|
|
275
|
-
- Trust smart fallbacks - automatic retry with alternatives
|
|
177
|
+
**Let AI Guide Discovery:**
|
|
178
|
+
- Start with broad queries - the system will intelligently narrow down
|
|
179
|
+
- Trust the smart fallbacks - automatic retry with alternatives
|
|
276
180
|
- Build on previous searches - maintain context for deeper exploration
|
|
277
181
|
- Works everywhere - public, private, and organization repositories
|
|
278
182
|
|
|
@@ -290,40 +194,36 @@ gh auth logout && gh auth login
|
|
|
290
194
|
npm whoami
|
|
291
195
|
```
|
|
292
196
|
|
|
293
|
-
**Windows-Specific
|
|
197
|
+
**Windows-Specific:**
|
|
294
198
|
```powershell
|
|
295
199
|
# Check PowerShell version (7+ recommended)
|
|
296
200
|
$PSVersionTable.PSVersion
|
|
297
201
|
|
|
298
|
-
# Verify custom paths
|
|
299
|
-
Write-Host "GH_PATH: $env:GH_PATH"
|
|
300
|
-
Write-Host "NPM_PATH: $env:NPM_PATH"
|
|
301
|
-
|
|
302
202
|
# Test executable detection
|
|
303
203
|
where.exe gh
|
|
304
204
|
where.exe npm
|
|
305
|
-
|
|
306
|
-
# Clear NPX cache
|
|
307
|
-
Remove-Item -Recurse -Force "$env:APPDATA\npm\_npx" -ErrorAction SilentlyContinue
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
**macOS/Linux:**
|
|
311
|
-
```bash
|
|
312
|
-
# Clear NPX cache
|
|
313
|
-
rm -rf ~/.npm/_npx
|
|
314
|
-
|
|
315
|
-
# Check installation paths
|
|
316
|
-
which gh
|
|
317
|
-
which npm
|
|
318
205
|
```
|
|
319
206
|
|
|
320
207
|
**Common Solutions:**
|
|
321
208
|
- No results? Try broader search terms
|
|
322
209
|
- Private repos not found? Check `gh auth status` for organization membership
|
|
323
|
-
- Windows
|
|
324
|
-
- Custom paths not working? Ensure absolute paths and file existence
|
|
210
|
+
- Windows issues? Install PowerShell 7+ for better security
|
|
325
211
|
- Permission errors? Check executable permissions and PATH configuration
|
|
326
212
|
|
|
213
|
+
## Security & Privacy π‘οΈ
|
|
214
|
+
|
|
215
|
+
### Local-First Architecture
|
|
216
|
+
- **π 100% Local** - Runs entirely on your machine
|
|
217
|
+
- **π« Zero Data Collection** - No telemetry or data transmission
|
|
218
|
+
- **π Safe Authentication** - Uses GitHub CLI OAuth, no personal tokens needed
|
|
219
|
+
|
|
220
|
+
### Enterprise Security
|
|
221
|
+
- **π‘οΈ Content Protection** - Input validation and content sanitization
|
|
222
|
+
- **π Secret Detection** - Automatic detection and redaction of sensitive data patterns
|
|
223
|
+
- **βͺ Safe Commands Only** - Pre-approved GitHub CLI and NPM commands only
|
|
224
|
+
|
|
225
|
+
> **π For comprehensive security architecture details, see [Technical Summary](./docs/summary.md)**
|
|
226
|
+
|
|
327
227
|
## Background π
|
|
328
228
|
|
|
329
229
|
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**.
|