MCP Server plugin
Enables recording Codex tool failures as redacted .tape evidence, inspecting captured runs, injecting failure conditions, and saving offline regression tests.
README
AgentTape
Turn one failed Codex run into a portable regression test.
AgentTape is an open-source, local-first Codex plugin that records supported tool failures as redacted, versioned .tape evidence. Inspect what failed, fork the captured run at a controlled boundary, and save the result as an offline regression test that can run in CI without another model call.
Most trace tools help you observe a failure. AgentTape is built to turn that failure into a small, reviewable artifact that prevents the same bug from returning.
Codex tool failure
↓
redacted .tape evidence
↓
inspect → inject one condition → compare branches
↓
save assertions → run offline in CI
Why AgentTape
- Failure artifact, not another dashboard. A
.tapeis portable evidence you can inspect, review, share, and commit with a bug fix. - Codex-native capture. Bundled hooks record supported lifecycle, permission, and tool events after the user reviews and trusts them—no application instrumentation required.
- Local and privacy-conscious. Runtime captures stay inside the active project, and common secret-bearing fields are recursively redacted before export.
- Controlled failure injection. Fork recorded evidence with permission-denied, timeout, malformed-JSON, or truncated-response results.
- Offline regression tests. Structural replay and assertions use captured evidence with zero model calls and zero live tool calls.
- Honest replay confidence. AgentTape reports coverage and limitations instead of claiming every external system can be reproduced bit for bit.
Install from GitHub
Prerequisites: Codex and Node.js 20 or newer.
codex plugin marketplace add jiangkoumo/agenttape
codex plugin add agenttape@agenttape
Start a new Codex task after installation and review the bundled hooks before trusting them. Captures are then stored under the active project's .agent-tape/ directory.
Two-minute workflow
First, use Codex normally until a supported local tool call fails. Then ask:
Use tool search to find AgentTape. List captured runs, inspect the latest
failed run, and explain the first recorded failure and replay confidence.
AgentTape exposes four MCP tools:
| Tool | Purpose |
|---|---|
list_tapes |
Find valid captures in the active workspace |
inspect_tape |
Inspect events, failures, redaction, and replay confidence |
fork_run |
Inject one supported failure condition at a recorded boundary |
save_regression |
Save reviewed assertions under tests/agenttape/ |
Run a saved regression locally or in CI:
node plugins/agenttape/scripts/agenttape.mjs test \
tests/agenttape/fixture_permission_denied-timeout.tape
Passing assertions exit with code 0. Validation or assertion failures exit nonzero, and captured comparison values are omitted from failure output.
What a .tape captures
Tape v1 keeps the evidence needed for structural debugging:
- Run identity, timestamps, source coverage, and explicit limitations.
- Ordered lifecycle, permission, and supported local tool events.
- Tool inputs, outputs, explicit failures, and the first failure boundary.
- A redaction manifest that records where values were removed.
- Optional fork metadata, injected conditions, and structural assertions.
- Replay-confidence inputs so consumers can distinguish strong evidence from playback-only traces.
The tape schema is independent from the UI and recorder implementation. See Tape Schema v1.
Regression assertions
AgentTape currently supports deterministic checks for:
- A field equals an expected value.
- A tool is present or absent.
- Retry count stays below a maximum.
- The final run status matches the expected status.
- Replay confidence meets a minimum threshold.
Reviewed regression artifacts are written under tests/agenttape/ and are not overwritten by default.
Replay boundaries
AgentTape currently provides structural replay, not full agent re-execution. It reuses captured state, substitutes one recorded tool result, and stops at the injected boundary. It does not regenerate downstream model reasoning.
Hosted tools, uncaptured external state, and changes in third-party systems may be absent. A redaction marker proves that AgentTape's redactor ran; it cannot prove arbitrary free-form text contains no secret. Review every .tape before sharing it.
See Privacy and Security for the complete trust boundary.
Repository layout
plugins/agenttape/
.codex-plugin/plugin.json # Codex plugin manifest
hooks/hooks.json # Recorder lifecycle hooks
skills/capture-failure/ # Guided capture workflow
dist/mcp-server.mjs # Self-contained bundled MCP server
scripts/ # Recorder, schema, and assertion CLI
schemas/ # Versioned .tape schema
The repository also contains an optional Branch Canvas prototype under src/ and an experimental stateless HTTP MCP under remote/. They exercise the same tape and replay concepts but are not required to install or use the Codex plugin.
Local development
git clone https://github.com/jiangkoumo/agenttape.git
cd agenttape
npm ci
npm run test:plugin-release
npm run build:plugin
codex plugin marketplace add .
codex plugin add agenttape@agenttape
The committed plugins/agenttape/dist/mcp-server.mjs allows marketplace installs to run without building the repository. Rebuild and commit it whenever MCP source changes.
Run npm test and npm run build when changing the optional Branch Canvas, Sites adapter, or remote HTTP MCP surfaces.
Uninstall
codex plugin remove agenttape@agenttape
codex plugin marketplace remove agenttape
Contributing
Issues and pull requests are welcome. See Contributing, Code of Conduct, and Changelog.
License
MIT. See LICENSE.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。