Allows the MCP server to be used as an interface for querying MySQL databases, providing tools for AI agents to retrieve data and inspect database schemas.
Allows the MCP server to be used as an interface for querying PostgreSQL databases, providing tools for AI agents to retrieve data and inspect database schemas.
Enables querying of SQLite databases to retrieve schema information and execute SQL queries, featuring built-in security guardrails like PII redaction and SQL injection blocking.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Demo — GitHub Copilot + Your DatabaseShow me the top 5 most expensive products in stock"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Demo — GitHub Copilot + Your Database
What if you could ask Copilot a question and it queried your database to answer it? That's what this demo shows. Clone it, run two commands, and watch it work.
What is MCP?
Model Context Protocol (MCP) is an open standard that lets AI assistants like GitHub Copilot connect directly to your tools and data — in real time, with guardrails you control.
Instead of copy-pasting data into chat, Copilot just asks your server:
You type in Copilot Chat | What happens |
| Copilot calls |
| Copilot writes and runs the SQL query live |
| Instant answer — emails auto-redacted |
MCP isn't AI-only. The same server can be called by scripts, pipelines, or any client. The LLM is just the first killer app.
See It In Action
Real responses from this running server:
"Show me all products under $200"
Product | Price | Stock |
Wireless Mouse | $49.99 | 120 |
USB-C Hub | $79.99 | 60 |
External SSD (1TB) | $129.99 | 35 |
Mechanical Keyboard | $149.99 | 45 |
Webcam (4K) | $199.99 | 12 |
Guardrail in action — PII is auto-redacted:
Dangerous query? Blocked before it touches the database:
Get Running in 3 Steps
Prerequisites: Python 3.12+, VS Code, GitHub Copilot extension
Connect to Copilot: A .vscode/mcp.json is already included — open this repo in VS Code and Copilot Agent mode picks it up automatically. No manual config needed.
Then open Copilot Chat → Agent mode and start asking questions.
Built-in Guardrails
This is a demo — but it ships with real security controls, not placeholders:
Guardrail | Detail |
PII auto-redaction |
|
SQL injection blocking | 17 patterns blocked: |
Allowed operations only |
|
Row cap | 100 rows max per query — prevents bulk extraction |
Rate limiting | 30 calls per 60-second window |
Audit logging | Every query logged with timestamp and outcome |
Sanitised errors | Stack traces never returned to the LLM |
Not included (needed for production): user authentication, role-based access control, write-operation approval gates. See PRODUCTION_READINESS.md.
What's Inside
How It Works
Want to extend it?
Add a new tool: create a class in
mcp_server/tools/, register it inserver.pyUse a real database: swap SQLite for PostgreSQL/MySQL in
sql_query_tool.pyAdd auth: wrap
execute_querywith a token check
Requirements
Python 3.12+
VS Code with GitHub Copilot (Agent mode)
macOS / Linux / Windows
License
MIT — free to use, fork, and adapt.