Skip to content

[FEATURE]: Add observability and audit for extension calls #4967

Description

@vishu-bh

Parent epic: #2527

User Story

As an operator, I want extension discovery, advertisement, routing, proxying, handler execution, resource serving, sanitizer decisions, plugin decisions, and denials to be observable and auditable so that extension behavior can be monitored and investigated.

One-Week Deliverable

Add structured logs, audit events, metrics, and tracing attributes for generic extension operations.

Acceptance Criteria

  • Discovery records extension identifier, gateway id, source, and enabled state without logging secrets.
  • Capability advertisement records extension id, caller scope category, client support, outcome, and deny reason where applicable.
  • Method routing records extension id, method, routing mode, gateway id or handler, outcome, latency, and auth scope category.
  • Denied extension calls produce security/audit events.
  • Plugin blocks, sanitizer blocks, disabled extension denials, unknown method denials, and hidden gateway denials are distinguishable.
  • MCP Apps-specific events include AppBridge allowed/denied calls, cross-server denials, CSP/sandbox policy decisions, and external navigation/linkout decisions.
  • Metrics distinguish core MCP methods from extension methods.
  • Observability follows existing separate-session behavior where applicable.
  • Tests cover audit/log emission for allow and deny paths.

Demo

Call a Tasks-style extension method and a denied unknown method, then show trace/log/audit output for both. Also show an MCP Apps external-navigation denial event.

Metadata

Metadata

Assignees

Labels

client-mrkHigh priority itemsenhancementNew feature or requestexperimentalExperimental features, test proposed MCP Specification changesmcp-protocolAlignment with MCP protocol or specificationpythonPython / backend development (FastAPI)securityImproves securitytriageIssues / Features awaiting triage

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions