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.
- package/README.md +16 -10
- package/dist/index.d.ts +74 -3
- package/dist/index.js +175 -143
- package/dist/public.d.ts +3658 -284
- package/dist/public.js +198 -141
- package/package.json +23 -23
- package/dist/commands/BaseCommandBuilder.d.ts +0 -39
- package/dist/commands/FindCommandBuilder.d.ts +0 -60
- package/dist/commands/GrepCommandBuilder.d.ts +0 -69
- package/dist/commands/LsCommandBuilder.d.ts +0 -51
- package/dist/commands/RipgrepCommandBuilder.d.ts +0 -61
- package/dist/errorCodes.d.ts +0 -440
- package/dist/github/client.d.ts +0 -8
- package/dist/github/codeSearch.d.ts +0 -4
- package/dist/github/errorConstants.d.ts +0 -173
- package/dist/github/errors.d.ts +0 -2
- package/dist/github/fileContent.d.ts +0 -9
- package/dist/github/fileOperations.d.ts +0 -10
- package/dist/github/githubAPI.d.ts +0 -199
- package/dist/github/index.d.ts +0 -7
- package/dist/github/pullRequestSearch.d.ts +0 -44
- package/dist/github/queryBuilders.d.ts +0 -7
- package/dist/github/repoSearch.d.ts +0 -16
- package/dist/github/repoStructure.d.ts +0 -4
- package/dist/gitlab/client.d.ts +0 -60
- package/dist/gitlab/codeSearch.d.ts +0 -29
- package/dist/gitlab/errors.d.ts +0 -65
- package/dist/gitlab/fileContent.d.ts +0 -44
- package/dist/gitlab/mergeRequests.d.ts +0 -68
- package/dist/gitlab/projectsSearch.d.ts +0 -56
- package/dist/gitlab/repoStructure.d.ts +0 -57
- package/dist/gitlab/types.d.ts +0 -346
- package/dist/hints/dynamic.d.ts +0 -37
- package/dist/hints/index.d.ts +0 -45
- package/dist/hints/static.d.ts +0 -24
- package/dist/hints/types.d.ts +0 -6
- package/dist/lsp/client.d.ts +0 -75
- package/dist/lsp/config.d.ts +0 -53
- package/dist/lsp/index.d.ts +0 -14
- package/dist/lsp/manager.d.ts +0 -39
- package/dist/lsp/resolver.d.ts +0 -98
- package/dist/lsp/symbols.d.ts +0 -27
- package/dist/lsp/types.d.ts +0 -244
- package/dist/lsp/uri.d.ts +0 -31
- package/dist/lsp/validation.d.ts +0 -36
- package/dist/prompts/prompts.d.ts +0 -7
- package/dist/providers/execute.d.ts +0 -172
- package/dist/providers/factory.d.ts +0 -91
- package/dist/providers/github/GitHubProvider.d.ts +0 -45
- package/dist/providers/gitlab/GitLabProvider.d.ts +0 -44
- package/dist/providers/types.d.ts +0 -492
- package/dist/responses.d.ts +0 -104
- package/dist/scheme/baseSchema.d.ts +0 -50
- package/dist/security/commandValidator.d.ts +0 -16
- package/dist/security/contentSanitizer.d.ts +0 -6
- package/dist/security/executionContextValidator.d.ts +0 -13
- package/dist/security/ignoredPathFilter.d.ts +0 -18
- package/dist/security/mask.d.ts +0 -1
- package/dist/security/pathValidator.d.ts +0 -95
- package/dist/security/patternsConstants.d.ts +0 -42
- package/dist/security/regexes/ai-providers.d.ts +0 -2
- package/dist/security/regexes/auth-crypto.d.ts +0 -6
- package/dist/security/regexes/cloud-infrastructure.d.ts +0 -5
- package/dist/security/regexes/communications.d.ts +0 -4
- package/dist/security/regexes/dev-tools-vcs.d.ts +0 -4
- package/dist/security/regexes/index.d.ts +0 -17
- package/dist/security/regexes/payments-commerce.d.ts +0 -3
- package/dist/security/regexes/types.d.ts +0 -2
- package/dist/security/regexes.d.ts +0 -16
- package/dist/security/securityConstants.d.ts +0 -23
- package/dist/security/withSecurityValidation.d.ts +0 -52
- package/dist/serverConfig.d.ts +0 -113
- package/dist/session.d.ts +0 -36
- package/dist/tools/github_fetch_content/execution.d.ts +0 -4
- package/dist/tools/github_fetch_content/github_fetch_content.d.ts +0 -3
- package/dist/tools/github_fetch_content/hints.d.ts +0 -7
- package/dist/tools/github_fetch_content/index.d.ts +0 -2
- package/dist/tools/github_fetch_content/scheme.d.ts +0 -191
- package/dist/tools/github_fetch_content/types.d.ts +0 -71
- package/dist/tools/github_search_code/execution.d.ts +0 -4
- package/dist/tools/github_search_code/github_search_code.d.ts +0 -3
- package/dist/tools/github_search_code/hints.d.ts +0 -7
- package/dist/tools/github_search_code/index.d.ts +0 -2
- package/dist/tools/github_search_code/scheme.d.ts +0 -115
- package/dist/tools/github_search_code/types.d.ts +0 -70
- package/dist/tools/github_search_pull_requests/execution.d.ts +0 -4
- package/dist/tools/github_search_pull_requests/github_search_pull_requests.d.ts +0 -3
- package/dist/tools/github_search_pull_requests/hints.d.ts +0 -7
- package/dist/tools/github_search_pull_requests/index.d.ts +0 -2
- package/dist/tools/github_search_pull_requests/scheme.d.ts +0 -387
- package/dist/tools/github_search_pull_requests/types.d.ts +0 -159
- package/dist/tools/github_search_repos/execution.d.ts +0 -4
- package/dist/tools/github_search_repos/github_search_repos.d.ts +0 -3
- package/dist/tools/github_search_repos/hints.d.ts +0 -7
- package/dist/tools/github_search_repos/index.d.ts +0 -2
- package/dist/tools/github_search_repos/scheme.d.ts +0 -191
- package/dist/tools/github_search_repos/types.d.ts +0 -70
- package/dist/tools/github_view_repo_structure/execution.d.ts +0 -4
- package/dist/tools/github_view_repo_structure/github_view_repo_structure.d.ts +0 -3
- package/dist/tools/github_view_repo_structure/hints.d.ts +0 -7
- package/dist/tools/github_view_repo_structure/index.d.ts +0 -2
- package/dist/tools/github_view_repo_structure/scheme.d.ts +0 -147
- package/dist/tools/github_view_repo_structure/types.d.ts +0 -51
- package/dist/tools/local_fetch_content/execution.d.ts +0 -8
- package/dist/tools/local_fetch_content/fetchContent.d.ts +0 -2
- package/dist/tools/local_fetch_content/hints.d.ts +0 -12
- package/dist/tools/local_fetch_content/index.d.ts +0 -4
- package/dist/tools/local_fetch_content/register.d.ts +0 -6
- package/dist/tools/local_fetch_content/scheme.d.ts +0 -180
- package/dist/tools/local_fetch_content/types.d.ts +0 -62
- package/dist/tools/local_find_files/execution.d.ts +0 -8
- package/dist/tools/local_find_files/findFiles.d.ts +0 -2
- package/dist/tools/local_find_files/hints.d.ts +0 -7
- package/dist/tools/local_find_files/index.d.ts +0 -4
- package/dist/tools/local_find_files/register.d.ts +0 -6
- package/dist/tools/local_find_files/scheme.d.ts +0 -272
- package/dist/tools/local_find_files/types.d.ts +0 -77
- package/dist/tools/local_ripgrep/execution.d.ts +0 -8
- package/dist/tools/local_ripgrep/hints.d.ts +0 -11
- package/dist/tools/local_ripgrep/index.d.ts +0 -4
- package/dist/tools/local_ripgrep/register.d.ts +0 -6
- package/dist/tools/local_ripgrep/scheme.d.ts +0 -464
- package/dist/tools/local_ripgrep/searchContentRipgrep.d.ts +0 -3
- package/dist/tools/local_ripgrep/types.d.ts +0 -127
- package/dist/tools/local_view_structure/execution.d.ts +0 -8
- package/dist/tools/local_view_structure/hints.d.ts +0 -7
- package/dist/tools/local_view_structure/index.d.ts +0 -4
- package/dist/tools/local_view_structure/local_view_structure.d.ts +0 -8
- package/dist/tools/local_view_structure/scheme.d.ts +0 -208
- package/dist/tools/local_view_structure/types.d.ts +0 -63
- package/dist/tools/lsp_call_hierarchy/callHierarchy.d.ts +0 -53
- package/dist/tools/lsp_call_hierarchy/execution.d.ts +0 -8
- package/dist/tools/lsp_call_hierarchy/hints.d.ts +0 -7
- package/dist/tools/lsp_call_hierarchy/index.d.ts +0 -4
- package/dist/tools/lsp_call_hierarchy/register.d.ts +0 -5
- package/dist/tools/lsp_call_hierarchy/scheme.d.ts +0 -122
- package/dist/tools/lsp_call_hierarchy/types.d.ts +0 -99
- package/dist/tools/lsp_find_references/execution.d.ts +0 -8
- package/dist/tools/lsp_find_references/hints.d.ts +0 -7
- package/dist/tools/lsp_find_references/index.d.ts +0 -4
- package/dist/tools/lsp_find_references/lsp_find_references.d.ts +0 -37
- package/dist/tools/lsp_find_references/scheme.d.ts +0 -113
- package/dist/tools/lsp_find_references/types.d.ts +0 -86
- package/dist/tools/lsp_goto_definition/execution.d.ts +0 -17
- package/dist/tools/lsp_goto_definition/hints.d.ts +0 -7
- package/dist/tools/lsp_goto_definition/index.d.ts +0 -2
- package/dist/tools/lsp_goto_definition/lsp_goto_definition.d.ts +0 -11
- package/dist/tools/lsp_goto_definition/scheme.d.ts +0 -89
- package/dist/tools/lsp_goto_definition/types.d.ts +0 -66
- package/dist/tools/package_search/execution.d.ts +0 -4
- package/dist/tools/package_search/hints.d.ts +0 -7
- package/dist/tools/package_search/index.d.ts +0 -2
- package/dist/tools/package_search/package_search.d.ts +0 -3
- package/dist/tools/package_search/scheme.d.ts +0 -197
- package/dist/tools/package_search/types.d.ts +0 -113
- package/dist/tools/toolConfig.d.ts +0 -27
- package/dist/tools/toolMetadata/index.d.ts +0 -35
- package/dist/tools/toolMetadata/proxies.d.ts +0 -57
- package/dist/tools/toolMetadata/schemaHelpers.d.ts +0 -359
- package/dist/tools/toolMetadata/schemas.d.ts +0 -358
- package/dist/tools/toolMetadata/state.d.ts +0 -30
- package/dist/tools/toolMetadata/types.d.ts +0 -12
- package/dist/tools/toolMetadata.d.ts +0 -13
- package/dist/tools/toolNames.d.ts +0 -24
- package/dist/tools/toolsManager.d.ts +0 -14
- package/dist/tools/utils.d.ts +0 -61
- package/dist/types/execution.d.ts +0 -35
- package/dist/types/metadata.d.ts +0 -183
- package/dist/types/responseTypes.d.ts +0 -122
- package/dist/types/toolTypes.d.ts +0 -24
- package/dist/types.d.ts +0 -514
- package/dist/utils/core/constants.d.ts +0 -96
- package/dist/utils/core/logger.d.ts +0 -41
- package/dist/utils/core/promise.d.ts +0 -2
- package/dist/utils/core/types.d.ts +0 -310
- package/dist/utils/credentials/index.d.ts +0 -6
- package/dist/utils/environment/environmentDetection.d.ts +0 -43
- package/dist/utils/exec/commandAvailability.d.ts +0 -63
- package/dist/utils/exec/index.d.ts +0 -12
- package/dist/utils/exec/npm.d.ts +0 -33
- package/dist/utils/exec/safe.d.ts +0 -13
- package/dist/utils/exec/spawn.d.ts +0 -79
- package/dist/utils/file/byteOffset.d.ts +0 -99
- package/dist/utils/file/filters.d.ts +0 -42
- package/dist/utils/file/size.d.ts +0 -17
- package/dist/utils/file/toolHelpers.d.ts +0 -44
- package/dist/utils/file/types.d.ts +0 -5
- package/dist/utils/http/cache.d.ts +0 -23
- package/dist/utils/http/fetch.d.ts +0 -63
- package/dist/utils/minifier/index.d.ts +0 -2
- package/dist/utils/minifier/jsonToYamlString.d.ts +0 -5
- package/dist/utils/minifier/minifier.d.ts +0 -39
- package/dist/utils/package/common.d.ts +0 -64
- package/dist/utils/package/npm.d.ts +0 -3
- package/dist/utils/package/python.d.ts +0 -2
- package/dist/utils/pagination/core.d.ts +0 -33
- package/dist/utils/pagination/hints.d.ts +0 -19
- package/dist/utils/pagination/index.d.ts +0 -11
- package/dist/utils/pagination/types.d.ts +0 -101
- package/dist/utils/parsers/diff.d.ts +0 -1
- package/dist/utils/parsers/ripgrep.d.ts +0 -11
- package/dist/utils/response/bulk.d.ts +0 -3
- 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](
|
|
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** >=
|
|
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](
|
|
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](
|
|
684
|
-
| **Authentication Guide** | Setup instructions for GitHub & GitLab | [Authentication Setup](
|
|
685
|
-
| **Troubleshooting** | Common issues and solutions | [Troubleshooting Guide](
|
|
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
|
|
725
|
+
export LOG=false
|
|
720
726
|
```
|
|
721
727
|
|
|
722
|
-
For full details, please read our [Privacy Policy](
|
|
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](
|
|
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
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
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
|