Get the FREE Ultimate OpenClaw Setup Guide →

ai -stockholm-public-transport

MCP Server for Stockholm public transport. Ask AI "When is the next train from Sollentuna to Upplands Väsby?"

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport http jeltechnologies-ai-mcp-stockholm-public-transport http://<your-ip-here>:18107/api/v1/sse

How to use

This MCP server provides AI agents with real-time access to Stockholm public transport data from SL. It exposes a server-sent events (SSE) API that streams essential transit information in a simplified format suitable for chatbots and autonomous agents. The project is designed to work with the Open WebUI MCPO proxy, enabling integration with OpenAI, Claude, or other MCP-enabled tools via the MCPO proxy. To use it, run the Docker-based deployment described in the installation steps, then point your MCP-enabled assistant at the SSE URL to query live bus data and related transit information. In practice, you’ll use questions like “What is the next bus to X?” and the agent will fetch the latest data from SL, translate it into a human-friendly answer, and present it through your chat interface.

Tools and capabilities include:

  • Real-time SSE feed from SL through the MCP server for Stockholm public transport.
  • Compatibility with Open WebUI via MCPO proxy for broad AI tool integrations.
  • Simplified data translation: the server converts SL data models into concise, task-focused information suitable for chat responses.
  • Deployment via Docker Compose, enabling quick setup on a Linux box or server with network access to SL services.

To use within a chat: connect your MCP-enabled model to the stockhol-public-transport endpoint as configured, then issue natural language queries like “What’s the next bus toCityCenter from Slussen?” The agent will pull the latest data, extract the relevant event details (destination, time, platform), and present a clear answer in natural language.

How to install

Prerequisites:

  • A Linux box or server with Docker and Docker Compose installed.
  • Internet access to pull Docker images and SL data.
  • Optional: Open WebUI setup if you plan to use MCPO with OpenAI/Claude.

Installation steps:

  1. Prepare the host
  • Ensure Docker and Docker Compose are installed on your Linux box.
  • Create a directory for the MCP project and navigate into it.
  1. Clone the repository
  • git clone https://github.com/<repository>/jeltechnologies-ai-mcp-stockholm-public-transport.git
  • cd jeltechnologies-ai-mcp-stockholm-public-transport
  1. Configure the MCP server
  • Edit the configuration file at docker/mcpo-config/config.json (or the provided path if different).
  • Set the IP address to the public or reachable IP of your Linux box: { "mcpServers": { "stockholm-public-transport": { "type": "sse", "url": "http://<your-ip-here>:18107/api/v1/sse" } } }
  • Save the file.
  1. Start the services
  • Run: docker compose up
  • This starts a Spring application and the MCPO proxy that enables access through OpenAI/AI tools.
  • To run in detached mode: docker compose up -d && docker compose logs -f
  1. Verify accessibility
  • Ensure port 18107 is reachable from your network and that the proxy (MCPO) on port 18108 is accessible if you’re using OpenWebUI.
  1. Optional OpenWebUI setup
  • Follow the Open WebUI integration steps to connect the tool via URL http://<your-ip-here>:18108/stockholm-public-transport and add it to your models for universal access in chats.

Additional notes

Notes and tips:

  • The mcpServers configuration uses the SSE endpoint provided by the service: http://<IP>:18107/api/v1/sse. Replace <IP> with the actual IP address of your server.
  • The MCPO proxy is used to bridge MCP to OpenAI/Open WebUI; ensure the MCPO container is running alongside the Spring application.
  • If you encounter connection issues, verify Docker containers are up (docker ps), check network accessibility (ping the host), and confirm that the SL data source is reachable.
  • Common issues include incorrect IP in config.json, firewall rules blocking ports 18107 or 18108, and mismatched MCPO URL paths.
  • Environment variables you might consider configuring include IP_ADDRESS for readability and ports for SSE/OpenWebUI if you customize deployments.

Related MCP Servers

Sponsor this space

Reach thousands of developers