经 AI Skill Hub 精选评估,Zap MCP工具 获评「推荐使用」。这款MCP工具在功能完整性、社区活跃度和易用性方面表现出色,AI 评分 7.5 分,适合有一定技术背景的用户使用。
Zap MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
Zap MCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/sanjeev23oct/zap
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"zap-mcp--": {
"command": "npx",
"args": ["-y", "zap"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 Zap MCP工具 执行以下任务... Claude: [自动调用 Zap MCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"zap_mcp__": {
"command": "npx",
"args": ["-y", "zap"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效
An AI coding agent built in Rust — skill-first context injection, a hard security boundary, and a single binary with no runtime.
╭────────────────────────────────────────────────────────────────────╮
│ │
│ _____ _ ___ │
│ ___/ /_\ | _ \ fast AI coding agent v0.12.5 │
│ / / _ \ | _/ │
│ /_____ /_/ \_\ |_| │
│ │
├──────────────────────────────────────┬─────────────────────────────┤
│ model claude-sonnet-4-6 │ Tips for getting started │
│ backend Anthropic API │ Tab ↑↓ autocomplete │
│ mode ask │ / commands │
│ │ /provider switch LLM │
│ ~/my-project │ /help all commands │
╰──────────────────────────────────────┴─────────────────────────────╯
---
We ship small, reversible changes. Every PR needs a test. No console.log in prod.
**Where to put them:**
| Path | Scope | Priority |
|---|---|---|
| `.zap/skills/` | project — check into git, team-shared | highest |
| `~/.zap/skills/` | personal — all projects | middle |
| binary | built-in defaults | lowest |
On first launch zap writes all built-in skills to `~/.zap/skills/` automatically — open any file there to read or edit it. Same-name files you create override the built-in version on the next run.
/skill list # see all skills with source and always-on/triggered label /skill show <name> # preview content + description + license /skill export <name> # re-export a built-in to ~/.zap/skills/ (if you deleted it) /skill export --all # re-export every built-in skill /skill create <name> # scaffold a new skill in .zap/skills/ /skill capture <name> # extract instructions from this session into a reusable skill ```
---
Order service — handles order lifecycle (create, fulfil, cancel).
Ship small. Write tests first. No magic numbers. Document the why, not the what.
**Where to place skills:**
~/.zap/skills/ personal, applies to all projects ← written here on first launch .zap/skills/ project-local, check into git for team sharing
On first launch zap writes all built-in skills to `~/.zap/skills/`. Open any file there, edit it, and your version takes effect on the next run. Files are never overwritten — only new ones are added when you update zap.
If you delete a file or want to reset a skill to its default, re-export it:
/skill export rust # restore rust.md from the built-in /skill export --all # restore every built-in skill /skill export rust --overwrite # force-overwrite even if the file exists
**All commands:**
/skill list list all skills (grouped: always-on / triggered) /skill show <name> preview content, description, license /skill log show which skills fired (or why they didn't) per turn this session /skill scope show which domain skills are active this session /skill scope add <name> add a skill to the active scope /skill scope remove <name> remove a skill from the active scope /skill scope reset restore default scope /skill export <name> re-export a built-in to ~/.zap/skills/ /skill export --all re-export every built-in skill /skill create <name> scaffold a new skill in .zap/skills/ /skill create <name> --global scaffold in ~/.zap/skills/ /skill capture <name> extract rules from this session into a skill file /skill capture <name> --global save captured skill globally
**Skill trace** — `/skill log` lets you audit which skill fired (or didn't) for every turn this session. If a skill you expected to fire didn't, the log shows "no match" or "casual" with the turn preview so you can tune the trigger keywords:
turn #3 "refactor the async fn to use channels" → rust, karpathy-guidelines turn #4 "commit these changes" → git, karpathy-guidelines turn #5 "hey thanks" → (casual) turn #6 "add an endpoint for POST /users" → (no match) ← missing api-conventions skill? ```
Same-name skills override lower-priority ones: .zap/skills/ > ~/.zap/skills/ > built-in.
---
Order service — handles order lifecycle (create, fulfil, cancel). Publishes events to Kafka on state transitions.
| **TUI** | Ratatui terminal UI — streaming output, sidebar with token counts, diff viewer (Ctrl+G), file browser (Ctrl+F), syntax highlighting |
| **Providers** | LM Studio, Ollama, Anthropic, OpenAI, Gemini, DeepSeek, Groq, Mistral, xAI, Together AI, Perplexity, Cohere + any OpenAI-compatible endpoint; per-provider settings persisted in ~/.agent.toml |
| **Tools** | 15 built-in — read, edit, write, batch-edit, undo, shell, search, glob, code-map, find-def, find-refs, web-fetch, web-search, spawn-agent |
| **Languages** | AST index: Rust, Python, TypeScript, JavaScript, Go, Java |
| **Code quality** | /index quality — god objects, coupling, dead code candidates, quality score (0–100); reference counts computed in one O(source-size) pass |
| **Index usage logging** | Every tool call answered by the AST index is logged to ~/.zap/zap.log and audit.jsonl — hit/miss per turn, auditable |
| **Permission modes** | ask (grouped prompt per destructive op), auto (approve all), deny (fully read-only); "always" grant auto-approves a tool class for the session |
| **Skills** | 23 built-in; always-on + keyword-triggered; user skills in ~/.zap/skills/ or .zap/skills/; SKILL.md standard compatible with Claude Code and Cursor |
| **Skill trace** | /skill log — see which skills fired (or why they didn't) for every turn this session |
| **Skill capture** | /skill capture <name> — extract session rules into a reusable skill file |
| **Skill scope** | /skill scope — pin or restrict which domain skills are active for a session without editing files |
| **Deploy** | /deploy — builds and installs zap with live streamed output; no shell timeout |
| **Context mgmt** | Skill injection, casual-turn optimization (~20 tokens for greetings), sliding history window, tool-result pruning, /compact in-place summarisation, Anthropic prompt caching |
| **Project init** | /init — auto-detects stack, indexes codebase, and generates ZAP.md + .zap/understanding.md filled with project-specific architecture, build commands, and constraints; ~30 seconds to full context awareness |
| **Project intelligence** | .zap/context.md session handoff (last goal, files touched, what's next); .zap/understanding.md LLM-maintained project knowledge; .zap/session_log.md session history — read on demand, not pre-loaded |
| **Sessions** | Every conversation persisted; /sessions fuzzy picker to resume any |
| **Branching** | /branch forks a conversation like a git branch; /switch to move between them |
| **Sub-agents** | spawn_agent runs parallel sub-agents with their own tool loop; multiple spawns in one turn run in parallel |
| **Autonomous loop** | /goal <condition> runs turns automatically until the model signals done or a turn limit is reached |
| **Extended thinking** | /think [on\|off\|N] — Anthropic extended thinking with configurable token budget |
| **MCP (lazy-loaded)** | Standard .mcp.json format — works in Claude Code, Cursor, Kiro; servers connect on demand, zero cost until first use |
| **Workflows** | Declarative YAML multi-step pipelines in .zap/workflows/ — versioned with your repo |
| **Hooks** | PreToolUse / PostToolUse / SessionStart / SessionEnd / UserPromptSubmit — shell commands that run on agent events |
| **Remote control** | /remote starts a local HTTP server + public tunnel; drive the session from any browser or phone |
| **Images** | /attach <path> or /paste clipboard — multimodal on supported models |
| **Audit log** | Every tool call written to ~/.zap/audit.jsonl |
| **Secret scanner** | 25+ patterns — Anthropic/OpenAI/Stripe keys, GitHub/GitLab tokens, AWS/GCP credentials, private keys, JWTs, generic password/api_key/secret fields — blocked before sending to any cloud LLM |
| **Cost display** | Token breakdown per turn — skills, message, context, estimated $ |
---
Scenario: You need to add a GET /orders/{id}/history endpoint to the existing order service.
Without zap (what most agents do): the agent creates src/main/java/.../controller/HistoryController.java, src/main/java/.../service/HistoryService.java, src/main/java/.../repository/HistoryRepository.java — duplicating the structure that already exists, ignoring the patterns already in use.
With zap:
"add a GET /orders/{id}/history endpoint that returns the state change log"
→ java skill fires
→ index query: WHERE name LIKE '%Order%' AND kind = 'class'
finds: OrderController, OrderService, OrderRepository, OrderHistory (entity — already exists!)
→ index query: WHERE name LIKE '%Repository%' AND kind = 'interface'
finds: OrderRepository extends JpaRepository<Order, Long> — this is the pattern to follow
→ index query: WHERE path LIKE '%controller%' ORDER BY line
finds: all existing controllers — sees they all extend BaseController, use @RestController
zap: OrderHistory entity already exists at OrderHistory.java:12.
I'll add a findByOrderId() method to OrderRepository, a getHistory() method
to OrderService, and a new endpoint to OrderController — no new files needed.
Shall I proceed?
One file touched in OrderController, one method added to OrderRepository, one to OrderService. No duplicate classes. Follows the existing JpaRepository pattern. Uses BaseController like every other controller.
This is the core difference. The agent knew what existed before it decided what to create.
---
- Pagination test for edge case: empty cursor on last page - Consider splitting OrderService (34 methods — see /index quality output) ```
Tomorrow's session picks this up automatically. No re-explaining. No lost context.
---
mvn clean install mvn test mvn spring-boot:run
| Platform | Status |
|---|---|
| macOS ARM (Apple Silicon) | Available |
| Windows x86_64 | Available |
| macOS Intel | Coming soon |
| Linux x86_64 | Coming soon |
Requires Rust 1.75+.
git clone https://github.com/sanjeev23oct/zap
cd zap
cargo build --release
cp target/release/zap ~/.local/bin/zap
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc
---
mvn clean install # full build mvn test # unit tests only mvn spring-boot:run # local dev server on :8080
zap # interactive REPL
zap --goal "add tests for src/lib.rs" # single-shot
zap --goal "..." --output-format json # JSON output (for piping)
zap --auto --goal "..." # skip all permission prompts (CI)
zap --sdk # JSON-lines remote control (stdin/stdout)
```yaml
- name: AI code review
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
run: |
zap --auto --goal "read the changed files, add docstrings where missing, and commit"
---
import subprocess, json
proc = subprocess.Popen(
["zap", "--sdk"],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
env={**os.environ, "ANTHROPIC_API_KEY": "sk-ant-..."},
)
def ask(prompt: str) -> dict:
proc.stdin.write(json.dumps({"type": "user", "text": prompt}).encode() + b"\n")
proc.stdin.flush()
return json.loads(proc.stdout.readline())
reply = ask("add input validation to src/api.rs")
print(reply["text"])
proc.stdin.write(b'{"type":"quit"}\n')
proc.stdin.flush()
proc.wait()
---
All settings live in ~/.agent.toml. Environment variables always take precedence.
Use /provider inside zap to switch interactively — settings are saved automatically per provider, so switching back restores your previous key and model.
```toml
AGENT_PROVIDER=anthropic \
AGENT_API_KEY=sk-ant-... \
AGENT_MODEL=claude-sonnet-4-6 \
zap
ANTHROPIC_API_KEY and OPENAI_API_KEY are also read automatically.
---
--sdk turns zap into a JSON-lines server — stdin carries prompts, stdout carries responses. It keeps session state across turns, so context accumulates.
zap --sdk # stdin → stdout, --auto implied, no banner
Declarative multi-step pipelines in .zap/workflows/<name>.yaml. Run with /run <name>.
name: ship-feature
description: Review → test → commit → changelog
steps:
- prompt: "Review all staged changes and flag anything blocking"
requires_approval: true
- skill: test-runner
prompt: "Run the test suite, fix any failures"
- prompt: "Commit with a conventional commit message"
- prompt: "Append a one-line entry to CHANGELOG.md"
---
AGENT_PERMISSION_MODE=auto zap --goal "run cargo test and fix any failures" ```
zap 是一款基于 Rust 开发的高性能 AI coding agent。它采用了“技能优先”的上下文注入机制,并构建了严格的安全边界。作为一个无需运行时的单二进制文件,zap 能够以极快的速度响应开发需求。其核心设计理念强调小步快跑、可逆变更,并严格遵循工程化原则,确保每一次 PR 都经过测试,且生产环境中绝不出现 console.log。
zap 提供功能丰富的 TUI 终端界面,支持流式输出、Token 计数侧边栏、Diff 查看器(Ctrl+G)以及文件浏览器(Ctrl+F)。在模型支持方面,它兼容 Anthropic、OpenAI、Gemini、DeepSeek、Groq、Mistral 等主流 Provider,并支持任何 OpenAI-compatible 接口。通过 ~/.agent.toml 进行持久化配置,内置了 15 种强大的 Tools 供开发者调用。
使用 zap 需要具备相应的环境依赖:本地文件读写功能需要安装 Node.js;若需使用 fetch 功能将 URL 转换为 Markdown 格式,则需要安装 Python 及 uv 工具。此外,由于 zap 涉及文件系统操作,请确保运行环境具备必要的读写权限。
目前 zap 已支持 macOS ARM (Apple Silicon) 和 Windows x86_64 平台,Linux x86_64 及 macOS Intel 版本即将推出。用户可以直接下载二进制文件使用,也可以通过 Rust 源码进行构建:通过 git clone 项目仓库后,使用 cargo build --release 命令进行编译,并将生成的二进制文件移动至 ~/.local/bin 目录下,最后配置 PATH 环境变量即可完成安装。
zap 支持多种交互模式:直接运行 `zap` 进入交互式 REPL 模式;使用 `zap --goal "..."` 执行单次任务指令;若需将结果用于管道处理,可使用 `--output-format json`;在 CI/CD 环境中,可以使用 `zap --auto` 跳过所有权限确认提示。此外,`zap --sdk` 模式允许通过 JSON-lines 进行远程控制。
所有的配置信息均存储在 ~/.agent.toml 文件中。为了保证灵活性,环境变量的优先级始终高于配置文件。你可以通过在 zap 内部输入 `/provider` 命令来交互式地切换模型和 API Key,设置会自动按 Provider 进行持久化保存。同时,系统也支持通过 AGENT_PROVIDER 和 AGENT_API_KEY 等环境变量进行临时覆盖。
通过添加 `--sdk` 参数,zap 可以切换为 JSON-lines 服务器模式。在这种模式下,stdin 用于接收 Prompt,stdout 用于输出响应。该模式的核心优势在于能够跨回合保持 Session 状态,使上下文信息能够持续累积,非常适合集成到其他自动化工具或自定义开发流程中。
zap 支持通过 `.zap/workflows/` 目录下的 YAML 文件定义声明式的多步骤流水线。你可以编写包含 Review、test、commit 及 changelog 等步骤的工作流,并通过 `/run <name>` 命令触发执行。工作流支持设置 `requires_approval` 参数,在关键步骤(如执行测试或提交代码)前请求人工确认,实现 AI 与人工的完美协作。
高质量的AI编码辅助工具
该工具未明确声明开源协议,商业使用前请联系原作者确认授权范围,避免侵权风险。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
AI Skill Hub 点评:Zap MCP工具 的核心功能完整,质量良好。对于Claude Desktop / Claude Code 用户来说,这是一个值得纳入个人工具库的选择。建议先在非生产环境试用,再逐步推广。
| 原始名称 | zap |
| 原始描述 | 开源MCP工具:1. Skill-First Approach — Context That Earns Its Place Most AI coding agents fro。⭐7 · Rust |
| Topics | mcpai-agentrust |
| GitHub | https://github.com/sanjeev23oct/zap |
| 语言 | Rust |
收录时间:2026-05-25 · 更新时间:2026-05-26 · License:未公布 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端