I Connected Claude to 20 Years of Azure SQL Data with a Custom MCP Server. Here's How.
A client came to me with a request that sounded simple: "We have 20 years of data in our database. We want our managers to ask Claude questions and get reports. Marketing, HR, R&D, Production, Procurement, Sales — all of them." No dashboards, no BI tool, no SQL training. Just: type a question, get an answer from the actual data. The database is Azure SQL. It's been growing since the mid-2000s. It…
A client sought a solution to enable their managers to ask Claude questions and receive reports from 20 years of Azure SQL Database data, without using dashboards, BI tools, or SQL training. The database contained hundreds of tables, including legacy and half-finished migration tables, making it challenging for a language model like Claude to process.
The solution involved creating a custom MCP (Model Context Protocol) server on the client's VPS, which whitelisted tables accessible to Claude, ensuring the language model could only see and query the relevant tables for each department. The MCP server utilized Node.js, the official SDK, and the Zod library to define table whitelists, schema descriptions, and read-only queries.
With just one shared key and a small audience, the architecture provided a secure and efficient way for managers to interact with the data using natural language questions.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.