Transit MCP for LangChain
com.transitmcp/transit-mcp
Trips, departures, alerts and vehicles for NYC, DC and the SF Bay Area.
client:LangChain
transport:streamable-http
tools:18
Install Transit MCP in LangChain
pip install langchain-mcp-adapters
from langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"transit-mcp": {
"transport": "streamable_http",
"url": "https://transitmcp.com/mcp",
}
})
tools = await client.get_tools()
get_tools() returns the server's tools as LangChain tools, ready for an agent. LangChain docs
What LangChain can do once it is connected
- get_station_predictions
- search_stations
- get_stations_by_line
- get_all_stations
- get_station_transfers
- get_incidents
- get_elevator_incidents
- get_bus_predictions
- get_bus_routes
- get_bus_stops
- get_bus_positions
- get_train_positions
- get_route_info
- find_transit
- plan_trip
- get_departures
- get_service_status
- get_vehicle_status