MCP.so
Sign In

MCP SqlServer

@RodrigoPAml

Basic information

Category

Databases

License

MIT

Transports

stdio

Author

RodrigoPAml

About MCP SqlServer

A MCP Server implementation in C# for LLM integration with SQL Server tested with Claude Desktop

MCP SqlServer config

Add this server to your MCP-compatible client using the configuration below.

{
  "mcpServers": {
    "database": {
      "command": "dotnet",
      "args": [
        "run",
        "--project",
        "C:\\Users\\{USER}\\Desktop\\MCP-SqlServer",
        "--no-build"
      ]
    }
  }
}

MCP SqlServer tools

Tool list not available yet

This listing does not currently have a tool list to display. This does not mean the server has no tools; check its documentation for supported capabilities.

We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.

Overview

What is MCP-SqlServer?

MCP-SqlServer is an MCP server (STDIO) written in C# that integrates LLMs with Microsoft SQL Server. It is tested with Claude Desktop and provides tools for database health checks, schema retrieval, and query execution.

How to use MCP-SqlServer?

Configure the connection string in the _env.database file, compile the project, then add the MCP server to your Claude Desktop configuration using dotnet run --project --no-build. Restart Claude Desktop to see the tools.

Key features of MCP-SqlServer

  • HealthCheck tool to test SQL Server connectivity.
  • GetSchema tool to list tables, schemas, columns, and types.
  • Query tool to execute SQL queries and return JSON results.
  • Logs server activity to mcp_server.log.
  • Caution: the LLM can modify your database.
  • Written in C# for .NET.

Use cases of MCP-SqlServer

  • Verify database connectivity before other operations.
  • Explore database schema for LLM‑driven data understanding.
  • Execute read queries and retrieve results as JSON.
  • Perform database modifications (with awareness of the included caution).

Frequently asked questions

1

What is MCP-SqlServer?

It is an MCP server implementation in C# that allows LLMs to interact with Microsoft SQL Server databases through a set of predefined tools.

2

What tools does MCP-SqlServer provide?

Three tools: HealthCheck (connection test), GetSchema (table and column metadata), and Query (run SQL queries, return JSON).

3

How is MCP-SqlServer configured with Claude Desktop?

Add a JSON entry to the `claude_desktop_config.json` file specifying the command `dotnet` with arguments `run`, `--project`, and the project path along with `--no-build`.

4

What runtime or dependencies are required?

The server requires the .NET runtime to compile and run via `dotnet`. No additional databases or authentication mechanisms are mentioned beyond the SQL Server connection string.

5

What caution should be taken when using MCP-SqlServer?

The LLM can modify your database, so you should protect sensitive data and restrict permissions as needed.

Comments

More Databases MCP servers