返回文档

Mqttable MCP 的 Agent 快速开始

Agent 发现 Mqttable 运行时、读取 schema、规划动作并验证结果的最短路径。

2026年6月24日Mqttable 工程团队Mqttable 工程团队

Agent 应该把 Mqttable 当成一个活的工具,而不是一堆静态文档。先发现运行时,再问 catalog 可以安全做什么。

Interactive diagram

Agent 路径:commands、runtime info、doctor、schema、plan、confirm、apply、verify。

交互图占位。等图生成后,用正式交互组件替换这里。

placeholder

先发现运行时

  • bin/mqttable-cli commands --json 查看本地 CLI catalog。
  • bin/mqttable-cli runtime info --json 查看 CLI 实际会使用哪个运行时。
  • bin/mqttable-cli doctor --json 解释缺失或过期的运行时上下文。
  • bin/mqttable-cli mcp client-config --json 在 runtime info 新鲜时输出带 authorization header 的客户端配置。

先读 schema,再写 payload

Agent 不应该猜 JSON。构造输入前,用 get_mqttable_schema 读取 action、workflow 或 resource 契约。需要具体调用示例时,再用 get_mqttable_example

写操作只走 plan

Broker 变更、Connection 变更、publish、Benchmark run、Proxy toxic、TLS binding 和 report persist 都应该走 plan_mqttable_action。Apply 阶段只接受 plan_idconfirmation.confirmation_token

每次写完都重读

最后一步不是“完成”。最后一步是 verify_mqttable_plan,以及 Agent 需要展示给人的任何 resource read。