GPT Maps

GPT Maps

MCP server that enables LLMs to create and control interactive MapLibre maps by placing markers, drawing paths, and rendering polygons directly in Claude Desktop.

Category
Visit Server

README

README.md

GPT Maps

AI-powered interactive map visualization built as an MCP Server + MCP App for Claude Desktop.

GPT Maps allows an LLM to control an interactive MapLibre map through custom MCP tools. Instead of only returning textual geographic information, the model can visualize locations, connect places with paths, and display geographic boundaries directly on the map.

Features

  • πŸ“ Markers β€” place locations on the map
  • πŸ›£οΈ Paths β€” connect multiple geographic points
  • πŸ—ΊοΈ Polygons β€” render geographic boundaries
  • 🌍 Country-aware camera positioning β€” intelligently adjusts the map view based on the countries associated with locations
  • πŸ”Ž Nominatim integration β€” resolves geographic boundaries using OpenStreetMap data
  • 🧩 MCP integration β€” exposes map operations as tools that an LLM can call
  • πŸ–₯️ Claude Desktop integration β€” renders the map inside a sandboxed MCP App
  • πŸ“¦ MCPB packaging β€” distributable as a Claude Desktop extension
  • πŸ”„ Scene-based rendering β€” represents map state using shared scene objects
  • πŸ›‘οΈ CSP-aware sandboxing β€” supports external MapLibre resources inside the MCP App sandbox

Example

A user can ask:

Show Delhi, Mumbai and Bangalore and connect them with a path.

The LLM can call the MCP tools to create the required scene:

User
  ↓
Claude
  ↓
MCP Tool Calls
  β”œβ”€β”€ createMarker
  β”œβ”€β”€ createMarker
  β”œβ”€β”€ createMarker
  └── createPath
        ↓
     Scene
        ↓
   SceneSerializer
        ↓
   MCP Resource
        ↓
   React + MapLibre
        ↓
 Interactive Map

The result is rendered directly inside the Claude Desktop interface.

Architecture

GPT Maps is structured as a TypeScript monorepo with separate shared, server, and web packages.

GPT Maps
β”‚
β”œβ”€β”€ packages/
β”‚   β”‚
β”‚   β”œβ”€β”€ shared/
β”‚   β”‚   β”œβ”€β”€ objects/
β”‚   β”‚   β”‚   β”œβ”€β”€ Marker
β”‚   β”‚   β”‚   β”œβ”€β”€ Path
β”‚   β”‚   β”‚   └── Polygon
β”‚   β”‚   β”‚
β”‚   β”‚   └── scene/
β”‚   β”‚       └── SceneBuilder
β”‚   β”‚
β”‚   β”œβ”€β”€ server/
β”‚   β”‚   β”œβ”€β”€ tools/
β”‚   β”‚   β”‚   β”œβ”€β”€ createMarker
β”‚   β”‚   β”‚   β”œβ”€β”€ createPath
β”‚   β”‚   β”‚   β”œβ”€β”€ createPolygon
β”‚   β”‚   β”‚   └── renderScene
β”‚   β”‚   β”‚
β”‚   β”‚   β”œβ”€β”€ services/
β”‚   β”‚   β”‚   └── BoundaryService
β”‚   β”‚   β”‚
β”‚   β”‚   └── SceneSerializer
β”‚   β”‚
β”‚   └── web/
β”‚       β”œβ”€β”€ renderer/
β”‚       β”‚   └── MapRenderer
β”‚       β”œβ”€β”€ SceneDeserializer
β”‚       └── MCP App
β”‚
└── mcpb/
    └── Claude Desktop package
Data flow
LLM
 β”‚
 β”‚ MCP tool calls
 β–Ό
MCP Server
 β”‚
 β”œβ”€β”€ createMarker
 β”œβ”€β”€ createPath
 β”œβ”€β”€ createPolygon
 └── renderScene
 β”‚
 β–Ό
Scene Model
 β”‚
 β–Ό
SceneSerializer
 β”‚
 β–Ό
MCP Resource
 β”‚
 β–Ό
React MCP App
 β”‚
 β–Ό
MapLibre GL
 β”‚
 β–Ό
Interactive Map
MCP Tools
createMarker

