# ThinAir Data (verified)

Connect AI assistants to PostgreSQL, MySQL, or SQL Server in 60 seconds. 24 dialect-aware tools — query, schema introspection, anomaly detection, query optimization. Read-only at three layers (firewa…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y smithery mcp add thinair/data

# Browse available tools
npx -y smithery tool list thinair/data

# Get full schema for a tool
npx -y smithery tool get thinair/data query_sql

# Call a tool
npx -y smithery tool call thinair/data query_sql '{}'
```

## Direct MCP Connection

Endpoint: `https://thinair-data.run.tools`

## Tools (23)

- `query_sql` — Execute a read-only SQL query against the target connection. ONLY SELECT / WITH / EXPLAIN permitted. Write dialect-appr…
- `describe_schema` — Discover the full database schema: tables, columns, types, primary keys, foreign keys, and indexes. Results cached 1 ho…
- `analyze_table` — QUICK statistical snapshot for ONE table — row count, null rates, cardinality, numeric min/max/avg, date ranges. Option…
- `detect_anomalies` — Scan a table for unusual patterns: volume drops/spikes, data gaps, value concentration, high null rates, stale data. Se…
- `suggest_queries` — Generate schema-aware query suggestions with ready-to-run SQL. Great for exploring unfamiliar databases or finding usef…
- `test_connection` — Ping a connection (SELECT 1) and return server version + latency. Fast way to confirm credentials and network path with…
- `list_connections` — List every database connection registered for your tenant: name, id, dbType (postgres / mysql / mssql), createdAt. Flag…
- `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 separat…
- `explain_query` — Analyze a SQL query's execution plan and return plain-English performance recommendations. Runs EXPLAIN ANALYZE (Postgr…
- `optimize_query` — Suggest a rewritten, optimized version of a SQL query with explanations. Identifies sequential scans, missing indexes, …
- `data_profile` — FULL data quality + compliance report for a table: per-column stats PLUS a 0-100 health score, type-gated PII detection…
- `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 save…
- `generate_migration` — Generate dialect-correct ALTER TABLE migration SQL + rollback from a plain-English intent. Output uses the connection's…
- `generate_seed_data` — Generate realistic, schema-aware INSERT statements for development and testing. Respects types, constraints, and FK rel…
- `show_locks` — List active sessions + blocking locks. Uses the dialect's own system view — `pg_stat_activity` on postgres, `informatio…
- `pii_scan` — Sweep string columns across tables for common PII patterns (email, SSN, credit card, phone, JWT, bearer tokens). Heuris…
- `watch_table` — Monitor a table's row count and latest record. Compares to previous snapshot to show changes. Built-in scheduler. [ARCH…
- `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 ti…
- `impact_analysis` — Analyze the blast radius of a proposed schema change: FK dependencies, affected views, row count, risk score. [ARCHITEC…
- `cross_db_query` — ⚠️ SQL MUST BE VALID IN EVERY DIALECT YOU TARGET — stick to ANSI-ish SELECT syntax when mixing pg/mysql/mssql. `SELECT …

```bash
# Get full input/output schema for a tool
npx -y smithery tool get thinair/data <tool-name>
```
