trackline-mcp
A zero-dependency Python MCP client that bridges Claude Code (and other MCP hosts) to the Trackline railway data platform over Streamable HTTP. Distributed as a uvx-runnable package — no manual installation or virtualenv required.
Installation
Via uvx (recommended)
No installation needed. Run directly:
uvx trackline-mcp --auth
Via pip
pip install trackline-mcp
trackline-mcp --auth
Authentication
Trackline MCP uses OAuth 2.0 Device Authorization Grant (no browser redirect required). You authenticate once and the token is cached at ~/.trackline/token.json with automatic refresh via an offline token.
Step 1 — Authenticate in a terminal:
uvx trackline-mcp --auth
This opens a URL. Visit it, log in, and the token is cached automatically.
Step 2 — Connect from Claude Code (see config below — no manual step needed).
Claude Code / MCP Configuration
Add to your .mcp.json (project or global):
{
"mcpServers": {
"trackline": {
"command": "uvx",
"args": ["trackline-mcp"]
}
}
}
How It Works
- On first run (
--auth), the client performs a Device Authorization Grant with Keycloak, opening a short URL for you to approve. - The token (including an offline refresh token) is cached at
~/.trackline/token.json. - On subsequent runs, the client reads the cached token and refreshes it automatically if needed.
- JSON-RPC messages from Claude Code arrive on stdin and each is POSTed independently to the Trackline MCP server (
/mcp); the JSON response is forwarded to stdout. Concurrent tool calls run in parallel — the server is stateless streamable-HTTP, so each request is fully independent.
Metadata
Release files for trackline-mcp 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| trackline_mcp-1.0.0.tar.gz | 48.9 kB | With provenance | Details for trackline_mcp-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| trackline_mcp-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for trackline_mcp-1.0.0-py3-none-any.whl |
Total release size: 55.6 kB
Release files / trackline_mcp-1.0.0.tar.gz
| Download URL | trackline_mcp-1.0.0.tar.gz |
|---|---|
| Size | 48.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f0de7b0fa8cd401c3c8c9c204e9ba83e2e4a67ad2ec3d6122199e5325d61fe9
|
|
BLAKE2b-256 checksum How to use checksums |
01edc5179e378d629c6bdd364772aa8d75e90bc5bee8f27be2dd5a89bf72c1cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 21, 2026.
Transparency logRelease files / trackline_mcp-1.0.0-py3-none-any.whl
| Download URL | trackline_mcp-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e7f171f999cf99b36c7212d8ffe47a575ce0c685cea8dbe7c08c8106c9878e0
|
|
BLAKE2b-256 checksum How to use checksums |
e90f1938934472e277fc2fe68102fc7b2e403fffaff8021378a5a0f01b516cb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 21, 2026.
Transparency logSecurity for trackline-mcp 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for trackline_mcp-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.