Loading...

MCP server for Trino, enabling AI assistants to interact with Trino's distributed SQL query engine via standardized tools and optional OAuth 2.1 authentication.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
MCP server for Trino, enabling AI assistants to interact with Trino's distributed SQL query engine via standardized tools and optional OAuth 2.1 authentication.
This MCP server provides a controlled interface to Trino. It is relatively safe when used with read-only queries and proper OAuth configuration. Enabling user impersonation and allowing arbitrary SQL execution increases the risk significantly.
Performance depends on the complexity of the SQL queries and the size of the data being processed. Restricting AI focus to specific schemas can significantly improve performance.
Cost is primarily related to Trino cluster resources consumed by query execution. Consider the cost of data transfer and compute resources.
brew install mcp-trino{
"mcpServers": {
"mcp-trino": {
"command": "docker",
"args": ["run", "--rm", "-i",
"-e", "TRINO_HOST=<HOST>",
"-e", "TRINO_PORT=<PORT>",
"-e", "TRINO_USER=<USERNAME>",
"-e", "TRINO_PASSWORD=<PASSWORD>",
"-e", "TRINO_SCHEME=http",
"ghcr.io/tuannvm/mcp-trino:latest"],
"env": {}
}
}
}MCP_TRANSPORTexecute_queryExecutes a SQL query against the Trino cluster.
Can modify or expose sensitive data depending on the query and user permissions.
list_catalogsLists available catalogs in the Trino cluster.
Read-only operation that reveals catalog names.
list_schemasLists available schemas within a specified catalog.
Read-only operation that reveals schema names.
list_tablesLists available tables within a specified schema.
Read-only operation that reveals table names.
get_table_schemaRetrieves the schema of a specified table.
Read-only operation that reveals table structure.
explain_queryExplains the execution plan of a SQL query.
Read-only operation that analyzes query execution.
OAuth
hybrid
This MCP server provides a controlled interface to Trino. It is relatively safe when used with read-only queries and proper OAuth configuration. Enabling user impersonation and allowing arbitrary SQL execution increases the risk significantly.
Autonomy depends on the configured permissions and the specific SQL queries executed. User impersonation can grant the AI the same privileges as the impersonated user.
Production Tip
Monitor Trino query logs and resource usage to identify and address performance bottlenecks or security issues.
It allows AI assistants to interact with a Trino cluster using standardized MCP tools.
OAuth 2.1 is supported with providers like Okta, Google, and Azure AD.
Use the `TRINO_ALLOWED_SCHEMAS` environment variable to limit the schemas the AI can access.
It allows the AI to execute queries as a specific user, inheriting their permissions. Enable it with `TRINO_ENABLE_IMPERSONATION=true`.
Security depends on proper configuration, especially OAuth and user impersonation settings. Follow security best practices.
Claude Desktop, Cursor, Windsurf, and any MCP-compatible client.
Monitor Trino query logs and resource usage. The server tags queries with user identity for auditing.