Creates a geographic marker.

Supports an optional country hint used for intelligent camera positioning.

Example:

createMarker(
  latitude,
  longitude,
  label,
  country
)

For locations where a country cannot meaningfully be associated with the point, the model can use:

VAGUE
createPath

Creates a path connecting multiple geographic points.

createPath(
  points[]
)

Paths use the same underlying geographic point model as markers.

createPolygon

Creates a geographic polygon from a named region.

The server uses the Nominatim Search API with GeoJSON polygon output to retrieve the boundary.

Region
  ↓
Nominatim
  ↓
GeoJSON
  ↓
Point conversion
  ↓
Polygon
  ↓
MapLibre

Both Polygon and MultiPolygon GeoJSON geometries are handled.

renderScene

Serializes the current scene and sends it to the MCP App for rendering.

The scene contains objects such as:

Scene
 β”œβ”€β”€ Markers
 β”œβ”€β”€ Paths
 └── Polygons
Country-Aware Camera

GPT Maps uses country information associated with markers to improve the initial map viewport.

For example:

User:
Show Delhi

The marker can carry:

country = "India"

The server resolves the country's bounding box through Nominatim.

The renderer then combines:

Marker bounds
        +
Country bounds
        ↓
Combined LngLatBounds
        ↓
MapLibre fitBounds()

This prevents a single marker from producing an excessively zoomed-in view.

If:

the country is unavailable,
the value is VAGUE, or
Nominatim cannot resolve the country,

the renderer safely falls back to the geographic bounds of the scene objects.

Country requests are also deduplicated within each scene so multiple markers from the same country do not trigger repeated lookups.

Map Rendering

The frontend uses MapLibre GL for rendering.

The renderer maintains the map as a visual representation of the current scene.

Before rendering a new independent scene, existing map objects are cleared:

New renderScene()
       ↓
clearMap()
       ↓
Remove previous markers
Remove previous paths
Remove previous polygons
       ↓
Render new scene

This prevents objects from previous independent prompts from accumulating on the same map.

MCP App Sandbox

The MCP App runs inside a sandboxed iframe controlled by the MCP host.

A standard Vite build normally produces:

index.html
assets/
 β”œβ”€β”€ index.js
 └── index.css

However, those relative asset URLs are not directly accessible from the MCP App sandbox.

GPT Maps therefore produces a self-contained HTML resource with JavaScript and CSS bundled into the HTML document.

The resulting MCP resource contains:

<script>
  ...
</script>

<style>
  ...
</style>

with no required:

./assets/
 /assets/

references.

This allows the MCP host to load the entire application from a single HTML resource.

Content Security Policy

MapLibre requires external network access for map resources.

The MCP App therefore declares the required external domain through MCP resource CSP metadata.

For example:

connectDomains:
  https://demotiles.maplibre.org

The CSP metadata is included in the actual resources/read response so the MCP host can apply the required policy when loading the application.

Technology Stack
Backend
TypeScript
Node.js
MCP SDK
Nominatim / OpenStreetMap
GeoJSON
Frontend
React
TypeScript
MapLibre GL
HTML/CSS
Architecture
TypeScript monorepo
Shared domain models
Scene Builder
Serialization / deserialization pipeline
MCP resources and tools
Distribution
MCPB
Claude Desktop
Project Structure
packages/
β”œβ”€β”€ shared/
β”‚   └── Shared scene/domain models
β”‚
β”œβ”€β”€ server/
β”‚   β”œβ”€β”€ MCP server
β”‚   β”œβ”€β”€ MCP tools
β”‚   β”œβ”€β”€ BoundaryService
β”‚   └── SceneSerializer
β”‚
└── web/
    β”œβ”€β”€ React MCP App
    β”œβ”€β”€ MapRenderer
    └── SceneDeserializer
Running Locally
Requirements
Node.js
npm
Claude Desktop
MCPB CLI (for packaging)
Install
npm install
Build
npm run build
Package

The project can be packaged as an MCPB extension using the official MCPB CLI.

mcpb pack

The resulting package can then be installed into Claude Desktop.

MCPB

GPT Maps is distributed as a Claude Desktop MCPB extension.

The package contains:

map-renderer.mcpb

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured