MCP Trino Server
A Model Context Protocol server that provides seamless integration with Trino and Iceberg, enabling data exploration, querying, and table maintenance through a standard interface.
What is MCP Trino Server?
MCP Trino Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to model context protocol server that provides seamless integration with trino and iceberg, enabling data exploration, querying, and table maintenance through a standard interface.
A Model Context Protocol server that provides seamless integration with Trino and Iceberg, enabling data exploration, querying, and table maintenance through a standard interface.
This server falls under the Databases and Data Science & ML categories on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- A Model Context Protocol server that provides seamless integ
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx mcp-trino-serverConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use MCP Trino Server
MCP Trino Server is a Python-based MCP server that provides AI assistants with seamless access to Trino distributed SQL query engine and Apache Iceberg table format. It enables natural language-driven data exploration, SQL query execution, catalog and schema browsing, and Iceberg table maintenance tasks through a standard MCP interface. The server supports stdio, Streamable HTTP, and SSE transports, and can be deployed locally with pip/uv or via Docker.
Prerequisites
- Python 3.12 or higher
- A running Trino server (or Docker for local development with sample data)
- uv package manager (recommended) or pip
- TRINO_HOST, TRINO_PORT, TRINO_USER, TRINO_CATALOG, and TRINO_SCHEMA environment variables
- An MCP client such as Claude Desktop, VS Code, or Claude Code
Clone the repository and set up environment
Clone the mcp-trino-python repository and create a .env file with your Trino connection details.
git clone https://github.com/alaturqua/mcp-trino-python.git
cd mcp-trino-python
# Create .env file
cat > .env << 'EOF'
TRINO_HOST=localhost
TRINO_PORT=8080
TRINO_USER=trino
TRINO_CATALOG=tpch
TRINO_SCHEMA=tiny
EOFStart a local Trino instance (optional)
If you don't have an existing Trino server, use the bundled Docker Compose to start one locally with TPC-H and TPC-DS sample data.
docker-compose up -d trinoInstall and run the MCP server
Install dependencies and start the server using uv (recommended) or pip.
# With uv (recommended)
uv sync
uv run src/server.py
# Or install via pip
pip install -e .
python src/server.pyInstall via Smithery (alternative)
You can also install the server automatically for Claude Desktop using Smithery.
npx -y @smithery/cli install @alaturqua/mcp-trino-python --client claudeAdd to Claude Desktop configuration
Edit your claude_desktop_config.json to register the Trino MCP server with connection environment variables.
{
"mcpServers": {
"trino": {
"command": "python",
"args": ["./src/server.py"],
"env": {
"TRINO_HOST": "your-trino-host",
"TRINO_PORT": "8080",
"TRINO_USER": "trino",
"TRINO_CATALOG": "tpch",
"TRINO_SCHEMA": "tiny"
}
}
}
}MCP Trino Server Examples
Client configuration
Claude Desktop configuration connecting to a Trino server via the mcp-trino-python server.
{
"mcpServers": {
"trino": {
"command": "python",
"args": ["/path/to/mcp-trino-python/src/server.py"],
"env": {
"TRINO_HOST": "localhost",
"TRINO_PORT": "8080",
"TRINO_USER": "trino",
"TRINO_CATALOG": "tpch",
"TRINO_SCHEMA": "tiny"
}
}
}
}Prompts to try
Prompts for exploring Trino catalogs, running SQL queries, and managing Iceberg tables through the MCP interface.
- "List all available catalogs and schemas in Trino."
- "Show me the top 10 rows from the tpch.tiny.orders table."
- "Run a SQL query to count orders per customer status in the orders table."
- "Describe the schema of the lineitem table including column types."
- "Run an Iceberg table optimization compaction on the orders table in the hive catalog."Troubleshooting MCP Trino Server
Connection refused or 'Failed to connect to Trino' error
Verify your TRINO_HOST and TRINO_PORT match the running Trino server. If using Docker locally, ensure the container is up with: docker-compose ps. The default port is 8080. If Trino is on another machine, ensure network access and firewall rules allow the connection.
Query fails with 'catalog not found' or 'schema not found'
Set the correct TRINO_CATALOG and TRINO_SCHEMA environment variables. You can discover available catalogs by asking: 'List all catalogs in Trino'. Common catalogs in local Docker setups include tpch and tpcds.
Server exits immediately with Python version error
This server requires Python 3.12 or higher. Check your version with python --version. If you have multiple Python versions, use uv which manages its own Python installation, or specify python3.12 explicitly.
Frequently Asked Questions about MCP Trino Server
What is MCP Trino Server?
MCP Trino Server is a Model Context Protocol (MCP) server that model context protocol server that provides seamless integration with trino and iceberg, enabling data exploration, querying, and table maintenance through a standard interface. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install MCP Trino Server?
Follow the installation instructions on the MCP Trino Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with MCP Trino Server?
MCP Trino Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is MCP Trino Server free to use?
Yes, MCP Trino Server is open source and available under the Apache 2.0 license. You can use it freely in both personal and commercial projects.
MCP Trino Server Alternatives — Similar Databases Servers
Looking for alternatives to MCP Trino Server? Here are other popular databases servers you can use with Claude, Cursor, and VS Code.
Excelize
★ 20.6kGo language library for reading and writing Microsoft Excel™ (XLAM / XLSM / XLSX / XLTM / XLTX) spreadsheets
MCP Toolbox for Databases
★ 15.3kOpen source MCP server specializing in easy, fast, and secure tools for Databases.
DBHub
★ 2.8kA universal database gateway MCP server that enables AI assistants to connect to and query multiple databases (PostgreSQL, MySQL, MariaDB, SQL Server, SQLite) with support for schema exploration, SQL execution, and secure connections via SSH tunnels.
Tabularis
★ 2.1kA lightweight, cross-platform database client for developers. Supports MySQL, PostgreSQL and SQLite. Hackable with plugins. Built for speed, security, and aesthetics.
Postgres AI Guide
★ 1.7kMCP server and Claude plugin for Postgres skills and documentation. Helps AI coding tools generate better PostgreSQL code.
Anyquery
★ 1.7k🏎️ 🏠 ☁️ - Query more than 40 apps with one binary using SQL. It can also connect to your PostgreSQL, MySQL, or SQLite compatible database. Local-first and private by design.
Browse More Databases MCP Servers
Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up MCP Trino Server in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use MCP Trino Server?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.