octocode-mcp 7.0.10 β†’ 7.0.11-alpha.2

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 CHANGED
@@ -1,582 +1,494 @@
1
- # Octocode MCP Server
1
+ <div align="center">
2
+ <img src="https://github.com/bgauryy/octocode-mcp/raw/main/packages/octocode-mcp/assets/logo_white.png" width="400px" alt="Octocode Logo">
2
3
 
3
- **Model Context Protocol Server for GitHub Code Research**
4
+ # Octocode MCP
4
5
 
5
- [![NPM Version](https://img.shields.io/npm/v/octocode-mcp)](https://www.npmjs.com/package/octocode-mcp)
6
- [![License](https://img.shields.io/npm/l/octocode-mcp)](../../LICENSE)
6
+ **Intelligent Code Context for AI Systems**
7
7
 
8
- MCP server implementation providing five specialized tools for AI-driven GitHub code research with enterprise-grade security and token optimization.
8
+ A Model Context Protocol (MCP) server enabling AI assistants to search, analyze, and extract insights from millions of GitHub repositories with enterprise-grade security and token efficiency.
9
9
 
10
- **For general overview and getting started, see the [main README](../../README.md).**
10
+ [![MCP Community Server](https://img.shields.io/badge/Model_Context_Protocol-Official_Community_Server-blue?style=flat-square)](https://github.com/modelcontextprotocol/servers)
11
+ [![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/bgauryy/octocode-mcp)
12
+ [![Trust Score](https://archestra.ai/mcp-catalog/api/badge/quality/bgauryy/octocode-mcp)](https://archestra.ai/mcp-catalog/bgauryy__octocode-mcp)
13
+
14
+ </div>
11
15
 
12
16
  ---
13
17
 
14
18
  ## Table of Contents
15
19
 
20
+ - [See It In Action](#see-it-in-action)
16
21
  - [Installation](#installation)
17
- - [API Reference](#api-reference)
18
- - [githubSearchCode](#githubsearchcode)
19
- - [githubSearchRepositories](#githubsearchrepositories)
20
- - [githubViewRepoStructure](#githubviewrepostructure)
21
- - [githubGetFileContent](#githubgetfilecontent)
22
- - [githubSearchPullRequests](#githubsearchpullrequests)
23
- - [Configuration](#configuration)
24
- - [Authentication](#authentication)
25
- - [Advanced Usage](#advanced-usage)
22
+ - [Quick Start](#quick-start)
23
+ - [Platform-Specific Setup](#platform-specific-setup)
24
+ - [More Examples](#more-examples)
25
+ - [Overview](#overview)
26
+ - [Architecture](#architecture)
27
+ - [Octocode MCP Server](#octocode-mcp-server)
28
+ - [Features](#features)
29
+ - [Commands](#commands)
30
+ - [/research - Expert Code Research Agent](#research---expert-code-research-agent)
31
+ - [/kudos - Repository Appreciation](#kudos---repository-appreciation)
32
+ - [/use - Quick Reference Guide](#use---quick-reference-guide)
26
33
  - [Documentation](#documentation)
34
+ - [Community](#community)
35
+ - [Recognition](#recognition)
36
+ - [License](#license)
27
37
 
28
38
  ---
29
39
 
30
- ## Installation
40
+ ## See It In Action
31
41
 
32
- ### NPM
42
+ ### Full-Stack Application Built in Under 10 Minutes
33
43
 
34
- ```bash
35
- npm install octocode-mcp
36
- ```
44
+ Watch AI assistant use Octocode to research, plan, and build a complete chat application with Express backend.
37
45
 
38
- ### NPX (Recommended for MCP)
46
+ **Prompt:**
39
47
 
40
- ```bash
41
- npx octocode-mcp@latest
42
- ```
48
+ > **Use Octocode MCP for Deep Research**
49
+ >
50
+ > I want to build an application with chat (front-end) that shows a chat window to the user.
51
+ > The user enters a prompt in the chat, and the application sends the prompt to an Express backend that uses AI to process the request.
52
+ >
53
+ > Add a return box (to show the message returned from the AI) and loaders to the UI.
54
+ > I want to build an AI agent system in Node.js using LangChain and LangGraph. Can you research the latest patterns?
55
+ >
56
+ > Please conduct thorough research on how to create this in the best way possible.
57
+ > Focus on repositories with good documentation and recent activity.
58
+ >
59
+ > - Do a deep research
60
+ > - Create a plan document
61
+ > - Initiate the plan and create the application
43
62
 
44
- ### Configuration
63
+ **Phase 1: Research & Planning**
45
64
 
46
- Add to your MCP client configuration:
65
+ https://github.com/user-attachments/assets/4225ab98-ae2f-46dc-b3ce-7d117e552b8c
47
66
 
48
- ```json
67
+ [Octocode Plan Document](https://gist.github.com/bgauryy/06504671c0d5fef727fe22c492e054d6) - Detailed architecture and step-by-step guide
68
+
69
+ **Phase 2: Implementation**
70
+
71
+ https://github.com/user-attachments/assets/2aaee9f1-3592-438a-a633-255b5cbbb8e1
72
+
73
+ **Result**: Production-ready full-stack application with authentication, real-time features, and best practices - **All in less than 10 minutes**
74
+
75
+ ---
76
+
77
+ ### Research and Build Fullstack Agentic Application with /research command in Under 10 Minutes
78
+
79
+ **Why use the `/research` command?** Instead of manually searching through repositories and piecing together information, let the AI conduct comprehensive research for you:
80
+
81
+ - **🎯 Intelligent Tool Orchestration**: Automatically selects and combines the right Octocode tools (repository search, code search, file content, PR analysis, repo structure) based on your research needs
82
+ - **🧠 Smart Decision Making**: Makes strategic choices throughout the research flowβ€”when to search broadly vs. specifically, which repositories to explore, and how to validate findings
83
+ - **πŸ‘₯ Multi-Purpose Research**: Perfect for feature discovery (product managers), code understanding (developers), bug investigation, flow analysis, planning from scratch, dependency tracking, security audits, and more
84
+ - **πŸ”¬ Specialized Workflows**: Handles Technical Research (code flows), Product Research (docs+code validation), Pattern Analysis (cross-repo comparison), Bug Investigation, Architecture Mapping, API Research, Security/Auth flows, and more
85
+ - **πŸ” Transparent Reasoning**: Shows you exactly which tools it's using, what it's searching for, and why at each step
86
+ - **🎨 Adaptive Strategy**: Works across public repos, private organizations, and specific repositories with configurable depth (overview, deep dive, or cross-repo comparison)
87
+ - **πŸ“Š Cross-Validated Results**: Leverages multiple Octocode tools to verify information from different sources and perspectives
88
+ - **πŸš€ Actionable Insights**: Delivers implementation-ready plans with code examples, not just raw information
89
+
90
+ **Prompt:**
91
+
92
+ > /octocode/research How can I use LangChain, LangGraph, and similar open-source AI tools to create agentic
93
+ > flows between agents for goal-oriented tasks?
94
+ > Can you suggest UI frameworks I can use to build a full-stack AI application?
95
+
96
+ https://github.com/user-attachments/assets/82ed97ae-57a9-46ae-9acd-828a509e711b
97
+
98
+ ---
99
+
100
+ ### Discover APIs, Frameworks, and Dive Into Internal Implementation Details
101
+
102
+ Octocode excels at both **broad discovery** and **deep code analysis**. Whether you're exploring new APIs, finding frameworks, or understanding how popular libraries work under the hood, Octocode provides comprehensive answers in seconds.
103
+
104
+ **First Prompt - Broad Discovery:**
105
+
106
+ > list top repositories for:
107
+ >
108
+ > - Stock market APIs (Typescript)
109
+ > - Cursor rules examples
110
+ > - UI for AI
111
+ > - Mobile development using React
112
+ > - State management for React
113
+
114
+ **What happens:** Octocode searches across GitHub to find the most popular and well-maintained repositories for each category, analyzing stars, activity, documentation quality, and recent updates. You get curated lists with context about each repository's strengths.
115
+
116
+ **Second Prompt - Deep Implementation Analysis:**
117
+
118
+ > How React implemented useState under the hood?
119
+
120
+ **What happens:** Octocode dives into React's source code, traces the implementation flow, analyzes the relevant files (ReactHooks.js, ReactFiberHooks.js), and explains the internal mechanics including fiber architecture, hook state management, and dispatcher patternsβ€”all with code references and detailed explanations.
121
+
122
+ **The Power:** Move seamlessly from **discovering what exists** to **understanding how it works** in a single conversation. No manual repository hunting or code spelunking required.
123
+
124
+ https://github.com/user-attachments/assets/c184d5d4-c9b6-40a1-a55a-41cb9b3ecc4f
125
+
126
+ ---
127
+
128
+ ## Installation
129
+
130
+ ### Prerequisites
131
+
132
+ - **Node.js** >= 18.12.0
133
+ - **GitHub Authentication** (choose one):
134
+ - **GitHub CLI (recommended)**: Install from [cli.github.com](https://cli.github.com/) and run `gh auth login`
135
+ - **Personal Access Token**: Create at [github.com/settings/tokens](https://github.com/settings/tokens) with scopes: `repo`, `read:user`, `read:org`
136
+
137
+ ### Getting started
138
+
139
+ First, install the Octocode MCP server with your client.
140
+
141
+ **Standard config** works in most of the tools:
142
+
143
+ ```js
49
144
  {
50
145
  "mcpServers": {
51
146
  "octocode": {
52
147
  "command": "npx",
53
- "args": ["octocode-mcp@latest"]
148
+ "args": [
149
+ "octocode-mcp@latest"
150
+ ]
54
151
  }
55
152
  }
56
153
  }
57
154
  ```
58
155
 
59
- **Platform-specific setup**: See [main README - Platform Setup](../../README.md#platform-specific-setup)
156
+ > **Note**: This configuration uses GitHub CLI authentication. For Personal Access Token, see the [Authentication Guide](#authentication-methods) below.
60
157
 
61
- ---
158
+ [<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522octocode%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522octocode-mcp%2540latest%255D%257D) [<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522octocode%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522octocode-mcp%2540latest%255D%257D)
159
+
160
+ <details>
161
+ <summary>Amp</summary>
62
162
 
63
- ## API Reference
163
+ Add via the Amp VS Code extension settings screen or by updating your settings.json file:
64
164
 
65
- ### githubSearchCode
165
+ ```json
166
+ "amp.mcpServers": {
167
+ "octocode": {
168
+ "command": "npx",
169
+ "args": [
170
+ "octocode-mcp@latest"
171
+ ]
172
+ }
173
+ }
174
+ ```
66
175
 
67
- Search for code implementations across GitHub repositories.
176
+ **Amp CLI Setup:**
68
177
 
69
- #### Parameters
178
+ Add via the `amp mcp add` command below:
70
179
 
71
- ```typescript
72
- interface GithubSearchCodeParams {
73
- // Query parameters
74
- keywordsToSearch: string[]; // Required: Search terms (AND logic)
180
+ ```bash
181
+ amp mcp add octocode -- npx octocode-mcp@latest
182
+ ```
75
183
 
76
- // Filters
77
- owner?: string; // Repository owner/organization
78
- repo?: string; // Specific repository name
79
- path?: string; // Directory path filter
80
- filename?: string; // Filename pattern (case-insensitive)
81
- extension?: string; // File extension without dot (e.g., "ts", "js")
184
+ </details>
82
185
 
83
- // Search mode
84
- match?: "file" | "path"; // "file" = search IN content (default)
85
- // "path" = search file/directory names
186
+ <details>
187
+ <summary>Claude Code</summary>
86
188
 
87
- // Control
88
- limit?: number; // Max results: 1-20 (default: 10)
89
- minify?: boolean; // Minify results (default: true)
90
- sanitize?: boolean; // Sanitize secrets (default: true)
91
- }
92
- ```
189
+ Use the Claude Code CLI to add the Octocode MCP server:
93
190
 
94
- #### Response
95
-
96
- ```typescript
97
- interface GithubSearchCodeResponse {
98
- results: Array<{
99
- path: string; // File path
100
- repository: {
101
- owner: string;
102
- name: string;
103
- full_name: string;
104
- html_url: string;
105
- description: string;
106
- stars: number;
107
- };
108
- text_matches?: Array<{ // Only when match="file"
109
- fragment: string; // Code snippet with match
110
- matches: Array<{
111
- text: string;
112
- indices: [number, number];
113
- }>;
114
- }>;
115
- }>;
116
- total_count: number;
117
- incomplete_results: boolean;
118
- }
191
+ ```bash
192
+ claude mcp add octocode npx octocode-mcp@latest
119
193
  ```
120
194
 
121
- #### Best Practices
195
+ </details>
122
196
 
123
- - **Discovery**: Use `match="path"` for fast file location (25x faster, 20 tokens vs 500)
124
- - **Analysis**: Use `match="file"` with low `limit` (5-10) for detailed matches
125
- - **Scope**: Always specify `owner`/`repo` when possible to avoid rate limits
126
- - **Keywords**: Use specific terms (function names, error messages) over generic terms
197
+ <details>
198
+ <summary>Claude Desktop</summary>
127
199
 
128
- #### Examples
200
+ Follow the MCP install [guide](https://modelcontextprotocol.io/quickstart/user), use the standard config above.
129
201
 
130
- ```typescript
131
- // Fast discovery - find files with "auth" in path
132
- {
133
- keywordsToSearch: ["auth"],
134
- match: "path"
135
- }
202
+ </details>
136
203
 
137
- // Detailed search - find OAuth implementations
138
- {
139
- owner: "passportjs",
140
- repo: "passport",
141
- keywordsToSearch: ["OAuth2", "strategy"],
142
- extension: "js",
143
- limit: 5
144
- }
204
+ <details>
205
+ <summary>Codex</summary>
145
206
 
146
- // Targeted search - find exports in specific directory
147
- {
148
- owner: "facebook",
149
- repo: "react",
150
- path: "packages/react/src",
151
- keywordsToSearch: ["export", "function"],
152
- match: "file"
153
- }
154
- ```
207
+ Use the Codex CLI to add the Octocode MCP server:
155
208
 
156
- ---
209
+ ```bash
210
+ codex mcp add octocode npx "octocode-mcp@latest"
211
+ ```
157
212
 
158
- ### githubSearchRepositories
213
+ Alternatively, create or edit the configuration file `~/.codex/config.toml` and add:
159
214
 
160
- Discover GitHub repositories by topics, keywords, or metadata.
215
+ ```toml
216
+ [mcp_servers.octocode]
217
+ command = "npx"
218
+ args = ["octocode-mcp@latest"]
219
+ ```
161
220
 
162
- #### Parameters
221
+ For more information, see the [Codex MCP documentation](https://github.com/openai/codex/blob/main/codex-rs/config.md#mcp_servers).
163
222
 
164
- ```typescript
165
- interface GithubSearchRepositoriesParams {
166
- // Query modes (use one or both)
167
- topicsToSearch?: string[]; // GitHub topic tags (exact match, curated)
168
- keywordsToSearch?: string[]; // Search name/description/README (AND logic)
223
+ </details>
169
224
 
170
- // Filters
171
- owner?: string; // Organization or user
172
- stars?: string; // Examples: ">1000", "100..500", "<100"
173
- language?: string; // Programming language (e.g., "TypeScript")
174
- size?: string; // Repo size in KB (e.g., ">1000", "<500")
175
- created?: string; // Creation date (e.g., ">=2024-01-01")
176
- updated?: string; // Last update date
225
+ <details>
226
+ <summary>Cursor</summary>
177
227
 
178
- // Search scope
179
- match?: ("name" | "description" | "readme")[]; // Fields to search (OR logic)
228
+ #### Click the button to install:
180
229
 
181
- // Control
182
- sort?: "stars" | "forks" | "updated" | "best-match";
183
- limit?: number; // Max results: 1-20 (default: 5)
184
- }
185
- ```
230
+ [<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor">](https://cursor.com/en/install-mcp?name=octocode&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJvY3RvY29kZS1tY3BAbGF0ZXN0Il19)
186
231
 
187
- #### Response
188
-
189
- ```typescript
190
- interface GithubSearchRepositoriesResponse {
191
- results: Array<{
192
- owner: string;
193
- name: string;
194
- full_name: string;
195
- description: string;
196
- html_url: string;
197
- stars: number;
198
- forks: number;
199
- language: string;
200
- topics: string[];
201
- created_at: string;
202
- updated_at: string;
203
- size: number; // KB
204
- }>;
205
- total_count: number;
206
- }
207
- ```
232
+ #### Or install manually:
208
233
 
209
- #### Best Practices
234
+ Go to `Cursor Settings` -> `MCP` -> `Add new MCP Server`. Name to your liking, use `command` type with the command `npx octocode-mcp@latest`. You can also verify config or add command like arguments via clicking `Edit`.
210
235
 
211
- - **Discovery**: Use `topicsToSearch` for curated, high-quality results
212
- - **Quality**: Filter with `stars=">1000"` for production-ready code
213
- - **Maintenance**: Use `updated` filter for actively maintained projects
214
- - **Scope**: Combine topics + stars for best results
236
+ #### Project-Specific Configuration
215
237
 
216
- #### Examples
238
+ Create `.cursor/mcp.json` in your project root:
217
239
 
218
- ```typescript
219
- // Find quality TypeScript CLI tools
240
+ ```json
220
241
  {
221
- topicsToSearch: ["typescript", "cli"],
222
- stars: ">1000",
223
- sort: "stars"
242
+ "mcpServers": {
243
+ "octocode": {
244
+ "command": "npx",
245
+ "args": ["octocode-mcp@latest"]
246
+ }
247
+ }
224
248
  }
249
+ ```
225
250
 
226
- // Recent authentication libraries
227
- {
228
- keywordsToSearch: ["authentication", "jwt"],
229
- language: "JavaScript",
230
- updated: ">=2024-01-01",
231
- limit: 10
232
- }
251
+ </details>
233
252
 
234
- // Organization's popular repos
253
+ <details>
254
+ <summary>Cline</summary>
255
+
256
+ Add via the Cline VS Code extension settings or by updating your `cline_mcp_settings.json` file:
257
+
258
+ ```json
235
259
  {
236
- owner: "facebook",
237
- sort: "stars",
238
- limit: 20
260
+ "mcpServers": {
261
+ "octocode": {
262
+ "command": "npx",
263
+ "args": [
264
+ "octocode-mcp@latest"
265
+ ]
266
+ }
267
+ }
239
268
  }
240
269
  ```
241
270
 
242
- ---
271
+ </details>
243
272
 
244
- ### githubViewRepoStructure
273
+ <details>
274
+ <summary>Gemini CLI</summary>
245
275
 
246
- Explore repository directory structure with file sizes.
276
+ Follow the MCP install [guide](https://github.com/google-gemini/gemini-cli/blob/main/docs/tools/mcp-server.md#configure-the-mcp-server-in-settingsjson), use the standard config above.
247
277
 
248
- #### Parameters
278
+ </details>
249
279
 
250
- ```typescript
251
- interface GithubViewRepoStructureParams {
252
- // Required
253
- owner: string; // Repository owner
254
- repo: string; // Repository name
255
- branch: string; // Branch, tag, or SHA
280
+ <details>
281
+ <summary>Goose</summary>
256
282
 
257
- // Optional
258
- path?: string; // Directory path (default: "" = root)
259
- depth?: 1 | 2; // Exploration depth (default: 1)
260
- // 1 = current directory only
261
- // 2 = includes subdirectories
262
- }
263
- ```
283
+ #### Click the button to install:
264
284
 
265
- #### Response
266
-
267
- ```typescript
268
- interface GithubViewRepoStructureResponse {
269
- path: string; // Current directory path
270
- files: Array<{
271
- name: string;
272
- path: string;
273
- size: number; // Bytes
274
- type: "file";
275
- }>;
276
- folders: Array<{
277
- name: string;
278
- path: string;
279
- type: "dir";
280
- files?: Array<...>; // Only when depth=2
281
- folders?: Array<...>; // Only when depth=2
282
- }>;
283
- }
284
- ```
285
+ [![Install in Goose](https://block.github.io/goose/img/extension-install-dark.svg)](https://block.github.io/goose/extension?cmd=npx&arg=octocode-mcp%40latest&id=octocode&name=Octocode&description=Intelligent%20code%20research%20and%20GitHub%20repository%20analysis)
285
286
 
286
- #### Best Practices
287
+ #### Or install manually:
287
288
 
288
- - **Start shallow**: Use `depth=1` for overview, then drill down
289
- - **Navigate**: Use `path` to explore specific directories
290
- - **Large repos**: Avoid `depth=2` on root of large repositories
289
+ Go to `Advanced settings` -> `Extensions` -> `Add custom extension`. Name to your liking, use type `STDIO`, and set the `command` to `npx octocode-mcp@latest`. Click "Add Extension".
291
290
 
292
- #### Examples
291
+ </details>
293
292
 
294
- ```typescript
295
- // Root overview
296
- {
297
- owner: "facebook",
298
- repo: "react",
299
- branch: "main",
300
- path: "",
301
- depth: 1
302
- }
293
+ <details>
294
+ <summary>Kiro</summary>
295
+
296
+ Follow the MCP Servers [documentation](https://kiro.dev/docs/mcp/). For example in `.kiro/settings/mcp.json`:
303
297
 
304
- // Deep dive into specific directory
298
+ ```json
305
299
  {
306
- owner: "facebook",
307
- repo: "react",
308
- branch: "main",
309
- path: "packages/react/src",
310
- depth: 2
300
+ "mcpServers": {
301
+ "octocode": {
302
+ "command": "npx",
303
+ "args": [
304
+ "octocode-mcp@latest"
305
+ ]
306
+ }
307
+ }
311
308
  }
312
309
  ```
313
310
 
314
- ---
311
+ </details>
315
312
 
316
- ### githubGetFileContent
313
+ <details>
314
+ <summary>LM Studio</summary>
317
315
 
318
- Read file contents with smart extraction capabilities.
316
+ #### Click the button to install:
319
317
 
320
- #### Parameters
318
+ [![Add MCP Server octocode to LM Studio](https://files.lmstudio.ai/deeplink/mcp-install-light.svg)](https://lmstudio.ai/install-mcp?name=octocode&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyJvY3RvY29kZS1tY3BAbGF0ZXN0Il19)
321
319
 
322
- ```typescript
323
- interface GithubGetFileContentParams {
324
- // Required
325
- owner: string; // Repository owner
326
- repo: string; // Repository name
327
- path: string; // File path from repository root
320
+ #### Or install manually:
328
321
 
329
- // Optional
330
- branch?: string; // Branch, tag, or SHA (default: default branch)
322
+ Go to `Program` in the right sidebar -> `Install` -> `Edit mcp.json`. Use the standard config above.
331
323
 
332
- // Extraction modes (choose one)
333
- // Mode 1: Pattern matching (most efficient)
334
- matchString?: string; // Search pattern
335
- matchStringContextLines?: number; // Context lines around match (1-50, default: 5)
324
+ </details>
336
325
 
337
- // Mode 2: Line range
338
- startLine?: number; // Start line (1-indexed)
339
- endLine?: number; // End line (1-indexed)
326
+ <details>
327
+ <summary>opencode</summary>
340
328
 
341
- // Mode 3: Full content
342
- fullContent?: boolean; // Return entire file (default: false)
329
+ Follow the MCP Servers [documentation](https://opencode.ai/docs/mcp-servers/). For example in `~/.config/opencode/opencode.json`:
343
330
 
344
- // Control
345
- minified?: boolean; // Minify content (default: true)
346
- sanitize?: boolean; // Sanitize secrets (default: true)
331
+ ```json
332
+ {
333
+ "$schema": "https://opencode.ai/config.json",
334
+ "mcp": {
335
+ "octocode": {
336
+ "type": "local",
337
+ "command": [
338
+ "npx",
339
+ "octocode-mcp@latest"
340
+ ],
341
+ "enabled": true
342
+ }
343
+ }
347
344
  }
348
345
  ```
349
346
 
350
- #### Response
347
+ </details>
351
348
 
352
- ```typescript
353
- interface GithubGetFileContentResponse {
354
- path: string;
355
- content: string; // File content (full or extracted)
356
- size: number; // Original file size in bytes
357
- encoding: string;
358
- sha: string;
359
- extraction_mode: "pattern" | "range" | "full";
360
- matches_found?: number; // When using matchString
361
- }
349
+ <details>
350
+ <summary>Qodo Gen</summary>
351
+
352
+ Open [Qodo Gen](https://docs.qodo.ai/qodo-documentation/qodo-gen) chat panel in VSCode or IntelliJ β†’ Connect more tools β†’ + Add new MCP β†’ Paste the standard config above.
353
+
354
+ Click <code>Save</code>.
355
+
356
+ </details>
357
+
358
+ <details>
359
+ <summary>VS Code</summary>
360
+
361
+ #### Click the button to install:
362
+
363
+ [<img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code">](https://insiders.vscode.dev/redirect?url=vscode%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522octocode%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522octocode-mcp%2540latest%255D%257D) [<img alt="Install in VS Code Insiders" src="https://img.shields.io/badge/VS_Code_Insiders-VS_Code_Insiders?style=flat-square&label=Install%20Server&color=24bfa5">](https://insiders.vscode.dev/redirect?url=vscode-insiders%3Amcp%2Finstall%3F%257B%2522name%2522%253A%2522octocode%2522%252C%2522command%2522%253A%2522npx%2522%252C%2522args%2522%253A%255B%2522octocode-mcp%2540latest%255D%257D)
364
+
365
+ #### Or install manually:
366
+
367
+ Follow the MCP install [guide](https://code.visualstudio.com/docs/copilot/chat/mcp-servers#_add-an-mcp-server), use the standard config above. You can also install the Octocode MCP server using the VS Code CLI:
368
+
369
+ ```bash
370
+ # For VS Code
371
+ code --add-mcp '{"name":"octocode","command":"npx","args":["octocode-mcp@latest"]}'
362
372
  ```
363
373
 
364
- #### Best Practices
374
+ After installation, the Octocode MCP server will be available for use with your GitHub Copilot agent in VS Code.
365
375
 
366
- - **Token efficiency**: Use `matchString` for 85% token savings vs `fullContent`
367
- - **Large files**: Always use extraction (matchString or line range), never fullContent
368
- - **Config files**: Set `minified=false` for JSON/YAML to preserve formatting
369
- - **Precision**: Use `matchString` from `githubSearchCode` text_matches for accurate targeting
376
+ </details>
370
377
 
371
- #### Examples
378
+ <details>
379
+ <summary>Warp</summary>
372
380
 
373
- ```typescript
374
- // Extract function with context (BEST - most efficient)
375
- {
376
- owner: "jaredhanson",
377
- repo: "passport",
378
- path: "lib/strategies/oauth2.js",
379
- matchString: "authorize",
380
- matchStringContextLines: 20
381
- }
381
+ Go to `Settings` -> `AI` -> `Manage MCP Servers` -> `+ Add` to [add an MCP Server](https://docs.warp.dev/knowledge-and-collaboration/mcp#adding-an-mcp-server). Use the standard config above.
382
382
 
383
- // Read specific line range
384
- {
385
- owner: "facebook",
386
- repo: "react",
387
- path: "packages/react/src/React.js",
388
- startLine: 1,
389
- endLine: 50
390
- }
383
+ Alternatively, use the slash command `/add-mcp` in the Warp prompt and paste the standard config from above:
391
384
 
392
- // Read config file (preserve formatting)
385
+ ```js
393
386
  {
394
- owner: "microsoft",
395
- repo: "TypeScript",
396
- path: "tsconfig.json",
397
- fullContent: true,
398
- minified: false
387
+ "mcpServers": {
388
+ "octocode": {
389
+ "command": "npx",
390
+ "args": [
391
+ "octocode-mcp@latest"
392
+ ]
393
+ }
394
+ }
399
395
  }
400
396
  ```
401
397
 
402
- ---
398
+ </details>
403
399
 
404
- ### githubSearchPullRequests
400
+ <details>
401
+ <summary>Windsurf</summary>
405
402
 
406
- Analyze pull requests, code changes, and discussions.
403
+ Follow Windsurf MCP [documentation](https://docs.windsurf.com/windsurf/cascade/mcp). Use the standard config above.
407
404
 
408
- **Status**: Default tool (enabled by default)
405
+ </details>
409
406
 
410
- #### Parameters
407
+ <details>
408
+ <summary>Zed</summary>
411
409
 
412
- ```typescript
413
- interface GithubSearchPullRequestsParams {
414
- // Identification (use one)
415
- owner?: string; // Repository owner
416
- repo?: string; // Repository name
417
- prNumber?: number; // Direct PR fetch (fastest, bypasses search)
410
+ Follow the MCP Servers [documentation](https://zed.dev/docs/assistant/model-context-protocol). Use the standard config above.
418
411
 
419
- // Search filters (when not using prNumber)
420
- state?: "open" | "closed";
421
- merged?: boolean; // Only merged PRs (requires state="closed")
422
- query?: string; // Free-text search in title/body/comments
423
- match?: ("title" | "body" | "comments")[]; // Search scope
412
+ </details>
424
413
 
425
- // Author and reviewers
426
- author?: string;
427
- assignee?: string;
428
- reviewedBy?: string;
414
+ ---
429
415
 
430
- // Metadata filters
431
- label?: string | string[]; // Label filter (OR logic if array)
432
- base?: string; // Target branch
433
- head?: string; // Source branch
416
+ ### Authentication Methods
434
417
 
435
- // Date filters
436
- created?: string; // Creation date (e.g., ">=2024-01-01")
437
- updated?: string; // Last update date
438
- merged?: string; // Merge date
439
- closed?: string; // Close date
418
+ Octocode MCP supports two authentication methods:
440
419
 
441
- // Engagement filters
442
- comments?: number | string; // Comment count (e.g., ">5", "10..20")
443
- reactions?: number | string; // Reaction count
420
+ #### Option 1: GitHub CLI (Recommended)
444
421
 
445
- // Control
446
- sort?: "created" | "updated" | "best-match";
447
- order?: "asc" | "desc";
448
- limit?: number; // Max results: 1-10 (default: 5)
422
+ **Advantages**: Automatic token management, works with 2FA, supports SSO
449
423
 
450
- // Content inclusion (token expensive)
451
- withContent?: boolean; // Include code diffs (default: false)
452
- withComments?: boolean; // Include comment threads (default: false)
453
- }
454
- ```
424
+ ```bash
425
+ # Install GitHub CLI
426
+ # macOS
427
+ brew install gh
455
428
 
456
- #### Response
457
-
458
- ```typescript
459
- interface GithubSearchPullRequestsResponse {
460
- results: Array<{
461
- number: number;
462
- title: string;
463
- state: "open" | "closed";
464
- merged: boolean;
465
- author: string;
466
- html_url: string;
467
- created_at: string;
468
- updated_at: string;
469
- merged_at?: string;
470
- body: string;
471
-
472
- // When withContent=true
473
- files?: Array<{
474
- filename: string;
475
- status: "added" | "modified" | "removed";
476
- additions: number;
477
- deletions: number;
478
- changes: number;
479
- patch?: string; // Diff content
480
- }>;
481
-
482
- // When withComments=true
483
- comments?: Array<{
484
- author: string;
485
- body: string;
486
- created_at: string;
487
- }>;
488
- }>;
489
- }
490
- ```
429
+ # Windows
430
+ winget install --id GitHub.cli
491
431
 
492
- #### Best Practices
432
+ # Linux
433
+ # See https://github.com/cli/cli/blob/trunk/docs/install_linux.md
493
434
 
494
- - **Direct fetch**: Use `prNumber` for 10x faster retrieval
495
- - **Production code**: Use `state="closed"` + `merged=true` for shipped features
496
- - **Token management**:
497
- - `withComments=false`: 50% token savings
498
- - `withContent=false`: 80% token savings
499
- - **Analysis**: Enable content/comments only when needed for deep analysis
435
+ # Authenticate
436
+ gh auth login
437
+ ```
500
438
 
501
- #### Examples
439
+ Then use the standard configuration (no `GITHUB_TOKEN` needed).
502
440
 
503
- ```typescript
504
- // Fetch specific PR with diffs (direct, fastest)
505
- {
506
- owner: "facebook",
507
- repo: "react",
508
- prNumber: 12345,
509
- withContent: true
510
- }
441
+ #### Option 2: Personal Access Token
511
442
 
512
- // Find merged authentication PRs
513
- {
514
- owner: "passportjs",
515
- repo: "passport",
516
- state: "closed",
517
- merged: true,
518
- query: "authentication",
519
- limit: 5
520
- }
443
+ **When to use**: CI/CD environments, automation, or if GitHub CLI isn't available
521
444
 
522
- // Recent open PRs with discussions
523
- {
524
- owner: "microsoft",
525
- repo: "TypeScript",
526
- state: "open",
527
- sort: "updated",
528
- withComments: true,
529
- limit: 10
530
- }
445
+ 1. Create a token at [github.com/settings/tokens](https://github.com/settings/tokens)
446
+ 2. Select scopes: `repo`, `read:user`, `read:org`
447
+ 3. Add to your MCP configuration:
531
448
 
532
- // Author's bug fixes
449
+ ```json
533
450
  {
534
- owner: "facebook",
535
- repo: "react",
536
- author: "gaearon",
537
- label: "bug",
538
- state: "closed",
539
- merged: true
451
+ "mcpServers": {
452
+ "octocode": {
453
+ "command": "npx",
454
+ "args": ["octocode-mcp@latest"],
455
+ "env": {
456
+ "GITHUB_TOKEN": "ghp_your_token_here"
457
+ }
458
+ }
459
+ }
540
460
  }
541
461
  ```
542
462
 
543
- ---
544
-
545
- ## Configuration
463
+ > **Security Tip**: Never commit tokens to version control. Use environment variables or secure secret management.
546
464
 
547
- ### Environment Variables
465
+ ---
548
466
 
549
- | Variable | Type | Description |
550
- |-----------------|------------------|----------------------------------------------------------|
551
- | `GITHUB_TOKEN` | string | Personal Access Token ( Uses `gh` CLI if not set) |
552
- | `TOOLS_TO_RUN` | string | Comma-separated tool list (exclusive mode) |
553
- | `ENABLE_TOOLS` | string | Comma-separated tools to enable (additive) |
554
- | `DISABLE_TOOLS` | string | Comma-separated tools to disable |
555
- | `BETA` | "0" \| "1" | Enable experimental features |
556
- | `LOG` | "true" \| "false"| Enable logging |
467
+ ### Verify Installation
557
468
 
469
+ After installation, verify Octocode MCP is working:
558
470
 
559
- **Notes**:
560
- - `TOOLS_TO_RUN` is mutually exclusive with `ENABLE_TOOLS`/`DISABLE_TOOLS`
561
- - Default tools (enabled automatically): `githubSearchCode`, `githubSearchRepositories`, `githubViewRepoStructure`, `githubGetFileContent`, `githubSearchPullRequests`
471
+ 1. **Restart your MCP client** completely
472
+ 2. **Check connection status**:
473
+ - **Cursor**: Look for green dot in Settings β†’ Tools & Integrations β†’ MCP Tools
474
+ - **Claude Desktop**: Check for "octocode" in available tools
475
+ - **VS Code**: Verify in GitHub Copilot settings
476
+ 3. **Test with a simple query**:
477
+ ```
478
+ Search GitHub for React hooks implementations
479
+ ```
562
480
 
563
- ### Tool Selection Examples
481
+ If you see Octocode tools being used, you're all set! πŸŽ‰
564
482
 
565
- ```bash
566
- # Run only search tools (exclusive mode)
567
- export TOOLS_TO_RUN="githubSearchCode,githubSearchRepositories"
483
+ ---
568
484
 
569
- # Disable PR search if not needed
570
- export DISABLE_TOOLS="githubSearchPullRequests"
485
+ ## GitHub Enterprise Support
571
486
 
572
- # Disable structure exploration
573
- export DISABLE_TOOLS="githubViewRepoStructure"
487
+ Octocode MCP supports GitHub Enterprise Server instances with custom API URLs.
574
488
 
575
- # Enable experimental features
576
- export BETA="1"
577
- ```
489
+ ### Configuration
578
490
 
579
- ### MCP Configuration with Environment Variables
491
+ Add the `GITHUB_API_URL` environment variable to your MCP configuration:
580
492
 
581
493
  ```json
582
494
  {
@@ -585,191 +497,371 @@ export BETA="1"
585
497
  "command": "npx",
586
498
  "args": ["octocode-mcp@latest"],
587
499
  "env": {
588
- "GITHUB_TOKEN": "ghp_your_token_here",
589
- "DISABLE_TOOLS": "githubSearchPullRequests",
590
- "BETA": "1"
500
+ "GITHUB_TOKEN": "your_token",
501
+ "GITHUB_API_URL": "https://github.company.com/api/v3"
591
502
  }
592
503
  }
593
504
  }
594
505
  }
595
506
  ```
596
507
 
508
+ **Default:** If not specified, defaults to `https://api.github.com` (public GitHub).
509
+
510
+ **Note:** Ensure your GitHub Enterprise token has the same scopes as documented in the [Authentication Guide](../../docs/AUTH_GUIDE.md).
511
+
597
512
  ---
598
513
 
599
- ## Authentication
514
+ ## More Examples
600
515
 
601
- ### Method 1: GitHub CLI (Recommended)
516
+ ### Additional Demonstrations
602
517
 
603
- ```bash
604
- # Install GitHub CLI
605
- brew install gh # macOS
606
- # or download from https://cli.github.com/
518
+ #### ThreeJS Implementation Quality Comparison
607
519
 
608
- # Authenticate
609
- gh auth login
520
+ **[Interactive Demo](https://octocode-sonnet4-gpt5-comparisson.vercel.app/)**
521
+
522
+ Side-by-side comparison showing:
523
+ - **Generic AI**: Basic implementation with common patterns
524
+ - **Octocode-Enhanced AI**: Production-grade implementation with advanced techniques from real projects
525
+
526
+ **Key Differences**:
527
+ - Performance optimizations from high-performance projects
528
+ - Proper resource management patterns
529
+ - Industry-standard error handling
530
+ - Real-world edge case handling
531
+
532
+ #### Deep Technical Research
533
+
534
+ **[YouTube: React Hooks Internals](https://www.youtube.com/watch?v=BCOpsRjAPU4&t=9s)**
535
+
536
+ Demonstrates progressive research workflow:
537
+ 1. Repository discovery (React source)
538
+ 2. Structure exploration (hooks implementation)
539
+ 3. Code analysis (internal mechanisms)
540
+ 4. Comprehensive explanation with code references
541
+
542
+ ---
543
+
544
+ ## Overview
545
+
546
+ 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.
547
+
548
+ ### Core Capabilities
549
+
550
+ | Capability | Implementation | Benefit |
551
+ |------------|----------------|---------|
552
+ | **Code Discovery** | Multi-dimensional search across repositories, code, and pull requests | Find relevant implementations in seconds |
553
+ | **Context Extraction** | Smart content retrieval with pattern matching and line-range targeting | Get exactly the context you need |
554
+ | **Token Optimization** | Advanced minification strategies (50+ language support) | 30-70% reduction in token consumption |
555
+ | **Security** | Automatic secrets detection and content sanitization | Enterprise-grade data protection |
556
+ | **Progressive Research** | Workflow-driven exploration (Discover β†’ Explore β†’ Analyze) | Deep understanding of complex systems |
557
+ | **Access Control** | GitHub permission-based access to public and private repositories | Organization-wide code research |
558
+
559
+ ---
560
+
561
+ ## Tools
562
+
563
+ Octocode provides five specialized research tools designed to work together for comprehensive code analysis:
610
564
 
611
- # Verify
612
- gh auth status
565
+ ### πŸ” githubSearchCode
566
+
567
+ **Find code implementations across repositories**
568
+
569
+ Search for specific code patterns, functions, or implementations across millions of repositories.
570
+
571
+ **Key Features**:
572
+ - **Content Search**: Find code inside files by keywords (AND logic)
573
+ - **Path Search**: Discover files/directories by name (25x faster)
574
+ - **Smart Filtering**: Scope by repository, path, file extension, or popularity
575
+ - **Context-Rich Results**: Returns code snippets with surrounding context
576
+
577
+ **Common Use Cases**:
578
+ ```
579
+ β€’ Find implementation examples: "How do popular repos implement OAuth?"
580
+ β€’ Discover patterns: "Search for React custom hooks in vercel repos"
581
+ β€’ Locate functions: "Find error handling patterns in Express apps"
613
582
  ```
614
583
 
615
- **Pros**: Automatic token refresh, secure credential storage
616
- **Cons**: Requires separate installation
584
+ ---
617
585
 
618
- ### Method 2: Personal Access Token
586
+ ### πŸ“š githubSearchRepositories
619
587
 
620
- 1. Create token at [github.com/settings/tokens](https://github.com/settings/tokens)
621
- 2. Required scopes:
622
- - `repo` - Access repositories (public and private)
623
- - `read:user` - Read user profile
624
- - `read:org` - Read organization data
625
- 3. Add to environment: `GITHUB_TOKEN=ghp_your_token_here`
588
+ **Discover repositories by topics and keywords**
626
589
 
627
- **Pros**: Simple, direct control
628
- **Cons**: Manual token management, no auto-refresh
590
+ Your starting point for repository discovery - find the right projects to analyze.
629
591
 
630
- ### Rate Limits
592
+ **Key Features**:
593
+ - **Topic-Based Discovery**: Search by exact GitHub topics (most precise)
594
+ - **Keyword Search**: Find repos by name, description, or README content
595
+ - **Quality Filters**: Filter by stars, language, size, activity
596
+ - **Sorting Options**: By popularity, recency, or relevance
631
597
 
632
- | Authentication | Rate Limit | Recommended For |
633
- |----------------|------------|-----------------|
634
- | Unauthenticated | 60 req/hour | Testing only |
635
- | Authenticated | 5,000 req/hour | Production use |
636
- | GitHub Enterprise | Custom | Enterprise deployments |
598
+ **Common Use Cases**:
599
+ ```
600
+ β€’ Find popular implementations: "Discover TypeScript CLI tools with >1000 stars"
601
+ β€’ Research ecosystems: "Find all React state management libraries"
602
+ β€’ Organization research: "List all repos from microsoft with topic 'ai'"
603
+ ```
637
604
 
638
- **Built-in handling**: Server automatically retries with exponential backoff on rate limit errors.
605
+ ---
606
+
607
+ ### πŸ—‚οΈ githubViewRepoStructure
608
+
609
+ **Explore repository directory structure**
610
+
611
+ Understand how a project is organized before diving into specific files.
612
+
613
+ **Key Features**:
614
+ - **Directory Tree**: Visual representation of folder structure
615
+ - **File Sizes**: See file sizes to identify important components
616
+ - **Depth Control**: Explore 1 level (overview) or 2 levels (detailed)
617
+ - **Path Targeting**: Navigate directly to specific directories
618
+
619
+ **Common Use Cases**:
620
+ ```
621
+ β€’ Project overview: "Show me the structure of facebook/react"
622
+ β€’ Find entry points: "Explore src/ directory in a monorepo"
623
+ β€’ Understand architecture: "Navigate to the API implementation folder"
624
+ ```
639
625
 
640
626
  ---
641
627
 
642
- ## Advanced Usage
643
-
644
- ### Progressive Research Workflow
645
-
646
- Recommended three-phase pattern for deep code understanding:
647
-
648
- ```typescript
649
- // PHASE 1: DISCOVER - Find relevant repositories
650
- const repos = await githubSearchRepositories({
651
- topicsToSearch: ["microservices", "typescript"],
652
- stars: ">1000"
653
- });
654
-
655
- // PHASE 2: EXPLORE - Understand structure
656
- const structure = await githubViewRepoStructure({
657
- owner: repos.results[0].owner,
658
- repo: repos.results[0].name,
659
- branch: "main",
660
- path: "",
661
- depth: 1
662
- });
663
-
664
- // PHASE 3: ANALYZE - Deep dive into code
665
- const code = await githubSearchCode({
666
- owner: repos.results[0].owner,
667
- repo: repos.results[0].name,
668
- keywordsToSearch: ["event", "handler"],
669
- path: "src/services"
670
- });
671
-
672
- const fileContent = await githubGetFileContent({
673
- owner: repos.results[0].owner,
674
- repo: repos.results[0].name,
675
- path: code.results[0].path,
676
- matchString: "EventHandler",
677
- matchStringContextLines: 30
678
- });
679
- ```
680
-
681
- ### Token Optimization Strategies
682
-
683
- 1. **Use pattern matching over full content**
684
- ```typescript
685
- // Good: 85% token savings
686
- { matchString: "function", matchStringContextLines: 10 }
687
-
688
- // Avoid: High token cost
689
- { fullContent: true }
690
- ```
628
+ ### πŸ“„ githubGetFileContent
691
629
 
692
- 2. **Discovery before detailed search**
693
- ```typescript
694
- // Fast discovery (20 tokens)
695
- { keywordsToSearch: ["auth"], match: "path" }
630
+ **Read file contents with smart extraction**
696
631
 
697
- // Then detailed (500 tokens)
698
- { keywordsToSearch: ["OAuth2"], match: "file", limit: 5 }
699
- ```
632
+ Retrieve specific content from files efficiently - full files or targeted sections.
700
633
 
701
- 3. **Scope searches**
702
- ```typescript
703
- // Good: Scoped
704
- { owner: "org", repo: "repo", path: "src" }
634
+ **Key Features**:
635
+ - **Pattern Matching**: Extract sections matching specific patterns with context
636
+ - **Line Range Reading**: Read specific line ranges for efficiency
637
+ - **Full Content Access**: Get entire file when needed
638
+ - **Content Minification**: Automatic optimization for token efficiency
705
639
 
706
- // Avoid: Unscoped (slow, generic results)
707
- { keywordsToSearch: ["helper"] }
708
- ```
640
+ **Common Use Cases**:
641
+ ```
642
+ β€’ Read specific functions: "Get the validateUser function from auth.ts"
643
+ β€’ Extract sections: "Show me all the middleware definitions in app.js"
644
+ β€’ Read configuration: "Get the full package.json file"
645
+ β€’ Analyze specific code: "Read lines 100-150 from the API handler"
646
+ ```
647
+
648
+ ---
709
649
 
710
- ### Error Handling
650
+ ### πŸ”€ githubSearchPullRequests
711
651
 
712
- All tools return standard error responses:
652
+ **Analyze pull requests, changes, and discussions**
713
653
 
714
- ```typescript
715
- interface ErrorResponse {
716
- error: {
717
- code: string;
718
- message: string;
719
- details?: any;
720
- };
721
- }
654
+ Understand how code evolved, why decisions were made, and learn from production changes.
655
+
656
+ **Key Features**:
657
+ - **PR Discovery**: Search by state, author, labels, dates
658
+ - **Direct Access**: Fetch specific PR by number (10x faster)
659
+ - **Code Diffs**: Include full diff content to see what changed
660
+ - **Discussions**: Access comment threads and review discussions
661
+ - **Merged Code**: Filter for production-ready, merged changes
662
+
663
+ **Common Use Cases**:
664
+ ```
665
+ β€’ Learn from changes: "Show recent merged PRs about authentication"
666
+ β€’ Understand decisions: "Find PRs discussing the API redesign with comments"
667
+ β€’ Track implementations: "See how feature X was implemented with diffs"
668
+ β€’ Expert contributions: "Find PRs by @author in the last 6 months"
722
669
  ```
723
670
 
724
- Common error codes:
725
- - `RATE_LIMIT_EXCEEDED` - Wait for rate limit reset
726
- - `AUTHENTICATION_FAILED` - Check GitHub credentials
727
- - `NOT_FOUND` - Repository or file doesn't exist
728
- - `VALIDATION_ERROR` - Invalid parameters
729
- - `CONTENT_TOO_LARGE` - File exceeds size limits
671
+ ---
730
672
 
731
- ### Performance Characteristics
732
673
 
733
- | Operation | Typical Latency | Token Cost (avg) |
734
- |-----------|----------------|------------------|
735
- | `githubSearchRepositories` | 200-500ms | 100-300 tokens |
736
- | `githubSearchCode` (path) | 300-800ms | 50-200 tokens |
737
- | `githubSearchCode` (file) | 500-1500ms | 500-2000 tokens |
738
- | `githubViewRepoStructure` (depth=1) | 200-400ms | 100-500 tokens |
739
- | `githubViewRepoStructure` (depth=2) | 400-1000ms | 500-2000 tokens |
740
- | `githubGetFileContent` (pattern) | 300-600ms | 200-800 tokens |
741
- | `githubGetFileContent` (full) | 400-1000ms | 1000-5000 tokens |
742
- | `githubSearchPullRequests` (no content) | 400-800ms | 200-600 tokens |
743
- | `githubSearchPullRequests` (with content) | 800-2000ms | 2000-10000 tokens |
674
+ **[Full Documentation β†’](./README.md)**
675
+
676
+ ---
677
+
678
+ ## Commands
679
+
680
+ Octocode MCP provides intelligent prompt commands that enhance your research workflow:
681
+
682
+ ### `/research` - Expert Code Research Agent
683
+
684
+ **Purpose**: Systematic code research using decision-tree workflows
685
+
686
+ **When to use**:
687
+ - **Understanding repository workflows**: Discover how repositories work, trace specific flows through codebases, and understand technical implementations
688
+ - **Cross-repository flow analysis**: Understand complex flows that span multiple repositories, trace data flows across microservices, or analyze how different repos interact
689
+ - **Technical flow investigation**: Deep-dive into technical flows within or across repositories (even cross-repo dependencies and integrations)
690
+ - **Real-world code examples**: Learn from actual production code implementations, not just documentation or tutorials
691
+ - **Deep technical investigations**: Trace code flows, understand complex implementations, analyze architecture decisions
692
+ - **Answering team questions**: Quickly research Slack/Jira questions about features, APIs, or behavior with code-backed answers
693
+ - **Bug investigation**: Find root causes by analyzing code, commit history, and related PRs
694
+ - **Organization features**: Understand how features work across your private/public repositories
695
+ - **Pattern discovery**: Compare implementations across multiple repos to find best practices
696
+ - **Documentation validation**: Verify docs match actual code behavior
697
+
698
+ **What it does**:
699
+ - Provides systematic guidance through research stages (discovery β†’ exploration β†’ analysis β†’ synthesis)
700
+ - Executes multiple queries in parallel for faster results
701
+ - Shows transparent reasoning at each step
702
+ - Adapts to different research types: code implementation, documentation validation, pattern comparison, or bug investigation
703
+
704
+ **Usage Examples** (by research type):
705
+
706
+ **Technical Research** (code-first, understanding implementations):
707
+ ```
708
+ /research How does React's useState hook work internally?
709
+ /research How to build a LangChain application with Express backend and Next.js frontend?
710
+ ```
711
+
712
+ **Product Research** (docs + code validation):
713
+ ```
714
+ /research What are the rate limiting features in our API according to docs and actual code?
715
+ /research How does authentication work in NextAuth.js? Verify docs against implementation
716
+ ```
717
+
718
+ **Pattern Analysis** (comparing multiple implementations):
719
+ ```
720
+ /research Compare state management approaches: Redux vs Zustand vs Jotai
721
+ /research How do popular repos handle WebSocket reconnection logic?
722
+ ```
723
+
724
+ **Bug Investigation** (root cause analysis):
725
+ ```
726
+ /research Why is the payment webhook failing? Trace the error through payment-service
727
+ /research User reports slow dashboard loading - investigate performance issues in myorg/frontend
728
+ ```
729
+
730
+ **Key Features**:
731
+ - Progressive refinement (broad β†’ specific β†’ deep dive)
732
+ - Code-as-truth validation (verifies docs against actual implementation)
733
+ - Cross-repository pattern analysis (public & private repos)
734
+ - Comprehensive synthesis with Mermaid diagrams and cited references
735
+ - Perfect for answering technical questions from Slack/Jira with code evidence
736
+
737
+ ---
738
+
739
+ ### `/kudos` - Repository Appreciation
740
+
741
+ **Purpose**: List and appreciate all GitHub repositories used in your research session
742
+
743
+ **When to use**:
744
+ - End of a research session to see what repos helped you
745
+ - Finding repositories to star and support
746
+
747
+ **What it does**:
748
+ - Analyzes conversation history
749
+ - Identifies all GitHub repositories explored via Octocode tools
750
+ - Creates formatted list with links and usage notes
751
+ - Reminds you to show appreciation to maintainers
752
+
753
+ **Usage**:
754
+ ```
755
+ /kudos
756
+ ```
757
+
758
+ **Output Example**:
759
+ ```markdown
760
+ # Repositories Used in This Research
761
+
762
+ ## ⭐ Repositories Explored
763
+
764
+ 1. **facebook/react** β€” https://github.com/facebook/react
765
+ Searched for hooks implementation and internals
766
+
767
+ 2. **vercel/next.js** β€” https://github.com/vercel/next.js
768
+ Explored routing architecture
769
+ ```
770
+
771
+ ---
772
+
773
+ ### `/use` - Quick Reference Guide
774
+
775
+ **Purpose**: Simple reminder of Octocode MCP capabilities and best practices
776
+
777
+ **When to use**:
778
+ - Quick refresher on available tools
779
+ - Learning key practices for efficient research
780
+ - Getting started with Octocode
781
+
782
+ **What it covers**:
783
+ - **Code Discovery**: Search repositories, explore structures, find patterns
784
+ - **Deep Analysis**: Read files, analyze PRs with diffs, track commits
785
+ - **Research Workflow**: Progressive refinement methodology
786
+ - **Key Practices**: Bulk queries, partial file access, search-first approach
787
+
788
+ **Usage**:
789
+ ```
790
+ /use
791
+ ```
792
+
793
+ ---
794
+
795
+ ### Tips for Using Commands
796
+
797
+ 1. **Start with `/use`** if you're new to Octocode MCP
798
+ 2. **Use `/research` for all code research** - This is the recommended way to use Octocode for any research task, providing structured guidance and optimal tool usage
799
+ 3. **Run `/kudos`** at the end of sessions to document sources and show appreciation
800
+ 4. Commands work in any MCP-compatible client (Claude, Cursor, etc.)
801
+
802
+ > **πŸ’‘ Pro Tip**: For any code research, start with `/research` in Octocode MCP. This command intelligently orchestrates all tools for you, optimizing your workflow, depth of analysis, and research quality.
744
803
 
745
804
  ---
746
805
 
747
806
  ## Documentation
748
807
 
749
- ### Comprehensive Resources
808
+ ### Comprehensive Guides
750
809
 
751
- - **[Main README](../../README.md)** - Getting started, overview, examples
752
- - **[Usage Guide](./docs/USAGE_GUIDE.md)** - 20+ real-world examples
753
- - **[Authentication Guide](./docs/AUTHENTICATION.md)** - Setup and troubleshooting
754
- - **[Tool Schemas](./docs/TOOL_SCHEMAS.md)** - Complete JSON schemas
755
- - **[Architecture](./docs/SUMMMARY.md)** - System design and internals
810
+ | Resource | Description | Link |
811
+ |----------|-------------|------|
812
+ | **Official Website** | Interactive tutorials, demos, community | [octocode.ai](https://octocode.ai) |
813
+ | **Configuration Guide** | Environment variables and server configuration | [CONFIGURATION.md](../../docs/CONFIGURATION.md) |
814
+ | **Authentication Guide** | Setup instructions and troubleshooting | [AUTH_GUIDE.md](../../docs/AUTH_GUIDE.md) |
815
+ | **YouTube Channel** | Video tutorials and demonstrations | [Octocode on YouTube](https://www.youtube.com/@Octocode-ai) |
756
816
 
757
- ### External Links
758
817
 
759
- - **[NPM Package](https://www.npmjs.com/package/octocode-mcp)** - Releases and changelog
760
- - **[GitHub Repository](https://github.com/bgauryy/octocode-mcp)** - Source code
761
- - **[Official Website](https://octocode.ai)** - Interactive tutorials
762
- - **[YouTube Channel](https://www.youtube.com/@Octocode-ai)** - Video guides
818
+ ---
819
+
820
+ ## Community
821
+
822
+ ### Get Support
823
+
824
+ - **GitHub Discussions**: [Ask questions, share ideas](https://github.com/bgauryy/octocode-mcp/discussions)
825
+ - **GitHub Issues**: [Report bugs, request features](https://github.com/bgauryy/octocode-mcp/issues)
826
+ - **Documentation**: [Complete guides and references](https://octocode.ai)
827
+ - **YouTube**: [Video tutorials and examples](https://www.youtube.com/@Octocode-ai)
828
+
829
+ ### Show Your Support
830
+
831
+ If Octocode helps your AI development workflow:
832
+
833
+ - **Star the repository** on [GitHub](https://github.com/bgauryy/octocode-mcp)
834
+ - **Share on social media** with #OctocodeMCP
835
+ - **Write about your experience** on your blog
836
+ - **Create tutorials** and share with the community
837
+ - **Contribute** improvements and bug fixes
763
838
 
764
839
  ---
765
840
 
766
- ## Support
841
+ <div align="center">
842
+
843
+ ## Recognition
844
+
845
+ <a href="https://glama.ai/mcp/servers/@bgauryy/octocode-mcp">
846
+ <img width="380" height="200" src="https://glama.ai/mcp/servers/@bgauryy/octocode-mcp/badge" alt="Octocode MCP on Glama" />
847
+ </a>
848
+
849
+ ---
850
+
851
+ **Built with care for developers by developers**
852
+
853
+ [Website](https://octocode.ai) β€’ [GitHub](https://github.com/bgauryy/octocode-mcp) β€’ [NPM](https://www.npmjs.com/package/octocode-mcp)
854
+
855
+ ---
856
+
857
+ *Octocode MCP is an official MCP Community Server*
858
+
859
+ [![MCP Community](https://img.shields.io/badge/Model_Context_Protocol-Official_Community_Server-blue?style=for-the-badge)](https://github.com/modelcontextprotocol/servers)
767
860
 
768
- - **Issues**: [github.com/bgauryy/octocode-mcp/issues](https://github.com/bgauryy/octocode-mcp/issues)
769
- - **Discussions**: [github.com/bgauryy/octocode-mcp/discussions](https://github.com/bgauryy/octocode-mcp/discussions)
861
+ </div>
770
862
 
771
863
  ---
772
864
 
773
865
  ## License
774
866
 
775
- MIT - See [LICENSE](../../LICENSE) for details.
867
+ MIT - See [LICENSE](./LICENSE) for details.