TransCAPI

السجل الرسمي أخرى

UK and Ireland transport: live buses and trains, journey planning, rail fares, disruptions.

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package transcapi-mcp
Claude Code
claude mcp add transcapi -e 'TRANSCAPI_API_KEY=<your transcapi_api_key>' -e 'TRANSCAPI_BASE_URL=<TRANSCAPI_BASE_URL>' -- uvx transcapi-mcp==0.1.3
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "transcapi": {
            "command": "uvx",
            "args": [
                "transcapi-mcp==0.1.3"
            ],
            "env": {
                "TRANSCAPI_API_KEY": "<your transcapi_api_key>",
                "TRANSCAPI_BASE_URL": "<TRANSCAPI_BASE_URL>"
            }
        }
    }
}

متغيرات البيئة

  • TRANSCAPI_API_KEY إلزامي سري Your TransCAPI API key. Free at https://www.transcapi.com/signup
  • TRANSCAPI_BASE_URL API address, if not https://api.transcapi.com

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. TransCAPI MCP server
  2. Setup
  3. Tools
  4. Configuration
  5. Attribution
  6. Licence

TransCAPI MCP server

Lets AI assistants such as Claude answer questions about public transport in Great Britain and Ireland with live data: "When's the next train from Leeds to York, and is it on time?", "Where's the 52 bus?", "Is anything disrupting my route home?"

It connects an assistant to TransCAPI, which covers England, Scotland, Wales and the island of Ireland (plus the Netherlands and Belgium): stops and places, bus and rail departures with live running, live bus positions, journey planning with rail fares, disruptions matched to a route, and measured bus punctuality.

Setup

  1. Get a free API key at https://www.transcapi.com/signup (200 requests a day, every endpoint).
  2. Add the server to your MCP client. For Claude Desktop, in claude_desktop_config.json:

     {
       "mcpServers": {
         "transcapi": {
           "command": "uvx",
           "args": ["transcapi-mcp"],
           "env": { "TRANSCAPI_API_KEY": "your-key" }
         }
       }
     }

    For Claude Code:

     claude mcp add transcapi --env TRANSCAPI_API_KEY=your-key -- uvx transcapi-mcp

    Or install it yourself with pip install transcapi-mcp and run transcapi-mcp.

Tools

ToolWhat it answers
search_placesFind a town, village, postcode or stop by name
nearby_stopsBus, tram and rail stops near a point, with which way the buses go
nearby_stationsRail stations near a point
bus_departuresWhat's leaving (or arriving at) a bus stop, with live times for tracked buses
rail_departuresLive trains at a station: expected times, platforms, cancellations, delay reasons
train_serviceEvery station one train calls at, live for today
bus_serviceEvery stop one bus journey calls at, and where the bus is now
live_busesBuses on the road near a point, with delays where tracked
disruptionsPlanned works, incidents and line status, by area, line or a journey's route
plan_journeyPublic transport journeys between two points (South and West Yorkshire and West Sussex for now)

All tools are read-only.

Configuration

Variable
TRANSCAPI_API_KEYRequired. Your TransCAPI key.
TRANSCAPI_BASE_URLOptional. Defaults to https://api.transcapi.com.

Attribution

TransCAPI is built on official open data. If you show its data to other people, credit the sources as described at https://www.transcapi.com/docs/data-sources.

Licence

MIT.

الأسئلة الشائعة

ما هو TransCAPI؟

UK and Ireland transport: live buses and trains, journey planning, rail fares, disruptions.

كيف أثبّت TransCAPI؟

يعمل على جهازك. في Claude Code: claude mcp add transcapi -e 'TRANSCAPI_API_KEY=<your transcapi_api_key>' -e 'TRANSCAPI_BASE_URL=<TRANSCAPI_BASE_URL>' -- uvx transcapi-mcp==0.1.3. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج TransCAPI إلى مفتاح API؟

نعم. يتطلب TRANSCAPI_API_KEY، وتضبطها في إعداداته.

هل TransCAPI مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون TransCAPI؟

ينشره tcdataconsultants. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.