octocode-mcp 12.0.0 → 13.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 (203) hide show
  1. package/README.md +16 -10
  2. package/dist/index.d.ts +74 -3
  3. package/dist/index.js +175 -143
  4. package/dist/public.d.ts +3658 -284
  5. package/dist/public.js +198 -141
  6. package/package.json +23 -23
  7. package/dist/commands/BaseCommandBuilder.d.ts +0 -39
  8. package/dist/commands/FindCommandBuilder.d.ts +0 -60
  9. package/dist/commands/GrepCommandBuilder.d.ts +0 -69
  10. package/dist/commands/LsCommandBuilder.d.ts +0 -51
  11. package/dist/commands/RipgrepCommandBuilder.d.ts +0 -61
  12. package/dist/errorCodes.d.ts +0 -440
  13. package/dist/github/client.d.ts +0 -8
  14. package/dist/github/codeSearch.d.ts +0 -4
  15. package/dist/github/errorConstants.d.ts +0 -173
  16. package/dist/github/errors.d.ts +0 -2
  17. package/dist/github/fileContent.d.ts +0 -9
  18. package/dist/github/fileOperations.d.ts +0 -10
  19. package/dist/github/githubAPI.d.ts +0 -199
  20. package/dist/github/index.d.ts +0 -7
  21. package/dist/github/pullRequestSearch.d.ts +0 -44
  22. package/dist/github/queryBuilders.d.ts +0 -7
  23. package/dist/github/repoSearch.d.ts +0 -16
  24. package/dist/github/repoStructure.d.ts +0 -4
  25. package/dist/gitlab/client.d.ts +0 -60
  26. package/dist/gitlab/codeSearch.d.ts +0 -29
  27. package/dist/gitlab/errors.d.ts +0 -65
  28. package/dist/gitlab/fileContent.d.ts +0 -44
  29. package/dist/gitlab/mergeRequests.d.ts +0 -68
  30. package/dist/gitlab/projectsSearch.d.ts +0 -56
  31. package/dist/gitlab/repoStructure.d.ts +0 -57
  32. package/dist/gitlab/types.d.ts +0 -346
  33. package/dist/hints/dynamic.d.ts +0 -37
  34. package/dist/hints/index.d.ts +0 -45
  35. package/dist/hints/static.d.ts +0 -24
  36. package/dist/hints/types.d.ts +0 -6
  37. package/dist/lsp/client.d.ts +0 -75
  38. package/dist/lsp/config.d.ts +0 -53
  39. package/dist/lsp/index.d.ts +0 -14
  40. package/dist/lsp/manager.d.ts +0 -39
  41. package/dist/lsp/resolver.d.ts +0 -98
  42. package/dist/lsp/symbols.d.ts +0 -27
  43. package/dist/lsp/types.d.ts +0 -244
  44. package/dist/lsp/uri.d.ts +0 -31
  45. package/dist/lsp/validation.d.ts +0 -36
  46. package/dist/prompts/prompts.d.ts +0 -7
  47. package/dist/providers/execute.d.ts +0 -172
  48. package/dist/providers/factory.d.ts +0 -91
  49. package/dist/providers/github/GitHubProvider.d.ts +0 -45
  50. package/dist/providers/gitlab/GitLabProvider.d.ts +0 -44
  51. package/dist/providers/types.d.ts +0 -492
  52. package/dist/responses.d.ts +0 -104
  53. package/dist/scheme/baseSchema.d.ts +0 -50
  54. package/dist/security/commandValidator.d.ts +0 -16
  55. package/dist/security/contentSanitizer.d.ts +0 -6
  56. package/dist/security/executionContextValidator.d.ts +0 -13
  57. package/dist/security/ignoredPathFilter.d.ts +0 -18
  58. package/dist/security/mask.d.ts +0 -1
  59. package/dist/security/pathValidator.d.ts +0 -95
  60. package/dist/security/patternsConstants.d.ts +0 -42
  61. package/dist/security/regexes/ai-providers.d.ts +0 -2
  62. package/dist/security/regexes/auth-crypto.d.ts +0 -6
  63. package/dist/security/regexes/cloud-infrastructure.d.ts +0 -5
  64. package/dist/security/regexes/communications.d.ts +0 -4
  65. package/dist/security/regexes/dev-tools-vcs.d.ts +0 -4
  66. package/dist/security/regexes/index.d.ts +0 -17
  67. package/dist/security/regexes/payments-commerce.d.ts +0 -3
  68. package/dist/security/regexes/types.d.ts +0 -2
  69. package/dist/security/regexes.d.ts +0 -16
  70. package/dist/security/securityConstants.d.ts +0 -23
  71. package/dist/security/withSecurityValidation.d.ts +0 -52
  72. package/dist/serverConfig.d.ts +0 -113
  73. package/dist/session.d.ts +0 -36
  74. package/dist/tools/github_fetch_content/execution.d.ts +0 -4
  75. package/dist/tools/github_fetch_content/github_fetch_content.d.ts +0 -3
  76. package/dist/tools/github_fetch_content/hints.d.ts +0 -7
  77. package/dist/tools/github_fetch_content/index.d.ts +0 -2
  78. package/dist/tools/github_fetch_content/scheme.d.ts +0 -191
  79. package/dist/tools/github_fetch_content/types.d.ts +0 -71
  80. package/dist/tools/github_search_code/execution.d.ts +0 -4
  81. package/dist/tools/github_search_code/github_search_code.d.ts +0 -3
  82. package/dist/tools/github_search_code/hints.d.ts +0 -7
  83. package/dist/tools/github_search_code/index.d.ts +0 -2
  84. package/dist/tools/github_search_code/scheme.d.ts +0 -115
  85. package/dist/tools/github_search_code/types.d.ts +0 -70
  86. package/dist/tools/github_search_pull_requests/execution.d.ts +0 -4
  87. package/dist/tools/github_search_pull_requests/github_search_pull_requests.d.ts +0 -3
  88. package/dist/tools/github_search_pull_requests/hints.d.ts +0 -7
  89. package/dist/tools/github_search_pull_requests/index.d.ts +0 -2
  90. package/dist/tools/github_search_pull_requests/scheme.d.ts +0 -387
  91. package/dist/tools/github_search_pull_requests/types.d.ts +0 -159
  92. package/dist/tools/github_search_repos/execution.d.ts +0 -4
  93. package/dist/tools/github_search_repos/github_search_repos.d.ts +0 -3
  94. package/dist/tools/github_search_repos/hints.d.ts +0 -7
  95. package/dist/tools/github_search_repos/index.d.ts +0 -2
  96. package/dist/tools/github_search_repos/scheme.d.ts +0 -191
  97. package/dist/tools/github_search_repos/types.d.ts +0 -70
  98. package/dist/tools/github_view_repo_structure/execution.d.ts +0 -4
  99. package/dist/tools/github_view_repo_structure/github_view_repo_structure.d.ts +0 -3
  100. package/dist/tools/github_view_repo_structure/hints.d.ts +0 -7
  101. package/dist/tools/github_view_repo_structure/index.d.ts +0 -2
  102. package/dist/tools/github_view_repo_structure/scheme.d.ts +0 -147
  103. package/dist/tools/github_view_repo_structure/types.d.ts +0 -51
  104. package/dist/tools/local_fetch_content/execution.d.ts +0 -8
  105. package/dist/tools/local_fetch_content/fetchContent.d.ts +0 -2
  106. package/dist/tools/local_fetch_content/hints.d.ts +0 -12
  107. package/dist/tools/local_fetch_content/index.d.ts +0 -4
  108. package/dist/tools/local_fetch_content/register.d.ts +0 -6
  109. package/dist/tools/local_fetch_content/scheme.d.ts +0 -180
  110. package/dist/tools/local_fetch_content/types.d.ts +0 -62
  111. package/dist/tools/local_find_files/execution.d.ts +0 -8
  112. package/dist/tools/local_find_files/findFiles.d.ts +0 -2
  113. package/dist/tools/local_find_files/hints.d.ts +0 -7
  114. package/dist/tools/local_find_files/index.d.ts +0 -4
  115. package/dist/tools/local_find_files/register.d.ts +0 -6
  116. package/dist/tools/local_find_files/scheme.d.ts +0 -272
  117. package/dist/tools/local_find_files/types.d.ts +0 -77
  118. package/dist/tools/local_ripgrep/execution.d.ts +0 -8
  119. package/dist/tools/local_ripgrep/hints.d.ts +0 -11
  120. package/dist/tools/local_ripgrep/index.d.ts +0 -4
  121. package/dist/tools/local_ripgrep/register.d.ts +0 -6
  122. package/dist/tools/local_ripgrep/scheme.d.ts +0 -464
  123. package/dist/tools/local_ripgrep/searchContentRipgrep.d.ts +0 -3
  124. package/dist/tools/local_ripgrep/types.d.ts +0 -127
  125. package/dist/tools/local_view_structure/execution.d.ts +0 -8
  126. package/dist/tools/local_view_structure/hints.d.ts +0 -7
  127. package/dist/tools/local_view_structure/index.d.ts +0 -4
  128. package/dist/tools/local_view_structure/local_view_structure.d.ts +0 -8
  129. package/dist/tools/local_view_structure/scheme.d.ts +0 -208
  130. package/dist/tools/local_view_structure/types.d.ts +0 -63
  131. package/dist/tools/lsp_call_hierarchy/callHierarchy.d.ts +0 -53
  132. package/dist/tools/lsp_call_hierarchy/execution.d.ts +0 -8
  133. package/dist/tools/lsp_call_hierarchy/hints.d.ts +0 -7
  134. package/dist/tools/lsp_call_hierarchy/index.d.ts +0 -4
  135. package/dist/tools/lsp_call_hierarchy/register.d.ts +0 -5
  136. package/dist/tools/lsp_call_hierarchy/scheme.d.ts +0 -122
  137. package/dist/tools/lsp_call_hierarchy/types.d.ts +0 -99
  138. package/dist/tools/lsp_find_references/execution.d.ts +0 -8
  139. package/dist/tools/lsp_find_references/hints.d.ts +0 -7
  140. package/dist/tools/lsp_find_references/index.d.ts +0 -4
  141. package/dist/tools/lsp_find_references/lsp_find_references.d.ts +0 -37
  142. package/dist/tools/lsp_find_references/scheme.d.ts +0 -113
  143. package/dist/tools/lsp_find_references/types.d.ts +0 -86
  144. package/dist/tools/lsp_goto_definition/execution.d.ts +0 -17
  145. package/dist/tools/lsp_goto_definition/hints.d.ts +0 -7
  146. package/dist/tools/lsp_goto_definition/index.d.ts +0 -2
  147. package/dist/tools/lsp_goto_definition/lsp_goto_definition.d.ts +0 -11
  148. package/dist/tools/lsp_goto_definition/scheme.d.ts +0 -89
  149. package/dist/tools/lsp_goto_definition/types.d.ts +0 -66
  150. package/dist/tools/package_search/execution.d.ts +0 -4
  151. package/dist/tools/package_search/hints.d.ts +0 -7
  152. package/dist/tools/package_search/index.d.ts +0 -2
  153. package/dist/tools/package_search/package_search.d.ts +0 -3
  154. package/dist/tools/package_search/scheme.d.ts +0 -197
  155. package/dist/tools/package_search/types.d.ts +0 -113
  156. package/dist/tools/toolConfig.d.ts +0 -27
  157. package/dist/tools/toolMetadata/index.d.ts +0 -35
  158. package/dist/tools/toolMetadata/proxies.d.ts +0 -57
  159. package/dist/tools/toolMetadata/schemaHelpers.d.ts +0 -359
  160. package/dist/tools/toolMetadata/schemas.d.ts +0 -358
  161. package/dist/tools/toolMetadata/state.d.ts +0 -30
  162. package/dist/tools/toolMetadata/types.d.ts +0 -12
  163. package/dist/tools/toolMetadata.d.ts +0 -13
  164. package/dist/tools/toolNames.d.ts +0 -24
  165. package/dist/tools/toolsManager.d.ts +0 -14
  166. package/dist/tools/utils.d.ts +0 -61
  167. package/dist/types/execution.d.ts +0 -35
  168. package/dist/types/metadata.d.ts +0 -183
  169. package/dist/types/responseTypes.d.ts +0 -122
  170. package/dist/types/toolTypes.d.ts +0 -24
  171. package/dist/types.d.ts +0 -514
  172. package/dist/utils/core/constants.d.ts +0 -96
  173. package/dist/utils/core/logger.d.ts +0 -41
  174. package/dist/utils/core/promise.d.ts +0 -2
  175. package/dist/utils/core/types.d.ts +0 -310
  176. package/dist/utils/credentials/index.d.ts +0 -6
  177. package/dist/utils/environment/environmentDetection.d.ts +0 -43
  178. package/dist/utils/exec/commandAvailability.d.ts +0 -63
  179. package/dist/utils/exec/index.d.ts +0 -12
  180. package/dist/utils/exec/npm.d.ts +0 -33
  181. package/dist/utils/exec/safe.d.ts +0 -13
  182. package/dist/utils/exec/spawn.d.ts +0 -79
  183. package/dist/utils/file/byteOffset.d.ts +0 -99
  184. package/dist/utils/file/filters.d.ts +0 -42
  185. package/dist/utils/file/size.d.ts +0 -17
  186. package/dist/utils/file/toolHelpers.d.ts +0 -44
  187. package/dist/utils/file/types.d.ts +0 -5
  188. package/dist/utils/http/cache.d.ts +0 -23
  189. package/dist/utils/http/fetch.d.ts +0 -63
  190. package/dist/utils/minifier/index.d.ts +0 -2
  191. package/dist/utils/minifier/jsonToYamlString.d.ts +0 -5
  192. package/dist/utils/minifier/minifier.d.ts +0 -39
  193. package/dist/utils/package/common.d.ts +0 -64
  194. package/dist/utils/package/npm.d.ts +0 -3
  195. package/dist/utils/package/python.d.ts +0 -2
  196. package/dist/utils/pagination/core.d.ts +0 -33
  197. package/dist/utils/pagination/hints.d.ts +0 -19
  198. package/dist/utils/pagination/index.d.ts +0 -11
  199. package/dist/utils/pagination/types.d.ts +0 -101
  200. package/dist/utils/parsers/diff.d.ts +0 -1
  201. package/dist/utils/parsers/ripgrep.d.ts +0 -11
  202. package/dist/utils/response/bulk.d.ts +0 -3
  203. package/dist/utils/response/error.d.ts +0 -71
package/README.md CHANGED
@@ -158,7 +158,7 @@ This will automatically:
158
158
  curl -fsSL https://raw.githubusercontent.com/bgauryy/octocode-mcp/main/install/install.sh | sh
159
159
  ```
160
160
 
161
- See [Troubleshooting Guide](../../docs/TROUBLESHOOTING.md) for common issues and solutions.
161
+ See [Troubleshooting Guide](https://github.com/bgauryy/octocode-mcp/blob/main/docs/TROUBLESHOOTING.md) for common issues and solutions.
162
162
 
163
163
  ---
164
164
 
@@ -166,7 +166,7 @@ See [Troubleshooting Guide](../../docs/TROUBLESHOOTING.md) for common issues and
166
166
 
167
167
  #### Prerequisites
168
168
 
169
- - **Node.js** >= 18.12.0
169
+ - **Node.js** >= 20.0.0
170
170
  - **GitHub Authentication** (choose one):
171
171
  - **GitHub CLI (recommended)**: Install from [cli.github.com](https://cli.github.com/) and run `gh auth login`
172
172
  - **Personal Access Token**: Create at [github.com/settings/tokens](https://github.com/settings/tokens) with scopes: `repo`, `read:user`, `read:org`
@@ -226,7 +226,13 @@ amp mcp add octocode -- npx octocode-mcp@latest
226
226
  Use the Claude Code CLI to add the Octocode MCP server:
227
227
 
228
228
  ```bash
