SQL Server

v1.0.0Databasesstable

Exemplo de uso do MCP do SQL Server (via dotnet tool) com um server de banco de dados containerizado e com consulta a dados de regiões do Brasil. Inclui Docker Compose para criação do ambiente de testes.

sqlserver-mcp-dotnet-tool-scriptsmcpai-integration
Share:
9
Stars
0
Downloads
0
Weekly
0/5

What is SQL Server?

SQL Server is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to exemplo de uso do mcp do sql server (via dotnet tool) com um server de banco de dados containerizado e com consulta a dados de regiões do brasil. inclui docker compose para criação do ambiente de test...

Exemplo de uso do MCP do SQL Server (via dotnet tool) com um server de banco de dados containerizado e com consulta a dados de regiões do Brasil. Inclui Docker Compose para criação do ambiente de testes.

This server falls under the Databases category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Exemplo de uso do MCP do SQL Server (via dotnet tool) com um

Use Cases

Query and manage SQL Server databases through Claude.
Automate database operations using AI-driven commands.
renatogroffe

Maintainer

LicenseMIT
Languagetsql
Versionv1.0.0
UpdatedFeb 5, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx sqlserver-mcp-dotnet-tool-scripts

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use SQL Server

This MCP server connects Claude and other AI agents to a Microsoft SQL Server database through the official mcpsqlserver dotnet global tool. A Docker Compose file spins up a containerized SQL Server instance pre-loaded with Brazilian geographic region data for quick testing, making it a practical reference for integrating any SQL Server database with LLM workflows.

Prerequisites

  • .NET 8 SDK installed (dotnet --version should show 8.x)
  • Docker and Docker Compose installed for the test environment
  • A SQL Server instance accessible via a connection string (local, Docker, or Azure SQL)
  • Claude Desktop or VS Code with MCP extension
1

Install the mcpsqlserver dotnet global tool

Install the MCP SQL Server tool globally via the dotnet CLI. This makes the mcpsqlserver binary available system-wide.

dotnet tool install --global mcpsqlserver-preview-202508d --version 1.0.0

# Verify installation
dotnet tool list -g
2

Start the containerized test database

The repository includes a Docker Compose file that launches a SQL Server container pre-populated with geographic data. This is optional — skip if you have your own SQL Server.

git clone https://github.com/renatogroffe/sqlserver-mcp-dotnet-tool-scripts.git
cd sqlserver-mcp-dotnet-tool-scripts/src
docker-compose up -d

# Verify the container is running
docker ps | grep sqlserver
3

Configure the MCP server in mcp.json

Create or edit your MCP client configuration. The CONNECTION_STRING environment variable holds all database credentials. Replace the example values with your actual server, database, user, and password.

{
  "servers": {
    "mcp-sqlserver-dotnet-tool": {
      "type": "stdio",
      "command": "mcpsqlserver",
      "args": [],
      "env": {
        "CONNECTION_STRING": "Server=localhost;Database=BaseDadosGeograficos;User Id=sa;Password=SqlServer2025!;TrustServerCertificate=True;"
      }
    }
  }
}
4

Configure Claude Desktop

For Claude Desktop, add the server block to claude_desktop_config.json with the same connection string pattern.

{
  "mcpServers": {
    "sqlserver": {
      "command": "mcpsqlserver",
      "args": [],
      "env": {
        "CONNECTION_STRING": "Server=localhost,1433;Database=MyDb;User Id=myuser;Password=mypassword;TrustServerCertificate=True;"
      }
    }
  }
}
5

Restart Claude Desktop and verify

Restart Claude Desktop to load the new MCP server. Ask Claude a simple question about your database to confirm connectivity.

SQL Server Examples

Client configuration

Full claude_desktop_config.json entry using the installed mcpsqlserver global tool pointing at a local SQL Server.

{
  "mcpServers": {
    "sqlserver": {
      "command": "mcpsqlserver",
      "args": [],
      "env": {
        "CONNECTION_STRING": "Server=localhost,1433;Database=BaseDadosGeograficos;User Id=sa;Password=SqlServer2025!;TrustServerCertificate=True;"
      }
    }
  }
}

Prompts to try

Natural-language prompts for querying and managing SQL Server databases.

- "List all tables in the current database"
- "Show me the top 10 rows from the Regioes table with all columns"
- "How many records are in each table? Give me a summary"
- "Write and run a query that groups sales by region and calculates total revenue for each"
- "Describe the schema of the Municipios table including column types and constraints"

Troubleshooting SQL Server

mcpsqlserver command not found after installing the dotnet tool

The dotnet tools directory is not on your PATH. Add it: on Linux/macOS add export PATH="$PATH:$HOME/.dotnet/tools" to your shell profile. On Windows it is usually %USERPROFILE%\.dotnet\tools — add it to the system PATH environment variable.

SQL Server connection refused or timeout when using Docker

The SQL Server container can take 30-60 seconds to initialize. Wait and retry. Check with: docker logs <container_id>. Also confirm the port mapping in docker-compose.yml matches the port in your connection string (default 1433).

TrustServerCertificate must be set to avoid SSL errors

For local or Docker SQL Server instances without a valid TLS certificate, always include TrustServerCertificate=True in the connection string. Do not use this in production — configure a real certificate instead.

Frequently Asked Questions about SQL Server

What is SQL Server?

SQL Server is a Model Context Protocol (MCP) server that exemplo de uso do mcp do sql server (via dotnet tool) com um server de banco de dados containerizado e com consulta a dados de regiões do brasil. inclui docker compose para criação do ambiente de testes. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install SQL Server?

Follow the installation instructions on the SQL Server GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with SQL Server?

SQL Server works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is SQL Server free to use?

Yes, SQL Server is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Databases MCP Servers

Explore all databases servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "sqlserver-mcp-dotnet-tool-scripts": { "command": "npx", "args": ["-y", "sqlserver-mcp-dotnet-tool-scripts"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use SQL Server?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides