Navitia MCP Server for Mastra AI 11 tools — connect in under 2 minutes
Mastra AI is a TypeScript-native agent framework built for modern web stacks. Connect Navitia through the Vinkius and Mastra agents discover all tools automatically — type-safe, streaming-ready, and deployable anywhere Node.js runs.
ASK AI ABOUT THIS MCP SERVER
Vinkius supports streamable HTTP and SSE.
import { Agent } from "@mastra/core/agent";
import { createMCPClient } from "@mastra/mcp";
import { openai } from "@ai-sdk/openai";
async function main() {
// Your Vinkius token — get it at cloud.vinkius.com
const mcpClient = await createMCPClient({
servers: {
"navitia": {
url: "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp",
},
},
});
const tools = await mcpClient.getTools();
const agent = new Agent({
name: "Navitia Agent",
instructions:
"You help users interact with Navitia " +
"using 11 tools.",
model: openai("gpt-4o"),
tools,
});
const result = await agent.generate(
"What can I do with Navitia?"
);
console.log(result.text);
}
main();
* Every MCP server runs on Vinkius-managed infrastructure inside AWS - a purpose-built runtime with per-request V8 isolates, Ed25519 signed audit chains, and sub-40ms cold starts optimized for native MCP execution. See our infrastructure
About Navitia MCP Server
Connect your Navitia multimodal transit API to any AI agent and take full control of European public transportation planning, real-time service monitoring, and accessibility analysis through natural conversation.
Mastra's agent abstraction provides a clean separation between LLM logic and Navitia tool infrastructure. Connect 11 tools through the Vinkius and use Mastra's built-in workflow engine to chain tool calls with conditional logic, retries, and parallel execution — deployable to any Node.js host in one command.
What you can do
- Multimodal Journey Planning — Plan door-to-door trips combining metro, bus, tram, RER, regional rail, walking, cycling, bike-sharing, and car
- Place Search — Find transit stops, stations, addresses, and POIs with autocomplete search across French and European networks
- Real-Time Departures — Check upcoming departures at any transit stop with ETAs, platforms, and delay indicators
- Arrival Tracking — Monitor incoming services for passenger pickup and connection coordination
- Stop Schedules — Access complete timetables for any transit stop with weekday/weekend/holiday patterns
- Nearby Discovery — Find all transit stops near any geographic coordinate with distance calculations
- Service Disruptions — Check active alerts, strikes, maintenance works, and operational notices across networks
- Line Exploration — Browse all transit lines by mode type (metro, bus, tram, rail) with operator affiliations
- Network Analysis — Research transit operators including RATP, SNCF, TCL, RTM, and regional authorities
- Isochrone Mapping — Generate accessibility maps showing reachable areas within time limits from any point
- Coverage Discovery — List all available coverage regions with data validity periods and contributor information
The Navitia MCP Server exposes 11 tools through the Vinkius. Connect it to Mastra AI in under two minutes — no API keys to rotate, no infrastructure to provision, no vendor lock-in. Your configuration, your data, your control.
How to Connect Navitia to Mastra AI via MCP
Follow these steps to integrate the Navitia MCP Server with Mastra AI.
Install dependencies
Run npm install @mastra/core @mastra/mcp @ai-sdk/openai
Replace the token
Replace [YOUR_TOKEN_HERE] with your Vinkius token
Run the agent
Save to agent.ts and run with npx tsx agent.ts
Explore tools
Mastra discovers 11 tools from Navitia via MCP
Why Use Mastra AI with the Navitia MCP Server
Mastra AI provides unique advantages when paired with Navitia through the Model Context Protocol.
Mastra's agent abstraction provides a clean separation between LLM logic and tool infrastructure — add Navitia without touching business code
Built-in workflow engine chains MCP tool calls with conditional logic, retries, and parallel execution for complex automation
TypeScript-native: full type inference for every Navitia tool response with IDE autocomplete and compile-time checks
One-command deployment to any Node.js host — Vercel, Railway, Fly.io, or your own infrastructure
Navitia + Mastra AI Use Cases
Practical scenarios where Mastra AI combined with the Navitia MCP Server delivers measurable value.
Automated workflows: build multi-step agents that query Navitia, process results, and trigger downstream actions in a typed pipeline
SaaS integrations: embed Navitia as a first-class tool in your product's AI features with Mastra's clean agent API
Background jobs: schedule Mastra agents to query Navitia on a cron and store results in your database automatically
Multi-agent systems: create specialist agents that collaborate using Navitia tools alongside other MCP servers
Navitia MCP Tools for Mastra AI (11)
These 11 tools become available when you connect Navitia to Mastra AI via MCP:
get_arrivals
Returns list of arriving services with line names and codes, origins, scheduled and real-time arrival times, platform information, delay indicators, and mode types. Essential for passenger pickup coordination, arrival monitoring, connection planning, and real-time arrival boards. AI agents use this when users ask "when does the next train arrive at this station", "show incoming services at stop X", or need to track arriving services for passenger coordination. Supports both theoretical schedules and real-time arrival predictions when operator data feeds are available. Get upcoming arrivals at a specific transit stop
get_coverage
Shows which cities and metropolitan areas are covered, data freshness indicators, and the contributing transit authorities for each region. Essential for discovering which transit networks are accessible through the API, validating region IDs for subsequent queries, understanding data coverage scope, and planning integration scope. AI agents should use this when users ask "what cities does Navitia cover", "show me all available transit regions", or need to identify the correct region ID (e.g., "fr-idf" for Paris/Ile-de-France) before making region-specific queries for lines, disruptions, or journeys. List all available coverage regions in the Navitia platform
get_departures
Returns list of departing services with line names and codes, destinations, scheduled and real-time departure times, platform or bay information, delay indicators, direction codes, and physical/commercial mode types (metro, bus, tram, RER, Transilien). Supports real-time data when available from operators. Essential for passenger information displays, departure boards, real-time transit monitoring, and journey planning. AI agents should reference this when users ask "when is the next metro from this station", "show departures from stop ID X", or need to monitor upcoming services at a known transit stop. Use data_freshness parameter to choose base_schedule (theoretical timetable) or realtime (including disruptions and delays). Get upcoming departures from a specific transit stop
get_disruptions
Returns active disruptions with affected lines, routes, stops, and networks, disruption descriptions, severity levels (minor, major, blocking), start and end timestamps, cause types (incident, maintenance, strike, weather), impact descriptions, and detour or alternative service recommendations. Covers all modes including metro, bus, tram, RER, Transilien, and regional rail across French and European networks. Essential for disruption awareness, passenger communication, journey reliability monitoring, and travel planning during service changes. AI agents should reference this when users ask "are there any disruptions on the Paris metro", "is there a strike on SNCF trains", or need to check service reliability before planning journeys. Get active service disruptions and alerts for a transit region
get_isochrone
Returns GeoJSON polygon boundaries, reachable area statistics, travel time bands, and accessibility metrics. Essential for urban planning, real estate location analysis, accessibility studies, job market research, school catchment analysis, and understanding transit connectivity. AI agents use this when users ask "what area can I reach within 30 minutes by metro from this address", "show me the accessible zone in 45 minutes by public transport", or need to analyze geographic accessibility from a specific location for housing, employment, or service planning. Generate an isochrone map showing reachable area from a point within a time limit
get_lines
Returns lines with codes, names, network affiliations, physical modes (metro, bus, tram, RER, rail), commercial modes, colors, text colors, route counts, and operational information. Covers metro systems (RATP Paris, TCL Lyon, TCL Marseille), bus networks, tramway systems, RER lines, Transilien suburban rail, and regional TER services across France. Essential for transit network exploration, line identification, route planning context, network analysis, and understanding service coverage by mode type. AI agents should use this when users ask "list all metro lines in Paris", "show me all tram lines in Lyon", or need line metadata to understand transit network structure and operator affiliations. List all transit lines in a coverage region
get_nearby_stops
Returns nearby objects sorted by distance with coordinates, names, types (stop point, stop area, station, address, POI), distances from search point, served lines, and administrative information. Essential for location-based transit discovery, "stops near me" features, geographic transit analysis, multimodal connection identification, and traveler navigation. AI agents use this when users ask "what metro stations are near my current location", "find transit stops within 500m of these coordinates", or need to discover accessible transit options from a specific geographic point. Supports filtering by object type (stop_point, stop_area, poi, address) and adjustable search radius. Find transit stops near a geographic coordinate
get_networks
Returns network information including names, codes, contributing authorities, coverage areas, associated lines and routes, and operational status. Covers major operators like RATP (Paris metro/bus/tram), SNCF (RER/Transilien/TER), TCL (Lyon), RTM (Marseille), TCL (Toulouse), and dozens of regional and local operators across France. Essential for operator research, network scoping, regional transit analysis, and understanding service governance structure. AI agents should reference this when users ask "what operators run transit in Paris", "list all networks in Ile-de-France", or need to identify transit operators for a specific region before querying lines or disruptions. List all transit operators and networks in a coverage region
get_stop_schedule
Returns all scheduled departures with routes, destinations, first and last departure times, service frequency, headway signatures (days of operation), and physical/commercial mode information. Shows complete timetable structure including weekday, weekend, and holiday service patterns. Essential for comprehensive schedule analysis, journey planning at specific times, timetable visualization, and understanding service frequency throughout the day. AI agents should use this when users ask "show me the full timetable for this metro station", "what times does this bus run on Sundays", or need complete schedule data for a transit stop. Supports depth parameter to control level of detail in route and destination information. Get full timetable for a specific transit stop
plan_journey
Supports combining public transit (metro, bus, tram, regional trains, high-speed rail), walking, cycling, car, bike-sharing (Vélib), and ridesharing. Returns complete itineraries with departure and arrival times, total duration, number of transfers, detailed legs with mode types, line names, operators, intermediate stops, walking distances, real-time disruption alerts, accessibility information (wheelchair access), and fare estimates. Essential for travel planning, multimodal route comparison, passenger information systems, and Mobility-as-a-Service applications across France and European cities. AI agents should use this when users ask "how do I get from Gare du Nord to Eiffel Tower", "plan a trip from Lyon Part-Dieu to Marseille", or need multimodal journey options with timing, transfers, and accessibility details. Supports traveler profiles including wheelchair, slow walker, fast walker, and luggage. Plan a multimodal trip between two locations in France or Europe
search_places
Returns transit stops (stop areas, stop points), stations (metro, tram, bus, rail), addresses, administrative areas, and points of interest with their IDs, names, coordinates, types, and administrative information. Supports autocomplete-style search for journey planning interfaces and location discovery. Essential for stop discovery, address resolution, geocoding, journey origin/destination identification, and building location-based transit features. AI agents should use this when users ask "find the metro station near Champs-Elysees", "search for stops called Republique", or need to identify place IDs and coordinates for use in journey planning queries. Results include embedded links to departures, schedules, and nearby objects for further exploration. Search for transit stops, stations, addresses, and POIs by name
Example Prompts for Navitia in Mastra AI
Ready-to-use prompts you can give your Mastra AI agent to start working with Navitia immediately.
"Plan a trip from Gare du Nord to the Eiffel Tower using public transit in Paris."
"Show me all metro departures from Chatelet station in the next 20 minutes."
"What areas can I reach within 45 minutes by public transit from Lyon Part-Dieu station?"
Troubleshooting Navitia MCP Server with Mastra AI
Common issues when connecting Navitia to Mastra AI through the Vinkius, and how to resolve them.
createMCPClient not exported
npm install @mastra/mcpNavitia + Mastra AI FAQ
Common questions about integrating Navitia MCP Server with Mastra AI.
How does Mastra AI connect to MCP servers?
MCPClient with the server URL and pass it to your agent. Mastra discovers all tools and makes them available with full TypeScript types.Can Mastra agents use tools from multiple servers?
Does Mastra support workflow orchestration?
Connect Navitia with your favorite client
Step-by-step setup guides for every MCP-compatible client and framework:
Anthropic's native desktop app for Claude with built-in MCP support.
AI-first code editor with integrated LLM-powered coding assistance.
GitHub Copilot in VS Code with Agent mode and MCP support.
Purpose-built IDE for agentic AI coding workflows.
Autonomous AI coding agent that runs inside VS Code.
Anthropic's agentic CLI for terminal-first development.
Python SDK for building production-grade OpenAI agent workflows.
Google's framework for building production AI agents.
Type-safe agent development for Python with first-class MCP support.
TypeScript toolkit for building AI-powered web applications.
TypeScript-native agent framework for modern web stacks.
Python framework for orchestrating collaborative AI agent crews.
Leading Python framework for composable LLM applications.
Data-aware AI agent framework for structured and unstructured sources.
Microsoft's framework for multi-agent collaborative conversations.
Connect Navitia to Mastra AI
Get your token, paste the configuration, and start using 11 tools in under 2 minutes. No API key management needed.
