# AKKO MCP server for Trino

> AKKO MCP server for Trino is an open-source MCP server for databases. Read-only Trino access for agents, run as the verified user so Trino policy decides. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** self-hosted, CLI
- **Website:** https://akko-ai.com/docs/akko-mcp-trino/
- **Repository:** https://github.com/akko-p/akko-mcp-trino
- **MCP Registry name:** io.github.ab2dridi/akko-mcp-trino
- **Categories:** databases, security
- **Listing updated:** 2026-11-14

## About

The notable choice in akko-mcp-trino is that the server never decides who may read what. By default it verifies the user's token, trades it with the identity provider for a separate token issued for Trino (OAuth 2.0 Token Exchange), and runs the query as that person. Trino's own access control, whether OPA, Ranger or built-in rules, then applies row filters and column masks, and the user's token never leaves the server. A query without a verified identity is refused rather than run under another name. Four identity modes exist, from `jwt` as the default to `service`, which gives every caller one account.

Agents can find tables and columns, describe a schema or table, list catalogs, schemas and tables, and explain or run a query. Tables the user cannot see do not appear in searches. Read-only is enforced on the parsed syntax tree: more than one statement, any write anywhere in the tree, EXPLAIN ANALYZE, table functions and the system catalog are all refused. Results are capped in rows and time, and every call leaves one audit line.

It installs from PyPI as `akko-mcp-trino` and needs the Trino host, OIDC settings and a bearer token. The core is Apache-2.0, and AKKO and ARCHE ship a fuller enterprise version.

## Features

- **User identity to Trino:** Runs each query as the verified user via token exchange.
- **Policy stays in Trino:** OPA, Ranger or Trino rules decide access; the server copies none.
- **Syntax-tree read-only check:** Rejects writes anywhere in the parsed query.
- **Schema discovery:** Finds tables and columns and describes schemas and tables.
- **Limits and audit:** Row and time caps, plus one audit line per call.
- **Four identity modes:** Choose jwt, impersonation, oauth2 or service.

## Good for

- Let an analyst's agent query a lakehouse with that analyst's permissions
- Find which tables hold a given kind of data
- Check a SQL query before running it
- Audit which agent tool calls touched which data

## Install

### Claude Code (Terminal)

```sh
claude mcp add akko-mcp-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>' --env TRINO_TOKEN_EXCHANGE_CLIENT_SECRET='<TRINO_TOKEN_EXCHANGE_CLIENT_SECRET>' --env MCP_USER_TOKEN='<MCP_USER_TOKEN>' -- uvx akko-mcp-trino
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "akko-mcp-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>",
        "TRINO_TOKEN_EXCHANGE_CLIENT_SECRET": "<TRINO_TOKEN_EXCHANGE_CLIENT_SECRET>",
        "MCP_USER_TOKEN": "<MCP_USER_TOKEN>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "akko-mcp-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>",
        "TRINO_TOKEN_EXCHANGE_CLIENT_SECRET": "<TRINO_TOKEN_EXCHANGE_CLIENT_SECRET>",
        "MCP_USER_TOKEN": "<MCP_USER_TOKEN>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "akko-mcp-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>",
        "TRINO_TOKEN_EXCHANGE_CLIENT_SECRET": "<TRINO_TOKEN_EXCHANGE_CLIENT_SECRET>",
        "MCP_USER_TOKEN": "<MCP_USER_TOKEN>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "akko-mcp-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>",
        "TRINO_TOKEN_EXCHANGE_CLIENT_SECRET": "<TRINO_TOKEN_EXCHANGE_CLIENT_SECRET>",
        "MCP_USER_TOKEN": "<MCP_USER_TOKEN>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "akko-mcp-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>",
        "TRINO_TOKEN_EXCHANGE_CLIENT_SECRET": "<TRINO_TOKEN_EXCHANGE_CLIENT_SECRET>",
        "MCP_USER_TOKEN": "<MCP_USER_TOKEN>"
      }
    }
  }
}
```

## Tools

- `search_columns`: Finds tables and columns by words in their names or comments.
- `execute_query`: Runs a read-only query as the verified user.
- `profile_table`: Profiles a table; added in version 0.8.0.

## FAQ

### Can the agent write data?

No. Any write statement, multiple statements, EXPLAIN ANALYZE and table functions are refused.

### Whose permissions does a query use?

By default the verified user's, through token exchange with your identity provider.

### Which tools are exposed?

The README names `search_columns`, `execute_query` and a ninth tool, `profile_table`, added in 0.8.0.

### What is open source?

The core under Apache 2.0; AKKO and ARCHE ship the full enterprise version.

### Is AKKO MCP server for Trino free?

Yes. AKKO MCP server for Trino is open source, so you can use and self-host it for free.

### How do I add AKKO MCP server for Trino to Claude Code?

Run this command in your terminal: claude mcp add akko-mcp-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>' --env TRINO_TOKEN_EXCHANGE_CLIENT_SECRET='<TRINO_TOKEN_EXCHANGE_CLIENT_SECRET>' --env MCP_USER_TOKEN='<MCP_USER_TOKEN>' -- uvx akko-mcp-trino

### What are the best alternatives to AKKO MCP server for Trino?

The closest alternatives to AKKO MCP server for Trino are REA, Agent Roast, Midplane, Leash and Tinplate Edge AI Safety, Security & EU Compliance.

## Alternatives

- [REA](https://ai-powered.com/mcp/rea): REA is an open-source MCP server for developer tools.
- [Agent Roast](https://ai-powered.com/mcp/agent-roast): Agent Roast is an open-source MCP server for developer tools.
- [Midplane](https://ai-powered.com/mcp/midplane): Midplane is an open-source MCP server for databases.
- [Leash](https://ai-powered.com/mcp/leash): Leash is a free MCP server for security.
- [Tinplate Edge AI Safety, Security & EU Compliance](https://ai-powered.com/mcp/tinplate-edge-ai-safety-security-and-eu-compliance): Tinplate Edge AI Safety, Security & EU Compliance is a freemium MCP server for security.
- [SecureCloud](https://ai-powered.com/mcp/securecloud): SecureCloud is a free MCP server for security.
- [Eikino](https://ai-powered.com/mcp/eikino): Eikino is a freemium MCP server for security.
- [SynomosAI Governance MCP](https://ai-powered.com/mcp/synomosai-governance-mcp-2): SynomosAI Governance MCP is an open-source MCP server for security.

---
Source: https://ai-powered.com/mcp/akko-mcp-server-for-trino
