Skip to main content
Glama
io.github.mohammad-abbasi-sh/flixtrain-mcp

io.github.mohammad-abbasi-sh/flixtrain-mcp

README.md
# flixtrain-mcp ๐Ÿš†

mcp-name: io.github.mohammad-abbasi-sh/flixtrain-mcp

Unofficial **read-only** MCP server for **[global.api.flixbus.com (FlixBus shop search API)](https://shop.flixbus.com)** โ€” FlixTrain times & prices from the FlixBus shop search API (free, no key, no login): train-only departures between German cities, with stations, duration, price and seat availability. No key, no login.

> Built by Mohammad Abbasi as part of the "Germany MCP factory". Not affiliated with global.api.flixbus.com (FlixBus shop search API).

## For AI agents

Add to your MCP client config (stdio):

```json
{
  "mcpServers": {
    "flixtrain": {
      "command": "uvx",
      "args": ["flixtrain-mcp==0.1.0"]
    }
  }
}
```

Or run locally: `python -m flixtrain_mcp.server` (needs `mcp<2`, `httpx`).

## Tools

| Tool | Description |
|------|-------------|
| `flixtrain_search_trains` | Search FlixTrain-only departures between two cities on a date: times, stations, duration, price & seats โ€” `from_city`, `to_city`, `date` (DD.MM.YYYY), `limit` 1..20, `sort` (departure/price) |
| `flixtrain_search_cities` | Find cities (with train stations) by name for the train search โ€” `query`, `limit` 1..10 |
| `flixtrain_health` | Reachability probe (ok / blocked / error) โ€” one polite request |

## Development

```bash
python3 -m venv .venv && .venv/bin/pip install "mcp<2" httpx pytest
.venv/bin/pip install -e .
.venv/bin/python -m pytest tests/ -q
```

## License

MIT

---

Built by [Mohammad Abbasi](https://github.com/mohammad-abbasi-sh) โ€” [Almanibama](https://almanibama.ir) ยท [mabbasi.ir](https://mabbasi.ir)

TDQS

A3.9/5.0

Scored across 3 tools

Disambiguation5/5

Each tool targets a clearly distinct concern: train departure search, city lookup, and API health probing. There is no overlap in inputs or outputs, and the fed relationship (cities โ†’ train search) is obvious from the descriptions.

Naming Consistency4/5

All names share the `flixtrain_` prefix and mostly follow verb_noun (search_trains, search_cities). `flixtrain_health` drops the verb form, a minor deviation that is still unambiguous.

Tool Count4/5

Three tools is on the thin side but each earns its place for a read-only search integration. Nothing extraneous, though a slightly richer surface (e.g. station/connection detail) would feel less minimal.

Completeness4/5

Discovery (cities), the core search, and a diagnostic health check form a coherent lifecycle for a search-only server. Gaps like no journey detail/price breakdown endpoint or deeper filtering exist, but agents can work around them with the search result payload.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues