Using Model Context Protocol to connect AI to databases
Dan Byler taught me to use MCP to have AI generate visualizations directly from a SQL database. How this works:
Instead of loading large amounts of data into context (bad idea) Claude writes SQL queries and runs them on the database, and then gets back the aggregated results
I can ask Claude for ideas for analyses to run! Claude can read the schema.
Claude can visualize the results (!!)
…and all of this without knowing any context on the business. Imagine what it could do with a little bit of background on strategy, target customer, metrics, or past experiments.As a product manager: Just like with AI prototyping, this allows me to iterate a lot faster on “rough drafts” of analyses with myself and sharpen my ask. It also allows me to explore moonshot ideas I wouldn’t waste scarce analyst time for.For product analysts: Product analysts can expect PMs who know what they want, and spend far less time iterating on things that could have been figured out ahead of time. They can focus more on higher level work like making sure we’re asking the right question, answering with the right business context, and quantitative integrity.