AI Skill Hub 推荐使用:开源MCP工具 是一款优质的MCP工具。AI 综合评分 7.5 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
🦀 Open-source alternative to Claude Code, built from scratch in Rust。提供了一个开源的MCP工具,用于替代Claude Code,使用Rust语言开发。
开源MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
🦀 Open-source alternative to Claude Code, built from scratch in Rust。提供了一个开源的MCP工具,用于替代Claude Code,使用Rust语言开发。
开源MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/lingcoder/crab-code
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"--mcp--": {
"command": "npx",
"args": ["-y", "crab-code"]
}
}
}
# 配置文件位置
# 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", "crab-code"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
<img src="assets/logo-horizontal.svg" width="360" alt="Crab Code" />
Open-source alternative to Claude Code, built from scratch in Rust.
English | 中文
</div>
---
Active Development — 4900+ tests · 27 crates · ~158k LOC
Crab Code is a Rust-native agentic coding CLI. It aligns with Claude Code's toolset, permission model, and interaction patterns while supporting any LLM provider (Anthropic / OpenAI / DeepSeek / Bedrock / Vertex).
cargo build --workspace
cargo nextest run --workspace # or: cargo test --workspace
cargo clippy --workspace -- -D warnings
git clone https://github.com/lingcoder/crab-code.git && cd crab-code
cargo build --release
export ANTHROPIC_API_KEY=sk-ant-...
./target/release/crab # Interactive TUI
./target/release/crab "explain this codebase" # Single-shot
./target/release/crab -p "fix the bug" # Non-interactive
See crab --help for more. Config lives at ~/.crab/config.toml (snake_case TOML); the full loading & merge spec is in docs/config-design.md.
Config sources, low → high priority:
defaults < plugin < user < project < local < --config <file> (file layer)
<
env < CLI flag (runtime layer)
~/.crab/config.toml (or $CRAB_CONFIG_DIR/config.toml)$PWD/.crab/config.toml (committed)$PWD/.crab/config.local.toml (gitignored)--config <path>: CLI-injected file-c key.path=value: dotted runtime override (TOML grammar; repeatable)Example config.toml:
api_provider = "deepseek"
base_url = "https://api.deepseek.com/v1"
model = "deepseek-chat"
api_key = "sk-..." # optional; env wins if both set
[permissions]
allow = ["Bash(git:*)", "Read", "Edit"]
deny = ["Bash(rm:*)"] # deny always wins over allow
Env (runtime layer) always wins over file. Mutually-exclusive variants apply highest-first.
| Category | Variable | Purpose |
|---|---|---|
| Provider | CRAB_API_PROVIDER | Override provider: anthropic, openai, deepseek, bedrock, vertex, custom |
| Provider | CRAB_API_KEY | Universal API key (any provider; highest priority) |
| Provider | CRAB_MODEL | Override model name |
| Provider | CRAB_BASE_URL | Universal base URL override |
| Provider | CRAB_CONFIG_DIR | Relocate config root (default ~/.crab/) |
| Provider | ANTHROPIC_API_KEY / ANTHROPIC_AUTH_TOKEN | Anthropic provider only |
| Provider | ANTHROPIC_BASE_URL | Anthropic base URL (only when CRAB_API_PROVIDER=anthropic) |
| Provider | OPENAI_API_KEY | OpenAI provider |
| Provider | OPENAI_BASE_URL | OpenAI base URL (only when CRAB_API_PROVIDER=openai) |
| Provider | DEEPSEEK_API_KEY | DeepSeek provider |
| Provider | DEEPSEEK_BASE_URL | DeepSeek base URL (only when CRAB_API_PROVIDER=deepseek) |
| Bedrock | AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY | Static credentials |
| Bedrock | AWS_SESSION_TOKEN | Optional session token (temporary credentials) |
| Bedrock | AWS_REGION / AWS_DEFAULT_REGION | AWS region |
| Bedrock | AWS_ROLE_ARN | IAM role ARN to assume |
| Bedrock | AWS_WEB_IDENTITY_TOKEN_FILE | OIDC token file (web-identity role assumption) |
| Bedrock | AWS_EXTERNAL_ID | External ID for cross-account role assumption |
| Bedrock | AWS_ROLE_SESSION_NAME | Session name for assumed role |
| Vertex | GOOGLE_CLOUD_PROJECT / GCLOUD_PROJECT | GCP project ID |
| Vertex | GOOGLE_CLOUD_REGION | GCP region (default: us-central1) |
| Vertex | GOOGLE_APPLICATION_CREDENTIALS | Path to service account key JSON |
| Shell | CRAB_SHELL | Path to bash/zsh binary (overrides auto-detection for the Bash tool) |
| Shell | SHELL | POSIX fallback when CRAB_SHELL is unset |
| Shell | CRAB_USE_POWERSHELL_TOOL | Truthy value exposes the PowerShell tool on Windows (default off) |
| Agent | CRAB_COORDINATOR_MODE | 1 enables Agent Teams coordinator mode |
| Agent | CRAB_AUTO_DREAM | 1 enables background memory consolidation between sessions |
| Agent | CRAB_AUTO_DREAM_MIN_HOURS | Minimum hours between consolidations (default: 6) |
| Agent | CRAB_AUTO_DREAM_MIN_SESSIONS | Minimum sessions before consolidation triggers (default: 2) |
| TLS | CRAB_CA_BUNDLE | Path to custom CA certificate bundle (PEM) |
| TLS | SSL_CERT_FILE / SSL_CERT_DIR | Standard OpenSSL CA overrides |
| Crab Code | Claude Code | OpenCode | Codex CLI | |
|---|---|---|---|---|
| Open Source | Apache 2.0 | Proprietary | MIT | Apache 2.0 |
| Language | Rust | TypeScript | TypeScript | Rust |
| Models | Any provider | Anthropic | Any provider | OpenAI only |
| MCP | 3 transports | 6 transports | LSP | 2 transports |
该项目是一个开源的MCP工具,使用Rust语言开发,提供了一个替代Claude Code的解决方案。虽然项目质量较高,但仍需要进一步的测试和验证。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ Apache 2.0 — 宽松开源协议,可商用,需保留版权声明和 NOTICE 文件,含专利授权条款。
总体来看,开源MCP工具 是一款质量良好的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | crab-code |
| 原始描述 | 开源MCP工具:🦀 Open-source alternative to Claude Code, built from scratch in Rust. Agentic c。⭐69 · Rust |
| Topics | mcpagentagentic-codingaiai-agentai-codingrust |
| GitHub | https://github.com/lingcoder/crab-code |
| License | Apache-2.0 |
| 语言 | Rust |
收录时间:2026-06-09 · 更新时间:2026-06-09 · License:Apache-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端