A Model Context Protocol server that interfaces with Vancouver's Translink API
Project description
Translink MCP Server
A Model Context Protocol server that interfaces with Vancouver's Translink API.
Available Tools
This package provides the following tools for interacting with the TransLink API:
-
get_trip_updates- Retrieves real-time trip update information from the TransLink API. This includes data about transit vehicle schedules, delays, and timing.
- No input parameters required.
-
get_position_updates- Retrieves real-time position update information from the TransLink API. This includes current location data for transit vehicles.
- No input parameters required.
-
get_service_alerts- Retrieves service alert information from the TransLink API. This includes notifications about disruptions, detours, and other service-related announcements.
- No input parameters required.
Prompts
- "Get the current trip updates from TransLink and show me buses that are running late."
- "List all TransLink route 99 buses and their current schedule status."
- "Create a summary of transit delays on major routes based on TransLink data."
- "Check if my bus (route 14) is on time and when it will arrive at Commercial Drive."
- "Where are all the SkyTrain trains currently located?"
- "Show me all buses near downtown Vancouver right now."
- "Find the closest buses to Science World station at this moment."
- "Track the current positions of SeaBus vessels crossing Burrard Inlet."
- "Are there any service disruptions on the Canada Line today?"
- "Check if there are any alerts affecting bus routes in Surrey."
- "Give me a list of all current TransLink service alerts as bullet points."
- "Are there any planned maintenance or closures on the SkyTrain system this weekend?"
Installation
Using uv (recommended)
When using uv no specific installation is needed. We will
use uvx to directly run mcp-server-translink.
Using PIP
Alternatively you can install mcp-server-translink via pip:
pip install mcp-server-translink
After installation, you can run it as a script using:
python -m mcp_server_translink
Configuration
Configure for Claude.app
Add to your Claude settings:
Using uvx
{
"mcpServers": {
"translink": {
"command": "uvx",
"args": ["mcp-server-translink"],
"env": {
"TRANSLINK_API_KEY": "PROVIDE_API_KEY"
}
}
}
}
Using pip installation
{
"mcpServers": {
"translink": {
"command": "python",
"args": ["-m", "mcp_server_translink"],
"env": {
"TRANSLINK_API_KEY": "PROVIDE_API_KEY"
}
}
}
}
Configure for VS Code
For manual installation, add the following JSON block to your User Settings (JSON) file in VS Code. You can do this by pressing Ctrl + Shift + P and typing Preferences: Open User Settings (JSON).
Optionally, you can add it to a file called .vscode/mcp.json in your workspace. This will allow you to share the configuration with others.
Note that the
mcpkey is needed when using themcp.jsonfile.
Using uvx
{
"mcp": {
"servers": {
"translink": {
"command": "uvx",
"args": ["mcp-server-translink"],
"env": {
"TRANSLINK_API_KEY": "PROVIDE_API_KEY"
}
}
}
}
}
Customization - API Key
An API Key will be required to interface with the Translink API. This API key can be requested by creating an account with the service and requesting one. Provide this
Debugging
You can use the MCP inspector to debug the server. For uvx installations:
npx @modelcontextprotocol/inspector uvx mcp-server-translink
Or if you've installed the package in a specific directory or are developing on it:
cd path/to/servers/src/translink
npx @modelcontextprotocol/inspector uv run mcp-server-translink
Testing
The project includes a comprehensive test suite using pytest. You can run the tests with:
Using uv (Recommended)
# Install development dependencies
uv pip install -e ".[dev]"
# Run all tests
uv run pytest
# Run tests with verbose output
uv run pytest -v
Using pip
# Install development dependencies
pip install -e ".[dev]"
# Run all tests
pytest
# Run tests with verbose output
pytest -v
For more details on the test suite, see the test README.
Contributing
We encourage contributions to help expand and improve mcp-server-translink. Whether you want to add new tools, enhance existing functionality, or improve documentation, your input is valuable.
For examples of other MCP servers and implementation patterns, see: https://github.com/modelcontextprotocol/servers
Pull requests are welcome! Feel free to contribute new ideas, bug fixes, or enhancements to make mcp-server-translink even more powerful and useful.
License
mcp-server-translink is licensed under the MIT License. This means you are free to use, modify, and distribute the software, subject to the terms and conditions of the MIT License. For more details, please see the LICENSE file in the project repository.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file translink_mcp-0.0.1.tar.gz.
File metadata
- Download URL: translink_mcp-0.0.1.tar.gz
- Upload date:
- Size: 9.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3b97cc29121ea1259b52e379497645b2d378037b2f6fb5ea712efca9783f7621
|
|
| MD5 |
0772079b4414f1ef0a2e03d1cd56b59a
|
|
| BLAKE2b-256 |
6d281cf46c27f37c7fdb95eaf4bf95afbbb62a36adae7dad1cf906a1d5fb8151
|
Provenance
The following attestation bundles were made for translink_mcp-0.0.1.tar.gz:
Publisher:
python.yml on mashour375/translink-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
translink_mcp-0.0.1.tar.gz -
Subject digest:
3b97cc29121ea1259b52e379497645b2d378037b2f6fb5ea712efca9783f7621 - Sigstore transparency entry: 404731036
- Sigstore integration time:
-
Permalink:
mashour375/translink-mcp@9704c3aaea60b57d5c94f63272f93268434075cf -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/mashour375
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yml@9704c3aaea60b57d5c94f63272f93268434075cf -
Trigger Event:
release
-
Statement type:
File details
Details for the file translink_mcp-0.0.1-py3-none-any.whl.
File metadata
- Download URL: translink_mcp-0.0.1-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f42a4eb807a82e496558ab108daff27568c60d050ff30f1202fc234cb2cfdc0
|
|
| MD5 |
23a8be4b927bbaad266dc33e44739c9c
|
|
| BLAKE2b-256 |
96afcfd657fb736e96719aadfcc440030ccfd3eb6a4b364ee985affe7f99c38d
|
Provenance
The following attestation bundles were made for translink_mcp-0.0.1-py3-none-any.whl:
Publisher:
python.yml on mashour375/translink-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
translink_mcp-0.0.1-py3-none-any.whl -
Subject digest:
5f42a4eb807a82e496558ab108daff27568c60d050ff30f1202fc234cb2cfdc0 - Sigstore transparency entry: 404731039
- Sigstore integration time:
-
Permalink:
mashour375/translink-mcp@9704c3aaea60b57d5c94f63272f93268434075cf -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/mashour375
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python.yml@9704c3aaea60b57d5c94f63272f93268434075cf -
Trigger Event:
release
-
Statement type: