Short answer: if you want Claude to follow your SQL conventions, write a skill. If you want Claude to answer questions from your real database, you need an MCP connector. A skill alone cannot see your tables, and a connector alone does not know your team's naming rules or business definitions.
Side by side
| SQL skill | MCP connector | |
|---|---|---|
| What it is | Instructions and files Claude loads when relevant | A server exposing tools Claude can call |
| Sees your real schema | Only what you write into it | Yes, read live |
| Runs queries | No (unless it calls a tool) | Yes |
| Good for | Style guides, dialect rules, metric definitions, query templates | Answering questions from data, exploring a schema, checking a query's result |
| Goes stale when | The schema changes and nobody updates the file | Rarely: the schema is read at question time |
| Main risk | Outdated or wrong instructions | Write access or leaked credentials, if the connector allows them |
When a skill is enough
- You mostly ask Claude to write SQL that you run yourself.
- You want consistent output: CTEs over subqueries, snake_case aliases, a specific dialect.
- You have definitions Claude cannot infer, such as how your team counts an "active customer".
When you need a connector
- You want answers, not just SQL: "how many orders shipped late last week?"
- Claude keeps inventing table or column names because it cannot see the schema.
- You want to check what a query returns before you trust it.
Using both
A common setup is a small SQL skill with your conventions and metric definitions, plus a read-only connector for the data. The skill shapes the SQL; the connector grounds it in the real schema and runs it. Keep schema details out of the skill when a connector can read them live, so there is one source of truth.
What to check in a SQL connector
- It runs only read statements, and catches writes hidden inside a
WITHclause. - Your database password stays on the server, not in Claude's config.
- Results are capped and long queries time out.
- Every query is logged, so you can see what the model ran.
- You connect it with a read-only database user as a second layer.
AI2SQL is an MCP connector built this way for PostgreSQL, MySQL and SQL Server. Setup guides: PostgreSQL, MySQL, SQL Server.