# AKKO MCP server for Trino

AKKO MCP server for Trino is a Claude Code MCP server for read-only Trino queries. Each request reaches Trino under the acting user's identity.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 7 repo stars
- Author: AKKO-p
- License: Apache-2.0 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/AKKO-p/akko-mcp-trino
- Updated: 2026-11-14
- Security check: automated, 2026-11-17 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/mcp/akko-mcp-server-for-trino

## What it does

AKKO MCP server for Trino gives an agent tools to find tables and columns, inspect schemas, list catalogs, and run permitted queries. It parses statements first and blocks write operations before they reach Trino.

The server checks a user token issued for this server, then obtains a separate Trino token through OAuth 2.0 Token Exchange. The original token stays inside the server. Trino policies, including OPA or Ranger rules, decide which data that identity may read.

Responses are bounded by row count and execution time, and each call produces an audit line. Running it requires Trino, `uvx`, an identity provider, and `TRINO_HOST`, `TRINO_HTTP_SCHEME`, `MCP_JWKS_URL`, `MCP_OIDC_ISSUER`, and `MCP_OIDC_AUDIENCE`; token exchange also uses `TRINO_TOKEN_EXCHANGE_CLIENT_SECRET` and `MCP_USER_TOKEN`.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `TRINO_HOST`, `TRINO_HTTP_SCHEME`, `MCP_JWKS_URL`, `MCP_OIDC_ISSUER`, `MCP_OIDC_AUDIENCE`, `TRINO_TOKEN_EXCHANGE_URL`, `TRINO_TOKEN_EXCHANGE_CLIENT_ID`, `TRINO_TOKEN_EXCHANGE_CLIENT_SECRET`, `TRINO_TOKEN_EXCHANGE_AUDIENCE`, `TRINO_IDENTITY_MODE` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add akko-mcp-trino -e TRINO_HOST=<TRINO_HOST> -e TRINO_HTTP_SCHEME=<TRINO_HTTP_SCHEME> -e MCP_JWKS_URL=<MCP_JWKS_URL> -e MCP_OIDC_ISSUER=<MCP_OIDC_ISSUER> -e MCP_OIDC_AUDIENCE=<MCP_OIDC_AUDIENCE> -e TRINO_TOKEN_EXCHANGE_CLIENT_SECRET=<TRINO_TOKEN_EXCHANGE_CLIENT_SECRET> -e MCP_USER_TOKEN=<MCP_USER_TOKEN> -- uvx akko-mcp-trino
```
Replace <…> with your own values. 6 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from akko-mcp-trino <command>

### Codex

**Platform CLI**
```bash
codex mcp add akko-mcp-server-for-trino --env TRINO_HOST=<TRINO_HOST> --env TRINO_HTTP_SCHEME=<TRINO_HTTP_SCHEME> --env MCP_JWKS_URL=<MCP_JWKS_URL> --env MCP_OIDC_ISSUER=<MCP_OIDC_ISSUER> --env MCP_OIDC_AUDIENCE=<MCP_OIDC_AUDIENCE> -- uvx akko-mcp-trino
```
Replace <…> with your own values. 6 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from akko-mcp-trino <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "akko-mcp-server-for-trino": {
            "command": "uvx",
            "args": [
                "akko-mcp-trino"
            ],
            "env": {
                "TRINO_HOST": "<TRINO_HOST>",
                "TRINO_HTTP_SCHEME": "<TRINO_HTTP_SCHEME>",
                "MCP_JWKS_URL": "<MCP_JWKS_URL>",
                "MCP_OIDC_ISSUER": "<MCP_OIDC_ISSUER>",
                "MCP_OIDC_AUDIENCE": "<MCP_OIDC_AUDIENCE>"
            }
        }
    }
}
```
Replace <…> with your own values. 6 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from akko-mcp-trino <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "akko-mcp-server-for-trino": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "akko-mcp-trino"
            ],
            "env": {
                "TRINO_HOST": "<TRINO_HOST>",
                "TRINO_HTTP_SCHEME": "<TRINO_HTTP_SCHEME>",
                "MCP_JWKS_URL": "<MCP_JWKS_URL>",
                "MCP_OIDC_ISSUER": "<MCP_OIDC_ISSUER>",
                "MCP_OIDC_AUDIENCE": "<MCP_OIDC_AUDIENCE>"
            }
        }
    }
}
```
Replace <…> with your own values. 6 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from akko-mcp-trino <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e TRINO_HOST=<TRINO_HOST> -e TRINO_HTTP_SCHEME=<TRINO_HTTP_SCHEME> -e MCP_JWKS_URL=<MCP_JWKS_URL> -e MCP_OIDC_ISSUER=<MCP_OIDC_ISSUER> -e MCP_OIDC_AUDIENCE=<MCP_OIDC_AUDIENCE> akko-mcp-server-for-trino uvx akko-mcp-trino
```
Replace <…> with your own values. 6 more environment variables are in the server README. uvx runs the command named after the package; if the README names another one, use uvx --from akko-mcp-trino <command>

## When to use it
- find tables and columns in Trino
- inspect a schema before writing a query
- run a query while blocking writes
- preserve each user's Trino permissions
- limit an agent response by rows and time

## Example prompts
- Find the Trino tables and columns related to orders.
- Describe the `analytics` schema and the `customers` table.
- Run a read query with my current Trino permissions and return the result.

## Similar
- [mcp-trino](https://affpapa.org/en/nevibecode/mcp/mcp-trino.md) — MCP server · ★ 125 repo stars
- [Context7](https://affpapa.org/en/nevibecode/mcp/context7.md) — MCP server · 5563 installs
- [Search Google Flights](https://affpapa.org/en/nevibecode/mcp/search-google-flights.md) — MCP server · 2595 installs
- [Math-MCP](https://affpapa.org/en/nevibecode/mcp/math-mcp.md) — MCP server · 5958 installs
- [pipeworx gateway](https://affpapa.org/en/nevibecode/mcp/pipeworx-gateway.md) — MCP server · 419019 installs
- [SparkForge](https://affpapa.org/en/nevibecode/mcp/sparkforge.md) — MCP server · 219896 installs
- [OpenWebSearch](https://affpapa.org/en/nevibecode/mcp/openwebsearch.md) — MCP server · 494 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
