drio
Open app

Trino MCP Server

Source

MCP Server for Trino

Catalog onlyCatalog onlySTDIO

Overview

Trino MCP Server is a Model Context Protocol server designed for Trino, enabling AI models to access and query Trino's distributed SQL query engine in a structured manner.

To use the Trino MCP Server, you can start it using Docker or run a standalone Python API server. You can then send SQL queries to the server via its REST API.

  • Reliable Docker container API initialization - Exposes Trino resources through the MCP protocol - Enables AI tools to query and analyze data in Trino - Supports both Docker container API and standalone Python API server options
  1. Allowing AI models to run complex SQL queries against Trino.
  2. Integrating with LLMs for data analysis and insights generation.
  3. Facilitating data exploration and schema information retrieval through AI.

Add to your AI client

Use these steps to connect Trino MCP Server in Cursor, Claude, VS Code, and other MCP-compatible apps. The same JSON appears in the Use with menu above for one-click copy.

Cursor

Add this to your .cursor/mcp.json file in your project root, then restart Cursor.

.cursor/mcp.json

{
  "mcpServers": {
    "trino-mcp-stinkgen": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-trino-mcp-stinkgen"
      ]
    }
  }
}

Claude Desktop

Add this server entry to the mcpServers object in your Claude Desktop config, then restart the app.

~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows)

{
  "mcpServers": {
    "trino-mcp-stinkgen": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-trino-mcp-stinkgen"
      ]
    }
  }
}

Claude Code

Add this to your project's .mcp.json file. Claude Code will detect it automatically.

.mcp.json (project root)

{
  "mcpServers": {
    "trino-mcp-stinkgen": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-trino-mcp-stinkgen"
      ]
    }
  }
}

VS Code (Copilot)

Add this to your .vscode/mcp.json file. Requires the GitHub Copilot extension with MCP support enabled.

.vscode/mcp.json

{
  "servers": {
    "trino-mcp-stinkgen": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-trino-mcp-stinkgen"
      ]
    }
  }
}

Windsurf

Add this to your Windsurf MCP config file, then restart Windsurf.

~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "trino-mcp-stinkgen": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-trino-mcp-stinkgen"
      ]
    }
  }
}

Cline

Open Cline settings, navigate to MCP Servers, and add this server configuration.

Cline MCP Settings (via UI)

{
  "mcpServers": {
    "trino-mcp-stinkgen": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-trino-mcp-stinkgen"
      ]
    }
  }
}

FAQ

Can I run Trino MCP Server without Docker?

Yes, you can run the standalone Python API server.

What transport methods are supported?

The server supports STDIO transport (recommended) and SSE transport (not recommended due to issues).

How can I troubleshoot API errors?

Check the container logs and ensure the server is running properly.7:["$","div",null,{"className":"container mx-auto flex flex-col gap-4","children":["$L26","$L27",["$","$L28",null,{"currentProject":{"id":1886,"uuid":"ae619ed4-cc43-4765-84bf-c7825bd8e2b1","name":"trino_mcp","title":"Trino MCP Server","description":"MCP Server for Trino","avatar_url":"https://avatars.githubusercontent.com/u/70232657?v=4","created_at":"2025-03-05T05:52:37.854Z","updated_at":"2025-03-12T10:21:41.636Z","status":"created","author_name":"stinkgen","author_avatar_url":"https://avatars.githubusercontent.com/u/70232657?v=4","tags":"trino,mcp,sql-query,ai-integration","category":"developer-tools","is_featured":false,"sort":1,"url":"https://github.com/stinkgen/trino_mcp","target":"_self","content":"$29","summary":"$2a","img_url":null,"type":null,"metadata":"{\"star\":\"1\",\"license\":\"MIT license\",\"language\":\"Python\",\"is_official\":false,\"latest_commit_time\":\"2025-03-02 00:19:22\"}","user_uuid":null,"tools":null,"sse_url":null,"sse_provider":null,"sse_params":null,"is_official":false,"server_command":null,"server_params":null,"server_config":null,"allow_call":false,"is_innovation":false,"is_dxt":false,"dxt_manifest":null,"dxt_file_url":null,"is_audit":false},"randomProjects":[],"currentServerKey":"$undefined"}]]}]