
How to add Trino MCP Server to Windsurf
High-performance Go MCP server that lets AI assistants run SQL queries and explore data across a Trino cluster. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.
Last updated June 14, 2026 · 109★ · stdio · oauth
Windsurf config for Trino MCP Server
brew install tuannvm/mcp/mcp-trino{
"mcpServers": {
"trino-mcp-server": {
"command": "mcp-trino",
"args": [],
"env": {
"TRINO_HOST": "<HOST>",
"TRINO_PORT": "<PORT>",
"TRINO_USER": "<USERNAME>",
"TRINO_PASSWORD": "<PASSWORD>"
}
}
}
}Setup steps
- 1Open Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
- 2Paste the Trino MCP Server config below.
- 3Fill in placeholder secrets, then save.
- 4Click Refresh in the MCP panel.
- 5Trino MCP Server's tools become available to Cascade.
Before you start
- A reachable Trino (or PrestoSQL) cluster with host, port, and user credentials
- The mcp-trino binary (installed via Homebrew or the install.sh script) or Docker to run ghcr.io/tuannvm/mcp-trino
- For production HTTP/OAuth deployments: an OIDC provider (Okta, Google, or Azure AD) and TLS certificates
What Trino MCP Server can do in Windsurf
execute_queryExecute a SQL query against Trino with full SQL support for complex analytical queries; returns columns and row data.
list_catalogsList all catalogs available in the Trino server, providing a comprehensive view of the data ecosystem.
list_schemasList all schemas in a given catalog to help navigate the data hierarchy.
list_tablesList all tables in a given catalog and schema, exposing the available datasets.
get_table_schemaGet the schema of a table, including column names, data types, and nullability, for better query planning.
explain_queryAnalyze a Trino query execution plan without running it, showing distributed execution stages and resource estimates.
Security
Secrets (e.g. TRINO_PASSWORD) are read purely from environment variables; the docs recommend injecting them via a secrets CLI (1Password `op run`, Vault, or Kubernetes Secrets) rather than committing them — see docs/secrets.md for shell-history, process-list, and env-var leakage nuances. For production HTTP deployments the server supports OAuth 2.1 (native or proxy mode) with JWT validation, PKCE, and token caching; JWT_SECRET is required for multi-pod deployments. User impersonation (TRINO_ENABLE_IMPERSONATION) is opt-in and relies on Trino to enforce per-user permissions.
Trino MCP Server + Windsurf FAQ
Where is the Windsurf config file?
Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_config.json. Paste the Trino MCP Server config there under the "mcpServers" key and restart the client.
Is Trino MCP Server safe to use with Windsurf?
Secrets (e.g. TRINO_PASSWORD) are read purely from environment variables; the docs recommend injecting them via a secrets CLI (1Password `op run`, Vault, or Kubernetes Secrets) rather than committing them — see docs/secrets.md for shell-history, process-list, and env-var leakage nuances. For production HTTP deployments the server supports OAuth 2.1 (native or proxy mode) with JWT validation, PKCE, and token caching; JWT_SECRET is required for multi-pod deployments. User impersonation (TRINO_ENABLE_IMPERSONATION) is opt-in and relies on Trino to enforce per-user permissions.
What transports does the server support?
Both STDIO (default, used by Claude Desktop/Windsurf) and StreamableHTTP at the /mcp endpoint (recommended for web clients and remote deployments), with backward-compatible SSE at /sse. Set MCP_TRANSPORT=http to enable HTTP mode.
How is authentication handled?
Authentication is optional. For remote/HTTP deployments the server supports OAuth 2.1 via the oauth-mcp-proxy library with HMAC, Okta, Google, and Azure AD providers, in either native mode (client handles OAuth, zero server-side secrets) or proxy mode. Remote clients pass a JWT via an Authorization: Bearer header.
Can I limit which schemas the AI can see?
Yes. Set TRINO_ALLOWED_SCHEMAS (e.g. hive.analytics,hive.marts) to focus the assistant on specific schemas, which the docs note can yield a 10-20x performance improvement.