Skip to main content
Glama
LAF-labs
by LAF-labs

laf-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

填写顺序

  1. collectSignals() — 只放"一旦停止就会出大事"的内容。这不是遥测, 而是值班清单。阈值判定(从多少个开始算 warn)必须在服务器端 完成,并以 status 输出。即使后端宕机,也要用信号而非协议错误 来响应(契约 §1.2)。

  2. 添加自由工具 — 按想让机器人执行的任务为单位,建议不超过 10 个工具。每个工具 都要声明 MCP 标准注解(契约 §2)。没有注解的工具在 注册时会被视为最高风险(destructive),机器人实际上无法使用。 写工具一开始就不要创建,先用只读方式跑一周,之后只添加 确实需要的那些,这样反而更快。

  3. 通过检查 — 直到 bun run check 的 FAIL 为 0。附带的 GitHub Actions 工作流会在每次推送时运行相同的检查。

  4. 部署 — 部署到本公司基础设施。代码审查、密钥管理、可用性由本公司负责, 平台只接收 URL 和 Bearer 令牌。

  5. 注册 — 在 LAF 管理界面注册 URL 后,平台会 定期轮询 laf.watch(无需模型,纯代码执行),只将信号的 出现、消失、转移生成为事件。自由工具在机器人对话中按风险声明执行 — 读取静默执行,破坏性、外发、涉及金钱的操作等待人工批准。

禁止事项

  • 将阈值判定推给平台 — status 必须在服务器端确定。

  • 将后端故障作为协议错误输出 — 用信号响应。

  • 省略注解 — 全部会被视为 destructive。

  • 注册后下调注解 — 会被视为权限提升,自动触发停止 + 重新同意。

文件

文件

用途

index.ts

参考服务器(约 100 行)。无状态 Streamable HTTP — 重启不会丢失任何内容

laf-mcp-check.ts

提交前检查器。与注册界面相同的问题 — 从 LAF-labs/openbot 原样引入的文件,请勿直接修改

.github/workflows/check.yml

启动服务器并运行检查器的 CI

MIT — LICENSE

A
license - permissive license
Not graded
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    An 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).
    4
    1
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    An 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.
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Scans MCP servers for tool poisoning, prompt injection and supply chain risks.

  • MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.

  • MCP server for Pentest-Tools.com: run scans, manage findings and reports via your preffered LLM.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LAF-labs/laf-mcp-template'

If you have feedback or need assistance with the MCP directory API, please join our Discord server