MCP Trino Server

v1.0.0Databasesstable

A Model Context Protocol server that provides seamless integration with Trino and Iceberg, enabling data exploration, querying, and table maintenance through a standard interface.

mcp-trino-servermcpai-integration
Share:
24
Stars
0
Downloads
0
Weekly
0/5

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

Query and explore data using Trino and Iceberg through a standard MCP interface.
Perform data maintenance tasks and analysis without SQL knowledge.
alaturqua

Maintainer

LicenseApache 2.0
Languagepython
Versionv1.0.0
UpdatedMay 16, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-trino-server

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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
EOF
2

Start 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 trino
3

Install 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.py
4

Install 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 claude
5

Add 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.

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.

Quick Config Preview

{ "mcpServers": { "mcp-trino-server": { "command": "npx", "args": ["-y", "mcp-trino-server"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides