Skip to content

Harden and observe public MCP execution #47

Description

@sebawebber

Parent

#43

What to build

Make anonymous MCP execution safe and observable in the existing public API
deployment without introducing authentication, application-level caching, custom
rate limiting, or a second service.

Acceptance criteria

  • Native clients without an Origin header can initialize and call the tool.
  • Browser requests from configured official pgconfig origins are accepted and unrelated browser origins are rejected.
  • Each tool execution has a five-second timeout and timeout failures are returned as actionable tool errors.
  • Successful calls emit structured logs containing tool, status, duration in milliseconds, assumption count, warning count, and server version.
  • Failed calls emit structured logs containing status, a stable error code, and missing-field names when applicable.
  • Complete tool arguments and full Tuning Requests are not written to logs.
  • The endpoint remains public, anonymous, stateless, and subject to the existing Fiber body-size default.
  • Tests cover Origin handling, timeout behavior, success logs, error logs, and the absence of complete arguments from logs.

Blocked by

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentReady for an implementation agent

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions