ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที เข้าสู่ระบบด้วย Google เพื่อเขียนรีวิวได้แล้วต้นแบบ · อัปเดตทุก 30 นาที
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · วิธีติดตั้งภาษาไทยทุกตัว

Traintrackr

โดย hugorodgerbrownรุ่น 0.1.0i★ 0iรันบนคลาวด์
ชื่อใน registrylive.traintrackr/traintracker

วิธีติดตั้ง

ใช้ทำอะไรได้

ยังไม่มีคำอธิบายภาษาไทย ดูข้อเท็จจริงด้านล่าง หรือเปิดคำอธิบายต้นฉบับจากผู้ทำ

  • ต่อแบบ คลาวด์ (ต่อผ่านอินเทอร์เน็ต)
  • บัญชีหรือคีย์ ล็อกอินกับบริการตอนต่อ (OAuth)
  • หมวด อื่น ๆ
คำอธิบายต้นฉบับจากผู้ทำ (อังกฤษ)
GB (National Rail) train times: live departures, platforms, timetables and journey planning.

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ผลตรวจผ่าน 4/5 · สิ่งที่คุณถามผ่านเซิร์ฟเวอร์ของผู้ทำ (traintrackr.live) · ✓ ตรวจคำสั่งแล้ว 13 พ.ย. 2569

ขั้นแรก: คุณใช้ AI ตัวไหน

เลือกแอปที่คุณใช้ ขั้นตอนจะขึ้นด้านล่าง

ต่อกับ Claude ได้ · ประมาณ 2 นาที

ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม · ตั้งครั้งเดียวที่ claude.ai หรือแอปบนคอม แล้วใช้ในแชตได้ · บัญชีฟรีเพิ่มได้ 1 ตัว · แผน Team/Enterprise ให้เจ้าของ (Owner) เป็นคนเพิ่ม

  1. เปิดหน้า Connectors ของ Claude

    CustomizeConnectors

    CustomizeConnectors1Add2https://…3Add4
  2. กด “Add” → “Custom” → “Web” แล้วกรอก 2 ช่องนี้

    คัดลอกจากที่นี่ไปวางในช่องชื่อเดียวกันบนหน้าจอของ Claude แล้วกด Continue

    Name · ชื่อTraintrackr
    Remote MCP server URL · ที่อยู่https://traintrackr.live/mcp

    กด Continue ผ่านหน้าตรวจการล็อกอินที่ Claude ตรวจเจอ · หัวข้อ Authentication เลือกตามที่ผู้ทำบอก (Sign in now, Sign in when needed หรือ No sign in) แล้วกด Add

  3. เปิดใช้ในแชต

    +ConnectorsTraintrackr

  4. ลองเลย

    ใช้ Traintrackr บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude บอกว่ากำลังใช้ Traintrackr หรือมีชื่อเครื่องมือของ Traintrackr ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ ChatGPT ได้ ขึ้นกับแผน

MCP แบบเต็ม: ChatGPT Business, Enterprise หรือ Edu บนเว็บ · Pro: ต่อได้ด้วยสิทธิ์อ่านและดึงข้อมูล เครื่องมือที่แก้ข้อมูลอาจใช้ไม่ได้ · Plus: เอกสารยังไม่ยืนยัน ถ้าเห็นเมนูเพิ่ม MCP แบบกำหนดเองในหน้าปลั๊กอิน ลองตามขั้นตอนได้ · ใช้บนเว็บเท่านั้น

  1. เปิดหน้าเพิ่ม MCP ของ ChatGPT บนเว็บ

    Plugins+Add custom MCP server

    ChatGPTPlugins1+2https://…3Create4
  2. กรอกชื่อและที่อยู่

    ใส่ชื่อ แล้ววางที่อยู่ใต้ Connection ติ๊กยอมรับคำเตือน แล้วกด Create as a plugin

    Name · ชื่อTraintrackr
    Connection · ที่อยู่https://traintrackr.live/mcp
  3. เลือก Traintrackr ในแชต

    เปิดแชตใหม่แล้วเลือก Traintrackr จากรายการปลั๊กอินก่อนพิมพ์

  4. ลองเลย

    ใช้ Traintrackr บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า ChatGPT บอกว่ากำลังใช้ Traintrackr หรือมีชื่อเครื่องมือของ Traintrackr ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ OpenAI เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ Claude Code ได้ · ประมาณ 2 นาที

ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม

  1. เปิด Terminal

    Mac: กด Command+Space พิมพ์ Terminal · Windows: เปิด PowerShell

  2. วางคำสั่งนี้แล้วกด Enter

    claude mcp add --transport http --scope user traintracker https://traintrackr.live/mcp
  3. พิมพ์ /mcp ใน Claude Code

    ต้องเห็น Traintrackr ในรายการและขึ้นว่าเชื่อมต่อแล้ว

  4. ลองเลย

    ใช้ Traintrackr บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Claude Code บอกว่ากำลังใช้ Traintrackr หรือมีชื่อเครื่องมือของ Traintrackr ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Anthropic เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ Cursor ได้ · ประมาณ 2 นาที

ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม

  1. กดปุ่มนี้เพื่อเปิด Cursor

    เปิดใน Cursor

    Cursor จะถามยืนยันการติดตั้ง ให้กด Install

  2. เปิดแชตของ AI ใน Cursor โหมด Agent

  3. ลองเลย

    ใช้ Traintrackr บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า Cursor บอกว่ากำลังใช้ Traintrackr หรือมีชื่อเครื่องมือของ Traintrackr ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ Cursor เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

ต่อกับ VS Code ได้ · ประมาณ 2 นาที

ไม่ต้องใช้คีย์ ไม่ต้องลงโปรแกรม

  1. กดปุ่มนี้เพื่อเปิด VS Code

    เปิดใน VS Code

    VS Code จะถามยืนยันการติดตั้ง ให้กด Install

  2. เปิดแชตของ AI ใน VS Code โหมด Agent

  3. ลองเลย

    ใช้ Traintrackr บอกหน่อยว่าทำอะไรให้ฉันได้บ้าง แล้วลองทำให้ดูหนึ่งอย่าง

    ✓ ถ้า VS Code บอกว่ากำลังใช้ Traintrackr หรือมีชื่อเครื่องมือของ Traintrackr ขึ้นในคำตอบ แปลว่าต่อสำเร็จ

ชื่อเมนูตรวจกับหน้าช่วยเหลือของ VS Code เมื่อ 11 พ.ย. 2569 · หน้าจอของคุณอาจต่างเล็กน้อยตามรุ่นของแอป

โปรแกรมอื่นที่ใช้ MCP ได้ เช่น Windsurf, Zed หรือ Gemini CLI มีวิธีเพิ่มต่างกัน ดูวิธีของแต่ละตัวในหน้ารวมโปรแกรม

ดูโปรแกรมที่ใช้ MCP ทั้งหมด →

ที่อยู่สำหรับโปรแกรมที่ต่อผ่านเว็บ

ที่อยู่https://traintrackr.live/mcp

ค่าตั้งแบบไฟล์ JSON อยู่ในหัวข้อ “สำหรับคนเขียนโค้ด” ด้านล่าง

ติดตรงไหน? ถามคนที่ใช้ Traintrackr อยู่💬 พูดคุย →
สำหรับคนเขียนโค้ด: คำสั่ง Terminal และค่าตั้ง JSON

ต่อผ่านเว็บ

Claude Code

claude mcp add --transport http --scope user traintracker https://traintrackr.live/mcp

Cursor (~/.cursor/mcp.json)

{
  "mcpServers": {
    "traintracker": {
      "url": "https://traintrackr.live/mcp"
    }
  }
}

VS Code (mcp.json)

{
  "servers": {
    "traintracker": {
      "type": "http",
      "url": "https://traintrackr.live/mcp"
    }
  }
}

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

สรุป

ดาวน์โหลดต่อสัปดาห์i
ไม่มียอดใน npm/PyPI
โดเมนที่ยืนยัน
✓ traintrackr.live
การเชื่อมต่อ
รันบนคลาวด์
รุ่นล่าสุดi
0.1.0
หมวดi
อื่น ๆ
ส่งเข้า registryi
30 ก.ย. 2569
แก้โค้ดล่าสุดi
14 พ.ย. 2569
ผู้ทำ
hugorodgerbrown
เว็บผู้ทำ
traintrackr.live
สถานะใน registry
ใช้งานอยู่

ใช้กับโปรแกรมไหนได้

ดูจากแบบการต่อของ server ตัวนี้ และเอกสารของผู้ทำโปรแกรมแต่ละตัว ตรวจเมื่อ 10 พ.ย. 2569

ต่อผ่านคลาวด์ได้ใน

ClaudeChatGPTGooseLM StudioMsty StudioCherry StudioCursorVS Code + GitHub CopilotVisual StudioWindsurf (Devin Desktop)ZedKiroClineContinueJetBrains AI AssistantClaude CodeCodex CLIGemini CLIOpenCodenodecodeWarpLibreChatOpen WebUIRaycast

ดูโปรแกรมทั้งหมดพร้อมข้อดีข้อเสีย →

คู่มือที่เกี่ยวข้อง

ทำอะไรได้บ้าง

server ให้ล็อกอินก่อนจึงจะแสดงรายการเครื่องมือ

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 15 พ.ย. 2569

  • ! ควรระวัง

    ตัวตนผู้ทำตรงกับ repo

    ผู้ลงทะเบียน (traintrackr.live) ไม่ใช่เจ้าของ repo (hugorodgerbrown) อาจเป็นคนอื่นที่นำมาลงต่อ

  • ✓ ผ่าน

    ยังมีคนดูแล

    มีการแก้โค้ดล่าสุด เมื่อวาน

  • ✓ ผ่าน

    มีสัญญาอนุญาต (license)

    ใช้ MIT

  • ✓ ผ่าน

    endpoint ตอบ

    ตอบกลับใน 83 ms (HTTP 401)

  • ✓ ผ่าน

    ล็อกอินแบบ OAuth

    ประกาศวิธีล็อกอินแบบ OAuth ให้โปรแกรม AI พาไปล็อกอินเอง

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    ยังไม่ได้ตรวจ เราอ่านรายการเครื่องมือตอนตรวจ endpoint

เราตรวจอะไรบ้าง → · JSON

ผู้ทำ: ขอให้ตรวจใหม่ หรือแจ้งข้อมูลผิด

พูดคุย

ถาม แชร์เคล็ดลับ หรือแจ้งว่าใช้ไม่ได้ เรียงตามที่คนกดว่ามีประโยชน์

ยังไม่มีใครโพสต์ ถามหรือแชร์เป็นคนแรกได้เลย

ข้อความในส่วนนี้เขียนโดยผู้ใช้ ไม่ใช่ทีม PopNx

เข้าสู่ระบบเพื่อโพสต์

รีวิวจากผู้ใช้

ยังไม่มีรีวิว

เข้าสู่ระบบเพื่อเขียนรีวิว

เทียบกับตัวอื่นในหมวด อื่น ๆi

  • ดาวมากกว่า 0% ของอีก 19878 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 49% ของอีก 19878 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 59% ของอีก 19878 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Traintrackr ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 4 จาก 5 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนคลาวด์ของผู้ทำ ต่อผ่านอินเทอร์เน็ตได้เลย ไม่ต้องลงโปรแกรม แต่ข้อมูลที่ส่งให้จะผ่านเซิร์ฟเวอร์ของผู้ทำ

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด เมื่อวาน และส่งรุ่นล่าสุด (0.1.0) เข้า registry 2 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต่อผ่าน URL จึงใช้กับโปรแกรมที่รับ remote MCP ได้ เช่น ChatGPT บนเว็บ (แบบเต็มในแผน Business ขึ้นไป · Pro แบบอ่านอย่างเดียว)

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี World Monitor, openstatus, Oh My Posh Validator, Strata, Jitsu

ตัวอื่นที่ทำงานคล้ายกัน

หมวดเดียวกันจากผู้ทำคนอื่น ผ่านตัวตรวจคำสั่งแล้ว ตัวทางการขึ้นก่อน แล้วเรียงตามดาว

อ่านการ์ด:↓ ดาวน์โหลดต่อสัปดาห์i★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

World Monitor

ข่าวกรองโลกแบบเรียลไทม์: ความขัดแย้ง ตลาด พลังงาน การค้า การขนส่ง และไซเบอร์

โดย koala73ใช้กันมาก★ 90.6Kอัปเดต เมื่อวาน

รันบนคลาวด์✓ เจ้าของบริการ · worldmonitor.app

openstatus

Manage monitors, status pages, incidents and maintenances in your openstatus workspace.

โดย openstatusHQใช้กันมาก★ 9.3Kอัปเดต 2 เดือนที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · openstatus.dev

Oh My Posh Validator

Validate oh-my-posh configurations and segment snippets against the official schema.

โดย JanDeDobbeleerใช้กันมาก★ 23.8K ดาวรวมทั้งรีโปอัปเดต 26 วันที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · ohmyposh.dev

Strata

MCP server for progressive tool usage at any scale (see https://klavis.ai)

โดย Klavis-AIกำลังโต★ 5.8Kอัปเดต 14 เดือนที่ผ่านมา

รันบนคลาวด์repo ถูกเก็บถาวร✓ klavis.ai

Jitsu

Manage Jitsu data pipelines: destinations, streams, connections, functions, live events.

โดย jitsucomใช้กันมาก★ 5.1Kอัปเดต 4 เดือนที่ผ่านมา

รันบนคลาวด์✓ เจ้าของบริการ · jitsu.com
  • World Monitor — ใช้บนคลาวด์ ไม่ต้องลงเครื่อง · ไม่ต้องใช้คีย์
  • openstatus — ใช้บนคลาวด์ ไม่ต้องลงเครื่อง · ไม่ต้องใช้คีย์
  • Oh My Posh Validator — ใช้บนคลาวด์ ไม่ต้องลงเครื่อง · ไม่ต้องใช้คีย์
  • Strata — ใช้บนคลาวด์ ไม่ต้องลงเครื่อง · ไม่ต้องใช้คีย์
  • Jitsu — ใช้บนคลาวด์ ไม่ต้องลงเครื่อง · ไม่ต้องใช้คีย์

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

Traintrackr

An MCP server that lets Claude and ChatGPT answer questions about GB (National Rail) trains: *"when's the next train to Sudbury?"*, *"is the 13:00 from Liverpool Street on time?"*, *"how do I get from Cambridge to Sudbury next Saturday morning?"*

The public service runs at traintrackr.live. It is free, and you sign in with an email address; there is no password. The connector address is:

https://traintrackr.live/mcp

Use it

Claude. Traintrackr is listed in Claude's connector directory: open claude.ai/directory/traintrackr, or in claude.ai open Customize → Connectors, choose the + next to Connectors and find *Traintrackr* in the directory. Choose Connect: Claude opens the Traintrackr sign-in page, where you enter your email address and then open the link, or type the six-digit code, in the email it sends. A connector added in claude.ai also works in Claude Desktop and the mobile apps. To add it by address instead, choose Add custom connector, name it *Traintrackr* and paste the connector address.

ChatGPT. ChatGPT adds it through developer mode, on the web, in Plus, Pro, Business, Enterprise and Edu plans; in a workspace, an admin may have to allow developer mode first. Turn on Settings → Security and login → Developer mode, then at chatgpt.com/plugins choose +, name it *Traintrackr*, paste the connector address and choose OAuth. Sign in with your email address as above. In a new chat, choose + → Developer mode and select Traintrackr.

Then ask about trains. traintrackr.live/docs shows what each answer contains, and the limits. The privacy policy and terms of use are on the site too. The server is listed in the MCP Registry as live.traintrackr/traintracker.

The rest of this README describes how the server works and how to run your own copy: locally over stdio for the Claude desktop app, or hosted over HTTP (see Deploy to Render). The timetable is stored in Postgres.

flowchart LR

Claude[Claude] <-->|stdio or HTTP| TT[traintracker]

subgraph Live["Live, next ~2 hours"] D[Darwin Rail Data Marketplace] end subgraph Timetable["Timetable, any future date"] NR[Network Rail SCHEDULE feed] -->|daily download| DB[(Postgres timetable schema)] end TT --> D TT --> DB

Tools

ToolAnswersData
find_station"Which Sudbury?" Station names ↔ CRS codesBundled station list
live_departuresNext trains, expected times, platforms, delays, cancellationsDarwin, going on with scheduled timetable trains where fewer than rows run in its two hours; if it's not set up, scheduled times; if it's offline, scheduled times with a note saying so
departure_platform"Which platform is the 13:00 to Colchester?" One train's platform, flagged live or scheduledDarwin (paged); scheduled platform from the timetable until the live one is announced
platform_departures"What are the next three trains from platform 7?"Same as departure_platform
live_arrivalsTrains arriving in the next ~2 hoursDarwin arrivals, going on with scheduled trains where short; if not set up, scheduled times; if offline, scheduled times with a note saying so
show_board"Show me the departures board for Liverpool Street." The same live departures or arrivals, drawn as a departure boardSame as live_departures and live_arrivals
timetableScheduled departures/arrivals at a station on any dateLocal timetable
service_detailsEvery stop for one trainWhichever source issued the ID
plan_journeyA to B with changes (up to max_changes, default 4), incl. cross-London linksLocal timetable + Darwin live overlay
data_statusWhat's configured, timetable freshness, what's missing; with DJANGO_DEBUG=1 (a server you run yourself), also the timetable schema, the last refresh error and the Darwin allowance used—
privacy_policy"What do you keep about me?" The privacy policy as text, with the page's addressThe /privacy page

Every tool accepts station names or CRS codes. Ambiguous names ("Sudbury", "Harrow") return the candidates so Claude can ask which one you meant.

Departure board

show_board comes with an MCP App: a client that supports MCP Apps draws its result as a split-flap departure board next to the answer. A client draws the board for every call of a tool that has one, so it is on a tool of its own, which the assistant is told to use only when someone asks to see a board. live_departures and live_arrivals return the same trains and draw nothing. A client without MCP Apps gets show_board's result as it would theirs.

The board is one page, apps/rail/ui/board.html, served as the resource ui://traintracker/board.html. Its style and script are inline and it loads nothing from anywhere. The client hands it the tool's result; it shows up to 12 trains, the station's notices and the data credit. Refresh asks the client to call show_board again with the same arguments, which counts against the rate limit like any other call. The flaps don't turn for someone who has asked their system for reduced motion, and a screen reader gets the trains as a table.

Run your own copy

Everything from here on is for running the server yourself. The public service at traintrackr.live is this code, deployed as described in Deploy to Render.

Try it without accounts (demo mode)

Set TRAINTRACKER_DEMO=1 to test every tool before your accounts are approved. The server then uses generated example data and makes no network requests:

  • Timetable: a generated SCHEDULE feed for 25 real stations in East Anglia and London (Liverpool Street, Stratford, Chelmsford, Colchester, Ipswich, Norwich, Marks Tey, Sudbury, Cambridge, Kings Cross and others), running from today for 90 days. Sundays start later. It is stored in its own schema (timetable_demo), apart from the real timetable, and rebuilt each day. Demo mode still needs DATABASE_URL.
  • Live boards: Darwin departure, arrival and service-details responses are generated from that timetable in-process. About one train in five runs late, one in 25 is cancelled and one in 12 has a platform change; the same train on the same day always gets the same result. Large stations (Liverpool Street, Kings Cross, Cambridge, …) announce platforms 15 minutes before departure, so the scheduled-platform fallback gets exercised.

Every board and plan carries a note that the data is generated, and data_status reports demo_mode. Ask for stations outside the demo network and you get an empty board.

"env": { "TRAINTRACKER_DEMO": "1" }

Add that to the traintracker entry in the Claude desktop config (see Add to the Claude desktop app), or put TRAINTRACKER_DEMO=1 in .env. Remove it once your keys are in place. Things to try: *"next trains from Liverpool Street"*, *"which platform is the next train from Cambridge to Kings Cross?"*, *"how do I get from Cambridge to Sudbury tomorrow at 9?"*

Accounts you need

#AccountNeeded?CostWhat it providesUsed for
1Rail Data Marketplace — *Live Departure Board* productYes for live timesFreeDarwin: National Rail's real-time feed. Departure boards for the next 2 hours with expected times, platforms, delay/cancellation reasons, calling points, station alerts. The same data as station screens.live_departures, live overlay in plan_journey
2Network Rail Open Data (NTROD) — *SCHEDULE* feedYes for timetables and planningFreeThe full GB passenger timetable from Network Rail's planning system, including short-term changes (engineering works, extra trains, cancellations) once published. Refreshed daily.timetable, plan_journey, service_details for tt: IDs, offline fallback for the live tools
3Rail Data Marketplace — *Service Details* productOptionalFreeFull live calling pattern for a train seen on a Darwin board.service_details for darwin: IDs
4Rail Data Marketplace — *Live Arrival Board* productOptionalFreeDarwin arrivals boards. Without it, arrivals show scheduled times.live_arrivals
1. Rail Data Marketplace (Darwin)
  1. Create an account at raildata.org.uk.
  2. In the product catalogue, search "Live Departure Board" (the LDBWS product, not "Live *Fastest* Departure Boards") and subscribe. Approval for the free tier ranges from instant to a few days.
  3. Open the subscribed product → Specification tab. Copy the Consumer key (not the secret) into DARWIN_API_KEY.
  4. Check the base URL on that tab matches DARWIN_DEPARTURES_URL in .env.example. If it differs, set DARWIN_DEPARTURES_URL to your value (everything before /GetDepBoardWithDetails).
  5. *(Optional)* Subscribe to Service Details and Live Arrival Board the same way. Each product has its own key and URL: set DARWIN_SERVICE_API_KEY / DARWIN_SERVICE_URL and DARWIN_ARRIVALS_API_KEY / DARWIN_ARRIVALS_URL.
2. Network Rail Open Data (SCHEDULE)
  1. Register at the Network Rail data feeds portal. Activation can take a while.
  2. Sign in and check that SCHEDULE appears under *Static feeds*.
  3. Put your portal username and password in NR_USERNAME and NR_PASSWORD.
  4. If the portal gives a different download link for the *full daily extract, all operators, JSON* than NR_SCHEDULE_URL in .env.example, set NR_SCHEDULE_URL to it.

The server downloads the feed in the background when the timetable is missing or older than 26 hours. It checks this on start-up and on every tool call, so a server left running for days stays current. If a download fails it keeps serving the old timetable, and data_status shows the error. You can also run manage.py refresh_timetable --commit by hand (see Commands). Set TIMETABLE_AUTO_REFRESH=0 where a separate job runs refresh_timetable, as on Render.

3. Postgres

The timetable lives in one schema (timetable by default) of the database in DATABASE_URL. The role needs to create schemas in that database; the owner of the database can. On a shared server, give traintracker its own database and role:

CREATE ROLE traintracker LOGIN PASSWORD '…';

CREATE DATABASE traintracker OWNER traintracker; REVOKE CONNECT ON DATABASE traintracker FROM PUBLIC;

Put that role in DATABASE_URL, not the server's own user. The server's user owns every database on it, so a fault in traintracker would reach the other applications' data; the traintracker role reaches its own database only.

The full GB timetable takes about 475 MB (4.3 million stops), and about twice that while a refresh builds the new copy. A refresh takes about 40 seconds plus the download. It builds the new timetable in a staging schema and swaps it in with a rename, so readers never see a half-built timetable, and an advisory lock stops two refreshes running at once.

The tables are UNLOGGED: they are rebuilt from the feed every day, so they skip the write-ahead log and don't add to the server's WAL or point-in-time-recovery storage. The cost is that Postgres empties them after a crash; the tools then report "No timetable yet" until the next refresh.

How each source is used

flowchart TD

Q{What's being asked?} Q -->|next ~2 hours| L[live_departures / live_arrivals]

ตัดมาแค่ช่วงต้น อ่านต่อใน repo