Where'S My DB?
БесплатноНе проверенA Claude skill + MCP server that tells you how Deutsche Bahn delays will affect your trip — not just whether your train is late.
Описание
A Claude skill + MCP server that tells you how Deutsche Bahn delays will affect your trip — not just whether your train is late.
README
A Claude skill + MCP server that tells you how Deutsche Bahn delays will affect your trip — not just whether your train is late.
What it does
Knowing a train is "5 min late" isn't useful. Knowing that the 12-minute delay three stops up the line will eat your 9-minute transfer in Berlin — that's useful.
Where's My DB? turns "is my train on time?" into a real answer. You ask Claude in plain language and it walks the upstream stops, traces the connection chain, and tells you which delays actually affect your journey:
Likely 15–18 minutes late.
- ICE 597 was already 18 min late at Solingen Hbf (three stops upstream) at 15:42.
- No scheduled padding before your boarding station at 16:02.
- Your Frankfurt connection (ICE 599) is currently on time — you'd lose ~14 min of a 16-min transfer.
Caveat: a single 5-min recovery en route can change this. The official board hasn't updated yet.

See examples/ for three full transcripts.
How it works
┌──────────────────────────────────────────────────────────┐
│ Claude (Code or Desktop) │
│ ┌────────────────────────────────────────────────────┐ │
│ │ Skill: db-delay-predictor │ │
│ │ Reasoning playbook: which tool, how to combine │ │
│ │ signals, how to express confidence honestly. │ │
│ └────────────────────────────────────────────────────┘ │
└──────────────────────────────────────────────────────────┘
│ MCP (stdio, JSON-RPC)
▼
┌──────────────────────────────────────────────────────────┐
│ MCP server: db-mcp (TypeScript) │
│ Typed data access. No reasoning. │
│ ┌─────────────────────┐ ┌─────────────────────┐ │
│ │ marudor (primary) │ → │ db-rest (fallback) │ │
│ │ tRPC + devalue │ │ plain REST │ │
│ └─────────────────────┘ └─────────────────────┘ │
│ ┌─────────────────────────────────────────────────┐ │
│ │ DWD weather warnings (independent source) │ │
│ └─────────────────────────────────────────────────┘ │
│ + 5-min in-memory LRU cache │
└──────────────────────────────────────────────────────────┘
Two artifacts. Clean split:
- The MCP server knows nothing about reasoning. It's typed data access with transparent provider fallback.
- The skill knows nothing about API endpoints. It's a reasoning playbook in markdown.
Both are independently testable. Both ship in this repo.
What's interesting under the hood
- The primary data source isn't a public REST API. Marudor (the community DB tracker) runs internal tRPC with custom devalue encoding. The MCP includes a hand-rolled tRPC transport that speaks it, because no public alternative exposes per-stop connection-chain data ("will my Anschluss be held?") — which is the whole point.
- Transparent fallback to a stable REST API. If marudor fails (it's an unofficial endpoint), the MCP transparently falls back to db-rest, and the skill tells the user the answer is degraded. Belt-and-suspenders engineering, not a hedge.
- External weather context. A separate
WeatherClientpulls live warnings from DWD (Deutscher Wetterdienst) — heatwave, storm, snow — so the agent can explain delays the DB feed hasn't acknowledged yet, and proactively warn about future trips through affected corridors. - The skill is honest about uncertainty. Delay predictions are rounded to 5-minute buckets ("about 10–15 minutes late") because precision would be theater. The skill explicitly enumerates which signals fired and what could change.
- 6 atomic MCP tools, no reasoning baked in.
resolve_station,find_train,get_train_status,plan_journey,get_disruptions,get_weather_risk. The skill composes them.
Quick start
Build it:
git clone https://github.com/<you>/wheres-my-db.git
cd wheres-my-db
npm install
npm run build
Wire into Claude Code (terminal)
claude mcp add db-mcp -s user -- node "$PWD/packages/db-mcp/dist/index.js"
ln -s "$PWD/packages/skill-db-delay" ~/.claude/skills/db-delay-predictor
Open a claude session, run /mcp to confirm db-mcp is connected with 6 tools, then ask:
Is ICE 597 on time today?
Wire into Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"db-mcp": {
"command": "node",
"args": ["/absolute/path/to/wheres-my-db/packages/db-mcp/dist/index.js"]
}
}
}
Then symlink the skill the same way and fully quit + relaunch Claude Desktop.
Wire into Codex CLI
OpenAI's Codex CLI speaks MCP. Edit ~/.codex/config.toml (create it if missing) and add:
[mcp_servers.db-mcp]
command = "node"
args = ["/absolute/path/to/wheres-my-db/packages/db-mcp/dist/index.js"]
Restart codex. The 6 tools (resolve_station, find_train, get_train_status, plan_journey, get_disruptions, get_weather_risk) become callable from any session.
Codex doesn't load SKILL.md automatically. To get the reasoning playbook, paste the contents of packages/skill-db-delay/SKILL.md into your project's AGENTS.md or the Codex system-prompt equivalent. (Verify the exact mechanism against current Codex docs — the config schema has shifted across versions.)
Wire into opencode
opencode also speaks MCP. Edit ~/.config/opencode/opencode.json (global) or a project-local opencode.json:
{
"mcp": {
"db-mcp": {
"type": "local",
"command": ["node", "/absolute/path/to/wheres-my-db/packages/db-mcp/dist/index.js"],
"enabled": true
}
}
}
Restart opencode. Same 6 tools become available.
For the reasoning playbook: copy the body of packages/skill-db-delay/SKILL.md into your project's AGENTS.md (opencode's instruction file) or use it as the system prompt.
Wire into Hermes Agent
Hermes Agent by Nous Research speaks MCP natively and — unlike Codex and opencode — supports the agentskills.io open standard, which is the same format SKILL.md uses. The skill auto-loads, no system-prompt copy-paste needed.
Add the MCP to ~/.hermes/config.yaml:
mcp_servers:
db-mcp:
command: "node"
args: ["/absolute/path/to/wheres-my-db/packages/db-mcp/dist/index.js"]
Then install the skill by symlinking the same way as for Claude:
mkdir -p ~/.hermes/skills
ln -s "$PWD/packages/skill-db-delay" ~/.hermes/skills/db-delay-predictor
Run hermes chat and ask:
Is ICE 597 on time today?
Any other MCP client
The server is a stdio MCP — it speaks JSON-RPC over stdin/stdout per the Model Context Protocol spec. Any client that implements MCP can use it. The shape is always roughly the same: a command + args pointing at packages/db-mcp/dist/index.js. The skill is Claude-specific in its frontmatter format, but its prose transfers cleanly into any system-prompt or custom-instructions slot.
Repo layout
packages/
├── db-mcp/ TypeScript MCP server
│ ├── src/
│ │ ├── server.ts wiring + cache integration
│ │ ├── tools/ one file per MCP tool
│ │ ├── clients/ marudor (tRPC) + db-rest + provider router
│ │ ├── cache.ts LRU
│ │ └── types.ts normalized domain types
│ └── tests/ vitest + msw
└── skill-db-delay/
└── SKILL.md the reasoning playbook
examples/ saved demo transcripts
Test it
npm test
Tests cover cache, provider clients, fallback routing, tool wrappers, and server wiring. Network calls are mocked via msw; failure modes (timeout, 5xx, partial collapse) are part of the test surface, not afterthoughts.
Credits
- marudor / bahn.expert — the data source that makes the connection-chain feature possible. Without it this project doesn't exist.
- db-rest by Jannis R — the stable REST fallback.
- DWD (Deutscher Wetterdienst) — Germany's official weather service. Their public warnings JSON drives the weather-context signal.
License
MIT
Установка Where'S My DB?
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/dewalt-1/wheres-my-dbFAQ
Where'S My DB? MCP бесплатный?
Да, Where'S My DB? MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Where'S My DB??
Нет, Where'S My DB? работает без API-ключей и переменных окружения.
Where'S My DB? — hosted или self-hosted?
Доступен hosted-вариант: Unyly запускает сервер в облаке, локальная установка не обязательна.
Как установить Where'S My DB? в Claude Desktop, Claude Code или Cursor?
Открой Where'S My DB? на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
автор: modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
автор: xuzexin-hzCompare Where'S My DB? with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории ai
