ai-verify-mcp AGENTS.md

A set of instructions for AI agents working on ai-verify-mcp, an MCP server with browser-based tools for testing and checking websites. It describes the project structure, coding rules, and security requirements.

In plain words
What is it for?
It guides work on browser verification, debugging, automated fixes, schemas, handlers, reports, tests, and Playwright-based browser support.
Why use it?
It gives agents the project conventions they need to make compatible changes and avoid exposing passwords, tokens, or cookies.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/validpilot/ai-verify-mcp/agents-md
Clone the repo
git clone --depth 1 https://github.com/validpilot/ai-verify-mcp

Made for: Codex, OpenCode.

Per session 1,993 This file is loaded in full into every session.
When invoked 1,993 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.01993 $0.01993
Opus 5 $0.00996 $0.00996
Sonnet 5 $0.00399 $0.00399
Haiku 4.5 $0.00199 $0.00199

Measured 2d ago against content hash 9293e4b51ec5, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ai-verify-mcp AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 190 lines

How it starts

The opening of the file, as written. The whole thing — 190 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AI 代理指南

本文档为在 ai-verify-mcp 项目上工作的 AI 编程代理(Claude、Cursor、Trae、Copilot 等)提供指导。

项目概述

ai-verify-mcp 是一个 MCP(模型上下文协议)服务器,为 AI 代理提供 136 个浏览器验证工具(v1.9.3)。它使 AI 代理能够通过标准化的 MCP 接口执行端到端的 Web 验证、调试和自动化修复。

核心技术栈:Node.js + Playwright + @modelcontextprotocol/sdk

架构

server.js                    # 主 MCP 服务器(所有工具处理器位于 switch 语句中)
tools/                       # 136 个 JSON schema 文件(每个工具一个)
handlers/                    # 工具处理器实现(browser/security/validation/exploration 等)
engines/                     # Playwright / Chrome 适配器引擎
core/                        # 核心工具(产物、配置、安全、脱敏、报告)
hands/                       # 高级操作器(browser_operator、evidence_collector、verification_runner)
brain/                       # AI 逻辑(error_aggregator)
rules/                       # 验证规则(suggested-rules.json)
docs/                        # 用户文档
examples/                    # 演示示例
bin/                         # CLI 入口点
test/                        # 单元测试(npm test 运行)
test-reports/                # 测试报告(含 v1.8.0 全量测试报告)

核心约定

  1. 工具 schema 与实现必须完全匹配tools/*.json 中的每个工具在 server.js 的 switch 语句中都必须有对应的处理器。参数、类型和描述必须保持一致。

  2. 安全第一 — 切勿在工具输出中暴露 API 密钥、令牌、密码或 Cookie。使用 core/redaction.js 中的脱敏工具。browser_eval 工具存在已知安全风险,需要仔细进行输入验证。

  3. 敏感数据脱敏 — 所有可能包含敏感数据的工具输出(Cookie、存储、带认证头的网络响应)在返回给 MCP 客户端之前必须经过脱敏处理。

  4. 错误处理 — 禁止空 catch 块。始终记录错误。HTTP 服务器未经认证不得暴露于公共网络。

  5. 会话管理 — 浏览器会话必须能够完全关闭,以防止资源泄漏。池操作必须处理竞态条件以确保线程安全。

  6. 日志数组边界控制 — 日志数组必须有大小限制,以防止内存泄漏。

  7. Schema 命名 — 使用 inputSchema(驼峰命名),而非 input_schema(下划线命名),以与 MCP SDK 约定保持一致。

  8. CLI 参数 — 对于敏感配置,优先使用环境变量而非命令行参数。

代码风格

  • 所有 JS 文件顶部使用 'use strict';
  • 2 空格缩进
  • 字符串使用单引号
  • 行尾不使用分号? — 不,使用分号(参见现有代码)
  • 优先使用 const > let > var
  • 所有异步操作使用 async/await

添加新工具

  1. 创建 tools/<tool_name>.json,包含完整的 JSON schema(name、description、inputSchema)
  2. 将工具对象添加到 server.jstools 数组中
  3. 在工具处理器 switch 语句中添加 case '<tool_name>': 代码块
  4. 更新 README.md 和 docs/USER-MANUAL.md 中的工具数量
  5. 如适用,添加测试或验证脚本
  6. 更新 CHANGELOG.md

Read the full file on GitHub · 190 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 190 lines · 1,993 tokens per session scan A 9293e4b51ec5

Subscribe to this mod's changes

ai-verify-mcp AGENTS.md is an instructions file published in the GitHub repository validpilot/ai-verify-mcp (0 stars, last pushed 24d ago), licensed MIT. It adds 1,993 tokens to every session, about $0.0100 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.