Mobility Data API Tool Server for AI Agents (MCP) - n8n Workflow

Expose the O2 Mobility API as an AI tool using this specialized n8n workflow. Integrate transit calculation and info retrieval for intelligent AI agents using the n8n trigger.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?

AI Developers and Engineers looking to extend AI agent capabilities with real-time mobility data.
n8n Automation Specialists designing tool-use architectures for large language models.
Data Scientists requiring automated transit calculation based on Czech Republic mobile network data.
Users seeking robust, template-driven n8n templates for API integration.

Overview

This sophisticated n8n workflow addresses the challenge of securely and dynamically integrating proprietary APIs—specifically the O2 Mobility API (providing Czech Republic transit data)—into AI agent frameworks. By utilizing the specialized Multi-tool Call Protocol (MCP) capabilities, this n8n template converts standard HTTP requests into structured, callable functions for AI models.

This approach means your AI agent doesn't need to understand complex API specifics; it simply calls the dedicated n8n trigger endpoint. The n8n workflow handles parameter mapping via powerful $fromAI() expressions, ensuring seamless and accurate communication between the agent and the external API. This n8n solution simplifies tool creation and deployment, offering two key mobility operations ready for immediate use.

How it Works

This specialized n8n workflow leverages the Multi-tool Call Protocol (MCP) to manage external API interactions. The core of this system is the Mobility MCP Server n8n trigger node. This n8n trigger serves as the dedicated public endpoint for AI agent communication. When an AI agent sends a request (specifying which tool to use) to the dedicated n8n trigger URL, the workflow automatically routes the request to one of the two available n8n node tools:


  1. Retrieve Application Info (Info): If the agent needs application details, this n8n node executes a simple GET request to the /info endpoint.

  2. Calculate Transit Route (Transit): If the agent requests transit data, this n8n node is activated. It is configured to automatically extract path and query parameters (like from, to, fromType, etc.) from the AI agent’s payload using $fromAI() expressions. This makes the n8n workflow highly dynamic.

Once the selected HTTP Request n8n node retrieves the data from the Mobility API, the response is natively returned through the initial Mobility MCP Server n8n trigger, delivering the result back to the calling AI agent.

Installation Guide

To deploy and activate this powerful n8n workflow, follow these setup steps:


  1. Import the n8n Template: Load the provided JSON code into your self-hosted or cloud n8n instance.

  2. Authentication: This particular n8n workflow template does not require explicit authentication setup within the workflow itself (it assumes necessary keys are handled by the external API system if required, or that the sandbox access is open).

  3. Activate the n8n Workflow: Switch the workflow from 'inactive' to 'active'. This starts the MCP server using the n8n trigger.

  4. Get the MCP URL: Copy the unique webhook URL generated by the Mobility MCP Server n8n trigger node.

  5. Connect AI Agent: Use this copied URL in your AI agent configuration (e.g., LangChain or OpenAI function calling setup) to register the 'Mobility' tool server. The AI agent can now utilize the two exposed operations provided by this n8n template.

Node Details

Mobility MCP Server (MCP Trigger n8n Node):
Function: Acts as the HTTP endpoint (the server) for receiving requests from AI agents, routing them to the appropriate tool, and returning the API response. This is the crucial n8n trigger for the entire system.
Key Configuration: Path is set to mobility-mcp.

Retrieve Application Info (HTTP Request Tool n8n Node):
Function: Implements the 'Info' tool, retrieving basic version and application data from the Mobility API.
Key Configuration: URL is fixed: https://developer.o2.cz/mobility/sandbox/api/info. The tool description guides the AI agent on when to use this function.

Calculate Transit Route (HTTP Request Tool n8n Node):
Function: Implements the 'Transit' tool, calculating movement between designated residential units based on parameters provided by the AI agent.
* Key Configuration: The URL and query parameters extensively use the $fromAI() expression, such as {{ $fromAI('from', 'source basic residential unit', 'string') }}. This ensures the n8n node dynamically captures user-specified variables from the AI's call.

Related n8n Workflows

Free

Nodes: 3 Nodes
Updated: December 26 2025
View all
Created by

A hacker by nature, programmer by trade ⚒️ I'm looking to collaborate on things that save human labor 📫 How to reach me Github👇 -> Discord

Featured*