229
- claude mcp add octocode npx octocode-mcp@latest
229
+ claude mcp add octocode -- npx octocode-mcp@latest
230
+ ```
231
+
232
+ **With local tools enabled:**
233
+
234
+ ```bash
235
+ claude mcp add octocode -e ENABLE_LOCAL=true -- npx octocode-mcp@latest
230
236
  ```
231
237
 
232
238
  </details>
@@ -544,7 +550,7 @@ Add the `GITHUB_API_URL` environment variable to your MCP configuration:
544
550
 
545
551
  **Default:** If not specified, defaults to `https://api.github.com` (public GitHub).
546
552
 
547
- **Note:** Ensure your GitHub Enterprise token has the same scopes as documented in the [Authentication Setup](./docs/AUTHENTICATION_SETUP.md).
553
+ **Note:** Ensure your GitHub Enterprise token has the same scopes as documented in the [Authentication Setup](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-mcp/docs/AUTHENTICATION_SETUP.md).
548
554
 
549
555
  ---
550
556
 
@@ -680,9 +686,9 @@ Comprehensive security analysis of a repository. Identifies vulnerabilities, rev
680
686
  | Resource | Description | Link |
681
687
  |----------|-------------|------|
682
688
  | **Official Website** | Interactive tutorials, demos, community | [octocode.ai](https://octocode.ai) |
683
- | **Configuration Guide** | Environment variables and server configuration | [CONFIGURATION_REFERENCE.md](../../docs/CONFIGURATION_REFERENCE.md) |
684
- | **Authentication Guide** | Setup instructions for GitHub & GitLab | [Authentication Setup](./docs/AUTHENTICATION_SETUP.md) |
685
- | **Troubleshooting** | Common issues and solutions | [Troubleshooting Guide](../../docs/TROUBLESHOOTING.md) |
689
+ | **Configuration Guide** | Environment variables and server configuration | [CONFIGURATION_REFERENCE.md](https://github.com/bgauryy/octocode-mcp/blob/main/docs/CONFIGURATION_REFERENCE.md) |
690
+ | **Authentication Guide** | Setup instructions for GitHub & GitLab | [Authentication Setup](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-mcp/docs/AUTHENTICATION_SETUP.md) |
691
+ | **Troubleshooting** | Common issues and solutions | [Troubleshooting Guide](https://github.com/bgauryy/octocode-mcp/blob/main/docs/TROUBLESHOOTING.md) |
686
692
  | **YouTube Channel** | Video tutorials and demonstrations | [Octocode on YouTube](https://www.youtube.com/@Octocode-ai) |
687
693
 
688
694
 
@@ -716,10 +722,10 @@ Octocode collects **de-identified** telemetry data to improve the tool, includin
716
722
  You can opt-out at any time:
717
723
 
718
724
  ```bash
719
- export OCTOCODE_TELEMETRY_DISABLED=1
725
+ export LOG=false
720
726
  ```
721
727
 
722
- For full details, please read our [Privacy Policy](../../PRIVACY.md) and [Terms of Usage](../../TERMS.md).
728
+ For full details, please read our [Privacy Policy](https://github.com/bgauryy/octocode-mcp/blob/main/PRIVACY.md) and [Terms of Usage](https://github.com/bgauryy/octocode-mcp/blob/main/TERMS.md).
723
729
 
724
730
  ---
725
731
 
@@ -729,4 +735,4 @@ This project is licensed under the **MIT License**.
729
735
 
730
736
  Copyright © 2026 Octocode AI.
731
737
 
732
- See [LICENSE](./LICENSE) for details.
738
+ See [LICENSE](https://github.com/bgauryy/octocode-mcp/blob/main/packages/octocode-mcp/LICENSE) for details.
package/dist/index.d.ts CHANGED
@@ -1,3 +1,74 @@
1
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { CompleteMetadata } from './tools/toolMetadata.js';
3
- export declare function registerAllTools(server: McpServer, _content: CompleteMetadata): Promise<void>;
1
+ #!/usr/bin/env node
2
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
3
+
4
+ //#region src/types/metadata.d.ts
5
+
6
+ interface ToolMetadata {
7
+ name: string;
8
+ description: string;
9
+ schema: Record<string, string>;
10
+ outputSchema?: Record<string, unknown>;
11
+ hints: {
12
+ hasResults: readonly string[];
13
+ empty: readonly string[];
14
+ dynamic?: Record<string, string[] | undefined>;
15
+ };
16
+ }
17
+ interface PromptArgument {
18
+ name: string;
19
+ description: string;
20
+ required?: boolean;
21
+ }
22
+ interface PromptMetadata {
23
+ name: string;
24
+ description: string;
25
+ content: string;
26
+ args?: PromptArgument[];
27
+ }
28
+ interface ToolNames {
29
+ GITHUB_FETCH_CONTENT: 'githubGetFileContent';
30
+ GITHUB_SEARCH_CODE: 'githubSearchCode';
31
+ GITHUB_SEARCH_PULL_REQUESTS: 'githubSearchPullRequests';
32
+ GITHUB_SEARCH_REPOSITORIES: 'githubSearchRepositories';
33
+ GITHUB_VIEW_REPO_STRUCTURE: 'githubViewRepoStructure';
34
+ GITHUB_CLONE_REPO: 'githubCloneRepo';
35
+ PACKAGE_SEARCH: 'packageSearch';
36
+ LOCAL_RIPGREP: 'localSearchCode';
37
+ LOCAL_FETCH_CONTENT: 'localGetFileContent';
38
+ LOCAL_FIND_FILES: 'localFindFiles';
39
+ LOCAL_VIEW_STRUCTURE: 'localViewStructure';
40
+ LSP_GOTO_DEFINITION: 'lspGotoDefinition';
41
+ LSP_FIND_REFERENCES: 'lspFindReferences';
42
+ LSP_CALL_HIERARCHY: 'lspCallHierarchy';
43
+ }
44
+ interface CompleteMetadata {
45
+ instructions: string;
46
+ prompts: Record<string, PromptMetadata>;
47
+ toolNames: ToolNames;
48
+ baseSchema: {
49
+ mainResearchGoal: string;
50
+ researchGoal: string;
51
+ reasoning: string;
52
+ bulkQuery: (toolName: string) => string;
53
+ };
54
+ tools: Record<string, ToolMetadata>;
55
+ baseHints: {
56
+ hasResults: readonly string[];
57
+ empty: readonly string[];
58
+ };
59
+ genericErrorHints: readonly string[];
60
+ bulkOperations?: {
61
+ instructions?: {
62
+ base?: string;
63
+ hasResults?: string;
64
+ empty?: string;
65
+ error?: string;
66
+ };
67
+ };
68
+ }
69
+ //#endregion
70
+ //#region src/index.d.ts
71
+ declare function registerAllTools(server: McpServer, _content: CompleteMetadata): Promise<void>;
72
+ //#endregion
73
+ export { registerAllTools };
74
+ //# sourceMappingURL=index.d.ts.map