MCP Demo Server

Provides real-time access to a sample database via MCP with guardrails, schema access, and safe query execution.
  • python

0

GitHub Stars

python

Language

3 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "coderkanasu-mcp-demo": {
      "command": "python3",
      "args": [
        "-m",
        "mcp_server.server"
      ],
      "env": {
        "PYTHONPATH": "${workspaceFolder}"
      }
    }
  }
}

Model Context Protocol (MCP) lets an AI assistant connect to your data and tools in real time with guardrails you control. You can ask questions in Copilot and have the server securely fetch schema, run queries, and return results without exposing raw data or bypassing your safeguards.

How to use

You use MCP by connecting a Copilot-enabled client to the MCP server that runs locally or remotely. Your Copilot chats can request data or actions, and the server validates, scrubs sensitive information, and executes approved queries against your database. Start questions like querying the schema, fetching data under certain conditions, or asking who has a specific role, and the server will perform the actions while enforcing guardrails.

How to install

Prerequisites to run the MCP server on your machine include Python 3.12 or later, VS Code, and the GitHub Copilot extension. Follow these steps to set up and run the server.

# 1. Install
git clone https://github.com/coderkanasu/mcp-demo && cd mcp-demo
pip install -r requirements.txt   # simple install
# or: pip install -e .            # editable install (for development)

# 2. Set up the database
python mcp_server/db/init_db.py

# 3. Verify it works
python mcp_server/tools/sql_query_tool.py
```} ,{

MCP server connection (stdio configuration)

To connect Copilot to the local MCP server, use the pre-configured stdio setup included in the repository. This configuration runs the MCP server as a local process and connects it to Copilot Agent mode.

{
  "servers": {
    "demo-sql-server": {
      "type": "stdio",
      "command": "python3",
      "args": ["-m", "mcp_server.server"],
      "env": { "PYTHONPATH": "${workspaceFolder}" }
    }
  }
}

Available tools

get_schema

Fetches the full database schema so Copilot can understand available tables and columns.

execute_query

Executes user-provided SQL queries with guardrails that prevent disallowed operations and excessive data extraction.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational