Best MCP servers for data analysis & SQL

Short answer
Start with a read-only database server (Postgres or your warehouse) — that single guardrail matters more than which one you pick. Add a notebook server (Jupyter) if you want the agent to actually run analysis, not just query. The risk here isn't capability; it's an unguarded execute_query against production.
Data analysis is the use case where MCP safety stops being theoretical. A database server with an unguarded execute_query doesn't have a vulnerability — it is one: the model writes a DELETE with no WHERE, or gets prompt-injected by data it just read, and the tool runs it. So my picks here are filtered first by 'does it default to read-only and parse SQL before running it', and only then by features.
The picks
The one I trust for Postgres: read-only mode and it parses SQL before executing. Capability without a guardrail is just a bigger blast radius — this gets the guardrail right.
Config & setupFirst-party. If you're already on Supabase, the official server beats any community Postgres wrapper on auth and maintenance.
Config & setupFor analytical/columnar workloads. Official, fast, and the right tool when you're querying events at scale rather than rows.
Config & setupAdd this when you want analysis, not just queries — it lets the agent run cells, so it can iterate on a notebook instead of one-shotting SQL.
Config & setupWhat to skip
Avoid any database server that only offers a wide-open execute_query with no read-only option and no SQL parsing — that's a production incident waiting to happen. And don't hand the agent live production credentials; point it at a replica or a sandboxed database first.
FAQ
What's the safest MCP server for connecting AI to a database?
One that defaults to read-only and parses SQL before executing — for Postgres, the Crystal DBA 'postgres-mcp' pro server is built around that. The guardrail matters more than the feature set.
Can an MCP server delete my data by accident?
Yes, if it exposes an unguarded write/execute tool and you give it production credentials. Use read-only mode, point it at a replica, and gate anything irreversible behind a human.