← Reddit

Map making and Claude

Reddit · AndrewSouthern729 · May 18, 2026
A developer reported difficulties creating maps in Claude with MCP servers due to Content Security Policy blocks preventing map tile CDNs from loading, while data points rendered successfully. Attempts to resolve the issue by adding mapping tools to the MCP server or generating SVG-based base maps proved unsuccessful. The developer requested recommendations for CDN sources approved by Claude's security policies.

Detailed Analysis

A developer working at the intersection of Claude's MCP (Model Context Protocol) ecosystem and geospatial visualization has surfaced a significant technical friction point: Claude's Content Security Policy systematically blocks the CDN-sourced map tile requests that underlie most modern web mapping libraries. The problem manifests in a specific and frustrating pattern — data points render correctly because they are generated locally or passed through the MCP server directly, while the base map layer remains blank, stripped of its visual context. The inconsistency compounds the difficulty, as tile requests from providers like Leaflet and Google Maps occasionally succeed, suggesting the blocking behavior is not absolute but governed by policy rules that are opaque to the developer.

The core architectural tension here lies in how modern mapping stacks are built. Libraries like Leaflet and Google Maps JavaScript API are designed around the assumption of unrestricted outbound HTTP requests to tile CDNs — typically domains like tile.openstreetmap.org, mt.google.com, or similar. Claude's runtime environment enforces a CSP that restricts which external origins can be fetched, a standard browser security mechanism that prevents unauthorized data exfiltration and cross-origin attacks. Because this restriction operates at the environment level rather than the application level, modifications to the MCP server itself — including the developer's attempt to build a dedicated map-making tool — cannot circumvent it. The MCP server governs what data is provided to Claude; it does not govern what Claude's rendering environment is permitted to fetch.

The developer's fallback attempt — generating an SVG base map server-side — runs into a separate but equally fundamental constraint: context window size limits. A vector representation of even a modest geographic area at sufficient detail generates enormous amounts of path data, quickly exceeding what can be passed through the model's context. This illustrates how geospatial rendering sits at an awkward intersection of Claude's two principal constraints: what it can fetch externally and how much data it can process internally. Neither pathway is currently unobstructed for complex mapping use cases.

This challenge reflects a broader pattern in the maturation of the MCP ecosystem, where developers are discovering that Claude's agentic capabilities — now increasingly powerful in terms of tool use and data retrieval — still operate within a sandboxed rendering environment that was not designed with rich, tile-dependent cartographic output in mind. The MCP framework enables sophisticated data pipelines, but the front-end visualization layer remains constrained by security policies that prioritize safety over flexibility. This is a known tradeoff in agentic AI deployments: the same boundaries that prevent malicious data leakage also prevent legitimate outbound requests to trusted third-party services.

The practical resolution likely requires either Anthropic publishing a list of approved CDN origins that are whitelisted under its CSP, or developers adopting tile-serving architectures that proxy through Claude's permitted domains. Alternatively, raster-based map exports generated entirely server-side — producing a single flat image rather than dynamic tiles — could bypass both the CSP restriction and the SVG size problem, at the cost of interactivity. The thread highlights that as Claude becomes more deeply embedded in developer workflows through MCP, pressure will grow on Anthropic to provide clearer documentation around rendering environment constraints and to potentially expand the set of trusted external origins for common, low-risk services like public map tile providers.

Read original article →