Skip to content

50,000 free calls a month, card-free. Get an API key →

Documentation menu
docs / examples / mcp-route-tool-call
Example

Call the route tool over MCP

Point any MCP client at the hosted endpoint and routing becomes a tool the model can call. No key is needed to connect for evaluation; present your own snk_ key and the metered calls bill to you instead of us.

bash
# Claude Code
claude mcp add --transport http mapmap https://mcp.mapmap.ai/mcp

# Anything else that speaks streamable HTTP takes the URL directly:
#   https://mcp.mapmap.ai/mcp
# No command, no environment variables, no key to connect.

# To bill metered calls to your own gateway key rather than ours, present it
# as a bearer token on the same endpoint:
#   Authorization: Bearer snk_...

Worth knowing

  • The result carries structured output alongside a plain text summary. Several MCP clients drop non-text content blocks, so the summary has to stand on its own.
  • geometry_polyline6 on the result is precision 6, which is what search_along_route, cheapest_fuel_along_route and the static map endpoint's default all expect.