ThinAir Data
OfficialThinAir Data MCP server gives AI agents secure, read-only access to PostgreSQL, MySQL, and SQL Server for schema discovery, querying, profiling, safety, and anomaly detection.
Connect and manage multiple databases at runtime (add/remove/list/test connections).
Execute parameterized read-only SQL (SELECT/WITH/EXPLAIN) with dialect-aware syntax and default LIMIT 100.
Introspect schemas: tables, columns, types, primary keys, foreign keys, indexes.
Profile data: row counts, null rates, cardinality, numeric/date stats, health scores, PII detection.
Detect anomalies: volume drops/spikes, data gaps, value concentration, stale data, severity-ranked.
Optimize queries: EXPLAIN analysis, rewritten SQL suggestions, index DDL recommendations.
Generate SQL artifacts: migrations with rollback, seed data, query suggestions (never executed).
Monitor and audit: query history, saved queries, active locks, table watch, N+1 detection.
Enforce safety: query firewall rules, PII scanning, impact analysis for schema changes.
Cross-database: run federated queries across 2–4 connections with unified results.
Execute SQL queries, list tables, describe schema, and manage data in MySQL databases.
Execute SQL queries, list tables, describe schema, and manage data in PostgreSQL databases.
ThinAir Data MCP Server
The only MCP database server for PostgreSQL, MySQL, and SQL Server in one session — 26 tools across 4 tiers — schema introspection, cross-database compare, query firewall, PII scanning, N+1 detection, and runtime connection management. Read-only data access by design.
26 tools · PostgreSQL · MySQL · SQL Server · Read-only data access, schema discovery, profiling, SQL safety, anomaly detection
> describe_schema("fleet")
✓ 42 tables discovered · 6 high-value entities
✓ no write permissions enabled
> ask("Which vehicles had the most idle time last week?")
✓ generated safe read-only SQL · returned 10 rows · flagged 3 exceptionsPart of ThinAir
ThinAir Data is part of the ThinAir platform for fleet visibility, analytics, operational search, reporting, and AI-assisted decision support.
Related MCP server: ThinAir Geo
Hosted product vs this repository
data.thinair.cois the hosted ThinAir product.This repository is the thin public MCP package/pointer for developers and AI-agent clients.
Production use may require a ThinAir account, API key, OAuth connection, or hosted workspace.
What It Does
ThinAir Data is a Model Context Protocol (MCP) server that gives AI agents secure, read-only access to your databases — no custom backend required. Designed for read-only production access when configured correctly. ThinAir Data enforces read-only behavior through SQL guards, database-session read-only mode where supported, and optional per-connection firewall rules. You should still use least-privilege database credentials and avoid exposing sensitive tables unless required.
Multi-database — PostgreSQL, MySQL, SQL Server in a single session. Cross-database compare with one tool call.
Read-only by design — SQL guards, database-session read-only mode where supported, and optional per-connection firewall rules.
Dialect-aware — every tool understands
SELECT TOP 10(mssql) vsLIMIT(others) and routes syntax correctly per connection.Tiered capability — 26 tools across 4 tiers: schema introspection, query execution + history, EXPLAIN/optimization, anomaly detection, PII scanning, N+1 detection, query firewall, cross-DB compare, and runtime connection management (add/remove).
Connections are managed at runtime — added per-tenant via the
add_connectiontool after sign-in. Never an env var or install-time config.
Product Links
Product: https://data.thinair.co
Connect a database: https://data.thinair.co/connect
Pricing: https://data.thinair.co/checkout
ThinAir: https://thinair.co
Agent Discovery
Autonomous agents and directory crawlers can discover this server's capabilities without parsing this README. All three surfaces are live and served by the hosted product:
Surface | URL | Carries |
Agent card (A2A) |
| Protocol version, endpoint, transport, auth schemes, and all 26 skills |
Skills index |
| Machine-readable catalog of the 26 tools |
LLM guide |
| Plain-text orientation for language models |
The MCP endpoint itself is https://data.thinair.co/mcp (streamable-http; OAuth 2.1
keyless, or Authorization: Bearer).
Tools (selected — full list of 26 in docs)
Tool | Tier | Description |
| discover | List connected databases with names + dialects |
| discover | Introspect tables, columns, types, primary keys, and indexes for a connection (foreign keys are not reported; MySQL indexes not yet) |
| discover | Execute a parameterized read-only SQL query |
| build | Recent queries with timing, row counts, status |
| build | Distributions, null rates, cardinality on a table |
| architect | Run the same query across 2–4 connections (regional/dialect compare) |
| discover | Statistical outliers in row growth, latency, value distributions |
| build | Scan a table for PII patterns (SSN, email, phone, credit card) |
| architect | Identify N+1 query patterns in |
| architect | Per-connection custom-block rules (deny specific tables/queries) |
add_connection, remove_connection, optimize_query, explain_query, suggest_queries, generate_migration, generate_seed_data, watch_table, saved_queries, impact_analysis, configure_allowlist, and others round out the 26-tool surface.
Quick Start
Claude Desktop, Cursor, Windsurf — OAuth (recommended, keyless)
Add to your client's MCP config (e.g. ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"thinair-data": {
"url": "https://data.thinair.co/mcp"
}
}
}The OAuth flow completes at first use — no manual token setup required. After sign-in, your agent calls add_connection to register a database with its DSN — connections are tenant-scoped and reusable across sessions.
API key (for non-OAuth clients)
{
"mcpServers": {
"thinair-data": {
"url": "https://data.thinair.co/mcp",
"headers": {
"Authorization": "Bearer ta_live_..."
}
}
}
}Get a key at https://data.thinair.co/connect.
npx (CLI / scripts)
npx -y @thinairtelematics/dataPrints a config block to stdout. OAuth-keyless by default.
Supported Databases
Database connections are added at runtime via the add_connection MCP tool — pass the DSN once, the connection becomes a named resource the agent can reuse across sessions. Three dialects supported:
Database | Connection string format |
PostgreSQL |
|
MySQL |
|
SQL Server |
|
You do not put a DSN in your client's config. The add_connection tool is how connections enter the session.
Example Usage
Once connected, ask your AI:
"Show me all rows that haven’t updated in the last 24 hours across staging and prod"
"What are the top 10 slowest queries this week?"
"Scan the customers table for PII patterns"
"Which tables have the most N+1 query exposure?"
Not for secrets
Do not commit DSNs, passwords, tokens, private keys, or production credentials. Use OAuth, the hosted connection flow, or your MCP client's secret storage.
npm Package
npmjs.com/package/@thinairtelematics/data
Previously published as
thinair-data(now deprecated in favor of the scoped package).
License
MIT © ThinAir Telematics
Available Tools
23 toolsanalyze_tableA
QUICK statistical snapshot for ONE table — row count, null rates, cardinality, numeric min/max/avg, date ranges. Optionally drill into a specific column. Use data_profile when the user wants a FULL quality report including PII detection.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
cross_db_queryA
Run a federated query across multiple connections (different dialects). Returns a unified result set with per-source provenance. [ARCHITECT tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
data_profileA
FULL data quality + compliance report for a table: per-column stats PLUS a 0-100 health score, type-gated PII detection (email / phone / SSN / etc.), and insight warnings. Use this when the user says 'profile' or 'quality report' or mentions PII/compliance. [BUILD tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
describe_schemaB
Discover the full database schema: tables, columns, types, primary keys, foreign keys, and indexes. Results cached 1 hour. Call with refresh=true after schema changes.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
detect_anomaliesA
Scan a table for unusual patterns: volume drops/spikes, data gaps, value concentration, high null rates, stale data. Severity-ranked alerts. Tables > 100k rows use a sampled path (~5%). Dialect-aware sampling.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
explain_queryA
Analyze a SQL query's execution plan and return plain-English performance recommendations. Runs EXPLAIN ANALYZE (Postgres) or EXPLAIN FORMAT=JSON (MySQL). [BUILD tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
find_n_plus_oneB
Detect N+1 query patterns from recent query history. Fingerprints queries and flags repeated patterns. [ARCHITECT tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
generate_migrationA
Generate dialect-correct ALTER TABLE migration SQL + rollback from a plain-English intent. Output uses the connection's exact dialect. Never executes. [BUILD tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
generate_seed_dataA
Generate realistic, schema-aware INSERT statements for development and testing. Respects types, constraints, and FK relationships. Never executes. [BUILD tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
impact_analysisA
Analyze the blast radius of a proposed schema change: FK dependencies, affected views, row count, risk score. [ARCHITECT tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
issue_api_keyA
Issue a fresh ta_data_* API key for your current tenant. Useful for pasting into /add-database or configuring a separate integration. Rate-limited to 5 issuances per tenant per day.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
list_connectionsA
List every database connection registered for your tenant: name, id, dbType (postgres / mysql / mssql), createdAt. Flags duplicate names. Returns nothing sensitive (no DSN, no credentials).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
optimize_queryA
Suggest a rewritten, optimized version of a SQL query with explanations. Identifies sequential scans, missing indexes, sort spills, join inefficiencies, and suggests index DDL. [BUILD tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
pii_scanA
Sweep string columns across tables for common PII patterns (email, SSN, credit card, phone, JWT, bearer tokens). Heuristic-only — not a compliance guarantee. [BUILD tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
query_firewallB
Manage per-connection SQL rules: block dangerous patterns, require WHERE on large tables, log PII access. [ARCHITECT tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
query_historyB
Return recent queries executed through ThinAir with timing, row counts, and status. [BUILD tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
query_sqlA
Execute a read-only SQL query against the target connection. ONLY SELECT / WITH / EXPLAIN permitted. Write dialect-appropriate SQL for the connection's engine — PostgreSQL syntax for postgres, T-SQL for mssql, MySQL for mysql. Response meta includes connection + dialect so you know which syntax worked. Default LIMIT 100 unless the user asks for all rows.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
quotaA
Check current API usage, daily limit, plan name, and upgrade options.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
saved_queriesB
Manage your personal library of reusable SELECT queries. action=save stores a query by name; action=run executes a saved query; action=list returns all your saved queries; action=delete removes one. [BUILD tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
show_locksA
List active sessions + blocking locks. Uses the dialect's own system view: pg_stat_activity on postgres, information_schema.processlist on mysql, sys.dm_exec_requests joined with sys.dm_tran_locks on mssql. [BUILD tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
suggest_queriesA
Generate schema-aware query suggestions with ready-to-run SQL. Great for exploring unfamiliar databases or finding useful queries.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
test_connectionA
Ping a connection (SELECT 1) and return server version + latency. Fast way to confirm credentials and network path without running describe_schema.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
watch_tableA
Monitor a table's row count and latest record. Compares to previous snapshot to show changes. Built-in scheduler. [ARCHITECT tier]
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
23 tool updates
v0.1.0- First observed
analyze_table - First observed
cross_db_query - First observed
data_profile - First observed
describe_schema - First observed
detect_anomalies - First observed
explain_query - First observed
find_n_plus_one - First observed
generate_migration - First observed
generate_seed_data - First observed
impact_analysis - First observed
issue_api_key - First observed
list_connections - First observed
optimize_query - First observed
pii_scan - First observed
query_firewall - First observed
query_history - First observed
query_sql - First observed
quota - First observed
saved_queries - First observed
show_locks - First observed
suggest_queries - First observed
test_connection - First observed
watch_table
TDQS
Scored across 23 tools
Most tools have clearly distinct purposes (schema, querying, profiling, etc.), though analyze_table and data_profile overlap in table statistics, and explain_query with optimize_query both address performance. Descriptions effectively differentiate them, but ambiguity exists for a couple of pairs.
The majority of tool names follow a verb_noun pattern (analyze_table, describe_schema, etc.), but there are minor deviations like cross_db_query (adjective_noun) and quota (single noun). Overall pattern is consistent and readable.
At 23 tools, the set is on the heavier side for a data management server. While each tool serves a distinct purpose (schema, querying, profiling, security, migrations), the number is borderline and could feel bloated for simpler use cases.
The tool surface is highly comprehensive for a data observability/management server, covering schema discovery, query execution/optimization, profiling, PII scanning, anomaly detection, migrations, security, and admin tasks. No obvious gaps within the intended scope.
Maintenance
Related MCP Connectors
Query Postgres, MySQL, SQL Server, Oracle, BigQuery, ClickHouse and Redshift from your AI client.
PostgreSQL, MySQL, and SQL Server in one session. 26 read-only MCP tools for AI agents.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Query 40 databases from Claude, ChatGPT, or Cursor — on any device. Read-only, encrypted, audited.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables secure, AI-driven PostgreSQL database administration, observability, and querying with support for extensions like PostGIS and pgvector, connection pooling, and advanced tool filtering.119 npm12MIT

ThinAir Geoofficial
AlicenseAqualityBmaintenanceLocation & routing intelligence for AI agents — geocoding, truck routing, traffic, weather, and place search.1932 npm1MIT- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage, monitor, and optimize PostgreSQL databases with over 200 specialized tools for operations, security, performance tuning, and diagnostics.29 npm12MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to connect to and interact with PostgreSQL, MySQL, SQLite, and MongoDB databases through natural language, supporting schema exploration, query execution, data export, and more.13MIT