Problem
PAGS has strong audit posture for its own MCP server, but outbound generic MCP calls are not yet first-class in observability. For an MCP-agent that can operate external apps, users and admins need to answer:
- which MCP endpoint was called?
- which remote tool was invoked?
- what consent/auth path allowed or denied it?
- did the remote call succeed, fail, timeout, or request more input?
- were arguments/results redacted safely?
Without this, MCP agents are difficult to trust and debug.
Expected behavior
Every outbound MCP action should emit structured, redacted events suitable for user-visible history and admin diagnostics. Connection setup should also have diagnostics for auth discovery, protocol negotiation, tools/list, and failed calls.
Acceptance criteria
mcp_list_tools and remote tool calls log endpoint/connection id, method, remote tool name where applicable, status, duration, and failure class.- Logs redact secrets, bearer headers, tokens, API keys, passwords, and high-risk values by key name and value shape.
- Denied calls are logged with the consent/auth reason before dispatch.
- User-facing instance history can show recent outbound MCP activity.
- Admin diagnostics can filter by user, instance, endpoint, and remote tool.
- Connection test UI exposes actionable diagnostics without leaking credentials.
- Tests cover successful call logging, denied call logging, redaction, and remote error logging.
Related
Code pointers
workers/api/src/lib/connectors/mcp.tsworkers/api/src/lib/events.tsworkers/api/src/lib/redact.tsworkers/api/src/routes/admin-mcp-audit.tsstore/console/src/tabs/SettingsTab.tsx
Problem
PAGS has strong audit posture for its own MCP server, but outbound generic MCP calls are not yet first-class in observability. For an MCP-agent that can operate external apps, users and admins need to answer:
Without this, MCP agents are difficult to trust and debug.
Expected behavior
Every outbound MCP action should emit structured, redacted events suitable for user-visible history and admin diagnostics. Connection setup should also have diagnostics for auth discovery, protocol negotiation,
tools/list, and failed calls.Acceptance criteria
mcp_list_toolsand remote tool calls log endpoint/connection id, method, remote tool name where applicable, status, duration, and failure class.Related
Code pointers
workers/api/src/lib/connectors/mcp.tsworkers/api/src/lib/events.tsworkers/api/src/lib/redact.tsworkers/api/src/routes/admin-mcp-audit.tsstore/console/src/tabs/SettingsTab.tsx