MCP server
The MCP server gives an AI assistant the same walking, cycling and transit times as the REST API
and the aportee CLI. It supports the 2026-07-28 protocol and the older 2025 initialization
handshake through the
official TypeScript SDK.
Connect
Section titled “Connect”Add https://aportee.ca/v1/mcp to your MCP client as a remote (Streamable HTTP)
server. You can start without a key. In Claude Code:
claude mcp add --transport http aportee https://aportee.ca/v1/mcpTo use a key, add it as the X-Api-Key HTTP header in the client’s server configuration (in Claude
Code, --header "X-Api-Key: $APORTEE_API_KEY"). Keep it out of chat text and URLs.
To get a key from the chat, the agent calls start_sign_in and shows you a link and code (agent
sign-in). You sign in and approve in your browser, and
check_sign_in returns the key once. For the rest of that conversation, the agent passes the key
as the api_key argument, which every tool but get_catalog and the sign-in tools takes. The
server reads that argument only when the client sends no header, and never stores or logs it. For
later conversations, add the key to the client’s settings. Anyone who can read the conversation
can read the key: if you share the transcript, revoke the key on your account page.
You can also run aportee login in a terminal (pipx install aportee, or uvx aportee login;
see CLI), or create a key on your account page
(quickstart).
Tools take coordinates
Section titled “Tools take coordinates”The tools take coordinates (lat and lon, decimal degrees) in Canada (latitude 41.6 to 83.2,
longitude −141.1 to −52.6), or a town found with find_place. To start from a street address, an
agent uses a geocoder of its own if it has one. With only an address, it gives the person
https://aportee.ca/map?q=<the address, URL-encoded> with its street number, street, city and
province. The map opens on the address, or lists the matches to choose from. The map’s link then
gives the coordinates as point=<lat>,<lon> to copy back.
Each point’s answer is for the census block that contains it or, in a block over 0.1 km², the H3
hexagon (about 130 m across); basis says which. A point one street off can change the answer.
The server refuses a point outside Canada with aportee.api.outside_coverage. Its hint gives the
pair to try when lat and lon look swapped or the longitude lost its minus sign. A point inside
Canada with no answer gets aportee.api.outside_coverage or aportee.api.no_street_nearby, also
with a hint.
The tools take arguments as models often send them: numbers and comma-separated lists as text,
latitude, longitude or lng for lat and lon, mode for modes. The server refuses an
unknown amenity type with the type it likely means (groceries: did you mean grocery?), and an
unknown argument with the arguments the tool takes.
Browser-based clients must run on aportee.ca or on an origin we’ve agreed with you.
Map and compass views
Section titled “Map and compass views”MCP Apps is the io.modelcontextprotocol/ui extension. Clients that support it show the answers
of three tools as views in the conversation. These clients include Claude on the web and desktop,
VS Code with GitHub Copilot, Microsoft 365 Copilot and Goose.
travel_timesandfind_placeshow the à portée map: the site’s embed at the point, at each point of a batch (up to 20), at each town found, or at each named place found near a point. When the answer has several places, the view has a button for each place. The map draws the types asked for, by the first mode asked that an embed can draw (walking, cycling, or transit at the weekday morning peak), or else by walking. It uses the call’slang, or else the client’s language, and the client’s light or dark theme. A link opens the full map there.nearby_placesshows the compass: the dial beside the list of trips, as on the map. Pointing at a trip, or focusing its row (Tab, then the arrow keys), lights it up on the dial and in the list. The place, its walking minutes and its direction then show under the dial. A link opens the map’s compass at the point.
Other clients ignore each tool’s _meta.ui and show the same text and structured results. The
views are two self-contained HTML pages, the resources ui://aportee/map.html and
ui://aportee/compass.html (text/html;profile=mcp-app). The map view frames the site’s own
embed, so its resource names the site’s origin in _meta.ui.csp.frameDomains. Where a client
refuses that frame, the view shows the link alone.
Every tool, its arguments and its results are in MCP tools.