Octri

mcp audit

按时间倒序列出代理尝试过的所有写入操作,无论是否获准:时间、工具和请求、结果,以及发起者。需要开启 Keep an audit log of writes,且条目保留时长取决于你的套餐。请参阅 审计日志。

bash
octri mcp audit [list | export] [filters]

标志

--tool <name>string

仅指定一个工具。

--outcome <outcome>string

仅指定一个结果:ok、error、declined、blocked 或 limited。

--source <source>string

仅指定一个来源:hosted、installation 或 self_hosted。

--who <identity>string

仅指定一个用户或安装。

--from <date>string

从此日期或时间开始。仅填写日期(例如 2026-11-01)时,起始时间为 UTC 午夜。

--to <date>string

截至此日期或时间。仅填写日期时,会包含 UTC 时间的整天。

--limit <n>number默认值:50

列出的条目数,上限为 200。

--cursor <id>string

下一页的起始位置,即上一页的最后一条记录。

octri mcp audit export

保存所有匹配的条目,参数已完成脱敏。支持相同的筛选条件。

标志

--format <format>string默认值:csv

csv 或 json。

--out <path>path默认值:the current folder

文件名,或用于保存文件的文件夹。

示例

本月被拒绝的写入操作

bash
octri mcp audit --outcome declined --from 2026-11-01
Output
✔ Loading the audit log

MCP audit log (3, kept 90 days)
  WHEN    TOOL              REQUEST           OUTCOME   WHO
  ──────  ────────────────  ────────────────  ────────  ──────
  5d ago  createCustomer    POST /customers   declined  hosted
  5d ago  createCustomer    POST /customers   declined  hosted
  5d ago  createCustomer    POST /customers   declined  hosted

导出以供审核

bash
octri mcp audit export --format csv --out audit.csv
Output
✔ Exporting the audit log
✔ Saved ./audit.csv (3.0 KB)
  • octri mcp permissions:查看并设置代理对每个工具的操作权限:自动、确认或关闭。
  • octri mcp calls:列出最新的工具调用,包括使用的工具、调用时间和结果。