Read-only Analytics MCP Server
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Read-only Analytics MCP Server
A clean-room core for exposing warehouse queries as a guarded Model Context Protocol tool. It validates read-only SQL, injects a conservative row limit, requires JSON responses from the upstream API, and returns audit metadata without leaking authentication material.
This repository contains no production account locator, warehouse name, access token, table name, schema, query history, or employer configuration.
What it demonstrates
MCP tool design for analytics agents
Read-only SQL validation
SQL API request construction
Required content negotiation headers
Row and statement limits
Secret-safe error handling
Auditable query fingerprints
Related MCP server: FastAPI Database MCP Server
Safety model
Only one
SELECT,SHOW, orDESCRIBEstatement is accepted.Mutating keywords, comments, and multiple statements are rejected.
SELECTqueries receive a maximum row limit when one is not already present.Tokens are accepted by the transport boundary but never returned or logged.
Run the tests
python -m unittest discover -s tests -vRun the optional MCP adapter
python -m pip install -e '.[mcp]'
export ANALYTICS_SQL_API_URL='http://localhost:9000/query'
export ANALYTICS_SQL_API_TOKEN='development-placeholder'
python -m readonly_analytics_mcp.mcp_serverThe example values are local placeholders. Never commit a real token or private endpoint.
Production extensions
Replace the lightweight keyword guard with an AST-based SQL parser.
Add per-tool table allowlists and policy-service authorization.
Add a streamable-HTTP deployment option alongside the included stdio adapter.
Add pagination, query cancellation, and structured observability.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
Related MCP Connectors
Read authorized Loam tables and supported external databases through a bounded MCP connection.
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.
Governed SQL access to your databases: redaction, query review and an audit log.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceProvides a read-only PostgreSQL SQL surface for LLM agents via MCP, with defense-in-depth security layers for safe database queries.136 PyPI4MIT
- FlicenseNot gradedqualityFmaintenanceProvides read-only SQL query access to Postgres and DuckDB databases via MCP tools, with extensive security hardening for public endpoints.1-
- FlicenseNot gradedqualityDmaintenanceEnables running read-only SQL queries and exploring DuckDB databases through MCP tools like listing tables, describing schemas, and fetching paginated data.-

MCP DB Gatewayofficial
AlicenseNot gradedqualityDmaintenanceProvides governed, read-only PostgreSQL access for AI agents via MCP. Enforces schema/table allowlists, query limits, and audit events.1MIT