laf.watch
Officiallaf-mcp-template
将本公司服务连接到 LAF 机器人 的 MCP 服务器起点。 契约只有 mcp-contract.md 一页,本仓库是该契约的可执行最小实现 + 提交前 检查器 + CI。
点击 Use this template 按钮创建本公司仓库,只需填写 collectSignals() 一个函数,
标准工具 laf.watch 即告完成。
开始
bun install
bun start # http://127.0.0.1:8765/mcp
bun run check # 제출 전 검사 — 등록 화면과 같은 질문을 CI에서 미리远程服务器检查使用 bun laf-mcp-check.ts <url> [--token <bearer>] [--json]。
Related MCP server: wrg-mcp-server
填写顺序
collectSignals()— 只放"一旦停止就会出大事"的内容。这不是遥测, 而是值班清单。阈值判定(从多少个开始算warn)必须在服务器端 完成,并以status输出。即使后端宕机,也要用信号而非协议错误 来响应(契约 §1.2)。添加自由工具 — 按想让机器人执行的任务为单位,建议不超过 10 个工具。每个工具 都要声明 MCP 标准注解(契约 §2)。没有注解的工具在 注册时会被视为最高风险(destructive),机器人实际上无法使用。 写工具一开始就不要创建,先用只读方式跑一周,之后只添加 确实需要的那些,这样反而更快。
通过检查 — 直到
bun run check的 FAIL 为 0。附带的 GitHub Actions 工作流会在每次推送时运行相同的检查。部署 — 部署到本公司基础设施。代码审查、密钥管理、可用性由本公司负责, 平台只接收 URL 和 Bearer 令牌。
注册 — 在 LAF 管理界面注册 URL 后,平台会 定期轮询
laf.watch(无需模型,纯代码执行),只将信号的 出现、消失、转移生成为事件。自由工具在机器人对话中按风险声明执行 — 读取静默执行,破坏性、外发、涉及金钱的操作等待人工批准。
禁止事项
将阈值判定推给平台 —
status必须在服务器端确定。将后端故障作为协议错误输出 — 用信号响应。
省略注解 — 全部会被视为 destructive。
注册后下调注解 — 会被视为权限提升,自动触发停止 + 重新同意。
文件
文件 | 用途 |
| 参考服务器(约 100 行)。无状态 Streamable HTTP — 重启不会丢失任何内容 |
| 提交前检查器。与注册界面相同的问题 — 从 LAF-labs/openbot 原样引入的文件,请勿直接修改 |
| 启动服务器并运行检查器的 CI |
MIT — LICENSE。
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
MCP server for CertScore.ai public website risk-signal workflows.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn AppSec-focused MCP server that performs static analysis scans on C/C++ source code for memory-safety vulnerabilities and parses compiled PE/ELF binary headers locally to audit active defensive compiler mitigations (ASLR, DEP/NX, PIE).41MIT
- AlicenseNot gradedqualityAmaintenanceAn MCP server that exposes a 60+ tool security and threat-intel stack to AI agents, enabling secret scanning, Sigma rule generation, ransomware lookup, OSINT, and deep research.1MIT
- AlicenseNot gradedqualityCmaintenanceA plug-and-play MCP server that adds zero-boilerplate tools like file search, reliability scoring, and prompt injection detection to any MCP-compatible agent.MIT
- AlicenseNot gradedqualityBmaintenanceAI code reviews and git activity digests with machine-readable risk scoring, available as an MCP server for use within an agent session.1MIT