4,500+ servers built on MCP Fusion
Vinkius
CTA logo
Vinkius
OpenAI Agents SDK logo

How to Use the CTA MCP in OpenAI Agents SDK

Get live CTA bus and train data into your OpenAI Agent to build reliable, location-aware transit assistants.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

CTA MCP on Cursor AI Code Editor MCP Client CTA MCP on Claude Desktop App MCP Integration CTA MCP on OpenAI Agents SDK MCP Compatible CTA MCP on Visual Studio Code MCP Extension Client CTA MCP on GitHub Copilot AI Agent MCP Integration CTA MCP on Google Gemini AI MCP Integration CTA MCP on Lovable AI Development MCP Client CTA MCP on Mistral AI Agents MCP Compatible CTA MCP on Amazon AWS Bedrock MCP Support
MCP Servers - Free for Subscribers
OpenAI Agents SDK

Connect CTA MCP to OpenAI Agents SDK

Create your Vinkius account to connect CTA to OpenAI Agents SDK and route execution through our secure gateway. The platform manages server hosting, runtime updates, and security layers. Configuration requires no manual server provisioning.

GDPR Free for Subscribers

Track Every Train and Bus in Chicago

Your agent gets a live view of the entire CTA network. Use `get_bus_vehicles` to see every active bus on a specific route or `get_train_positions` to pinpoint all trains on the Red Line. You're not guessing based on a schedule; you're getting real-time latitude and longitude coordinates, speed, and heading for every vehicle. This is the ground truth for any transit application. Your OpenAI Agent can use this data to build live maps, calculate dynamic ETAs, or monitor fleet distribution. The `get_route_status` tool gives a quick summary of system health, so your agent knows if there are widespread delays before it even starts planning a trip.

Build a Better Transit App with an OpenAI Agent

Stop scraping websites or using stale GTFS data. The `get_bus_predictions` and `get_train_arrivals` tools connect your agent directly to the CTA's real-time prediction engine. It returns arrival times in minutes, vehicle IDs, and even tells you if the prediction is based on a schedule or live tracking. Your agent can answer "When's the next bus?" with confidence. First, it can use `get_bus_stops` to find the right stop ID for a route. Then, it calls for predictions. This MCP Server handles the connection, so your agent just focuses on giving the user a straight answer.

Handle Delays and Reroutes Like a Local

Nothing's worse than a "scheduled" arrival for a train that isn't running. The `get_service_alerts` tool gives your agent access to official disruption notices, from track work to street festivals. It provides descriptions, severity, and detour info. When your OpenAI Agent plans a trip, it can first check `get_service_alerts` for the specific route. This lets it proactively find alternatives or just warn the user about a delay. It's the difference between a useful assistant and one that just reads a schedule. This is a key feature for any serious transit tool using this MCP.

Setup guide

Set up CTA MCP in OpenAI Agents SDK

Prerequisites

  • Python 3.10+ installed
  • openai-agents package (pip install openai-agents)
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install the SDK

    Run pip install openai-agents to install the OpenAI Agents SDK. The MCP integration is built-in — no extra dependencies needed.

  2. 2

    Connect via SSE transport

    Use MCPServerSse with your Vinkius endpoint URL. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com. The SDK auto-discovers all CTA tools at runtime.

  3. 3

    Create your Agent

    Pass the MCP to Agent(mcp_servers=[server]). The agent receives CTA tools as native definitions — JSON schemas resolve automatically.

  4. 4

    Run the agent

    Call Runner.run(agent, prompt) to execute. The agent invokes the appropriate CTA tools and returns structured results. Copy the full example on the right to get started.

agent.py
import asyncio
from agents import Agent, Runner
from agents.mcp import MCPServerSse

async def main():
    async with MCPServerSse(
        url="https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
    ) as server:
        agent = Agent(
            name="CTA Agent",
            instructions="You have access to CTA tools.",
            mcp_servers=[server],
        )
        result = await Runner.run(agent, "List recent transactions")
        print(result.final_output)

asyncio.run(main())

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by CTA. All third-party trademarks, logos, and brand names are the property of their respective owners. Their use on this website is strictly for informational purposes to identify service compatibility and interoperability.

Why Choose Vinkius

Vinkius connects your tools to AI with real-time monitoring and automatic cost savings — all from one dashboard.

Real-time monitoring

Live

visibility into every interaction

Connect your favorite tools to your AI and see exactly what's happening — every request, every response, in real time.

Built-in savings

60%

lower AI costs

Vinkius compresses data between your apps and your AI automatically. Lower bills every month — no configuration required.

Single dashboard

One

place for every integration

Every tool your AI connects to, managed from a single screen. One account, complete control.

Common questions about CTA MCP in OpenAI Agents SDK

Your agent should first use the `get_bus_stops` tool. It can query by route ID to get a full list of stops, including their unique IDs, names, and direction. It then uses that stop ID with `get_bus_predictions`.
Yes. The `get_service_alerts` tool is designed for this. Your OpenAI Agent can query it for a specific route or get all system-wide alerts to see if there are any disruptions that might affect the user's travel.
`get_bus_vehicles` gives you the live GPS location of the bus right now. `get_bus_predictions` tells you when that bus is expected to arrive at a specific stop in the future. You'd use the first for a live map and the second to answer "When's my bus coming?"
This server exposes 11 tools for the CTA system. They cover bus and train tracking, arrival predictions, service alerts, and route information. Your agent will see all of them automatically upon connection.
Your agent handles public CTA transit data like bus locations, train arrival times, and service alerts. Vinkius manages the connection to this MCP server in an isolated sandbox. Your agent's credentials aren't shared; it uses a single Vinkius token for access, and all operations are ephemeral.

Start using the CTA MCP today

We host it, we monitor it, we maintain it. You just paste one token.

Built & Managed by Vinkius 30s setup 11 tools

We've already built the connector for CTA. Just plug in your AI agents and start using Vinkius.

No hosting. No infrastructure. No complex setup.
All 11 tools are live and waiting. You're up and running in seconds.

Claude Claude
ChatGPT ChatGPT
Cursor Cursor
Gemini Gemini
Windsurf Windsurf
VS Code VS Code
JetBrains JetBrains
Vercel Vercel
+ other MCP clients

Vinkius gives your AI agents access to the full catalog of app connectors, all fully managed, secure, and enterprise-ready. One subscription, every tool you need.

Zero hosting required Full MCP catalog included Enterprise-grade security Auto-updated by Vinkius

Built, hosted, and secured by Vinkius. You just connect and go.