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 gives an agent the full context it needs to change, review, or explain code: real evidence from your local workspace and from external sources (GitHub repositories, pull requests, and npm packages). One toolset covers all of it: ripgrep and AST structural search, repository tree browsing, precise content fetching, LSP semantic navigation, and binary inspection.
Run it as a CLI or an MCP server. A Rust engine keeps every call fast and token-efficient, minifying and skeletonizing code so an agent reads the shape of a file instead of every byte, from a single file to a mega-repo. It is also the best tool for cross-repository research and exploration across millions of repositories.
---
Fast install:
<img src="https://cursor.com/deeplink/mcp-install-dark.svg" alt="Install in Cursor"> <img src="https://img.shields.io/badge/VS_Code-VS_Code?style=flat-square&label=Install%20Server&color=0098FF" alt="Install in VS Code"> <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">
Or use the installer (detects your installed clients):
```bash
npx octocode install
npx octocode
npx octocode auth login
npx octocode status
Drop this at <octocode-home>/.octocoderc for machine-wide defaults shared by the CLI and the MCP server. Every field is optional; keep only what you want to change. Tokens never go here (use env or octocode login).
{
// GitHub Enterprise users: point at your API endpoint.
"github": { "apiUrl": "https://api.github.com" },
"local": {
"enabled": true, // overrides the surface default for CLI and MCP
"enableClone": false, // false disables ghCloneRepo for CLI and MCP
"workspaceRoot": "~/code", // base for relative local paths (absolute or ~)
"allowedPaths": [] // extra dirs the local tools may read
},
"network": { "timeout": 30000, "maxRetries": 3 },
"output": { "format": "yaml" } // "yaml" or "json"
}
Per-project overrides and custom LSP servers live in a workspace .octocode/ folder (for example .octocode/lsp-servers.json). For every variable, the full .octocoderc schema, clone-cache tuning, GitHub Enterprise setup, local-state paths, and precedence details, see the Configuration Reference.
---
Add to your MCP client config file:
{
"mcpServers": {
"octocode": {
"command": "npx",
"args": ["octocode-mcp@latest"]
}
}
}
For GitHub auth, add a token under env (see Authentication Methods).
Set tokens and options as env entries here, or machine-wide in .octocoderc. See Configuration for every setting, the home-folder layout, and precedence.
---
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, logs, and tmp materialization caches. Its location is fixed per platform (there is no override):
| Platform | Location |
|---|---|
| macOS | ~/.octocode |
| Linux | ${XDG_CONFIG_HOME:-~/.config}/.octocode |
| Windows | %APPDATA%\.octocode |
Set in MCP (env entries; these win over .octocoderc):
{
"mcpServers": {
"octocode": {
"command": "npx",
"args": ["octocode-mcp@latest"],
"env": {
"GITHUB_TOKEN": "ghp_xxxxxxxx",
"ENABLE_LOCAL": "true",
"ENABLE_CLONE": "false"
}
}
}
}
Set globally for both the CLI and MCP in <octocode-home>/.octocoderc (JSON, comments and trailing commas tolerated; never put tokens here). See the ready-to-copy example below.
The Scope column shows where a setting applies: Both, or MCP (the CLI ignores it).
| Env var | .octocoderc key | Default | Scope | What it does |
|---|---|---|---|---|
OCTOCODE_TOKEN / GH_TOKEN / GITHUB_TOKEN | env only | unset | Both | GitHub token, in priority order. Tokens stay in env, never in .octocoderc. |
GITHUB_API_URL | github.apiUrl | https://api.github.com | Both | API endpoint; use /api/v3 for GitHub Enterprise. |
ENABLE_LOCAL | local.enabled | CLI true, MCP false | Both | Turns local filesystem + LSP tools on/off. |
ENABLE_CLONE | local.enableClone | CLI true, MCP false | Both | ghCloneRepo and directory fetch. Default differs by surface; set false to disable in either. |
WORKSPACE_ROOT | local.workspaceRoot | cwd | Both | Absolute root for resolving relative local paths. |
ALLOWED_PATHS | local.allowedPaths | [] | Both | Extra path allowlist for local access; empty means home directory only after validation. |
TOOLS_TO_RUN / ENABLE_TOOLS / DISABLE_TOOLS | tools.* | unset | **MCP** | Whitelist, add to, or remove from the registered tool set. The CLI exposes every tool. |
REQUEST_TIMEOUT | network.timeout | 30000 | Both | Request timeout in ms (clamped 5000..300000). |
MAX_RETRIES | network.maxRetries | 3 | Both | Retry attempts (clamped 0..10). |
OCTOCODE_OUTPUT_FORMAT | output.format | yaml | Both | Response format: yaml or json. |
Local and clone defaults differ by surface. The CLI honorsENABLE_LOCALand defaults local tools on; clone is enabled by default. The MCP server honorsENABLE_LOCALand defaults local tools and clone off, so a deployment can control what an assistant may touch. Explicit env or.octocodercvalues override those defaults.
npx octocode auth login
npx octocode status # verify the active token source
Octocode stores OAuth credentials 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.
Security tip: 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, 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-vscode](https://github.com/bgauryy/octocode/tree/main/packages/octocode-vscode) | octocode-mcp-vscode | VS Code extension: GitHub OAuth + multi-editor MCP install. |
---
npx octocode install
**CLI fast install:**
bash npx octocode
Authenticate GitHub when you want private repositories or higher API limits:
bash npx octocode auth login ```
高质量的开源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-21 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端