octocode-mcp 5.0.0 → 6.0.0

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.
Files changed (59) hide show
  1. package/README.md +83 -80
  2. package/dist/index.js +1 -1
  3. package/dist/src/constants.d.ts +0 -16
  4. package/dist/src/github/fileOperations.d.ts +4 -4
  5. package/dist/src/github/github-openapi.d.ts +0 -2
  6. package/dist/src/github/githubAPI.d.ts +1 -1
  7. package/dist/src/github/index.d.ts +0 -1
  8. package/dist/src/github/pullRequestSearch.d.ts +3 -3
  9. package/dist/src/github/queryBuilders.d.ts +0 -5
  10. package/dist/src/github/repoSearch.d.ts +3 -4
  11. package/dist/src/responses.d.ts +32 -12
  12. package/dist/src/sampling.d.ts +1 -1
  13. package/dist/src/scheme/baseSchema.d.ts +37 -213
  14. package/dist/src/scheme/github_fetch_content.d.ts +80 -73
  15. package/dist/src/scheme/github_search_code.d.ts +64 -102
  16. package/dist/src/scheme/github_search_pull_requests.d.ts +180 -160
  17. package/dist/src/scheme/github_search_repos.d.ts +94 -119
  18. package/dist/src/scheme/github_view_repo_structure.d.ts +43 -133
  19. package/dist/src/serverConfig.d.ts +11 -0
  20. package/dist/src/systemPrompts.d.ts +1 -1
  21. package/dist/src/tools/descriptions.d.ts +7 -0
  22. package/dist/src/tools/hints.d.ts +1 -3
  23. package/dist/src/tools/tools.d.ts +1 -3
  24. package/dist/src/utils/bulkOperations.d.ts +15 -9
  25. package/dist/src/utils/cache.d.ts +1 -21
  26. package/dist/src/utils/fileFilters.d.ts +10 -25
  27. package/dist/src/utils/logger.d.ts +40 -0
  28. package/manifest.json +0 -12
  29. package/package.json +4 -6
  30. package/dist/src/github/commitSearch.d.ts +0 -9
  31. package/dist/src/npm/BaseCommandBuilder.d.ts +0 -77
  32. package/dist/src/npm/NpmCommandBuilder.d.ts +0 -30
  33. package/dist/src/npm/getNPMUserDetails.d.ts +0 -4
  34. package/dist/src/npm/npmAPI.d.ts +0 -15
  35. package/dist/src/npm/package.d.ts +0 -6
  36. package/dist/src/scheme/github_search_commits.d.ts +0 -297
  37. package/dist/src/scheme/package_search.d.ts +0 -234
  38. package/dist/src/security/auditLogger.d.ts +0 -46
  39. package/dist/src/security/credentialStore.d.ts +0 -69
  40. package/dist/src/security/rateLimiter.d.ts +0 -113
  41. package/dist/src/tools/github_search_commits.d.ts +0 -2
  42. package/dist/src/tools/package_search.d.ts +0 -2
  43. package/dist/src/tools/types.d.ts +0 -77
  44. package/dist/tests/enterprise/basic-functionality.test.d.ts +0 -4
  45. package/dist/tests/tools/github_search_repos.test.d.ts +0 -1
  46. package/dist/tests/tools/package_search.test.d.ts +0 -1
  47. package/dist/tests/tools/utils/BaseCommandBuilder.test.d.ts +0 -1
  48. package/dist/tests/tools/utils/NpmCommandBuilder.test.d.ts +0 -1
  49. package/dist/tests/types.test.d.ts +0 -1
  50. package/dist/tests/utils/cache.functionality.test.d.ts +0 -1
  51. package/dist/tests/utils/cache.security.test.d.ts +0 -1
  52. package/dist/tests/utils/npmAPI.test.d.ts +0 -1
  53. package/dist/tests/utils/package-npm-disabled.test.d.ts +0 -1
  54. package/dist/tests/utils/package-npm-enabled-vs-disabled.test.d.ts +0 -1
  55. /package/dist/tests/{npm/getNPMUserDetails.test.d.ts → github/codeSearch.filtering.test.d.ts} +0 -0
  56. /package/dist/tests/{security/auditLogger.test.d.ts → tools/github_search_code.filtering.test.d.ts} +0 -0
  57. /package/dist/tests/{security/credentialStore.test.d.ts → tools/github_search_code.sensitive_filtering.test.d.ts} +0 -0
  58. /package/dist/tests/{security/rateLimiter.test.d.ts → tools/github_search_repos_integration.test.d.ts} +0 -0
  59. /package/dist/tests/tools/{github_search_commits.test.d.ts → github_view_repo_structure.sensitive_filtering.test.d.ts} +0 -0
