Loading...

This MCP server allows listing and querying Trino tables, executing SQL queries, and reading table contents, configured via environment variables.
Boost this tool
Subscribe to listing upgrades or segmented pushes.
This MCP server allows listing and querying Trino tables, executing SQL queries, and reading table contents, configured via environment variables.
This server is relatively safe for read-only operations and listing tables. However, executing arbitrary SQL queries introduces significant risk, especially if proper input validation and resource controls are not implemented. Secure handling of environment variables is crucial.
Performance is largely dependent on the Trino cluster's performance and the complexity of the SQL queries. Network latency between the MCP server and the Trino cluster can also impact performance.
Cost is primarily associated with Trino cluster resources consumed by the executed queries. Complex queries and large data scans can be expensive.
{
"mcpServers": {
"trino": {
"command": "uv",
"args": [
"--directory",
"<path_to_mcp_server_trino>",
"run",
"mcp_server_trino"
],
"env": {
"TRINO_HOST": "<host>",
"TRINO_PORT": "<port>",
"TRINO_USER": "<user>",
"TRINO_PASSWORD": "<password>",
"TRINO_CATALOG": "<catalog>",
"TRINO_SCHEMA": "<schema>"
}
}
}
}list_tablesLists available tables in the configured Trino catalog and schema.
Read-only operation; no data modification.
read_tableReads the contents of a specified Trino table.
Read-only operation; no data modification.
execute_sqlExecutes an arbitrary SQL query against the Trino database.
Allows arbitrary SQL execution, potentially leading to data modification or leakage.
Environment Variable
This server is relatively safe for read-only operations and listing tables. However, executing arbitrary SQL queries introduces significant risk, especially if proper input validation and resource controls are not implemented. Secure handling of environment variables is crucial.
Autonomy level depends on the configured permissions and the SQL queries executed. Exercise caution when granting autonomy due to the potential for destructive SQL operations.
Production Tip
Implement robust input validation and query sanitization to prevent SQL injection attacks. Monitor Trino resource usage to prevent denial-of-service.
Authentication is configured through environment variables, typically requiring a username and optionally a password, depending on the Trino setup.
Store the environment variables containing the credentials securely, such as using a secrets management system. Avoid hardcoding credentials in the code.
Resource limits should be configured on the Trino side. The MCP server itself does not provide resource limiting capabilities.
Implement robust input validation and query sanitization on the MCP server side before passing queries to Trino. Use parameterized queries where possible.
SSL/TLS configuration depends on the Trino server setup. Ensure that Trino is configured to use SSL/TLS, and the MCP server will inherit that configuration through the Trino Python client.
Monitor query performance using Trino's built-in monitoring tools and query logs. The MCP server itself provides limited monitoring capabilities.
The MCP server will return an error message from the Trino Python client. Implement proper error handling in your application to handle query failures gracefully.