Skip to content

[FEATURE]: Enforce MCP Apps CSP, sandbox, and permissions policy #4971

Open

Description

@vishu-bh

Parent epic: #2527

User Story

As a security administrator, I want MCP Apps rendering to enforce CSP, sandbox, permissions policy, origin policy, and external navigation policy so that interactive UI content is isolated from the host, other apps, and unapproved internet destinations.

One-Week Deliverable

Implement policy validation and response/header behavior for MCP Apps UI resources, plus the host-facing metadata needed by the Playground/Admin UI.

Acceptance Criteria

  • UI resources store and validate CSP, sandbox, allowed-origin, allowed-domain, external-navigation, and permissions policy fields.
  • Served UI content includes the effective gateway-approved CSP metadata/headers for the selected serving path.
  • Gateway policy intersects with upstream-declared CSP/sandbox requirements; upstream declarations are not blindly trusted.
  • Sandbox origin and allowed origins are enforced for AppBridge communication.
  • External navigation is blocked by default.
  • External connect-src, script-src, img-src, frame-src, and related browser capabilities are blocked unless explicitly allowlisted.
  • Allowed external links are host-mediated through AppBridge or rewritten through a governed ContextForge linkout path where click-time policy and audit are possible.
  • Unsafe policy combinations are rejected or require explicit admin override.
  • Policy decisions are audited.
  • Tests cover safe policy, unsafe policy rejection, override behavior, header/metadata output, blocked external links, allowed linkout, and blocked external network domains.

Demo

Register a safe UI resource and show policy metadata/headers, then attempt to register unsafe CSP/external-link behavior and show it rejected or gated.

Activity

  1. added this to the milestone on May 29, 2026
  2. self-assigned this
    on May 29, 2026
  3. added
    enhancementNew feature or request
    triageIssues / Features awaiting triage
    frontendFrontend development (HTML, CSS, JavaScript)
    pythonPython / backend development (FastAPI)
    securityImproves security
    mcp-protocolAlignment with MCP protocol or specification
    mcp-appsSEP-1865: MCP Apps: Interactive User Interfaces for MCP
    on May 29, 2026
  4. removed this from the milestone on Jun 16, 2026
  5. added this to the v1.1.0 milestone on Jul 22, 2026
  6. added
    COULDP3: Nice-to-have features with minimal impact if left out; included if time permits
    and removed
    triageIssues / Features awaiting triage
    on Aug 20, 2026
  7. removed this from the v1.1.0 milestone on Sep 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

COULDP3: Nice-to-have features with minimal impact if left out; included if time permitsenhancementNew feature or requestfrontendFrontend development (HTML, CSS, JavaScript)mcp-appsSEP-1865: MCP Apps: Interactive User Interfaces for MCPmcp-protocolAlignment with MCP protocol or specificationpythonPython / backend development (FastAPI)securityImproves security

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions