kesesfigyelo-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
kesesfigyelo-mcp
A read-only Model Context Protocol server that lets an AI assistant answer questions about Budapest public transport reliability, plus an evaluation harness that measures how well different models use it.
The data comes from Késésfigyelő, a monitor I built that collects BKK GTFS-Realtime feeds every minute and aggregates delays per line, hour and day. Live site: kesesfigyelo.armands.dev. The server reads only its public JSON API, so it needs no database access and no secrets.
flowchart LR
BKK[BKK GTFS-Realtime] -->|every minute| W[Késésfigyelő v3<br/>Cloudflare Workers + D1]
W -->|public JSON API| M[kesesfigyelo-mcp<br/>FastMCP, Python]
M -->|stdio or HTTP| C[MCP client<br/>Claude Code, Claude Desktop, …]
M -->|in-process, recorded fixtures| E[evals/run.py<br/>Groq, Ollama]Tools
Tool | What it answers |
| Which line is “6”, “907A” or “M2”? Search by name and vehicle type. |
| Network median delay, most delayed lines right now, hourly trend. |
| Daily and hourly delays of one line, the stops where delays accumulate, today’s per-minute medians. |
| Service alerts recorded today, optionally for one line. |
| Vehicles reporting a position, per line or for one line. |
| Collector uptime, feed fetch results, schedule-resolution rate, upstream health. |
All tools are marked readOnlyHint. Conventions in every result: delays in minutes (negative means early), late means at least 5 minutes late, times in UTC and Europe/Budapest. When a period has no data, the result says so explicitly, so the model has no reason to guess.
Related MCP server: db-mcp
Running it
Requires Python 3.12+ and uv.
uv sync
uv run kesesfigyelo-mcp # stdio
uv run kesesfigyelo-mcp --http # streamable HTTP on 127.0.0.1:8000Claude Code / Claude Desktop (.mcp.json or the Desktop config):
{
"mcpServers": {
"kesesfigyelo": {
"command": "uv",
"args": ["run", "--directory", "/path/to/kesesfigyelo-mcp", "kesesfigyelo-mcp"]
}
}
}Optional settings: KFG_API_BASE, KFG_HTTP_TIMEOUT, KFG_HTTP_RETRIES. Responses are cached in memory (30 s to 1 h depending on the endpoint) to keep load on the API low.
Evaluation
evals/ measures whether a model, given these tools, picks the right tool, passes the right arguments, reports the right numbers and admits when data is missing.
Golden set (
evals/golden.yaml): questions in Hungarian and English. Expected values are not hard-coded; each one points into the recorded API responses intests/fixtures/, so re-recording the fixtures keeps the expectations correct.Checks per case: tool choice, arguments, facts within tolerance, groundedness (every decimal number in the answer must appear in a tool output), refusal for no-data questions, “not found” for unknown lines, answer language.
Model-agnostic runner (
evals/run.py): any OpenAI-compatible endpoint drives the tools in-process against the fixtures. Free options only: Groq’s free tier and a local Ollama. Runs are cached per model, case, fixtures and server code.
uv sync --group eval
uv run --group eval python evals/run.py --model groq:openai/gpt-oss-120b
uv run --group eval python evals/run.py --model ollama:qwen3:8bGroq needs GROQ_API_KEY; the runner reads it from ~/.config/kesesfigyelo-mcp/.env, never from the repository.
Results (fixtures recorded 2026-11-30, 10 cases)
Model | Passed | Notes |
| 10/10 | |
| 9/10 | For a line that does not exist it said “no data” instead of “no such line”. |
| 10/10 | Runs offline at no cost; about 80 s per question on CPU. |
Full transcripts: evals/results/. The golden set will grow to 40–50 cases.
Development
uv run pytest # tool tests against recorded fixtures, no network
uv run ruff check . && uv run mypyCI runs lint, type checks and tests on every push (GitHub Actions). LLM calls never run in CI.
Limitations
The answers can only be as good as the Késésfigyelő data. The collector had outages in late November 2026;
get_data_qualityreports the current state.Stop-level delays are only available from 2026-11-30 onwards (an earlier aggregation bug stored list positions instead of stop identifiers).
About
Built by Armand Viktor Bozsik with AI assistance (Claude Code); I designed the tools and the evaluation method and reviewed every change. MIT licensed.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
MCP server exposing Buildkite API data (pipelines, builds, jobs, tests) to AI tooling and editors.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Hosted MCP server for live public-data APIs and Skills for AI agents.
MCP server that lets AI assistants use all OneSchema features exposed via the public API.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server exposing Montevideo public transportation data (STM) as tools for AI assistants, enabling natural language queries about routes, stops, arrivals, and trip planning.9 npm1MIT
- AlicenseAqualityDmaintenanceAn MCP server that exposes the Deutsche Bahn public transport API to any MCP-compatible client (Claude Desktop, Cursor, Cline, Continue, etc.). Five tools cover station search, departures, journey planning, trip details, and nearby stations.62MIT
- AlicenseAqualityDmaintenanceExposes network-monitoring tools (query metrics, analyze windows, compare, logs, status, runbooks, speed tests) as an MCP server for agentic workflows. Designed with evaluation suites, cost-aware model routing, and semantic tool retrieval.1MIT
- FlicenseAqualityDmaintenanceMCP server for St. Louis transit developer tooling, providing 45 tools for GTFS and GTFS-Realtime inspection, feed surveillance, schedule and arrival queries, assertions, drift detection, and golden-fixture generation for the Light Phone 3 Kotlin transit app, all backed by public unauthenticated sources.45-