Navitia MCP Server for Pydantic AI 11 tools — connect in under 2 minutes
Pydantic AI brings type-safe agent development to Python with first-class MCP support. Connect Navitia through the Vinkius and every tool is automatically validated against Pydantic schemas — catch errors at build time, not in production.
ASK AI ABOUT THIS MCP SERVER
Vinkius supports streamable HTTP and SSE.
import asyncio
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPServerHTTP
async def main():
# Your Vinkius token — get it at cloud.vinkius.com
server = MCPServerHTTP(url="https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp")
agent = Agent(
model="openai:gpt-4o",
mcp_servers=[server],
system_prompt=(
"You are an assistant with access to Navitia "
"(11 tools)."
),
)
result = await agent.run(
"What tools are available in Navitia?"
)
print(result.data)
asyncio.run(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.
Pydantic AI validates every Navitia tool response against typed schemas, catching data inconsistencies at build time. Connect 11 tools through the Vinkius and switch between OpenAI, Anthropic, or Gemini without changing your integration code — full type safety, structured output guarantees, and dependency injection for testable agents.
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 Pydantic 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 Pydantic AI via MCP
Follow these steps to integrate the Navitia MCP Server with Pydantic AI.
Install Pydantic AI
Run pip install pydantic-ai
Replace the token
Replace [YOUR_TOKEN_HERE] with your Vinkius token
Run the agent
Save to agent.py and run: python agent.py
Explore tools
The agent discovers 11 tools from Navitia with type-safe schemas
Why Use Pydantic AI with the Navitia MCP Server
Pydantic AI provides unique advantages when paired with Navitia through the Model Context Protocol.
Full type safety: every MCP tool response is validated against Pydantic models, catching data inconsistencies before they reach your application
Model-agnostic architecture — switch between OpenAI, Anthropic, or Gemini without changing your Navitia integration code
Structured output guarantee: Pydantic AI ensures tool results conform to defined schemas, eliminating runtime type errors
Dependency injection system cleanly separates your Navitia connection logic from agent behavior for testable, maintainable code
Navitia + Pydantic AI Use Cases
Practical scenarios where Pydantic AI combined with the Navitia MCP Server delivers measurable value.
Type-safe data pipelines: query Navitia with guaranteed response schemas, feeding validated data into downstream processing
API orchestration: chain multiple Navitia tool calls with Pydantic validation at each step to ensure data integrity end-to-end
Production monitoring: build validated alert agents that query Navitia and output structured, schema-compliant notifications
Testing and QA: use Pydantic AI's dependency injection to mock Navitia responses and write comprehensive agent tests
Navitia MCP Tools for Pydantic AI (11)
These 11 tools become available when you connect Navitia to Pydantic 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 Pydantic AI
Ready-to-use prompts you can give your Pydantic 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 Pydantic AI
Common issues when connecting Navitia to Pydantic AI through the Vinkius, and how to resolve them.
MCPServerHTTP not found
pip install --upgrade pydantic-aiNavitia + Pydantic AI FAQ
Common questions about integrating Navitia MCP Server with Pydantic AI.
How does Pydantic AI discover MCP tools?
MCPServerHTTP instance with the server URL. Pydantic AI connects, discovers all tools, and generates typed Python interfaces automatically.Does Pydantic AI validate MCP tool responses?
Can I switch LLM providers without changing MCP code?
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 Pydantic AI
Get your token, paste the configuration, and start using 11 tools in under 2 minutes. No API key management needed.
