Skip to content

Trino MCP Server API Reference

Production-ready Trino MCP server for secure querying of distributed data sources with configurable access controls, authentication, and read-only mode using FastMCP and SQLAlchemy

This reference provides detailed information about all available tools and their parameters.

Available Tools

list_catalogs

Description: List all accessible Trino catalogs

Parameters: No parameters required

Example Usage:

mcp_platform call trino list_catalogs
from mcp_platform.client import MCPClient

client = MCPClient()
result = client.call_tool("trino", "list_catalogs", {})
curl -X POST http://localhost:8000/v1/call \
  -H "Content-Type: application/json" \
  -d '{"template_id": "trino", "tool_name": "list_catalogs", "arguments": {}}'

list_schemas

Description: List schemas in a specific catalog

Parameters:

  • catalog (string) (required): Catalog name to list schemas from

Example Usage:

mcp_platform call trino list_schemas
from mcp_platform.client import MCPClient

client = MCPClient()
result = client.call_tool("trino", "list_schemas", {})
curl -X POST http://localhost:8000/v1/call \
  -H "Content-Type: application/json" \
  -d '{"template_id": "trino", "tool_name": "list_schemas", "arguments": {}}'

list_tables

Description: List tables in a specific schema

Parameters:

  • catalog (string) (required): Catalog name containing the schema
  • schema (string) (required): Schema name to list tables from

Example Usage:

mcp_platform call trino list_tables
from mcp_platform.client import MCPClient

client = MCPClient()
result = client.call_tool("trino", "list_tables", {})
curl -X POST http://localhost:8000/v1/call \
  -H "Content-Type: application/json" \
  -d '{"template_id": "trino", "tool_name": "list_tables", "arguments": {}}'

describe_table

Description: Get detailed schema information for a table

Parameters:

  • catalog (string) (required): Catalog name containing the table
  • schema (string) (required): Schema name containing the table
  • table (string) (required): Table name to describe

Example Usage:

mcp_platform call trino describe_table
from mcp_platform.client import MCPClient

client = MCPClient()
result = client.call_tool("trino", "describe_table", {})
curl -X POST http://localhost:8000/v1/call \
  -H "Content-Type: application/json" \
  -d '{"template_id": "trino", "tool_name": "describe_table", "arguments": {}}'

execute_query

Description: Execute a SQL query against Trino (subject to read-only restrictions)

Parameters:

  • query (string) (required): SQL query to execute
  • catalog (string) (optional): Default catalog for the query (optional)
  • schema (string) (optional): Default schema for the query (optional)

Example Usage:

mcp_platform call trino execute_query
from mcp_platform.client import MCPClient

client = MCPClient()
result = client.call_tool("trino", "execute_query", {})
curl -X POST http://localhost:8000/v1/call \
  -H "Content-Type: application/json" \
  -d '{"template_id": "trino", "tool_name": "execute_query", "arguments": {}}'

get_query_status

Description: Get status of a running query

Parameters:

  • query_id (string) (required): Trino query ID to check

Example Usage:

mcp_platform call trino get_query_status
from mcp_platform.client import MCPClient

client = MCPClient()
result = client.call_tool("trino", "get_query_status", {})
curl -X POST http://localhost:8000/v1/call \
  -H "Content-Type: application/json" \
  -d '{"template_id": "trino", "tool_name": "get_query_status", "arguments": {}}'

cancel_query

Description: Cancel a running query

Parameters:

  • query_id (string) (required): Trino query ID to cancel

Example Usage:

mcp_platform call trino cancel_query
from mcp_platform.client import MCPClient

client = MCPClient()
result = client.call_tool("trino", "cancel_query", {})
curl -X POST http://localhost:8000/v1/call \
  -H "Content-Type: application/json" \
  -d '{"template_id": "trino", "tool_name": "cancel_query", "arguments": {}}'

get_cluster_info

Description: Get information about the Trino cluster

Parameters: No parameters required

Example Usage:

mcp_platform call trino get_cluster_info
from mcp_platform.client import MCPClient

client = MCPClient()
result = client.call_tool("trino", "get_cluster_info", {})
curl -X POST http://localhost:8000/v1/call \
  -H "Content-Type: application/json" \
  -d '{"template_id": "trino", "tool_name": "get_cluster_info", "arguments": {}}'

Integration Examples

For more integration examples and usage patterns, see the Usage Guide.

Support

For questions and issues related to the Trino MCP Server, please refer to: - Usage Guide for comprehensive examples - Template Overview for setup and configuration - MCP Platform Documentation for general platform usage