ThinAir Data
About
Read-only MCP server for PostgreSQL, MySQL, and SQL Server with schema introspection, SQL query execution, EXPLAIN/optimization, anomaly detection, PII scanning, and N+1 query detection.
Details
- Transport
- SSE
Explore
Setup
Install ThinAir Data in your MCP client (Claude Desktop, Cursor, Windsurf, and others).
Repository: https://github.com/thinairtelematics/thinair-data
Follow the installation instructions in the repository README, then restart your MCP client.
query_sql
Execute a read-only SQL query against the target connection. ONLY SELECT / WITH / EXPLAIN permitted. Write dialect-appropriate SQL for the connection's engine — use PostgreSQL syntax for postgres connections (`SELECT NOW()`, `LIMIT`, `ILIKE`), T-SQL for mssql (`SELECT GETDATE()`, `TOP N`, `LIKE`), MySQL for mysql (`SELECT NOW()`, `LIMIT`). Response meta includes `connection` + `dialect` so you know which syntax worked; reuse that dialect in follow-up calls. Default LIMIT 100 unless the user a…
describe_schema
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.
analyze_table
QUICK statistical snapshot for ONE table — row count, null rates, cardinality, numeric min/max/avg, date ranges. Optionally drill into a specific column. Use this for a fast at-a-glance read. Use `data_profile` instead when the user wants a FULL quality report including PII detection and a health score.
detect_anomalies
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%) — when a finding has `sampled:true`, surface it to the user with a hedge like 'based on a ~5% sample' rather than presenting the number as exact. Dialect-aware: TABLESAMPLE SYSTEM on postgres, TABLESAMPLE PERCENT on mssql, WHERE RAND() on mysql.
suggest_queries
Generate schema-aware query suggestions with ready-to-run SQL. Great for exploring unfamiliar databases or finding useful queries.
test_connection
Ping a connection (SELECT 1) and return server version + latency. Fast way to confirm credentials and network path without running describe_schema.
list_connections
List every database connection registered for your tenant: name, id, dbType (postgres / mysql / mssql), createdAt. Flags duplicate names — only the first-added connection of a duplicate name is reachable by name. Returns nothing sensitive (no DSN, no credentials).
add_connection
Get a secure one-time link to register a new database connection with ThinAir Data (postgres, mysql, or mssql). This tool does NOT take a connection string as input — you'll open the returned link and paste the connection string into a secure web form; it is never sent through chat. The response includes `connection_string_format` and `auth_note` for the chosen dialect — surface both to the user verbatim. IMPORTANT for mssql: Azure SQL uses Microsoft Entra, so the connection string is HOST/DA…
remove_connection
Remove a stored database connection from ThinAir Data by name. This deletes ONLY ThinAir's saved connection record (name, encrypted DSN) — your actual database is never touched, nothing is dropped or altered on it. Call list_connections first if you're unsure of the exact name.
quota
Check current API usage, daily limit, plan name, and upgrade options.
issue_api_key
Issue a fresh ta_data_* API key for your current tenant. Useful for pasting into /add-database or configuring a separate integration. The new key is tied to your existing plan tier. Rate-limited to 5 issuances per tenant per day.
explain_query
Analyze a SQL query's execution plan and return plain-English performance recommendations. Runs EXPLAIN ANALYZE (Postgres) or EXPLAIN FORMAT=JSON (MySQL). [BUILD tier]
optimize_query
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]
data_profile
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. Slower than `analyze_table` but returns everything needed to audit a table for ownership / compliance / onboarding. Use this when the user says 'profile' or 'quality report' or mentions PII/compliance. [BUILD tier]
query_history
Return recent queries executed through ThinAir with timing, row counts, and status. [BUILD tier]
saved_queries
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]
generate_migration
Generate dialect-correct ALTER TABLE migration SQL + rollback from a plain-English intent. Output uses the connection's exact dialect (ALTER TABLE for all three, plus pg-specific `USING` casts / mssql-specific `sp_rename` / mysql-specific `MODIFY COLUMN`). Never executes. Check response `dialect` field before manually editing — don't hand-translate across dialects. [BUILD tier]
generate_seed_data
Generate realistic, schema-aware INSERT statements for development and testing. Respects types, constraints, and FK relationships. Never executes. [BUILD tier]
show_locks
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. No dialect arg needed — inferred from the connection. **Required privileges (per dialect):** postgres — `pg_read_all_stats` role membership (or be the role that owns the queries; otherwise you only see your own session); mysql — `PROCESS` privilege; mssql — `VIEW SERVER STATE`. If…
pii_scan
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]
watch_table
Monitor a table's row count and latest record. Compares to previous snapshot to show changes. Built-in scheduler. [ARCHITECT tier]
find_n_plus_one
Detect N+1 query patterns from recent query history. Fingerprints queries and flags repeated patterns. [ARCHITECT tier]
query_firewall
Manage per-connection SQL rules: block dangerous patterns, require WHERE on large tables, log PII access. [ARCHITECT tier]
impact_analysis
Analyze the blast radius of a proposed schema change: FK dependencies, affected views, row count, risk score. [ARCHITECT tier]
cross_db_query
⚠️ SQL MUST BE VALID IN EVERY DIALECT YOU TARGET — stick to ANSI-ish SELECT syntax when mixing pg/mysql/mssql. `SELECT TOP 10` (mssql) or `LIMIT` (others) will fail on the wrong side. Run the same query across 2-4 connections in parallel; returns per-connection rows + errors for diffing. Canonical use cases: regional compare (`['mssql-reporting-us', 'mssql-reporting-eu']`), cross-dialect sync check (`['prod-postgres-fleet', 'prod-mysql-app']`), 3-env drift, 4-region compare. Resolve every con…
configure_allowlist
Manage HARD SQL guardrails for an enterprise connection: a TABLE ALLOWLIST (queries may reference only the listed tables — enforced at the AST level across subqueries/CTEs/JOINs) and a PII MASKING policy (mask flagged columns in query results). Both opt-out by default. action=view shows current policy + schema reference; set_tables replaces the allowlist (use [] to lock down everything); remove_allowlist disables it; set_pii_policy toggles masking + chooses which PII kinds to mask. Masking is…
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.
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 exceptions
ThinAir Data is part of the ThinAir platform for fleet visibility, analytics, operational search, reporting, and AI-assisted decision support.
- 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.
- 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 understandsSELECT 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 theadd_connectiontool after sign-in. Never an env var or install-time config.
- Product:https://data.thinair.co
- Connect a database:https://data.thinair.co/connect
- Docs:https://data.thinair.co/docs/getting-started
- Pricing:https://data.thinair.co/checkout
- ThinAir:https://thinair.co
Tools (selected — full list of 26 indocs)
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.
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 callsadd_connectionto register a database with its DSN — connections are tenant-scoped and reusable across sessions.
{ "mcpServers": { "thinair-data": { "url": "https://data.thinair.co/mcp", "headers": { "Authorization": "Bearer ta_live_..." } } } }
Get a key athttps://data.thinair.co/connect.
Prints a config block to stdout. OAuth-keyless by default.
Database connections are added atruntimevia theadd_connectionMCP tool — pass the DSN once, the connection becomes a named resource the agent can reuse across sessions. Three dialects supported:
You donotput a DSN in your client's config. Theadd_connectiontool is how connections enter the session.
- "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?"
Do not commit DSNs, passwords, tokens, private keys, or production credentials. Use OAuth, the hosted connection flow, or your MCP client's secret storage.
npmjs.com/package/@thinairtelematics/data
Previously published asthinair-data(now deprecated in favor of the scoped package).
Multi-database agent access (PostgreSQL, SQLite, MySQL, Oracle, SQL Server) with batch queries, pre-configured connections, and SQLGlot-enforced read-only safety
A read-only MCP server by CData that enables LLMs to query live data from EnterpriseDB databases.
A read-only MCP server for MySQL, enabling LLMs to query live data using the CData JDBC Driver.
Database MCP server for MySQL, MariaDB, PostgreSQL & SQLite
A single-binary MCP server for MySQL, MariaDB, PostgreSQL, and SQLite
A Model Context Protocol (MCP) server that provides multi-database query execution capabilities with support for SQLite, PostgreSQL, and MySQL databases. Includes a built-in Web UI for managing database connections.
Update various databases (PostgreSQL, MySQL, MongoDB, SQLite) using data from CSV and Excel files.
Expert-level PostgreSQL database analysis MCP server for AI assistants.
Enables AI assistants to interact with various databases through JDBC connections.
Production-grade Model Context Protocol (MCP) server for unified SQL database access. Connect multiple databases through a single MCP server with schema discovery, relationship mapping, caching, and safety controls.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



