Connect your AI client¶
Every client runs the same command, uvx mcp-trino-python, and passes the connection settings as
environment variables. Install uv first.
Plugin (recommended). Claude Code asks for the connection settings when you install it:
/plugin marketplace add alaturqua/mcp-trino-python
/plugin install trino@mcp-trino-python
Or add the server directly:
claude mcp add trino -e TRINO_HOST=localhost -e TRINO_USER=trino -- uvx mcp-trino-python
One-click extension (recommended).
- Download
mcp-trino-python.mcpbfrom the latest release. - Double-click it, or drag it into Settings → Extensions.
- Fill in your Trino host and user when asked.
Or edit claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"trino": {
"command": "uvx",
"args": ["mcp-trino-python"],
"env": { "TRINO_HOST": "localhost", "TRINO_PORT": "8080", "TRINO_USER": "trino" }
}
}
}
Create .vscode/mcp.json in your workspace, or run MCP: Add Server from the command palette:
{
"servers": {
"trino": {
"type": "stdio",
"command": "uvx",
"args": ["mcp-trino-python"],
"env": { "TRINO_HOST": "localhost", "TRINO_PORT": "8080", "TRINO_USER": "trino" }
}
}
}
Open Copilot Chat in Agent mode; the Trino tools appear in the tools list.
For the GitHub Copilot CLI, put the same entry under mcpServers in ~/.copilot/mcp-config.json.
Most clients use the mcpServers format, for example ~/.cursor/mcp.json:
{
"mcpServers": {
"trino": {
"command": "uvx",
"args": ["mcp-trino-python"],
"env": { "TRINO_HOST": "localhost", "TRINO_PORT": "8080", "TRINO_USER": "trino" }
}
}
}
The server is also in the MCP Registry as
io.github.alaturqua/mcp-trino-python, so clients that browse the registry can install it from there.
Clients that start the server themselves can run the container instead of uvx:
{
"mcpServers": {
"trino": {
"command": "docker",
"args": ["run", "-i", "--rm", "-e", "TRINO_HOST", "-e", "TRINO_USER", "ghcr.io/alaturqua/mcp-trino-python"],
"env": { "TRINO_HOST": "host.docker.internal", "TRINO_USER": "trino" }
}
}
}
host.docker.internal reaches a Trino running on your own machine.
Troubleshooting¶
uvx: command not found- Install uv, then restart your client so it picks up the new
PATH. - The tools don't show up
- Restart the client after changing its config. In Claude Code,
/mcpshows the server's status and errors. Connection refusedor timeouts- Check
TRINO_HOSTandTRINO_PORT. Inside Docker,localhostis the container itself; usehost.docker.internalor the Trino container's name. Both catalog and schema must be specified- Mention the catalog and schema in your question, or set
TRINO_CATALOGandTRINO_SCHEMA.