A production-grade Model Context Protocol server that connects Claude AI to your Apache Pinot cluster for real-time analytics, metadata queries, and schema management.
Bridge the gap between conversational AI and real-time OLAP analytics with a secure, production-ready server.
Query data, list tables, inspect schemas, and preview configuration changes through any compatible MCP client.
Read-only SQL queries, table-level filtering with glob patterns, OAuth authentication, and TLS/SSL support.
STDIO for desktop integration and Streamable HTTP for local or authenticated remote MCP clients.
A configurable Helm chart with health checks, optional network policy, disruption budgets, and ingress support.
Typed MCP tools, prompts, and resources over standard transports — no proprietary REST tool API required.
Comprehensive unit and integration coverage, typed contracts, structured logging, and actionable errors.
14 typed MCP tools with case-sensitive, underscore-separated identifiers.
| Tool | Description | Category |
|---|---|---|
test_connection |
Test and diagnose Pinot cluster connectivity | Query |
read_query |
Execute read-only SELECT queries on Pinot tables | Query |
list_tables |
Page through table names visible to this server | |
get_table_size |
Get table size and storage information | |
list_segments |
Page through exact segment names for a table | |
list_segment_metadata |
Page through detailed metadata for table segments | |
get_segment_index_metadata |
Inspect index and column-level information | |
get_schema |
Fetch a schema by name | Config |
create_schema |
Preview or create a Pinot schema | Config |
update_schema |
Preview or update an existing schema | Config |
get_table_config |
Retrieve table configuration | Config |
create_table_config |
Preview or create a table configuration | Config |
update_table_config |
Preview or update a table configuration | Config |
reload_table_filters |
Preview by default, then apply the unchanged candidate with its confirmation token | Config |
dry_run=true, show the exact preview to the
user, and apply with dry_run=false plus the preview's one-time
confirmation_token only after confirmation. A preview is
non-mutating but does not guarantee that Pinot will accept the later write.
Editing a table-filter file after preview invalidates its token.
Get up and running in under 5 minutes.
A fast Python package installer written in Rust.
curl -LsSf https://astral.sh/uv/install.sh | sh
Clone the repository and install dependencies.
git clone https://github.com/startreedata/mcp-pinot.git cd mcp-pinot uv pip install -e .
Set up your Pinot cluster connection.
# Copy the example config mv .env.example .env # Edit with your Pinot cluster details # PINOT_CONTROLLER_URL=http://localhost:9000 # PINOT_BROKER_URL=http://localhost:8000
Start the MCP server with the configured transport.
uv --directory . run mcp_pinot/server.py
If you don't have a Pinot cluster, start the QuickStart with Docker:
docker run --name pinot-quickstart \ -p 2123:2123 -p 9000:9000 -p 8000:8000 \ -d apachepinot/pinot:1.5.1 QuickStart -type batch
Connect a desktop host, use Streamable HTTP, or deploy on Kubernetes.
{
"mcpServers": {
"pinot_mcp": {
"command": "/path/to/uv",
"args": [
"--directory",
"/path/to/mcp-pinot",
"run",
"mcp_pinot/server.py"
],
"env": {
"MCP_TRANSPORT": "stdio",
"PINOT_CONTROLLER_URL": "http://localhost:9000",
"PINOT_BROKER_URL": "http://localhost:8000"
}
}
}
}
Replace paths with your actual uv and repo locations. Run which uv to find the uv path.
Use STDIO transport for Claude Desktop.
# Start the local Streamable HTTP server at /mcp MCP_TRANSPORT=http MCP_HOST=127.0.0.1 MCP_PORT=8080 uv run mcp-pinot # In another terminal, connect with the bundled MCP client uv run python examples/example_client.py
Use an MCP SDK or compatible host for initialization and tool calls. The
server does not expose custom /api/tools/* REST endpoints.
# Build the image docker build -t mcp-pinot . # Run with your config docker run -v $(pwd)/.env:/app/.env mcp-pinot
# Deploy with Helm helm install mcp-pinot ./helm/mcp-pinot \ --set pinot.controller.url=http://pinot-controller:9000 \ --set pinot.broker.url=http://pinot-broker:8000 # Expose through a Service only with OAuth enabled helm upgrade mcp-pinot ./helm/mcp-pinot \ --set service.enabled=true \ --set mcp.host=0.0.0.0 \ --set mcp.oauth.enabled=true
MCP Pinot Server working with Claude AI for real-time data analysis.
Ask Claude to explore your Pinot cluster — list tables, inspect schemas, and understand your data model.
Query data and generate visualizations like histograms, all through natural language prompts.
Configure Pinot connectivity, MCP transport, authentication, and deployment exposure.
.env file from the current working directory.
Process environment variables take precedence over .env. STDIO is the safe default; select HTTP explicitly and enable an auth provider before binding to a non-loopback host.
Use STDIO for local desktop integrations.
MCP_TRANSPORT=stdio
Explicit Streamable HTTP profile for local development.
MCP_TRANSPORT=httpMCP_HOST=127.0.0.1
Network exposure requires OAuth or static-token auth, plus TLS or an authenticated proxy.
MCP_HOST=0.0.0.0AUTH_PROVIDER=oauth
Services are opt-in and must be OAuth-gated for non-loopback hosts.
service.enabled=true
Use either PINOT_BROKER_URL or the individual broker host, port, and scheme overrides.
| Variable | Description | Default / Notes |
|---|---|---|
PINOT_CONTROLLER_URL |
Pinot controller endpoint | http://localhost:9000 |
PINOT_BROKER_URL |
Pinot broker endpoint | http://localhost:8000 |
PINOT_BROKER_HOST |
Optional broker host override | Parsed from PINOT_BROKER_URL |
PINOT_BROKER_PORT |
Optional broker port override | Parsed from PINOT_BROKER_URL |
PINOT_BROKER_SCHEME |
Optional broker scheme override | Parsed from PINOT_BROKER_URL |
PINOT_USERNAME / PINOT_PASSWORD |
Basic authentication for Pinot | — |
PINOT_TOKEN |
Bearer or raw token for Pinot | Takes precedence over token file |
PINOT_TOKEN_FILENAME |
File containing a Pinot token | — |
PINOT_DATABASE |
Optional database header | empty |
PINOT_USE_MSQE |
Enable Pinot multi-stage query engine | false |
PINOT_REQUEST_TIMEOUT |
HTTP request timeout in seconds | 60 |
PINOT_CONNECTION_TIMEOUT |
HTTP connection timeout in seconds | 60 |
PINOT_QUERY_TIMEOUT |
SQL query timeout in seconds | 60 |
STDIO is the default. Explicit HTTP binds to loopback; non-loopback binds fail closed unless OAuth or static-token authentication is enabled. Run one process or Helm replica while confirmation and rate-limit state are process-local.
| Variable | Description | Default / Notes |
|---|---|---|
MCP_TRANSPORT |
Transport mode: stdio or http |
stdio |
MCP_HOST |
HTTP bind address | 127.0.0.1 |
MCP_PORT |
HTTP port | 8080 |
MCP_PATH |
MCP HTTP path | /mcp |
MCP_SSL_CERTFILE |
Path to SSL certificate for HTTPS | — |
MCP_SSL_KEYFILE |
Path to SSL private key | — |
MCP_LOG_LEVEL |
Application logging level written to stderr | INFO |
MCP_RATE_LIMIT_RPS / MCP_RATE_LIMIT_BURST |
Per-principal or loopback-peer tool-call limits | 10 / 20 |
MCP_CONFIRMATION_TTL_SECONDS |
Lifetime of process-bound one-time confirmation tokens | 300 |
OAuth or static-token authentication is required for HTTP or HTTPS exposure outside loopback. Component scopes enforce read/write/admin access. Table filtering improves UX, but Pinot ACLs remain the production security boundary.
| Variable | Description | Default / Notes |
|---|---|---|
AUTH_PROVIDER |
Inbound authentication provider: oauth or static |
Required for non-loopback HTTP |
MCP_STATIC_TOKEN |
Shared bearer secret for a service principal | Required for the static provider |
MCP_STATIC_SCOPES |
Space- or comma-separated Pinot component scopes | pinot:read pinot:write pinot:admin |
PINOT_TABLE_FILTER_FILE |
YAML file for table filtering | Startup fails if configured and missing |
OAUTH_ENABLED |
Enable OAuth authentication | false |
OAUTH_CLIENT_ID |
OAuth client ID | Required when OAuth is enabled |
OAUTH_CLIENT_SECRET |
OAuth client secret | Required when OAuth is enabled |
OAUTH_BASE_URL |
Public base URL for this MCP server | http://localhost:8080 |
OAUTH_AUTHORIZATION_ENDPOINT |
Upstream authorization endpoint | Required when OAuth is enabled |
OAUTH_TOKEN_ENDPOINT |
Upstream token endpoint | Required when OAuth is enabled |
OAUTH_JWKS_URI |
JWKS URI used for token verification | Required when OAuth is enabled |
OAUTH_ISSUER |
Expected token issuer | Required when OAuth is enabled |
OAUTH_AUDIENCE |
Canonical MCP resource URI expected in the token audience | Required when OAuth is enabled |
OAUTH_EXTRA_AUTH_PARAMS |
Additional authorization parameters as JSON | — |
See the README configuration reference, SECURITY.md, and Helm chart docs for deployment details.