Python MCP server that exposes Trino catalogs/schemas/tables as MCP resources and lets you run SQL against Trino from MCP clients.
https://github.com/Dataring-engineering/mcp-server-trinoStop wrestling with complex data access patterns when your AI applications need to query enterprise data. This MCP server transforms your Trino cluster into a natural, conversational interface that AI can actually use.
You've got petabytes of data in Trino, but getting AI applications to query it intelligently is a nightmare. You're either building custom APIs for every use case or forcing AI models to generate raw SQL without understanding your schema structure. Neither scales, and both break constantly.
This server makes your Trino infrastructure AI-native by exposing it through the Model Context Protocol. Your AI can now:
Instead of this painful process:
# Custom API wrapper for every query pattern
@app.route('/sales-data/<region>')
def get_sales_data(region):
# Hard-coded SQL for each use case
sql = f"SELECT * FROM sales.regional WHERE region = '{region}'"
# Custom connection handling, error management...
You get this:
// AI can directly query with natural language understanding
{
"tool": "query_trino",
"parameters": {
"sql": "SELECT region, sum(revenue) FROM sales.regional WHERE quarter = 'Q4' GROUP BY region",
"catalog": "warehouse"
}
}
The AI understands your schema structure, generates appropriate queries, and handles the Trino connection automatically.
Data Analytics Automation: AI assistants that can answer complex business questions by querying your data warehouse directly, without pre-built dashboards or reports.
Schema Exploration: Let AI discover and understand your data structure organically - it can browse catalogs, examine table relationships, and suggest relevant queries based on actual schema metadata.
Dynamic Reporting: Build AI applications that generate reports on-the-fly by understanding your data model and constructing appropriate queries for any business question.
Data Integration Workflows: AI agents that can pull data from multiple Trino catalogs, understand relationships between different data sources, and combine results intelligently.
Drop it into your existing MCP client setup:
{
"mcpServers": {
"trino": {
"command": "uv",
"args": ["--directory", "/path/to/mcp-server-trino", "run", "mcp_server_trino"],
"env": {
"TRINO_HOST": "your-trino-cluster.com",
"TRINO_USER": "analytics_user",
"TRINO_CATALOG": "warehouse",
"TRINO_SCHEMA": "public"
}
}
}
}
Your AI can immediately start discovering and querying your data without any additional configuration or API development.
Enterprise data is locked away in systems like Trino that weren't designed for AI interaction. This server bridges that gap cleanly - your existing Trino security, performance optimizations, and data governance all remain intact while your AI gets the natural access it needs.
If you're building AI applications that need to work with real enterprise data, this server eliminates the custom integration work that usually takes weeks to get right.