octocode-mcp 9.0.0-alpha.2 → 9.2.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 (137) hide show
  1. package/README.md +14 -135
  2. package/dist/index.js +29 -7
  3. package/package.json +34 -16
  4. package/dist/src/errorCodes.d.ts +0 -353
  5. package/dist/src/github/client.d.ts +0 -4
  6. package/dist/src/github/codeSearch.d.ts +0 -4
  7. package/dist/src/github/errorConstants.d.ts +0 -173
  8. package/dist/src/github/errors.d.ts +0 -4
  9. package/dist/src/github/fileOperations.d.ts +0 -6
  10. package/dist/src/github/githubAPI.d.ts +0 -164
  11. package/dist/src/github/index.d.ts +0 -10
  12. package/dist/src/github/pullRequestSearch.d.ts +0 -7
  13. package/dist/src/github/queryBuilders.d.ts +0 -7
  14. package/dist/src/github/repoSearch.d.ts +0 -6
  15. package/dist/src/index.d.ts +0 -2
  16. package/dist/src/prompts/prompts.d.ts +0 -7
  17. package/dist/src/responses.d.ts +0 -8
  18. package/dist/src/scheme/baseSchema.d.ts +0 -21
  19. package/dist/src/scheme/github_fetch_content.d.ts +0 -203
  20. package/dist/src/scheme/github_search_code.d.ts +0 -131
  21. package/dist/src/scheme/github_search_pull_requests.d.ts +0 -390
  22. package/dist/src/scheme/github_search_repos.d.ts +0 -79
  23. package/dist/src/scheme/github_view_repo_structure.d.ts +0 -148
  24. package/dist/src/scheme/package_search.d.ts +0 -196
  25. package/dist/src/security/contentSanitizer.d.ts +0 -6
  26. package/dist/src/security/mask.d.ts +0 -1
  27. package/dist/src/security/regexes.d.ts +0 -2
  28. package/dist/src/security/withSecurityValidation.d.ts +0 -86
  29. package/dist/src/serverConfig.d.ts +0 -12
  30. package/dist/src/session.d.ts +0 -22
  31. package/dist/src/tools/github_fetch_content.d.ts +0 -3
  32. package/dist/src/tools/github_search_code.d.ts +0 -3
  33. package/dist/src/tools/github_search_pull_requests.d.ts +0 -3
  34. package/dist/src/tools/github_search_repos.d.ts +0 -3
  35. package/dist/src/tools/github_view_repo_structure.d.ts +0 -3
  36. package/dist/src/tools/package_search.d.ts +0 -3
  37. package/dist/src/tools/toolConfig.d.ts +0 -16
  38. package/dist/src/tools/toolMetadata.d.ts +0 -207
  39. package/dist/src/tools/toolsManager.d.ts +0 -6
  40. package/dist/src/tools/utils.d.ts +0 -23
  41. package/dist/src/types.d.ts +0 -537
  42. package/dist/src/utils/bulkOperations.d.ts +0 -3
  43. package/dist/src/utils/cache.d.ts +0 -22
  44. package/dist/src/utils/diffParser.d.ts +0 -1
  45. package/dist/src/utils/exec.d.ts +0 -25
  46. package/dist/src/utils/fetchWithRetries.d.ts +0 -52
  47. package/dist/src/utils/fileFilters.d.ts +0 -19
  48. package/dist/src/utils/githubRepoFallback.d.ts +0 -17
  49. package/dist/src/utils/logger.d.ts +0 -40
  50. package/dist/src/utils/npmPackage.d.ts +0 -3
  51. package/dist/src/utils/package.d.ts +0 -50
  52. package/dist/src/utils/promiseUtils.d.ts +0 -2
  53. package/dist/src/utils/pythonPackage.d.ts +0 -2
  54. package/dist/tests/errorCodes.test.d.ts +0 -1
  55. package/dist/tests/fixtures/mcp-fixtures.d.ts +0 -24
  56. package/dist/tests/fixtures/mcp-fixtures.test.d.ts +0 -1
  57. package/dist/tests/github/client.test.d.ts +0 -1
  58. package/dist/tests/github/codeSearch.filtering.test.d.ts +0 -1
  59. package/dist/tests/github/codeSearch.security.test.d.ts +0 -1
  60. package/dist/tests/github/errors.test.d.ts +0 -1
  61. package/dist/tests/github/fileOperations.processContent.test.d.ts +0 -1
  62. package/dist/tests/github/fileOperations.recursive.test.d.ts +0 -1
  63. package/dist/tests/github/githubAPI.test.d.ts +0 -1
  64. package/dist/tests/github/index.test.d.ts +0 -1
  65. package/dist/tests/github/pullRequestSearch.coverage.test.d.ts +0 -1
  66. package/dist/tests/github/pullRequestSearch.test.d.ts +0 -1
  67. package/dist/tests/github/queryBuilders.test.d.ts +0 -1
  68. package/dist/tests/github/repoSearch.test.d.ts +0 -1
  69. package/dist/tests/index.logic.test.d.ts +0 -1
  70. package/dist/tests/index.shutdown.test.d.ts +0 -1
  71. package/dist/tests/index.startup.test.d.ts +0 -1
  72. package/dist/tests/index.test.d.ts +0 -1
  73. package/dist/tests/investigate_pr_response.test.d.ts +0 -1
  74. package/dist/tests/prompts/prompts.test.d.ts +0 -1
  75. package/dist/tests/scheme/github_fetch_content.test.d.ts +0 -1
  76. package/dist/tests/security/contentSanitizer.test.d.ts +0 -1
  77. package/dist/tests/security/mask.branches.test.d.ts +0 -1
  78. package/dist/tests/security/mask.test.d.ts +0 -1
  79. package/dist/tests/security/withSecurityValidation.basic.test.d.ts +0 -1
  80. package/dist/tests/security/withSecurityValidation.extractRepoOwner.test.d.ts +0 -1
  81. package/dist/tests/security/withSecurityValidation.extractResearchFields.test.d.ts +0 -1
  82. package/dist/tests/security/withSecurityValidation.logging.test.d.ts +0 -1
  83. package/dist/tests/serverConfig.test.d.ts +0 -1
  84. package/dist/tests/session.edgecases.test.d.ts +0 -1
  85. package/dist/tests/session.logging_control.test.d.ts +0 -1
  86. package/dist/tests/session.test.d.ts +0 -1
  87. package/dist/tests/setup.d.ts +0 -1
  88. package/dist/tests/tools/callback.test.d.ts +0 -1
  89. package/dist/tests/tools/github_fetch_content.test.d.ts +0 -1
  90. package/dist/tests/tools/github_search_code.filtering.test.d.ts +0 -1
  91. package/dist/tests/tools/github_search_code.match_modes.test.d.ts +0 -22
  92. package/dist/tests/tools/github_search_code.test.d.ts +0 -1
  93. package/dist/tests/tools/github_search_code.tool.test.d.ts +0 -1
  94. package/dist/tests/tools/github_search_pull_requests.test.d.ts +0 -1
  95. package/dist/tests/tools/github_search_repos.tool.test.d.ts +0 -1
  96. package/dist/tests/tools/github_search_repos_integration.test.d.ts +0 -1
  97. package/dist/tests/tools/github_search_repos_query_splitting.test.d.ts +0 -1
  98. package/dist/tests/tools/github_view_repo_structure.test.d.ts +0 -1
  99. package/dist/tests/tools/github_view_repo_structure_filters.test.d.ts +0 -1
  100. package/dist/tests/tools/hints.test.d.ts +0 -1
  101. package/dist/tests/tools/package_search.test.d.ts +0 -1
  102. package/dist/tests/tools/response_structure.test.d.ts +0 -12
  103. package/dist/tests/tools/toolConfig.branches.test.d.ts +0 -1
  104. package/dist/tests/tools/toolConfig.test.d.ts +0 -1
  105. package/dist/tests/tools/toolMetadata.branches.test.d.ts +0 -1
  106. package/dist/tests/tools/toolMetadata.edge.test.d.ts +0 -1
  107. package/dist/tests/tools/toolMetadata.final.test.d.ts +0 -1
  108. package/dist/tests/tools/toolMetadata.test.d.ts +0 -1
  109. package/dist/tests/tools/toolsManager.metadata.test.d.ts +0 -1
  110. package/dist/tests/tools/toolsManager.test.d.ts +0 -1
  111. package/dist/tests/tools/tools_logging_integration.test.d.ts +0 -1
  112. package/dist/tests/tools/userContext_authInfo_propagation.test.d.ts +0 -10
  113. package/dist/tests/tools/utils.test.d.ts +0 -5
  114. package/dist/tests/types/github-openapi.test.d.ts +0 -1
  115. package/dist/tests/utils/betaFeatures.test.d.ts +0 -1
  116. package/dist/tests/utils/bulkOperations.instructions.test.d.ts +0 -1
  117. package/dist/tests/utils/bulkOperations.test.d.ts +0 -1
  118. package/dist/tests/utils/cache.collision.test.d.ts +0 -1
  119. package/dist/tests/utils/cache.dataCache.test.d.ts +0 -1
  120. package/dist/tests/utils/diffParser.test.d.ts +0 -1
  121. package/dist/tests/utils/exec.test.d.ts +0 -1
  122. package/dist/tests/utils/fetchWithRetries.additional.test.d.ts +0 -1
  123. package/dist/tests/utils/fetchWithRetries.test.d.ts +0 -1
  124. package/dist/tests/utils/fileFilters.test.d.ts +0 -1
  125. package/dist/tests/utils/github/fileOperations.test.d.ts +0 -1
  126. package/dist/tests/utils/githubAPI.test.d.ts +0 -1
  127. package/dist/tests/utils/githubRepoFallback.test.d.ts +0 -1
  128. package/dist/tests/utils/logger.test.d.ts +0 -1
  129. package/dist/tests/utils/npmPackage.test.d.ts +0 -1
  130. package/dist/tests/utils/promiseUtils.concurrency.test.d.ts +0 -1
  131. package/dist/tests/utils/promiseUtils.edgecases.test.d.ts +0 -1
  132. package/dist/tests/utils/promiseUtils.test.d.ts +0 -1
  133. package/dist/tests/utils/pythonPackage.test.d.ts +0 -1
  134. package/dist/tests/utils/responses.empty_arrays.test.d.ts +0 -4
  135. package/dist/tests/utils/responses.test.d.ts +0 -1
  136. package/dist/tests/utils/sessionCacheTests.test.d.ts +0 -1
  137. package/dist/tests/utils/testHelpers.d.ts +0 -16
