Typed MapMap clients for Python and TypeScript
MapMap now has published API clients. mapmap-client on PyPI and @mapmap/api-client on npm are typed clients for the whole hosted API, generated from its live OpenAPI document, and langchain-mapmap and crewai-mapmap hand the MCP server's tools to LangChain and CrewAI agents in one import. All four were first released on 22 and 23 November 2026.
What was published?
Four packages, each MIT-licensed and versioned on its own:
| Package | Install | What it is | Version on 25 Nov |
|---|---|---|---|
mapmap-client | pip install mapmap-client | Python client for every REST endpoint | 0.1.1 |
@mapmap/api-client | npm install @mapmap/api-client | TypeScript client for every REST endpoint | 0.1.1 |
langchain-mapmap | pip install langchain-mapmap | MCP server tools as LangChain tools | 0.1.1 |
crewai-mapmap | pip install crewai-mapmap | MCP server tools as CrewAI tools | 0.1.0 |
The licence covers the client code only. Using the MapMap service is governed by our terms, and the key and pricing rules are the same as for a hand-written request.
How are the two API clients made?
They are generated, not written by hand. Both come from https://api.mapmap.ai/openapi.json through OpenAPI Generator 7.16.0. We chose generation because a hand-written client drifts from the API the day after it is written, and one written for two languages drifts in two directions. The gateway serves that document itself, and our per-endpoint docs pages are generated from it too, so a client generated from it says what the gateway says.
The 0.1.1 clients were regenerated on 25 November 2026 against version 0.3.0 of the document, which declared 181 operations, and each carries a typed method for all 181: routing and truck routing, geocoding, matrices, isochrones, optimisation, coverage plans, navigation sessions, place entrances, tiles and styles.
We give that as a count with a date because the count is the honest claim. Before the first release, the README said the client covered "every endpoint" when it covered 69 of 128. That sentence is gone, and the README now gives the regeneration date and the operation count instead.
What changed in 0.1.1?
Two things, both from the week's API changes:
- Matrix and isochrone answers keep their
exclusionsblock. The API already sent it; 0.1.0 dropped it from the typed result, so a caller could not see which closed places a matrix had matched. - Coverage plans take
avoid.min_kept_m, with the fields that report what it left out.
Every field added to an existing model is optional, so code written for 0.1.0 runs unchanged.
What do the agent packages do?
They connect an agent framework to the hosted MCP server at https://mcp.mapmap.ai/mcp and turn whatever tools it lists into the framework's own tool objects, with their full JSON Schemas. They name no tool count, because they adapt what the server returns: a new server tool reaches them with no new release. On 25 November get_mapmap_tools() in langchain-mapmap 0.1.1 loaded 61 tools with no key, including the navigation session and place entrance tools added that week.
import asyncio
from langchain_mapmap import get_mapmap_tools
async def main() -> None:
tools = await get_mapmap_tools() # keyless connect, fair use
print(len(tools))
asyncio.run(main())
The hosted MCP server connects without a key for evaluation under fair use. For metered volume, an agent passes its own key and the calls bill to that key.
What do the clients not do?
- They lag the API. A generated client is a snapshot. When the gateway gains an endpoint, the clients gain it only when we regenerate and publish. Check the method is there before relying on it.
- Some bodies are untyped. The matrix and isochrone request bodies are free-form in the OpenAPI document, so the clients pass them through as dictionaries rather than typed models.
- They are what the generator writes. Method and model names come from operation ids such as
get_geocode_reverseandcreate_navigation_session, and there is no hand-written layer on top of them. - Most calls need a key. Without one only the keyless demo lane answers:
GET /route/v1/*and the four geocodingGETs, with a per-address rate limit. Anything truck, ADR orPOSTneeds a key. - No mobile clients. On iOS, Android and React Native, use the mobile SDKs, which also run routing offline.
- Publishing is a deliberate step. A merge to our main branch does not publish a package; a maintainer dispatches the release.
Try it
Both clients answer keyless calls on the demo lane. This is what we ran on 25 November 2026 with mapmap-client 0.1.1, a reverse geocode that asks for the place's mapped doors:
import mapmap_client
from mapmap_client.api.geocoding_api import GeocodingApi
config = mapmap_client.Configuration(host="https://api.mapmap.ai")
with mapmap_client.ApiClient(config) as api:
places = GeocodingApi(api).get_geocode_reverse(
lat=51.53384, lon=-0.10738, kinds="poi", limit=1, include="entrances")
print(places.entrances_index, places.features[0]["properties"]["name"])
It printed loaded Waitrose. The same call through @mapmap/api-client 0.1.1:
import { Configuration, GeocodingApi } from "@mapmap/api-client";
const geocoding = new GeocodingApi(new Configuration({ basePath: "https://api.mapmap.ai" }));
const places = await geocoding.getGeocodeReverse({
lat: 51.53384, lon: -0.10738, kinds: "poi", limit: 1, include: "entrances",
});
console.log(places.entrancesIndex, places.features?.[0]?.properties?.name);
For everything else, pass your key as access_token in Python or accessToken in TypeScript. Worked examples for sessions in both languages are in the navigation sessions documentation. Places © OpenStreetMap contributors.
