使用说明
Using the MBTA MCP:
Setup
- Get an API key from the MBTA, and put it in an
.env.localfile
Request link: https://www.mbta.com/developers/v3-api#key
MBTA_API_KEY=<API_KEY>
-
Run
uv sync -
Add this configuration to your tool that will call the MCP server:
{
"mcpServers": {
"mbta-alerts": {
"command": "uv",
"args": [
"--directory",
"~/mbta-mcp",
"run",
"api/mbta/alerts/run.py"
]
}
}
}
- Now, your MCP server should be callable and should work correctly.
Development
-
Follow the Setup steps above.
-
Create your virtual environment by running
source .venv/bin/activate(on Mac). Windows commands will be slightly different. -
Run
python3 -m api.mbta.alerts.run