MCP工具 是 AI Skill Hub 本期精选MCP工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/bgauryy/octocode
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"mcp--": {
"command": "npx",
"args": ["-y", "octocode"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 MCP工具 执行以下任务... Claude: [自动调用 MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"mcp__": {
"command": "npx",
"args": ["-y", "octocode"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
</div>
Evidence-first code research for AI agents and developers.
Octocode researches your local code and external code alike (GitHub repositories, PRs, npm) with one toolset: ripgrep + AST search, trees, precise reads, and LSP. Use it as a CLI or MCP server, backed by a Rust engine for fast, token-efficient results across single files or mega-repos.
---
Prerequisites: Node.js 20.12+
1. Run the Octocode CLI with npx
npx octocode --help
2. Authenticate with GitHub - optional, but unlocks private repositories and higher API rate limits:
npx octocode auth login
npx octocode status # verify the active token source
3. Choose your interface. Same tools and Rust engine on both. (Clone is on by default in the CLI, opt-in for MCP.)
🖥️ CLI - research straight from your terminal:
npx octocode
🤖 MCP - one-click install:
<details> <summary><b>Show more install options (Windsurf, Kiro, Goose, LM Studio, Claude Code)</b></summary> <br>
Claude Code:
claude mcp add-json octocode --scope user '{"command":"npx","type":"stdio","args":["octocode-mcp@latest"]}' </details>
Any other client: npx octocode install
---
~/.octocode/.octocoderc:
{
"github": {
"apiUrl": "https://api.github.com"
},
"local": {
"enabled": true,
"enableClone": true
},
"output": {
"format": "yaml"
}
}
Per-project overrides and custom LSP servers live in a workspace .octocode/ folder. For the full .octocoderc schema, a ready-to-copy example, clone-cache tuning, GitHub Enterprise setup, and precedence details, see the Configuration Reference.
---
Add to your MCP client config, using octocode-mcp:
{
"octocode": {
"command": "npx",
"type": "stdio",
"args": [
"octocode-mcp@latest"
]
}
}
Add a GitHub token and options under env - see Authentication and Configuration.
---
Everything is optional; Octocode runs on sensible defaults. Settings resolve from three sources, in priority order:
environment variables > <octocode-home>/.octocoderc > built-in defaults
env or your shell.<octocode-home>/.octocoderc, machine-wide defaults read by both the CLI and the MCP server.Octocode home (<octocode-home>) holds the global config, encrypted credentials, sessions, stats, and tmp materialization caches. On every platform it is .octocode inside the OS home directory — ~/.octocode on macOS and Linux, %USERPROFILE%\.octocode on Windows. Override it with OCTOCODE_HOME.
Set values as MCP env entries (per client; these win over .octocoderc) or globally in <octocode-home>/.octocoderc (JSON with comments). Tokens never go in .octocoderc — use env or npx octocode auth login.
Most-used settings (both CLI and MCP unless noted):
| Env var | .octocoderc key | Default | What it does |
|---|---|---|---|
OCTOCODE_TOKEN / GH_TOKEN / GITHUB_TOKEN | env only | unset | GitHub token, in priority order. Never in .octocoderc. |
ENABLE_LOCAL | local.enabled | CLI true; on MCP set it explicitly | Local filesystem and LSP tools on or off. |
ENABLE_CLONE | local.enableClone | CLI true, MCP false | ghCloneRepo + directory fetch on/off. |
WORKSPACE_ROOT | local.workspaceRoot | cwd | Root for resolving relative local paths. |
ALLOWED_PATHS | local.allowedPaths | [] | Extra path allowlist for local access. |
OCTOCODE_OUTPUT_FORMAT | output.format | yaml | Response format: yaml or json. |
OCTOCODE_HOME, GitHub Enterprise (GITHUB_API_URL), MCP tool allowlisting (TOOLS_TO_RUN/ENABLE_TOOLS/DISABLE_TOOLS), and network timeouts/retries: see the Configuration Reference.
npx octocode auth login
npx octocode status # verify the active token source
Interactive login lets you choose Octocode browser OAuth or gh auth login. Octocode OAuth credentials are stored encrypted on disk.
gh auth login
Octocode reads the gh token automatically — no further config needed.
Set OCTOCODE_TOKEN, GH_TOKEN, or GITHUB_TOKEN in your shell. Required scopes: repo, read:user, read:org.
Create a token at github.com/settings/tokens.
Note: Never commit tokens to version control. Use environment variables or secure secret management.
---
| Tool | What it does | Knob |
|---|---|---|
npmSearch | npm package lookup and keyword search; returns metadata and the source repository for GitHub handoff. | concise |
| Directory | npm package | Role |
|---|---|---|
[packages/octocode](https://github.com/bgauryy/octocode/tree/main/packages/octocode) | octocode | CLI: quick commands, raw tool runner, skill installs, auth/login/logout, install, status, context. |
[packages/octocode-mcp](https://github.com/bgauryy/octocode/tree/main/packages/octocode-mcp) | octocode-mcp | MCP server (stdio) that registers the tool catalog for AI assistants. |
[packages/octocode-tools-core](https://github.com/bgauryy/octocode/tree/main/packages/octocode-tools-core) | @octocodeai/octocode-tools-core | Shared tool core: implementations, GitHub client, credentials and token resolution, session, pagination, security bridge. |
[packages/octocode-engine](https://github.com/bgauryy/octocode/tree/main/packages/octocode-engine) | @octocodeai/octocode-engine | Rust/napi native engine: security scanning, minification, signatures, structural AST, ripgrep/diff/YAML, LSP. |
[packages/octocode-config](https://github.com/bgauryy/octocode/tree/main/packages/octocode-config) | @octocodeai/config | Zero-dep env + config loader: getOctocodeHome, .env parsing, .octocoderc reading. Single source used by every package and skill. |
[packages/octocode-vscode](https://github.com/bgauryy/octocode/tree/main/packages/octocode-vscode) | octocode-mcp-vscode | VS Code extension: GitHub OAuth + multi-editor MCP install. |
packages/octocode-benchmark (private, not published) holds benchmark methodology, evals, and run artifacts - see Documentation.
---
Node.js or environment issues? Run the built-in doctor command to check your environment:
npx node-doctor
Common pitfalls: - GitHub auth failures: Ensure your Personal Access Token (PAT) has the repo and read:user scopes. If using the CLI, run npx octocode auth login to refresh. - MCP connection issues: If your AI assistant (like Cursor or Windsurf) fails to connect, ensure you have run npx octocode auth login in your terminal first, or explicitly pass your OCTOCODE_TOKEN in the MCP env configuration. - Native engine errors: Octocode uses a prebuilt Rust engine. If it fails to load on Linux, ensure your system has glibc or musl compatibility. On macOS/Windows, ensure you are on a supported architecture (x64 or arm64).
---
高质量的开源MCP工具,具有广泛的应用前景
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,MCP工具 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | octocode |
| 原始描述 | 开源MCP工具:MCP server for semantic code research and context generation on real-time using 。⭐867 · TypeScript |
| Topics | aiai-agentstypescript |
| GitHub | https://github.com/bgauryy/octocode |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-06-21 · 更新时间:2026-06-22 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端