# thinair-data

> thinair-data is an MCP server for databases. Read-only MCP server giving AI agents schema, query and data-quality access to PostgreSQL. It is available on API, CLI, Web and Self-hosted.

- **Kind:** MCP server
- **Platforms:** API, CLI, Web, Self-hosted
- **Repository:** https://github.com/thinairtelematics/thinair-data
- **GitHub stars:** 1
- **License:** MIT
- **Categories:** [databases](https://ai-powered.com/categories/databases)
- **Listing updated:** 2026-12-01

## About

Connects an AI assistant to several relational databases at once, so questions can be answered from live data without writing a custom backend. Connections are registered during the session with the add_connection tool rather than in client configuration, and each one becomes a named resource that can be reused later.

The server exposes 26 tools for discovering tables and columns, running SELECT, WITH or EXPLAIN queries, reviewing query history, profiling distributions and null rates, flagging volume or staleness anomalies, scanning string columns for PII patterns, and comparing the same query across two to four connections. A dialect layer translates row-limit syntax per database, and per-connection firewall rules can block specific tables or queries.

It suits data and operations teams who want an agent to query production or staging databases under read-only guards, and developers who want help spotting N+1 patterns or slow queries. Least-privilege database credentials are still recommended, since the server's read-only enforcement is layered on top of the database's own permissions.

## Features

- **Multi-database sessions:** Query PostgreSQL, MySQL and SQL Server connections within a single MCP session.
- **Read-only query execution:** Runs only SELECT, WITH and EXPLAIN statements, with SQL guards and session read-only mode where supported.
- **Cross-database comparison:** Runs one query across two to four connections to compare results by region or dialect.
- **PII pattern scanning:** Heuristically sweeps string columns for email, SSN, card, phone, JWT and bearer token patterns.
- **Query firewall rules:** Lets each connection block specific tables or queries with custom rules.
- **Runtime connection management:** Adds and removes database connections during the session through tools.

## Good for

- Asking natural-language questions of production or staging data without writing SQL
- Comparing the same metric across regional databases of different engines
- Scanning a database for personal data patterns before a compliance review
- Finding slow queries and N+1 patterns in recent query history
- Profiling table distributions and null rates to check data quality

## Tools

From the tool list in its README, going by the names, 1 of 21 tools deletes data and 1 changes data; 10 names don't say. From the server's own tool labels and tool names; not verified by us.

- `list_connections` (name suggests: reads): List connected databases with names and dialects
- `describe_schema` (name suggests: reads): Introspect tables, columns, types, primary keys and indexes for a connection
- `query_sql` (name suggests: reads): Execute a read-only SQL query (SELECT / WITH / EXPLAIN only)
- `query_history` (name suggests: reads): Recent queries with timing, row counts and status
- `data_profile`: Distributions, null rates and cardinality on a table
- `cross_db_query` (name suggests: reads): Run the same query across 2-4 connections
- `detect_anomalies`: Volume drops/spikes, data gaps, value concentration, null rates, stale data
- `pii_scan`: Heuristic sweep of string columns for PII patterns
- `find_n_plus_one` (name suggests: reads): Identify N+1 query patterns in query_history
- `query_firewall` (name suggests: reads): Per-connection custom-block rules
- `add_connection` (name suggests: changes): Register a database connection at runtime
- `remove_connection` (name suggests: deletes): Remove a registered database connection
- `optimize_query` (name suggests: reads): Suggest query optimizations
- `explain_query` (name suggests: reads): Show query execution plan
- `suggest_queries`: Suggest useful queries
- `generate_migration`: Generate a schema migration
- `generate_seed_data`: Generate seed data
- `watch_table`: Monitor a table
- `saved_queries`: Manage saved queries
- `impact_analysis`: Analyze impact of changes
- `configure_allowlist`: Configure allowed operations

## FAQ

### Can the server modify data?

It is designed for read-only access. Queries are limited to SELECT, WITH and EXPLAIN, and session read-only mode is used where the database supports it.

### Which databases are supported?

PostgreSQL, MySQL and SQL Server, all usable in one session.

### How are database connections configured?

They are added at runtime with the add_connection tool after sign-in, not in the client config or as environment variables.

### How do I connect an MCP client?

Add the hosted endpoint https://data.thinair.co/mcp to the client config. It supports OAuth 2.1 or a Bearer API key.

### What are the best alternatives to thinair-data?

The closest alternatives to thinair-data are db-mcp-server, mcp-multi-db, thinair.co, sql-query-mcp and MCP Postgres.

## Where this comes from

- Description: written from the project's README.

## Alternatives

- [db-mcp-server](https://ai-powered.com/mcp/db-mcp-server-2): db-mcp-server is an open-source MCP server for databases.
- [mcp-multi-db](https://ai-powered.com/mcp/mcp-multi-db): mcp-multi-db is an open-source MCP server for databases.
- [thinair.co](https://ai-powered.com/mcp/thinair-co): thinair.co is an MCP server for databases.
- [sql-query-mcp](https://ai-powered.com/mcp/sql-query-mcp): sql-query-mcp is an open-source MCP server for databases.
- [MCP Postgres](https://ai-powered.com/mcp/mcp-postgres): MCP Postgres is an open-source MCP server for databases.
- [postgres_mcp](https://ai-powered.com/mcp/postgres-mcp-5): postgres_mcp is an open-source MCP server for databases.
- [Postgres](https://ai-powered.com/mcp/postgres): Postgres is an open-source MCP server for databases.
- [JDBC MCP Server](https://ai-powered.com/mcp/jdbc-mcp-server): JDBC MCP Server is an open-source MCP server for databases.

---
Source: https://ai-powered.com/mcp/thinair-data
