Magic Lane MCP Server

by magiclane

Not rated
GitHub

Description

The [Magic Lane MCP Server](https://developer.magiclane.com/docs/guides/mcp-server/) empowers AI agents with advanced geospatial intelligence. Built on [Magic Lane's](https://www.magiclane.com/) global mapping engine, it delivers fast place search, multi-stop and round-trip…

About

The [Magic Lane MCP Server](https://developer.magiclane.com/docs/guides/mcp-server/) empowers AI agents with advanced geospatial intelligence. Built on [Magic Lane's](https://www.magiclane.com/) global mapping engine, it delivers fast place search, multi-stop and round-trip routing, isochrone analysis, reverse…

Details

Author
magiclane
Categories
Other, Knowledge Base, Search

Setup

Install Magic Lane MCP Server in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/magiclane/magiclane-mcp-server

Follow the installation instructions in the repository README, then restart your MCP client.

The Magic Lane MCP Server empowers AI agents with advanced geospatial intelligence. Built on Magic Lane's global mapping engine, it delivers fast place search, multi-stop and round-trip routing, isochrone analysis, reverse geocoding, geofencing, and rich visual map outputs for seamless, data-driven experiences.

TheMagic Lane Model Context Protocol (MCP) Serverenables any AI agent or application to become ageospatially intelligent assistant, capable of acting as a reliable companion for pedestrians, cyclists, and drivers alike.

Built on top ofMagic Lane's advanced mapping and routing technology, this TypeScript-based MCP server empowers AI agents to:

- Understand and process geospatial data,
- Interpret user intent in a spatial context,
- Deliver accurate, contextually relevant navigation guidance.

By leveragingMagic Lane's global map dataandreal-time geospatial intelligence, the MCP Server enables deeply personalized navigation and trip-planning experiences through core tools:

-

Intelligent Search- Find addresses, points of interest (POIs), or coordinates with intelligent search capabilities and POI category filtering.

Smart Routing- Generate optimized routes between multiple waypoints with support for various transport modes, route preferences, and dynamic POI integration.

Round Trip Planning- Create circular routes that start and end at the same location, perfect for jogging routes, cycling loops, or delivery runs.

Reverse Geocoding- Convert geographic coordinates into detailed address information including street name, city, state, country, and postal code.

Isochrone Analysis- Calculate reachability polygons showing areas accessible within specific time or distance constraints.

Route Visualization- Create visual map images of calculated routes, isochrones, and round trips for immediate geographical context and presentation.

Geofence Management- Create, manage, and query geographic boundaries for asset monitoring, location-based alerts, and spatial analysis with support for polygons, circles, and rectangles.

Interactive Map- Display an interactive vector tile map directly inside the conversation using MapLibre GL JS and MagicLane vector tiles. Supports location views, route visualization, isochrone overlays, round trip routes, search result markers, geofence areas, and custom coordinate paths — with one or many overlays per map and pan/zoom interactions.

The map functionalities can be visualized as high-quality map images through our new beta feature:

- Static Map Rendering- Generate custom map views with markers, bounding boxes, or location-centered areas without route calculation, complementing route visualization for routes, isochrones, and round trips.

Together, these capabilities enable AI agents to act astrue geospatial copilots- understanding spatial context, anticipating user needs, and optimizing every journey with precision and ease.

Transport Options:The server supports bothstdio(for MCP-native clients like Claude Desktop) andHTTP(for web applications, serverless deployments, and custom integrations).

TheMagic Lane MCP Serverintegrates seamlessly with any AI application or agent, providing access to geospatial data and navigation functionality. Before setup, ensure you have the following:
- Node.js 22+installed (Download here)
- npm(comes with Node.js)
- A validMagic Lane API Key(for access to map data)
- AnMCP-compatible AI client, such as:

- Claude Desktop
-
Cursor IDE
- Visual Studio Codewith
GitHub Copilot

# Check Node.js version (should be 22+) node --version # Check npm version npm --version

For immediate testing, use npx to run the server without installation:

# Set your API key as environment variable export MAGICLANE_API_KEY="your_api_key" # Run the server directly npx @magiclane/mcp-server

To obtain a Magic Lane API token, follow ourstep-by-step guide. The detailed steps are:

- Visitdeveloper.magiclane.com/api/registerand register for a free account.

- Log in to your account
- Navigate to the
Projects Dashboard
- Follow the instructions to generate your unique API key, which will serve as your access token for the MCP Server

To explore and integrate the MCP Server locally, follow these steps to install dependencies and build the project:

# Clone or navigate to the Magic Lane MCP Server directory cd path/to/magiclane-mcp # Install dependencies npm install # Build the TypeScript project npm run build # Verify the build was successful ls dist/ # Should show map-server.esm.js and other compiled files

Note:Ensure Node.js 22+ and npm are properly installed before running these commands.

# Option 1: Using .env file (recommended) cp .env.example .env # Edit .env with your actual API key npm start # Option 2: Using Node's built-in env file support node --env-file=.env dist/map-server.esm.js # Option 3: Using environment variable directly MAGICLANE_API_KEY=your_api_key npm start

HTTP Server (for web and custom clients):

# Development mode (with auto-reload) npm run dev:http # Production mode (after build) npm run start:http

For complete HTTP server documentation including endpoints, JSON-RPC examples, and client integration, see theHTTP Server Setup Guide.

Configure your MCP client to connect to the Magic Lane server. Follow the detailed setup guide for your specific AI client:

- Claude Desktop Setup Guide- Complete configuration instructions for Claude Desktop
-
Cursor AI Setup Guide- Step-by-step setup for Cursor IDE
-
VS Code Setup Guide- Integration guide for Visual Studio Code with GitHub Copilot

- Client-specific configuration file locations
- Multiple installation options (local build, NPM, Docker)
- Platform-specific instructions (Windows, macOS, Linux)

# Build the Docker image docker build -t magiclane-mcp-server . # Run the container (pass API key via environment variable) docker run --rm -e MAGICLANE_API_KEY=your_api_key magiclane-mcp-server # Or use an env file docker run --rm --env-file .env magiclane-mcp-server

The container runs with--enable-source-mapsfor better stack traces in production.

TheMagic Lane MCP Serverprovides several integrated geospatial tools that enable AI systems to search, plan, analyze, and visualize routes and locations.

Looking for rendered map images and live interactive map demos? SeeVisual Examples.

TheLocation Search Tooluses theMagic Lane Search REST APIto find:

- Coordinates, addresses, or administrative areas.
- Points of Interest (POIs) around a reference location (restaurants, gas stations, pharmacies, etc.).

- "Search for authentic Italian restaurants in downtown Chicago within walking distance of Millennium Park."
- "Where are the ATMs near Brandenburg Gate, Berlin?"

- "Locate the closest 'DHL Service Point' near Berlin Central Station."
- "Find all Starbucks locations within 1km of our office at 1 Market Street, San Francisco."
- "Where are the parking garages near Amsterdam Central Station?"

- "Show all elementary schools near 456 Maple Avenue, Portland, Oregon with their exact distances from the property."
- "Locate pharmacies, grocery stores, and public transport stops near the property at Baker Street 221B, London."

TheRouting Planner Toolgenerates optimized routes between multiple points using theMagic Lane Routing REST APIand theMagic Lane Fleet Management Rest API. This tool supports the following capabilities:

- Point-to-point and multi-stop routing (A -> B -> C).
- Inclusion of POIs (e.g., gas stations, restaurants).
- Advanced VRP optimization for multi-delivery routes.
- Traffic, restriction, and terrain considerations.
- Multilingual route instructions.

Each entry inintermediate_waypointsrepresents one stop. Thetypediscriminator determines the shape ofwaypointand which fields apply:

- "Generate a scenic bike route from Vienna to Bratislava, avoiding highways."
- "Plan a road trip from Munich to Venice with stops at Innsbruck and Bolzano, optimized for scenic views."

- "Find a public transport route from London to Oxford with minimal transfers."
- "What's the quickest way to get from JFK Airport to Manhattan using public transport?"

- "Create a walking tour from the Colosseum to the Trevi Fountain, stopping at the Pantheon and a gelato shop."
- "I'm at the Eiffel Tower and need to visit Notre-Dame, Louvre Museum, and return to my hotel near Gare du Nord. Plan the best route by car."

- "Find the fastest route from St. John Ambulance Station, Westminster to General Hospital, avoiding traffic and roadblocks."
- "Calculate the quickest route for emergency services from Fire Station 23 to the reported incident at Pike Place Market."

- "I'm driving a Tesla Model 3 with 60% battery from San Francisco to Los Angeles. Find the optimal route with necessary charging stops, ensuring I arrive with at least 20% charge."
- "Calculate a route for my electric van (80 kWh battery, 250km range) from Berlin to Prague with fast-charging stops along the way."

TheIsochrone Calculator Toolprovides spatial analysis to determine all areas reachable from a reference point within specific travel time or distance constraints using theMagic Lane Isochrones REST API. This enables AI systems to analyze accessibility zones, service coverage areas, and reachability studies.

- Calculate reachability polygons based on time or distance constraints
- Support for multiple transport modes (walking, cycling, driving, public transport)
- Departure location resolution through coordinates or geocoding
- Multi-range analysis for complex accessibility studies

- "Where can I cycle to in 45 minutes from Amsterdam Central Station?"
- "Display all areas within a 10-minute walk from Atlantic Avenue-Barclays Center Station in Brooklyn."
- "Display the 1-hour driving catchment area from the proposed warehouse location in Frankfurt."

TheRound Trip Planner Toolgenerates circular routes that start and end at the same location. This tool is perfect for creating exploration routes, cycling loops, jogging paths, and delivery runs.

- Circular routes with guaranteed return to starting point
- Time-based or distance-based route generation
- Support for multiple transport modes (walking, cycling, driving)
- Terrain and hill skip preferences for cyclists
- Customizable route length and complexity

- "Create a 10km jogging loop starting from Central Park."
- "Design a 90-minute bike ride loop from Stephansplatz."

- "Generate a 45-minute walking loop from the Eiffel Tower."
- "Plan a 2-hour walking loop starting from Times Square."

- "Create a 25km bike loop from Whistler Village, avoiding highways."
- "Design a 1-hour cycling loop from Golden Gate Park using the shortest route."

TheReverse Geocoding Toolconverts geographic coordinates or areas into detailed address information using theMagic Lane Reverse Geocoding REST API. This tool provides comprehensive address components for various spatial queries.

- Point-to-address conversion for specific coordinates
- Search around a point, within an area, or along a path
- Returns multiple address results with distance ranking
- Includes administrative hierarchy (settlement, city, county, state, country)
- Identifies nearby points of interest

- "What's the address at coordinates 51.5074, -0.1278?"
- "Find all addresses within a 500-meter radius of the Brandenburg Gate."

TheGeofence Manager Toolprovides comprehensive geofence operations for defining and managing geographic boundaries, enabling location-based services and asset monitoring. This tool supports creating, retrieving, updating, deleting geofences, and checking if points fall within defined boundaries.

- Create geofences with polygon, circle, or rectangle geometries
- Query geofences by ID, within bounding boxes, or by proximity to a point
- Update geofence properties (name, keywords)
- Delete geofences by ID
- Check if specific coordinates fall inside geofences
- Support for custom metadata and tags

Create Operation- Create one or more geofences with the following parameters:

Read Operation- Retrieve one or more geofences with the following parameters:

Update Operation- Modify properties of an existing geofence with the following parameters:

Delete Operation- Remove one or more geofences with the following parameters:

Check Point Operation- Determine if coordinates fall within geofences with the following parameters:

- "Create a circular geofence with 500m radius around our warehouse at 123 Main Street, Chicago."
- "Is the delivery vehicle at coordinates 40.7589, -73.9851 inside of Main Street zone geofence?"

- "Create a rectangular 'construction-zone-1' geofence covering downtown Seattle bounded by these coordinates: north 47.6205, south 47.5990, east -122.3250, west -122.3450."
- "Update the 'construction-zone-1' geofence to include 'temporary' and 'high-priority' keywords."

- "Create three circular delivery zone geofences: 'berlin-warehouse-1' at coordinates 13.3777, 52.5163 with 2km radius, 'berlin-warehouse-2' at 13.4050, 52.5200 with 1.5km radius, and 'berlin-warehouse-3' at 13.3888, 52.5170 with 2.5km radius."
- "Show me all geofences within 2km of Brandenburg Gate at coordinates 13.3777, 52.5163."
- "Retrieve all geofences with IDs: 'zone-premium-01', 'zone-premium-02', and 'zone-premium-03' that are tagged with 'premium-service'."

- "Delete the temporary event geofences with IDs: 'summer-festival-2025-main', 'summer-festival-2025-parking', and 'summer-festival-2025-stage' now that the event is over."
- "List all geofences within the bounding box covering Manhattan: north 40.8820, south 40.7006, east -73.9070, west -74.0479."
- "Find all geofences near Times Square within 1000 meters and show their names and keywords."

TheRenderer Toolgenerates static map images of calculated routes, isochrones, round trips, and custom map views using the Magic Lane rendering service. It delivers immediate visual context by overlaying geographic data on a map and returning the result as an embedded image.

- Renders routes, isochrones, and round trips as PNG, JPEG, or WebP images
- Automatically calculates the optimal viewport to frame all relevant data
- Generates static map views centered on a location or bounded by custom coordinates
- Delivers images directly to the MCP client as base64-encoded data; forrouting,isochrone, andround_tripa JSON text block with the underlying route details accompanies the image, so no separate calculation call is needed

- "I'm at 10 Downing Street, London - please show a driving route to St Paul's Cathedral."

- "Visualize a 5.5km jogging route starting from the Rijksmuseum in Amsterdam."

- "Please display a map of Paris with a 15-minute walking isochrone."

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.