# Sql Mcp

> SQL MCP Application - A Model Context Protocol server for SQL queries

- **Type:** MCP server
- **Install:** `agentstack add mcp-ustabar-sql-mcp`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [ustabar](https://agentstack.voostack.com/s/ustabar)
- **Installs:** 0
- **Category:** [Databases](https://agentstack.voostack.com/c/databases)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [ustabar](https://github.com/ustabar)
- **Source:** https://github.com/ustabar/sql-mcp

## Install

```sh
agentstack add mcp-ustabar-sql-mcp
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# SQL MCP - SQL Server for Model Context Protocol

A Model Context Protocol (MCP) server implementation for SQL Server queries that enables natural language interaction with your database through GitHub Copilot.

## Overview

SQL MCP allows you to query SQL Server databases using natural language through GitHub Copilot. This integration makes database interaction more accessible without requiring extensive SQL knowledge.

Key features:
- Natural language queries to SQL Server databases
- Integration with GitHub Copilot
- JSON-formatted responses
- Works with Azure SQL Database

## Prerequisites

- .NET 9.0 SDK or later
- Visual Studio 2022 or Visual Studio Code
- GitHub Copilot with Agent Mode
- SQL Server or Azure SQL Database access

## Setup Instructions

1. **Clone the repository**
   ```bash
   git clone https://github.com/ustabar/sql-mcp.git
   cd sql-mcp
   ```

2. **Configure the database connection**

   Edit the `appsettings.json` file to update your database connection string:
   ```json
   {
     "ConnectionStrings": {
       "AzureSqlConnection": "Server=yourserver.database.windows.net,1433;Database=yourdatabase;User Id=yourusername;Password=yourpassword;TrustServerCertificate=True;"
     }
   }
   ```

3. **Build and run the application**
   ```bash
   dotnet build
   dotnet run
   ```

4. **Configure VS Code for MCP**

   Add the MCP server to your VS Code settings:
   
   

   Example settings entry:
   ```json
   "github.copilot.advanced": {
     "mcp": {
       "enabled": true,
       "mcp_server_command": "dotnet run --project C:\\path\\to\\sql-mcp"
     }
   }
   ```

5. **Verify the MCP server is running**

   You can check available MCP servers in VS Code:
   
   

## Usage

Once set up, you can query your database in natural language through GitHub Copilot Agent Mode:

The MCP server processes your natural language query, converts it to SQL, and returns the results in a structured format.

Example interaction:

## Structure

- **Program.cs**: Application entry point and MCP server configuration
- **Services/SqlConnectionService.cs**: Manages database connections
- **Tools/SqlServerTools.cs**: Implements the MCP tools for SQL interaction
- **Data/prompt-tr.txt**: Contains prompt templates for Turkish language support

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the LICENSE file for details.

## Source & license

This open-source MCP server is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [ustabar](https://github.com/ustabar)
- **Source:** [ustabar/sql-mcp](https://github.com/ustabar/sql-mcp)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/mcp-ustabar-sql-mcp
- Seller: https://agentstack.voostack.com/s/ustabar
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
