akko-mcp-trino
Read-only MCP server for Trino: six tools, writes refused on the SQL tree, one configured Trino identity, bounded rows and time. Any MCP host, any model.
Install / Use
claude mcp add AKKO-p -- npx -y github:AKKO-p/akko-mcp-trinoIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
SecuritySupported Platforms
Our assessment of akko-mcp-trino
akko-mcp-trino scores 83/100 on our quality scale, 905th of 1,113 Security skills we index.
Its MCP Server is 35 KB long, well organised into 33 sections with 19 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated yesterday, so akko-mcp-trino is actively maintained.
- It is released under the Apache-2.0 license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 92/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
akko-mcp-trino compared with similar skills
All 4 of these similar skills score higher than akko-mcp-trino; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| akko-mcp-trino (this skill)by AKKO-p | 83 | 3 | 1d ago | MCP Server |
| claude-memby thedotmack | 100 | 100.0k | today | CLAUDE.md |
| Agent-Reachby Panniantong | 100 | 96.4k | 4d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 75.1k | 1d ago | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.4k | today | CLAUDE.md |
Frequently asked questions
- How do I install akko-mcp-trino?
- Run
claude mcp add AKKO-p -- npx -y github:AKKO-p/akko-mcp-trino. The install tabs above show the steps for each supported agent. - Which AI agents does akko-mcp-trino work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is akko-mcp-trino safe to use?
- It is Apache-2.0-licensed and scores 92/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is akko-mcp-trino still maintained?
- The repository was last updated yesterday, so akko-mcp-trino is actively maintained.
Skill content
View source on GitHubakko-mcp-trino
English · Français
<!-- mcp-name: io.github.ab2dridi/akko-mcp-trino -->Give your AI agents read-only access to Trino, and nothing more.
akko-mcp-trino is an MCP server for Trino. It lets an agent list catalogs, schemas and tables, describe a table, explain a query and run it, and it guarantees that nothing it sends can write: every statement is parsed, and a write anywhere in it is refused before Trino. Every query runs either as the one Trino identity the administrator configured, or as the user the agent acts for, whose own token Trino verifies again. Either way Trino's access control (OPA, Ranger, or Trino's own rules) decides what the agent may read. Results are bounded in rows and in time, and every call leaves one audit line.
Why
An agent that reads a lakehouse needs a small, predictable surface: a few tools
whose descriptions a model understands, answers that never run away, and a
guarantee that a prompt injection cannot turn a question into a DROP TABLE.
This server is that surface, and nothing else. It does not decide access: in
jwt mode Trino decides for each user with the rules it already has, and in
service mode for the one identity you give it, with the rights every caller
of this server may have, no more.
Highlights
- Read-only by construction. SQL is parsed into an AST and refused if a write appears anywhere in the tree, CTEs and subqueries included. Table functions (
TABLE(...), such as a JDBC connector'ssystem.query) and thesystemcatalog are refused too, including through a name without a catalog when the session catalog issystem. - The user's own rights, end to end. In
jwtmode the caller's verified token goes to Trino, which verifies it again and runs the query as that user: Ranger or OPA decide for the person, not for a service account, with no password and no right to act for another user. A request without a verified token is refused, never run as anyone else. - Or one identity, configured by the administrator. In
servicemode, the default, every query runs asTRINO_USER, authenticated byTRINO_PASSWORDover https (or nothing, for a local Trino). The agent cannot name another user. - Bounded. A row cap with a
truncatedflag, a time budget per query cancelled in Trino, a time budget per tool call. - One audit line per call. Keyed by
X-Request-Id, never the token, never the SQL text: who called which tool, with which outcome, for how long. - Six tools, no more. List catalogs, schemas and tables, describe a table, explain a statement, run a read-only query.
- A guarded door. Bearer tokens verified against any OIDC provider's JWKS (issuer, audience, expiry, clock tolerance), strict mode refusing a request without a verified caller, a Host header filter.
- Built to be extended without being forked. Tool plugins and extensions are Python packages named at start: identity modes, guards at the door, audit fields, routes, tools. An extension can only refuse what the core allows, never widen it.
- Any MCP host, any model. Cursor, Claude Desktop, VS Code, the Python SDK… Mistral, or any OpenAI-compatible model through the example agent.
- Small and proven. 322 tests at 100 % line and branch coverage, including in-process suites on the real SDK for all three transports, and a product-neutral guard in CI.
Documentation
- How it works, end to end: akko-ai.com/en/docs/how-it-works (also en français).
- Guide, prerequisites, configuration, examples: akko-ai.com/docs/akko-mcp-trino (also in English) and akko-ai.com/docs/exemples.
- Reference, in this repository: this README,
examples/,CHANGELOG.md,CONTRIBUTING.md,SECURITY.md.
Contents
- How it works
- Compatibility
- Prerequisites
- Install and run
- Connect an MCP host
- Use it from an agent
- The tools
- Extensions
- What happens on a request
- Configuration
- Operations
- Development
- Design notes
- Contributing
- About AKKO
How it works
flowchart LR
Host["MCP host<br/>(Cursor, Claude, VS Code, an agent)"]
IdP["Identity provider<br/>(OIDC, JWKS)"]
Server["akko-mcp-trino"]
Trino["Trino"]
Policy["Policy engine<br/>(OPA, Ranger, built-in)"]
Data[("Data sources")]
Host -- "1. tool call + Bearer token" --> Server
Server -. "verify signature<br/>against JWKS" .-> IdP
Server -- "2. read-only SQL, as the caller (jwt)<br/>or as TRINO_USER (service)" --> Trino
Trino -- "3. may this identity read this?" --> Policy
Trino -- "4. rows, as that identity may read them" --> Server
Server -- "5. result" --> Host
Trino --> Data
The host calls a tool. When authentication is on, the server verifies the
caller's token (signature against the provider's JWKS, issuer, audience,
expiry) and refuses a request without one in strict mode; the caller's name
goes into the audit line. The server then checks the statement (read-only,
identifiers, table functions, the system catalog) and runs it in Trino under
the identity mode TRINO_IDENTITY_MODE names. Trino asks its policy engine and
returns what that identity may read, bounded in rows and time.
| Mode | Who Trino sees | What Trino needs | Who decides |
|---|---|---|---|
| service (default) | TRINO_USER, the same for every caller | a password (or nothing, locally) | the rights of that one identity |
| jwt | the caller, by their own verified token | its JWT authenticator, trusting the same identity provider | the rights of each user |
In service mode the caller's token never leaves the server. In jwt mode it
goes to Trino only once verified, over https only, and never into the audit
line; without one, the query is refused. An extension (see
Extensions) may add other identity modes.
Compatibility
| | Supported | Tested |
|---|---|---|
| Python | 3.12, 3.13 | 3.12, 3.13 (CI) |
| Trino | 351 and later, over http (local) or https with a password; https with the JWT authenticator for jwt | a recent release behind OPA, with row filters and column masks |
| Policy engines | OPA (trino-opa), Ranger (Trino plugin), Trino file-based access control | OPA with row filters and column masks |
| Identity providers (the door) | any OIDC provider publishing a JWKS | Keycloak 26 |
| MCP | protocol negotiated by the official mcp SDK 2.2 (versions up to 2025-11-25); transports streamable-http, sse and stdio | all three, official SDK client, in CI |
| MCP hosts | remote: anything that sends a bearer header; local: any stdio host | Python SDK, the example agent |
| Models | any, the server never talks to a model | Mistral Small 3.2 through OpenRouter, driving the tools |
Prerequisites
| You need | Why | Notes |
|---|---|---|
| Python 3.12 or later | runtime | pip and a virtual environment |
| A reachable Trino coordinator | the engine | any recent version; https when a password is set, and for jwt |
| A Trino identity for this server (service) | the rights of every caller | TRINO_USER, and TRINO_PASSWORD when Trino authenticates by password; give it read rights only on what every caller may read |
| Or Trino's JWT authenticator (jwt) | each user reads with their own rights | http-server.authentication.type=JWT with the identity provider's JWKS; the token's audience must be one Trino accepts |
| A policy engine deciding for Trino | the governance | OPA (opa.policy.uri), Ranger, or Trino file-based rules |
| An OIDC provider with a JWKS endpoint | the door (optional) | Keycloak, Entra ID, Okta, Dex… Tokens must carry iss, aud, exp, and a subject (preferred_username or sub) |
| An MCP host | the client | Cursor, Claude Desktop, VS Code, or any client built on the mcp SDK |
Optional: a Prometheus to scrape /metrics.
Install and run
pip install akko-mcp-trino # or: pipx install akko-mcp-trino
uvx akko-mcp-trino --version # run it without installing, the way most MCP hosts do
Or from source:
git clone https://github.com/AKKO-p/akko-mcp-trino.git
cd akko-mcp-trino
python -m venv .venv && source .venv/bin/activate
pip install -e .
The package installs a Python module (akko_mcp_trino) and a command
(akko-mcp-trino); python -m akko_mcp_trino is the same entrypoint.
Point it at your Trino and your identity provider, then serve:
export TRINO_HOST=trino.example.internal
export TRINO_PORT=8443
export TRINO_HTTP_SCHEME=https
export TRINO_CATALOG=iceberg
export TRINO_USER=mcp-reader
export TRINO_PASSWORD=... # Basic authentication, https only
export MCP_AUTH_ENABLED=true
export MCP_AUTH_REQUIRED=true # refuse requests without a verified identity
export MCP_JWKS_URL=https://idp.example.com/realms/data/protocol/openid-connect/certs
export MCP_OIDC_ISSUER=https://idp.example.com/realms/data
export MCP_OIDC_AUDIENCE=data-platform
python -m akko_mcp_trino
Before serving, akko-mcp-trino --check prints the effective configuration
(never a secret) and exits with 2 if something would refuse to start; over
stdio it checks that MCP_USER_TOKEN is present, not that it is valid (the
real start verifies the token). Then:
INFO:__main__:serving transport=streamable-http port=3000 auth=True strict=True extensions=none
Check it is alive and can reach Trino:
curl -s localhost:3001/health # {"status":"ok"} never touches Trino
curl -s localhost:3001/ready # {"status":"ready"} service: a bounded SELECT 1 as TRINO_USER; jwt: Trino's /v1/info
curl -s localhost:3001/metrics # Prometheus exposition
Every query runs as TRINO_USER, whoever calls: give that identity the rights
every caller of this server may have, no more. In strict mode, a request
without a verified token is refused before any query.
Each user with their own rights (jwt)
When Trino trusts the same identity provider, let it decide for each user:
export TRINO_IDENTITY_MODE=jwt # the caller's verified token goes to Trino
export TRINO_HTTP_SCHEME=https # required: a token never travels over http
export MCP_AUTH_ENABLED=true
export MCP_AUTH_REQUIRED=true
# TRINO_USER and TRINO_PASSWORD are not used
On the Trino side, http-server.authentication.type=JWT,
http-server.authentication.jwt.key-file set to the provider's JWKS URL, and
http-server.authentication.jwt.principal-field naming
Truncated for display — read the full file on GitHub.
Related Skills
claude-mem
100.0kPersistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More
Agent-Reach
96.4kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
75.1kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.4kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
