4,500+ servers built on MCP Fusion
Vinkius
LA Metro logo
Vinkius
LlamaIndex logo

How to Use the LA Metro MCP in LlamaIndex

Turn live LA Metro data into a searchable knowledge base for your LlamaIndex RAG apps.

See Vinkius in Action

Works with every AI agent you already use

…and any MCP-compatible client

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

Connect LA Metro MCP to LlamaIndex

Create your Vinkius account to connect LA Metro to LlamaIndex 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

Index Live Transit Events

Use this MCP server to call `get_service_alerts` every hour and feed the results into a LlamaIndex vector store. Now you have a searchable history of every transit disruption. Your agent isn't just live anymore; it has a memory. When a user asks, "How often is the Red Line down for maintenance?" your RAG application can query its own indexed knowledge. It provides answers based on a history of real events, not just what's happening this second.

Ground Answers in Real Data

Stop your agent from making things up. When you build a RAG pipeline with LlamaIndex, you're forcing it to base its answers on the data you provide. You can index all the routes from `get_bus_routes` and all the stations from `get_rail_stations`. Now, when a user asks about a route, the agent's response is pulled from that specific, indexed data. It's not guessing based on its training data; it's retrieving facts from the LA Metro tool outputs you've already saved.

Build a Transit Memory with LlamaIndex

There's no reason to call `get_rail_routes` every five minutes. The rail lines don't change that often. With LlamaIndex, you can index that static data once and keep it in a knowledge base for your agent to reference. This makes your app faster and cheaper to run. The agent can query its local index to find the line ID for the Expo Line, then use that ID to make a live, real-time call to `get_rail_arrivals`. It's the best of both worlds: a fast, local knowledge base combined with targeted, live API calls.

Setup guide

Set up LA Metro MCP in LlamaIndex

Prerequisites

  • Python 3.10+ installed
  • llama-index-tools-mcp package
  • Active Vinkius subscription with a valid endpoint token
  1. 1

    Install dependencies

    Run pip install llama-index-tools-mcp llama-index-llms-openai. The MCP tools package provides BasicMCPClient and McpToolSpec.

  2. 2

    Connect with BasicMCPClient

    Point BasicMCPClient to your Vinkius endpoint URL. Replace [YOUR_TOKEN_HERE] with your token from cloud.vinkius.com. Supports SSE and Streamable HTTP transports.

  3. 3

    Convert to LlamaIndex tools

    Call mcp_tool_spec.to_tool_list_async() to convert all LA Metro MCP tools into native FunctionTool objects that any LlamaIndex agent can use.

  4. 4

    Run with any LLM

    Create a FunctionAgent with the tools and your preferred LLM. Swap OpenAI for Anthropic, Gemini, or any LlamaIndex-supported provider.

agent.py
from llama_index.tools.mcp import BasicMCPClient, McpToolSpec
from llama_index.core.agent.workflow import FunctionAgent
from llama_index.llms.openai import OpenAI

# Connect to the MCP
mcp_client = BasicMCPClient(
    "https://edge.vinkius.com/[YOUR_TOKEN_HERE]/mcp"
)
mcp_tool_spec = McpToolSpec(client=mcp_client)

# Convert MCP tools to LlamaIndex tools
tools = await mcp_tool_spec.to_tool_list_async()

# Create and run the agent
agent = FunctionAgent(
    tools=tools,
    llm=OpenAI(model="gpt-4o"),
    system_prompt="You have access to LA Metro tools.",
)
response = await agent.run("List recent LA Metro data")

Independent Platform Disclaimer: Vinkius is an independent platform and is not affiliated with, endorsed by, sponsored by, verified by, or otherwise authorized by LA Metro. 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 LA Metro MCP in LlamaIndex

You'd set up a process to periodically call `get_service_alerts` and ingest the results into a LlamaIndex vector index. Your agent can then query that index to find patterns or details about disruptions that happened days or weeks ago.
Yes, that's exactly what it's for. You can index the output of the LA Metro MCP server tools right alongside your own notes, PDFs of city plans, or other documents to create a single, unified knowledge source for your agent.
LlamaIndex is built for Retrieval-Augmented Generation (RAG). Its main purpose isn't just to call the LA Metro tools, but to index their output. This creates a searchable knowledge base, allowing your agent to answer questions based on a history of real data.
No, you control the indexing process. You would set up a script or data pipeline that calls the LA Metro tools on a schedule (e.g., every hour for `get_service_alerts`) and adds the new data to your LlamaIndex index.
You decide what gets indexed. Typically, you'll be indexing the JSON output from the MCP server's tools — things like lists of bus stops, service alert details, or route schedules. This data is stored in your private vector index, which you manage.

Start using the LA Metro MCP today

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

Built & Managed by Vinkius 30s setup 12 tools

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

No hosting. No infrastructure. No complex setup.
All 12 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.