package/README.md CHANGED
@@ -137,7 +137,19 @@ https://github.com/user-attachments/assets/c184d5d4-c9b6-40a1-a55a-41cb9b3ecc4f
137
137
 
138
138
  ## Installation
139
139
 
140
- ### Prerequisites
140
+ ### Standalone Binary (No Node.js Required)
141
+
142
+ ```bash
143
+ curl -fsSL https://raw.githubusercontent.com/bgauryy/octocode-mcp/main/install/install.sh | sh
144
+ ```
145
+
146
+ **[Full Binary Installation Guide →](../../docs/BINARY_INSTALLATION.md)** — Manual downloads, MCP configs, troubleshooting
147
+
148
+ ---
149
+
150
+ ### npm / npx (Requires Node.js)
151
+
152
+ #### Prerequisites
141
153
 
142
154
  - **Node.js** >= 18.12.0
143
155
  - **GitHub Authentication** (choose one):
@@ -551,140 +563,6 @@ Demonstrates progressive research workflow:
551
563
 
552
564
  ---
553
565
 
554
- ## Overview
555
-
556
- Octocode is an **agentic code research platform** that bridges the gap between AI assistants and real-world code implementations. By providing structured access to GitHub's vast repository ecosystem, it enables AI systems to learn from production codebases rather than relying solely on training data.
557
-
558
- ### Core Capabilities
559
-
560
- | Capability | Implementation | Benefit |
561
- |------------|----------------|---------|
562
- | **Code Discovery** | Multi-dimensional search across repositories, code, and pull requests | Find relevant implementations in seconds |
563
- | **Context Extraction** | Smart content retrieval with pattern matching and line-range targeting | Get exactly the context you need |
564
- | **Token Optimization** | Advanced minification strategies (50+ language support) | 30-70% reduction in token consumption |
565
- | **Security** | Automatic secrets detection and content sanitization | Enterprise-grade data protection |
566
- | **Progressive Research** | Workflow-driven exploration (Discover → Explore → Analyze) | Deep understanding of complex systems |
567
- | **Access Control** | GitHub permission-based access to public and private repositories | Organization-wide code research |
568
-
569
- ---
570
-
571
- ## Tools
572
-
573
- Octocode provides five specialized research tools designed to work together for comprehensive code analysis:
574
-
575
- ### 🔍 githubSearchCode
576
-
577
- **Find code implementations across repositories**
578
-
579
- Search for specific code patterns, functions, or implementations across millions of repositories.
580
-
581
- **Key Features**:
582
- - **Content Search**: Find code inside files by keywords (AND logic)
583
- - **Path Search**: Discover files/directories by name (25x faster)
584
- - **Smart Filtering**: Scope by repository, path, file extension, or popularity
585
- - **Context-Rich Results**: Returns code snippets with surrounding context
586
-
587
- **Common Use Cases**:
588
- ```
589
- • Find implementation examples: "How do popular repos implement OAuth?"
590
- • Discover patterns: "Search for React custom hooks in vercel repos"
591
- • Locate functions: "Find error handling patterns in Express apps"
592
- ```
593
-
594
- ---
595
-
596
- ### 📚 githubSearchRepositories
597
-
598
- **Discover repositories by topics and keywords**
599
-
600
- Your starting point for repository discovery - find the right projects to analyze.
601
-
602
- **Key Features**:
603
- - **Topic-Based Discovery**: Search by exact GitHub topics (most precise)
604
- - **Keyword Search**: Find repos by name, description, or README content
605
- - **Quality Filters**: Filter by stars, language, size, activity
606
- - **Sorting Options**: By popularity, recency, or relevance
607
-
608
- **Common Use Cases**:
609
- ```
610
- • Find popular implementations: "Discover TypeScript CLI tools with >1000 stars"
611
- • Research ecosystems: "Find all React state management libraries"
612
- • Organization research: "List all repos from microsoft with topic 'ai'"
613
- ```
614
-
615
- ---
616
-
617
- ### 🗂️ githubViewRepoStructure
618
-
619
- **Explore repository directory structure**
620
-
621
- Understand how a project is organized before diving into specific files.
622
-
623
- **Key Features**:
624
- - **Directory Tree**: Visual representation of folder structure
625
- - **File Sizes**: See file sizes to identify important components
626
- - **Depth Control**: Explore 1 level (overview) or 2 levels (detailed)
627
- - **Path Targeting**: Navigate directly to specific directories
628
-
629
- **Common Use Cases**:
630
- ```
631
- • Project overview: "Show me the structure of facebook/react"
632
- • Find entry points: "Explore src/ directory in a monorepo"
633
- • Understand architecture: "Navigate to the API implementation folder"
634
- ```
635
-
636
- ---
637
-
638
- ### 📄 githubGetFileContent
639
-
640
- **Read file contents with smart extraction**
641
-
642
- Retrieve specific content from files efficiently - full files or targeted sections.
643
-
644
- **Key Features**:
645
- - **Pattern Matching**: Extract sections matching specific patterns with context
646
- - **Line Range Reading**: Read specific line ranges for efficiency
647
- - **Full Content Access**: Get entire file when needed
648
- - **Content Minification**: Automatic optimization for token efficiency
649
-
650
- **Common Use Cases**:
651
- ```
652
- • Read specific functions: "Get the validateUser function from auth.ts"
653
- • Extract sections: "Show me all the middleware definitions in app.js"
654
- • Read configuration: "Get the full package.json file"
655
- • Analyze specific code: "Read lines 100-150 from the API handler"
656
- ```
657
-
658
- ---
659
-
660
- ### 🔀 githubSearchPullRequests
661
-
662
- **Analyze pull requests, changes, and discussions**
663
-
664
- Understand how code evolved, why decisions were made, and learn from production changes.
665
-
666
- **Key Features**:
667
- - **PR Discovery**: Search by state, author, labels, dates
668
- - **Direct Access**: Fetch specific PR by number (10x faster)
669
- - **Code Diffs**: Include full diff content or targeted file patches (smart token management)
670
- - **Discussions**: Access comment threads and review discussions
671
- - **Merged Code**: Filter for production-ready, merged changes
672
-
673
- **Common Use Cases**:
674
- ```
675
- • Learn from changes: "Show recent merged PRs about authentication"
676
- • Understand decisions: "Find PRs discussing the API redesign with comments"
677
- • Track implementations: "See how feature X was implemented with diffs"
678
- • Expert contributions: "Find PRs by @author in the last 6 months"
679
- ```
680
-
681
- ---
682
-
683
-
684
- **[Full Documentation →](./README.md)**
685
-
686
- ---
687
-
688
566
  ## Commands
689
567
 
690
568
  Octocode MCP provides intelligent prompt commands that enhance your research workflow:
@@ -787,6 +665,7 @@ Comprehensive security analysis of a repository. Identifies vulnerabilities, rev
787
665
  | Resource | Description | Link |
788
666
  |----------|-------------|------|
789
667
  | **Official Website** | Interactive tutorials, demos, community | [octocode.ai](https://octocode.ai) |
668
+ | **Binary Installation** | Standalone binary download and setup | [BINARY_INSTALLATION.md](../../docs/BINARY_INSTALLATION.md) |
790
669
  | **Configuration Guide** | Environment variables and server configuration | [CONFIGURATION.md](../../docs/CONFIGURATION.md) |
791
670
  | **Authentication Guide** | Setup instructions and troubleshooting | [AUTH_GUIDE.md](../../docs/AUTH_GUIDE.md) |
792
671
  | **YouTube Channel** | Video tutorials and demonstrations | [Octocode on YouTube](https://www.youtube.com/@Octocode-ai) |