Developer Builds Custom MCP Server to Let Managers Query 20 Years of Azure SQL Data via Claude

A developer built a custom Model Context Protocol (MCP) server to allow company managers across departments like HR, Sales, and Production to query two decades of business data using Claude, without any SQL knowledge or BI tools. The system routes requests from Claude through a self-hosted Node.js server on the client's own VPS, then to an Azure SQL database via a read-only SQL user, keeping all data off third-party infrastructure. A table whitelist built into the MCP layer ensures Claude can only access approved tables, preventing exposure of legacy, staging, or sensitive data. The server exposes three core tools to Claude: listing available tables, describing table schemas, and running SELECT-only queries capped at 500 rows. Key design choices included self-hosting for data privacy, enforced read-only database access to prevent destructive queries, and a shared secret key for authenticating manager accounts.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in