# ThinAirTelematics/thinair-data [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/ThinAirTelematics/thinair-data  
**GitHub Stars:** 1  
**npm Downloads (last month):** 150  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/thinairtelematics-thinair-data

## Description
Connect any AI to PostgreSQL, MySQL, or SQL Server — 24 dialect-aware tools for query, schema introspection, optimization, migrations, PII scan, and more. Hosted MCP server with OAuth 2.0 + Bearer auth, free trial available.

## Tools
Capabilities this server exposes over MCP:

- **list_connections** — List connected databases with names + dialects
- **describe_schema** — Introspect tables, columns, types, primary keys, and indexes for a connection (foreign keys are not reported; MySQL indexes not yet)
- **query_sql** — Execute a read-only SQL query (SELECT / WITH / EXPLAIN only)
- **query_history** — Recent queries with timing, row counts, status
- **data_profile** — Distributions, null rates, cardinality on a table
- **cross_db_query** — Run the same query across 2–4 connections (regional/dialect compare)
- **detect_anomalies** — Volume drops/spikes, data gaps, value concentration, null rates, stale data
- **pii_scan** — Heuristic sweep of string columns across tables for PII patterns (email, SSN, card, phone, JWT, bearer token)
- **find_n_plus_one** — Identify N+1 query patterns in `query_history
- **query_firewall** — Per-connection custom-block rules (deny specific tables/queries)

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "thinair-data": {
    "command": "npx",
    "args": ["-y","@thinairtelematics/data"]
  }
}
```

## Documentation

## What ThinAirTelematics/thinair-data does

ThinAirTelematics/thinair-data exposes databases to MCP-compatible AI clients while keeping data access read-only. It supports PostgreSQL, MySQL, and SQL Server in one session, with dialect-aware handling for database-specific SQL such as SQL Server TOP syntax versus LIMIT on other systems.

The server is part of the ThinAir platform and is intended for database discovery, operational analysis, reporting, and AI-assisted investigation. Its tool surface covers schema inspection, safe query execution, query history, profiling, anomaly detection, PII pattern scanning, cross-database comparisons, and query safety controls.

## How it works

The hosted MCP endpoint is available at `https://data.thinair.co/mcp` over streamable HTTP. Clients can authenticate through OAuth 2.1 without manually configuring a token, or send an API key using a Bearer authorization header. After authentication, the agent registers databases with `add_connection` by supplying a DSN. Connections become named resources that can be reused across sessions and are scoped to the tenant.

The server applies SQL guards and uses database-session read-only mode where supported. Per-connection firewall rules can add custom blocks for particular tables or queries. These controls complement, rather than replace, least-privilege database credentials and careful selection of exposed data.

A local invocation is also available through the scoped npm package:

```bash
npx -y @thinairtelematics/data
```

That command prints a client configuration block and uses OAuth-keyless operation by default.

## Setup and configuration

For Claude Desktop, Cursor, or Windsurf, configure the hosted endpoint as an MCP server:

```json
{
  "mcpServers": {
    "thinair-data": {
      "url": "https://data.thinair.co/mcp"
    }
  }
}
```

The OAuth flow starts when the client first connects. For clients using API keys, add an `Authorization` header with a Bearer token obtained through the ThinAir connection flow. Database DSNs do not belong in the client configuration; provide them through `add_connection` instead.

Supported DSN formats are `postgresql://user:pass@host:5432/db`, `mysql://user:pass@host:3306/db`, and `sqlserver://user:pass@host:1433/db`. Do not commit DSNs, passwords, tokens, or other credentials to source control.

## Tools and capabilities

The 26-tool surface includes:

- `list_connections` for viewing registered databases and their dialects.
- `describe_schema` for tables, columns, types, primary keys, and indexes.
- `query_sql` for read-only SELECT, WITH, and EXPLAIN statements.
- `query_history` for recent execution timing, row counts, and status.
- `data_profile` for distributions, null rates, and cardinality.
- `cross_db_query` for running one query across two to four connections.
- `detect_anomalies` for data gaps, volume changes, stale data, concentration, and null-rate issues.
- `pii_scan` for heuristic detection of email, SSN, payment-card, phone, JWT, and bearer-token patterns in string columns.
- `find_n_plus_one` for analyzing N+1 patterns in query history.
- `query_firewall` for custom per-connection deny rules.

Additional tools cover connection removal, query explanation and optimization, query suggestions, migration and seed-data generation, table watching, saved queries, impact analysis, and allowlist configuration.

## Limitations and notes

Access is read-only by design; `query_sql` accepts SELECT, WITH, and EXPLAIN statements rather than write operations. Foreign keys are not reported by `describe_schema`, and MySQL indexes are not yet included. PII results are heuristic pattern matches, not definitive classifications. Cross-database comparison supports two to four connections per query. Production deployments should still use least-privilege credentials and avoid exposing unnecessary sensitive tables.

_Full upstream README: https://allmcps.com/mcp/thinairtelematics-thinair-data/readme_