package/README.md CHANGED
@@ -1,11 +1,15 @@
1
1
  # Octocode MCP - AI-Powered GitHub Intelligence
2
2
 
3
- **Transform your AI assistant into a code research expert**
3
+ **Transform your AI assistant into a code research expert with the Model Context Protocol (MCP)**
4
4
 
5
5
  <div align="center">
6
6
  <a href="https://octocode.ai" style="font-size: 1.1em; font-weight: bold; text-decoration: none;">
7
7
  🌐 Visit octocode.ai for guides, examples & community →
8
8
  </a>
9
+ <br>
10
+ <a href="https://www.youtube.com/@Octocode-ai" style="font-size: 1.1em; font-weight: bold; text-decoration: none; color: #ff0000;">
11
+ 📺 YouTube Tutorials & Demos →
12
+ </a>
9
13
  </div>
10
14
 
11
15
  <div align="center">
@@ -21,32 +25,65 @@
21
25
 
22
26
  <div align="center">
23
27
 
24
- [![Version](https://img.shields.io/badge/version-4.1.0-blue.svg)](./package.json)
28
+ [![Version](https://img.shields.io/badge/version-6.0.0-blue.svg)](./package.json)
25
29
  [![License](https://img.shields.io/badge/license-MIT-green.svg)](./package.json)
26
30
  [![Node.js Version](https://img.shields.io/badge/node-%3E%3D18.12.0-brightgreen)](https://nodejs.org/)
27
31
  [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/bgauryy/octocode-mcp)
28
- [![X/Twitter](https://img.shields.io/badge/X-Follow%20@guy__bary-1DA1F2.svg?logo=x&logoColor=white)](https://x.com/guy_bary)
32
+ [![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/bgauryy/octocode-mcp)](https://archestra.ai/mcp-catalog/bgauryy__octocode-mcp)
29
33
 
30
34
  </div>
31
35
 
36
+ ## 🤖 What is MCP?
37
+
38
+ **Model Context Protocol (MCP)** is an open standard that enables AI assistants to securely connect to external data sources and tools. Octocode MCP is an official community server that gives your AI assistant superpowers for code research to add quality context for your AI agents.
39
+
40
+
41
+ ## 🚀 Quick Start
32
42
 
33
- ### Local Setup
43
+ Get up and running in 2 minutes with your preferred authentication method:
34
44
 
35
- For local development:
45
+ ### Option 1: GitHub CLI (Recommended)
46
+ **Perfect for developers who already use GitHub CLI**
36
47
 
37
48
  ```bash
38
- # 1. Authenticate with GitHub
49
+ # 1. Install GitHub CLI (if not already installed)
50
+ # macOS: brew install gh
51
+ # Windows: winget install --id GitHub.cli
52
+ # Linux: See https://github.com/cli/cli#installation
53
+
54
+ # 2. Authenticate with GitHub
39
55
  gh auth login
40
56
 
41
- # 2. Add to your MCP configuration
57
+ # 3. Add to your MCP configuration
58
+ ```
59
+
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "octocode": {
64
+ "command": "npx",
65
+ "args": ["octocode-mcp@latest"]
66
+ }
67
+ }
68
+ }
42
69
  ```
43
70
 
71
+ ### Option 2: GitHub Personal Access Token
72
+ **Great for CI/CD, Windows users, or when you prefer token-based auth**
73
+
74
+ 1. **Create a token**: Go to [GitHub Settings → Developer settings → Personal access tokens](https://github.com/settings/tokens)
75
+ 2. **Select scopes**: `repo`, `read:user`, `read:org` (see [detailed scope guide](./docs/AUTHENTICATION.md))
76
+ 3. **Configure MCP**:
77
+
44
78
  ```json
45
79
  {
46
80
  "mcpServers": {
47
81
  "octocode": {
48
82
  "command": "npx",
49
- "args": ["octocode-mcp"]
83
+ "args": ["octocode-mcp@latest"],
84
+ "env": {
85
+ "GITHUB_TOKEN": "ghp_xxxxxxxxxxxx"
86
+ }
50
87
  }
51
88
  }
52
89
  }
@@ -59,6 +96,7 @@ gh auth login
59
96
  style="font-size: 1.1em; font-weight: bold; text-decoration: none;">
60
97
  📚 View Usage Examples & Best Practices →
61
98
  </a>
99
+ <br><br>
62
100
  </div>
63
101
 
64
102
  ## What can Octocode do?
@@ -70,53 +108,28 @@ gh auth login
70
108
  - **Node.js** >= 18.12.0 - [Download here](https://nodejs.org/)
71
109
  - **GitHub Authentication** - GitHub CLI (recommended) or Personal Access Token
72
110
 
73
- ## 🔧 Alternative Setup Options
111
+ ## 🔗 MCP Assistant Integration
74
112
 
75
- **Need a different setup?** Choose your preferred method:
113
+ Octocode MCP works with any MCP-compatible AI assistant:
76
114
 
77
- ### GitHub Token (for Windows/CI/Production)
78
- ```json
79
- {
80
- "mcpServers": {
81
- "octocode": {
82
- "command": "npx",
83
- "args": ["octocode-mcp"],
84
- "env": {
85
- "GITHUB_TOKEN": "ghp_xxxxxxxxxxxx"
86
- }
87
- }
88
- }
89
- }
90
- ```
115
+ ## 🏢 Enterprise & Advanced Setup
91
116
 
92
- ### Enterprise Setup
93
- ```json
94
- {
95
- "mcpServers": {
96
- "octocode": {
97
- "command": "npx",
98
- "args": ["octocode-mcp"],
99
- "env": {
100
- "GITHUB_TOKEN": "ghp_xxxxxxxxxxxx",
101
- "GITHUB_ORGANIZATION": "your-org"
102
- }
103
- }
104
- }
105
- }
117
+ ### Advanced Configuration Options
118
+ ```bash
119
+ export GITHUB_TOKEN="ghp_xxxxxxxxxxxx" # GitHub token
120
+ export TOOLS_TO_RUN="githubSearchCode,githubSearchPullRequests" # Run ONLY these tools (exclusive)
121
+ export ENABLE_TOOLS="additionalTool1,additionalTool2" # Add non-default tools
122
+ export DISABLE_TOOLS="unwantedTool1,unwantedTool2" # Disable default tools
123
+ export BETA="1" # Enable experimental features
106
124
  ```
107
125
 
108
- **📚 Need detailed setup help?**
109
- - **[Complete Authentication Guide](./docs/AUTHENTICATION.md)** - All authentication methods, OAuth, GitHub Apps, and enterprise features
110
- - **[Installation Guide](./docs/INSTALLATION.md)** - Step-by-step setup for all environments
126
+ **⚠️ 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.
111
127
 
112
- ## 🔗 AI Assistant Integration
128
+ ## 🔒 Security & Privacy
113
129
 
114
- **Claude Desktop setup:**
115
- ```bash
116
- claude mcp add -s user octocode npx 'octocode-mcp@latest'
117
- ```
118
-
119
- Octocode works with any MCP-compatible AI assistant.
130
+ Octocode MCP is built with security-first principles:
131
+ - **Content Sanitization**: Automatically detects and redacts API keys, tokens, and sensitive data
132
+ - **Smart File Filtering**: Ignores sensitive paths, binaries, and non-searchable files for cleaner results
120
133
 
121
134
  ## 🚀 What You Can Do
122
135
 
@@ -146,50 +159,40 @@ For organizations: audit logging, access controls, rate limiting, and compliance
146
159
  | `githubGetFileContent` | Fetch file content from GitHub repositories | ✅ Yes | Content |
147
160
  | `githubViewRepoStructure` | View GitHub repository structure and navigation | ✅ Yes | Content |
148
161
  | `githubSearchRepositories` | Search and discover GitHub repositories | ✅ Yes | Search |
149
- | `githubSearchCommits` | Search GitHub commits and change history | ❌ No | History |
150
162
  | `githubSearchPullRequests` | Search GitHub pull requests and code reviews | ❌ No | History |
151
- | `packageSearch` | Search NPM and Python package registries | ❌ No | NPM |
152
163
 
153
164
  **Default tools** are automatically enabled and provide core GitHub research functionality. **Non-default tools** can be enabled using the configuration options below.
154
165
 
155
- ## ⚙️ Configuration & Advanced Setup
156
166
 
157
- **Most common settings:**
158
- ```bash
159
- export GITHUB_TOKEN="ghp_xxxxxxxxxxxx" # GitHub token
160
- export TOOLS_TO_RUN="githubSearchCode,packageSearch" # Run ONLY these tools (exclusive)
161
- export ENABLE_TOOLS="additionalTool1,additionalTool2" # Add non-default tools
162
- export DISABLE_TOOLS="unwantedTool1,unwantedTool2" # Disable default tools
163
- export BETA="1" # Enable experimental features
164
- ```
167
+ ## 📚 Complete Documentation
165
168
 
166
- **⚠️ 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.
167
-
168
- **📚 For complete configuration options:**
169
- - **[Environment Variables Reference](./docs/AUTHENTICATION.md)** - All settings, OAuth, enterprise features
170
- - **[Tool Configuration Guide](./docs/TOOL_SCHEMAS.md)** - Available tools and parameters
171
-
172
- ## 🚨 Troubleshooting
169
+ ### 🚀 Getting Started
170
+ | Resource | Description |
171
+ |----------|-------------|
172
+ | **[🌐 octocode.ai](https://octocode.ai)** | Interactive tutorials and community |
173
+ | **[🔐 Authentication Guide](./docs/AUTHENTICATION.md)** | Complete setup for GitHub CLI, tokens, OAuth, and enterprise |
174
+ | **[📚 Usage Guide](./docs/USAGE_GUIDE.md)** | Examples, best practices, and prompt templates |
173
175
 
174
- **Common Issues:**
175
- - **"No GitHub token found"** → [Setup GitHub authentication](./docs/AUTHENTICATION.md)
176
- - **Rate limiting** → [Configure rate limits](./docs/AUTHENTICATION.md)
177
- - **Enterprise setup** → [Enterprise guide](./docs/AUTHENTICATION.md)
176
+ ### 🛠️ Technical Reference
177
+ | Resource | Description |
178
+ |----------|-------------|
179
+ | **[🔧 Tool Schemas](./docs/TOOL_SCHEMAS.md)** | Complete API reference for all 7 tools with parameters |
180
+ | **[🏗️ Architecture Overview](./docs/summary.md)** | System design, security, and performance details |
178
181
 
179
- ## 📚 Documentation & Help
182
+ ### 🎯 Quick Links by Use Case
183
+ - **Want examples?** → [Usage Guide](./docs/USAGE_GUIDE.md) with 20+ prompt examples
184
+ - **Need API details?** → [Tool Schemas](./docs/TOOL_SCHEMAS.md) for bulk operations and advanced parameters
185
+ - **Enterprise deployment?** → [Authentication Guide](./docs/AUTHENTICATION.md) for audit logging and access controls
186
+ - **Understanding MCP?** → [Architecture Overview](./docs/summary.md) for system design
180
187
 
181
- | Resource | Purpose |
182
- |----------|---------|
183
- | **[🌐 octocode.ai](https://octocode.ai)** | Tutorials, community & latest updates |
184
- | **[📚 Usage Guide](./docs/USAGE_GUIDE.md)** | Examples and best practices |
185
- | **[🔐 Authentication](./docs/AUTHENTICATION.md)** | Setup for all auth methods |
186
- | **[🛠️ Tool Reference](./docs/TOOL_SCHEMAS.md)** | Complete API reference |
187
- | **[🏗️ Architecture](./docs/SUMMARY.md)** | System design overview |
188
-
189
- **Need help?** [GitHub Issues](https://github.com/bgauryy/octocode-mcp/issues) • [Discord](https://discord.gg/octocode) • [octocode.ai](https://octocode.ai)
188
+ ## 🚨 Troubleshooting
190
189
 
190
+ **Need help?** [GitHub Issues](https://github.com/bgauryy/octocode-mcp/issues)
191
191
  ---
192
192
 
193
+ <a href="https://glama.ai/mcp/servers/@bgauryy/octocode-mcp">
194
+ <img width="380" height="200" src="https://glama.ai/mcp/servers/@bgauryy/octocode-mcp/badge" />
195
+
193
196
  <div align="center">
194
197
  <p>Built with ❤️ for developers</p>
195
198
  <p>