# Talk to DB - MCP Server and Client in .NET 9

This project demonstrates how to create an MCP Server and consume it using an MCP Client - both built entirely in .NET 9.

It also includes a small UI frontend layer built with .NET MAUI Blazor Hybrid, allowing you to chat with your database in natural language.

![Talk-to-Db-Windows-Desktop-App](https://raw.githubusercontent.com/Abhayprince/TalkToDb/refs/heads/master/Talk-to-DB-App-Screenshot.png)

---

## Live Coding Video

Watch me building this complete project on YouTube:  
[https://youtu.be/8z7tA6LpwQE](https://youtu.be/8z7tA6LpwQE)

---

## Local Development

1. Add your OpenAI API key in **appsettings.json** (or User Secrets / Environment Variables) in the **TalkToDb.Api** project.
2. Add your database connection string in **appsettings.json** in the **TalkToDb.MCPServer** project.
3. Build the solution.
4. Set the API and UI projects as startup projects and run the solution.

---

## Support

If you find this project useful, please **star this repository** on GitHub to show your support.

You can also buy me a coffee if you'd like to support my work:  
[https://buymeacoffee.com/abhayprince](https://buymeacoffee.com/abhayprince)
