mcp-trino — Claude Code MCP server: what it does, how to install
Connects Trino to AI coding assistants for running distributed SQL queries and inspecting catalogs. Helpful when exploring data schemas or debugging queries directly in your editor.
Open on GitHubWhat mcp-trino does
Written in Go, this server connects your assistant to a Trino cluster. It provides tools to execute SQL statements, analyze query plans, and inspect database schemas. The binary can also launch as an interactive command-line shell with table or JSON formatting.
Communication runs over STDIO or HTTP endpoints. Built-in OAuth 2.1 integration handles tokens from providers like Okta or Azure AD. Queries automatically carry identity tags, or can impersonate the active account using Trino headers.
Local execution requires TRINO_HOST and TRINO_USER environment variables. Without a reachable Trino instance, any query execution exits with code 1.
What it helps with
- Query distributed datasets directly through Trino
- Inspect catalogs, schemas, and table definitions from the chat
- Retrieve query execution plans for performance tuning
- Propagate user identities into Trino headers for auditing
Example prompts for the agent
- Show the available catalogs and schemas in Trino
- Explain the execution plan for
SELECT COUNT(*) FROM my_table - Fetch the schema for
my_catalog.my_schema.ordersand run a sample query
How to install mcp-trino
Install
The MCP registry has no launch command for it: see the repository README
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about mcp-trino
How to install mcp-trino in Claude Code?
Install the binary with brew install tuannvm/mcp/mcp-trino or run curl -fsSL https://raw.githubusercontent.com/tuannvm/mcp-trino/main/install.sh | bash. Then export your settings with export TRINO_HOST=localhost TRINO_USER=trino and run mcp-trino.
What does mcp-trino do?
It exposes tools to run distributed SQL queries, explore data catalogs, and explain query execution plans. The binary also functions as a standalone terminal REPL shell.
Which authentication options are available?
It supports JWT tokens over HTTP and OAuth 2.1 via Okta or Azure AD. It also handles user tracking via client tag headers and user impersonation with X-Trino-User.