Artifacts: allow owner-approved network domains (like MCP Apps connectDomains), so live maps work
What I'm trying to do
I build internal presentation decks for our real-estate company as Claude Code artifacts. Many slides need live, interactive maps: Mapbox GL with satellite imagery and labels, plus planning layers (PDM land-use, REN/RAN, Natura 2000) from our own map server. On our own website these decks use Mapbox GL with a public, URL-restricted token, and they work well.
Live example (public data only, link valid until 4 November 2026)
https://eurosuez-decks.vercel.app/p/AlhowyXjvppWocZxNAh78uNBFjJ2gLjgT8PzrTe8Rl8
Six slides: live satellite of the Alentejo coast with Natura 2000; protected land (REN) over the satellite; a 60° tilted view; then what the same deck loses as an artifact, and the request. Use the arrow keys; each map takes a few seconds to fill, and the layer panel on the right switches layers on and off.
The problem
The artifact CSP blocks every outside request (connect-src and img-src reach only the artifact's own origin), and frames inherit the sandbox. I tested every route: fetch, <img>, iframes (outside and same-origin), srcdoc, workers. None of them can reach api.mapbox.com or our own server.
The only workaround is packing map tiles into the artifact as files. That gives blurry, heavy and static maps, and it isn't allowed by Mapbox's terms (Product Terms §1.9 and §2.8.1 forbid caching, bundling or redistributing tiles). So there's currently no compliant way to show a Mapbox map in an artifact.
What would solve it
MCP Apps already have the right model: a connector declares connectDomains and Claude adds those domains to the frame's CSP. Something similar for artifacts, for example:
- A per-artifact declaration at publish time (like
capabilities: { network: { connect: ["https://api.mapbox.com"], img: [...] } }), shown to viewers and consented like connector calls; and/or - For Team and Enterprise, an Owner-approved allowlist in Organization settings > Artifacts, which per-artifact declarations must stay within.
Keeping it opt-in, listed per domain and visible to viewers would keep the sandbox's guarantees for every other artifact.
Environment
Claude Code desktop app, artifacts runtime contract 0.2.67, individual plan.
Related: anthropics/claude-ai-mcp#40 (claude.ai ignores resourceDomains and frameDomains for MCP Apps).