kosa8 docs Dashboard
esc
↑ ↓ move↵ openRuns in your browser; nothing you type is sent anywhere.

CLI / mcp-policy / check

kosa8 mcp-policy check

Ask whether a scope may call a tool, and record the decision

Usage#

kosa8 mcp-policy check SERVER TOOL

Answers the same question the gateway asks before forwarding a call, and writes the same audit event, so a dry run and the real thing agree.

With --args the server's argument rules are applied to that JSON, as they would be to a real call; without it only the tool lists are consulted, so a tool whose rules depend on its arguments is reported as the lists see it.

Without --scope the policy's own default_scope applies. --scope is a what-if for admins reviewing another team's access; it is recorded in the event, and it does not change what the gateway enforces — scope assignment lives in the signed policy precisely so it cannot be picked locally.

Exits non-zero when the call would be denied, so CI can gate on it.

Options#

FlagTypeWhat it doesDefault
--actorstringwho is asking: human, agent or toolhuman
--argsstringthe call's arguments as JSON, to apply the server's argument rules as the gateway would—
--scopestringevaluate as this scope (default: the policy's default_scope)—

Example#

  kosa8 mcp-policy check github create_issue --scope eng
  kosa8 mcp-policy check github delete_repo --scope eng --actor ada@example.com

The kosa8 weekly

Agent security news, one industry deep-dive and a hands-on challenge, every Monday. Unsubscribe in one click.

© 2026 kosa8 · kosa8.com · Zero Trust cybersecurity infrastructure for AI agents · Local models served by llamay · Agent gateway: MAQPNA