https://github.com/rodrigopaml/mcp-sqlserver
A MCP Server implementation in C# for LLM integration with SQL Server tested with Claude Desktop
https://github.com/rodrigopaml/mcp-sqlserver
llm mcp-server sql-server
Last synced: 9 months ago
JSON representation
A MCP Server implementation in C# for LLM integration with SQL Server tested with Claude Desktop
- Host: GitHub
- URL: https://github.com/rodrigopaml/mcp-sqlserver
- Owner: RodrigoPAml
- License: mit
- Created: 2025-04-08T00:51:26.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-04-10T23:30:55.000Z (10 months ago)
- Last Synced: 2025-04-14T17:14:06.943Z (9 months ago)
- Topics: llm, mcp-server, sql-server
- Language: C#
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MCP-SqlServer
A MCP Server (STDIO) implementation in C# for LLM integration with SQL Server tested with Claude Desktop
The server register logs into a **mcp_server.log** file
**Caution, the LLM can modify your database**
# Tools
List of tools provided to the LLM
* **HealthCheck**: Tests if the Microsoft SQL Server Database connection is good and alive.
* **GetSchema**: Get a list of all tables with their respective schema, columns and types.
* **Query**: Execute a query into the Microsoft SQL Server database and return the result as a JSON.
# Setup with Claude
1. Fill the _env.database_ with the connection string from your SQL Server
2. Compile the project
3. In the Claude Destkop Go _File->Configurations->Developer_ and edit the MCP configuration (_claude_desktop_config.json_)
4. Paste the json as:
```json
{
"mcpServers": {
"database": {
"command": "dotnet",
"args": [
"run",
"--project",
"C:\\Users\\{USER}\\Desktop\\MCP-SqlServer",
"--no-build"
]
}
}
}
```
5. Restart Claude Desktop
# Testing
Open Claude Desktop and if everything is configured well you should be able to see this

Click on the icon and you should be able to see the tools

## Asking for connection check

## Asking for schema/table informations

## Asking for read query

## Asking for modifications
