octocode-mcp

Octocode is an AI-powered code assistant that provides advanced search capabilities to understand connections between repositories and NPM packages. Users can ask specific questions to quickly retrieve necessary information, eliminating the need for manual browsing and enhancing development efficiency.

GitHub Stars

425

User Rating

Not Rated

Favorites

0

Views

49

Forks

29

Issues

2

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes
Requirements
Node.js 18.12以上
GitHub CLI 最新版

Installation

Installation

Prerequisites

Please specify required software and versions:
Node.js: 18.12 or higher
GitHub CLI: Latest version

Installation Steps

1. Clone Repository

bash
git clone https://github.com/bgauryy/octocode-mcp.git
cd octocode-mcp

2. Install Dependencies

bash
npm install

3. Authenticate

bash

Login to GitHub (opens browser)

gh auth login

Login to NPM (for package research)

npm login

Troubleshooting

Common Issues

Issue: Server won't start Solution: Check Node.js version and reinstall dependencies. Issue: Authentication error occurs Solution: Verify that authentication via GitHub CLI is correctly performed.

Configuration

Configuration

Basic Configuration

MCP Setup

Edit ~/.config/claude-desktop/claude_desktop_config.json (macOS/Linux) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
json
{
  "mcpServers": {
    "octocode-mcp": {
      "command": "npx",
      "args": ["octocode-mcp"]
    }
  }
}

Advanced Configuration

Security Settings

Store API keys in environment variables or secure configuration files
Set appropriate file access permissions.

Examples

Examples

Basic Usage

Programmatic Usage

javascript
// JavaScript example (Node.js)
const { MCPClient } = require('@modelcontextprotocol/client');

const client = new MCPClient();
await client.connect();

// Execute tool
const result = await client.callTool('octocode-mcp', {
  parameter1: 'value1',
  parameter2: 'value2'
});

console.log(result);

Advanced Examples

Automation Script

bash
#!/bin/bash

Batch processing example

for file in *.txt; do mcp-tool process "$file" done

Use Cases

Investigate how React implements concurrent rendering.
Display authentication patterns in Next.js applications.
Find examples of how to use a specific API.
Retrieve information to understand the architecture of a library.
Learn how to effectively use this MCP tool.