MCP Trino Python MCP Server

The MCP Trino Server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that provides seamless integration with

Local serverstdioPython

What is the MCP Trino Python MCP Server?

The MCP Trino Server is a Model Context Protocol (MCP) server that provides seamless integration with Trino and Iceberg, enabling advanced data exploration, querying, and table maintenance capabilities through a standard interface.

Requirements

  1. A running Trino server (or Docker Compose for local development) 2. Python 3.12 or higher 3. Docker (optional, for containerized deployment)

Practical notes

  • Maintained by alaturqua, written in Python.

More MCP options

Compare MCP servers by category, or browse hosted MCP servers if you prefer an endpoint over a local process.

Maintainer setup documentation.

Recorded tools

Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.

ToolWhat it does
show_catalogsList all available catalogs
show_schemasList all schemas in a catalog
Parameters:limit: Maximum number of queries to return (number, optional)
show_tablesList all tables in a schema
schemaSchema name (string, optional)
describe_tableShow detailed table structure and column information
catalogCatalog name (string, optional)
execute_queryExecute a SQL query and return formatted results
show_catalog_treeShow a hierarchical tree view of catalogs, schemas, and tables
show_create_tableShow the CREATE TABLE statement for a table
show_create_viewShow the CREATE VIEW statement for a view
show_statsShow statistics for a table
optimizeOptimize an Iceberg table by compacting small files
optimize_manifestsOptimize manifest files for an Iceberg table
expire_snapshotsRemove old snapshots from an Iceberg table
retention_thresholdAge threshold (e.g., "7d") (string, optional)
show_table_propertiesShow Iceberg table properties
show_table_historyShow Iceberg table history/changelog
show_metadata_log_entriesShow Iceberg table metadata log entries
show_snapshotsShow Iceberg table snapshots
show_manifestsShow Iceberg table manifests for current or all snapshots
all_snapshotsInclude all snapshots (boolean, optional)
show_partitionsShow Iceberg table partitions
show_filesShow Iceberg table data files in current snapshot
show_entriesShow Iceberg table manifest entries for current or all snapshots
show_refsShow Iceberg table references (branches and tags)
show_query_historyGet the history of executed queries

How to install the MCP Trino Python MCP Server

{
  "mcpServers": {
    "trino": {
      "command": "python",
      "args": [
        "./src/server.py"
      ],
      "env": {
        "TRINO_HOST": "your-trino-host",
        "TRINO_PORT": "8080",
        "TRINO_USER": "trino"
      }
    }
  }
}

From the project documentation. Replace placeholders and example paths before connecting.

Configuration

  1. A running Trino server (or Docker Compose for local development) 2. Python 3.12 or higher 3. Docker (optional, for containerized deployment)
VariableDescriptionRequired
TRINO_HOSTDeclared in the maintainer’s client configuration.Check documentation
TRINO_PORTDeclared in the maintainer’s client configuration.Check documentation
TRINO_USERDeclared in the maintainer’s client configuration.Check documentation

Example prompts to try

  • “Use MCP Trino Python to show catalogs.”
  • “Use MCP Trino Python to show schemas.”
  • “Use MCP Trino Python to Parameters.”

Frequently asked questions

The MCP Trino Server is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server that provides seamless integration with Trino and Confirm the tools offered by your installed version in the connected client. Tool availability and permissions depend on the server and account configuration.