From 99d208055ba9e7fac4992f0df243ed79bd5b1ad9 Mon Sep 17 00:00:00 2001 From: Rizel Scarlett Date: Wed, 18 Feb 2026 16:55:11 -0500 Subject: [PATCH 1/4] docs: add Permission Policy documentation for MCP Apps - Add 'Requesting Browser Permissions' section documenting camera, microphone, geolocation, and clipboardWrite permissions - Update CSP configuration to remove deprecated frameDomains and baseUriDomains - Update server.js example to remove deprecated CSP fields Ref: PR #6947 --- .../docs/tutorials/building-mcp-apps.md | 86 ++++++++++++++----- 1 file changed, 66 insertions(+), 20 deletions(-) diff --git a/documentation/docs/tutorials/building-mcp-apps.md b/documentation/docs/tutorials/building-mcp-apps.md index 7bcbd7ca6600..b27388814855 100644 --- a/documentation/docs/tutorials/building-mcp-apps.md +++ b/documentation/docs/tutorials/building-mcp-apps.md @@ -169,8 +169,6 @@ server.setRequestHandler(ReadResourceRequestSchema, async (request) => { csp: { connectDomains: [], resourceDomains: [], - frameDomains: [], - baseUriDomains: [], }, prefersBorder: true, }, @@ -538,7 +536,7 @@ MCP Apps run in a sandboxed iframe with strict Content Security Policy restricti ### Content Security Policy Configuration -By default, apps can only load resources from their own origin. If your app needs to interact with external domains—such as loading resources from a CDN, making API calls, or embedding maps—you can configure which domains are allowed through the `csp` object in the resource's `_meta.ui` section. +By default, apps can only load resources from their own origin. If your app needs to interact with external domains—such as loading resources from a CDN or making API calls—you can configure which domains are allowed through the `csp` object in the resource's `_meta.ui` section. ```javascript _meta: { @@ -546,8 +544,6 @@ _meta: { csp: { connectDomains: [], // Domains for fetch/XHR requests resourceDomains: [], // Domains for scripts, styles, images, fonts, media - frameDomains: [], // Origins allowed for nested iframes - baseUriDomains: [], // Additional allowed base URIs }, }, } @@ -557,37 +553,87 @@ _meta: { |--------|---------------|---------|---------| | `connectDomains` | `connect-src` | Domains your app can make network requests to | Same-origin only | | `resourceDomains` | `script-src`, `style-src`, `img-src`, `font-src`, `media-src` | Domains for loading external resources | Same-origin only | -| `frameDomains` | `frame-src` | Origins allowed for nested `