nextbillion-mcp
OfficialProvides tools for interacting with NextBillion.ai location APIs, enabling geocoding, place search, routing, distance matrices, isochrones, and static maps.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@nextbillion-mcpGet driving directions from Seattle to Portland"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
nextbillion-mcp
The NextBillion.ai MCP server: geocoding, place search, routing, distance matrices, isochrones, static maps and the product documentation as tools for AI agents. It runs as a hosted service at https://mcp.nextbillion.io — add the URL to your MCP client and sign in with your NextBillion.ai API key in the browser. Nothing is installed locally.
Implements the MCP 2026-07-28 specification (stateless core, Streamable HTTP, OAuth 2.1) via the official TypeScript SDK v2; older-protocol clients are served through the SDK's built-in legacy negotiation.
Quick start
Get an API key from console.nextbillion.ai or by emailing support@nextbillion.ai, then connect your client:
Client | How |
Claude (claude.ai, Claude Desktop) | Settings → Connectors → Add custom connector → |
Claude Code |
|
Codex |
|
Cursor | add |
Scripts / CI | send the key directly: |
The browser sign-in page asks for your API key once. Without signing in you can already list
the tools and use the four documentation tools; the first API tool call triggers the sign-in.
Full snippets: distributions/manual/README.md.
Related MCP server: NextBillion.ai MCP Server
Tools
Tool | NextBillion API |
| Autocomplete (prefix address completion) |
| Autosuggest (typo-tolerant suggestions) |
| Directions (fast + flexible) |
| Distance Matrix (fast + flexible, synchronous) |
| Batch Geocode (up to 100 queries per call) |
| Forward Geocode |
| Reverse Geocode |
| Structured Geocode |
| Isochrone |
| Browse (places by category near a location) |
| Place Lookup |
| Discover (POI search) |
| Geocode Postcode |
| Search Along Route |
| Static Images |
| Static Images (route/path overlay) |
| Documentation search (index of docs.nextbillion.ai) |
| Documentation page by |
| Request parameters of a REST endpoint, as records |
| Documentation categories, APIs and pages |
| Straight-line distance, line length, area, bearing (local) |
| Geofencing: which points fall inside a polygon (local) |
| Union, intersection, difference of polygons (local) |
| Zone within a distance of a point, line or polygon (local) |
| Nearest candidates, or nearest position on a line (local) |
| Bounding box of points, a line or a polygon (local) |
| Centroid and guaranteed-inside label point (local) |
Tool inputs always use explicit {latitude, longitude} objects; the server handles the
underlying API's coordinate-order conventions internally.
Geometry tools (local, no sign-in)
Seven tools compute straight-line geometry on the WGS84 ellipsoid inside the server, without
calling the NextBillion.ai API: measure (distance, length, area, bearing), points_in_polygon
(geofencing), polygon_ops (union / intersect / difference), buffer, nearest, bbox and
centroid. They take the same {latitude, longitude} points as the other tools and GeoJSON
Polygon/MultiPolygon geometry, so an isochrone contour can be passed straight into
points_in_polygon or polygon_ops. Results that return a shape are simplified to a vertex
budget (max_vertices, default 500) to keep them small in the model's context. Their descriptions
say so explicitly: straight-line, not road distance — directions and distance_matrix remain the
tools for travel questions.
Documentation tools
Four tools answer questions about the APIs and SDKs from the official documentation: search_documentation returns ranked excerpts with a source_url to cite and the name of the tool that performs the operation, get_documentation returns one page or one section, get_api_parameters returns the request parameters of a REST endpoint as structured records (units only when the docs state them), and list_documentation_topics lists what is covered. The hosted server builds its index from the documentation repository at start and rebuilds it whenever the repository's main branch changes, so documentation updates reach it within minutes; the image carries a fallback snapshot built at release time (see packages/server/docs/README.md). Pages that exist on the site but not in the docs repository (solutions, apps, help, the Web Maps SDK v1) are not covered.
How the hosted server works
The MCP endpoint is the root of
https://mcp.nextbillion.io(also the OAuthresource).GET /healthanswers liveness and reports the documentation index in use;/.well-known/oauth-protected-resourceand/.well-known/oauth-authorization-serverserve OAuth discovery.Credentials travel with each request. There is no server-wide key: every API call uses the key of the caller, sealed into the OAuth tokens or sent as a bearer header.
Lazy authentication. Without credentials a host can connect, list tools and use the documentation tools; the first API tool call is answered with HTTP 401 and a
WWW-Authenticate: Bearer resource_metadata=…challenge, which makes the host open sign-in.Sign-in. The server is its own OAuth 2.1 authorization server (
/oauth/*). The sign-in page asks for the API key once, checks it with the API (an unbilled request) and seals it into the tokens it issues (AES-256-GCM, key inNBAI_TOKEN_KEY). Nothing is stored server-side; revoke by resetting the key in the console. Claude identifies itself with its Client ID Metadata Document; other hosts use dynamic registration. PKCE is required.Documentation follows the docs repository. The server rebuilds its documentation index from
nb-public-docsat start and whenevermainmoves (checked every 10 minutes), so documentation updates reach users within minutes and without a release.Stateless. One server instance per request, built from that request's credentials. Nothing about a caller is retained between requests.
Fixed egress address
136.85.116.23for calls to the NextBillion.ai API; allow it if your key has an IP allowlist.Running it yourself:
docker build -t nextbillion-mcp .thendocker run -p 8080:8080 -e NBAI_PUBLIC_URL=https://your.host -e NBAI_TOKEN_KEY=… -e NBAI_DOCS_GITHUB_TOKEN=… nextbillion-mcp.node packages/server/dist/index.js --helplists every environment variable. Infrastructure (Cloud Run, static egress, secrets, domain) is Terraform-managed innextbillion-infra.
Privacy Policy
nextbillion-mcp is a hosted MCP server operated by NextBillion.ai at https://mcp.nextbillion.io.
NextBillion.ai's privacy policy applies: https://nextbillion.ai/privacy.
What is collected and sent. When your AI client calls one of the API tools, the server
forwards that tool call's arguments (for example addresses, place names, coordinates, route
and map parameters) to api.nextbillion.io over HTTPS, authenticated with your API key, and
returns the API's response to your client unchanged. The server does not receive or
transmit anything else: no conversation content beyond the tool arguments, no files, no
device information.
Your API key. At sign-in your API key is sent to the server once, checked against the NextBillion.ai API, and returned to your MCP host sealed inside encrypted tokens. On every tool call the server decrypts the token in memory and uses the key for that request only. The server keeps no database and stores no keys or tokens. Revoke access at any time by resetting the key in the console; existing tokens stop working immediately.
Documentation tools. The four documentation tools (search_documentation,
get_documentation, get_api_parameters and list_documentation_topics) answer from an
index the server builds from NextBillion.ai's own documentation repository. They need no
sign-in and send nothing to the NextBillion.ai API.
Logs and telemetry. The server logs method, path, status and duration of each request —
never headers, bodies, keys or tokens. There is no analytics or crash reporting. Calls to the
API come from the server's fixed address 136.85.116.23 rather than from your machine.
Third-party sharing and retention. The server shares data with no one other than NextBillion.ai. How NextBillion.ai uses and retains API request data is described in its privacy policy at https://nextbillion.ai/privacy.
Contact. Privacy or support questions: support@nextbillion.ai.
Repository layout
packages/server/— the server (not published to npm since 0.4; it ships as a container).src/core/— server assembly (spec compliance, error mapping)src/tools/— one file per tool, grouped by product (places / routing / maps / docs)src/nbclient/— shared NextBillion HTTP client (auth, timeout, retry, key redaction)src/http/— Streamable HTTP app, bearer verification, the OAuth authorization serversrc/docs/— documentation index: builder (from the docs repository), BM25 search, GitHub readerdata/docs-index.json— snapshot of the index built into the image, the fallback when the docs repository is unreachable at start
distributions/— client setup: the Claude Code and Codex plugins (URL only, no code) and snippets for Cursor and manual configuration.Dockerfile,.github/workflows/ci.yml— image build; release tags push the image and deploy it to Cloud Run.
Development
npm install
npm run typecheck
npm test # unit + protocol conformance (no network, no key needed)
npm run build # bundles the server into a single zero-dependency dist/index.js
NBAI_API_KEY=<key> npm run test:e2e # live-API smoke tests
npm run build && NBAI_TOKEN_KEY=$(node -e "console.log(require('crypto').randomBytes(32).toString('base64url'))") \
NBAI_PUBLIC_URL=http://localhost:8080 node packages/server/dist/index.js # run it locallyTest a local build interactively with the MCP Inspector: start the server as above, then
npx @modelcontextprotocol/inspector and connect to http://localhost:8080 (transport
Streamable HTTP; use the browser sign-in, or set the header Authorization: Bearer <key>).
License
Copyright 2026 NextBillion.ai. Licensed under the Apache License, Version 2.0.
This server cannot be deployed
Maintenance
Related MCP Connectors
- geoOAuthco.thinair
Geocoding, routing, isochrones, traffic, weather, and place search for AI agents. 19 MCP tools.
Routing, geocoding, places, matrix and map tools for location-aware AI workflows.
Pay-per-use tool marketplace for AI agents. Search, price-check, and call APIs via MCP.
Mobility, geocoding and nearby urban services for AI agents.
Related MCP Servers
- AlicenseAqualityCmaintenanceProduction-ready MCP server for Google Maps Platform APIs, providing 11 tools for directions, places, geocoding, traffic, and road data to empower AI agents with location intelligence.1123 PyPI4Apache 2.0
- AlicenseNot gradedqualityCmaintenanceProvides geolocation, routing, and navigation tools including geocoding, place search, distance matrix, and turn-by-turn directions via NextBillion.ai APIs.3 npm1MIT

Magic Lane MCP Serverofficial
AlicenseBqualityCmaintenanceEnables AI agents to become geospatially intelligent assistants with tools for location search, smart routing, round trip planning, reverse geocoding, isochrone analysis, route visualization, geofence management, and interactive map display.85 npm7Apache 2.0- AlicenseAqualityDmaintenanceEnables AI agents to perform geocoding, routing, nearby search, and other location-based tasks for Indian addresses using the Mappls (MapMyIndia) platform.1715 npm3MIT