SQL Server MCP Server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SQL Server MCP ServerList all tables in the database"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
SQL Server MCP Server
A Model Context Protocol (MCP) server for SQL Server — built for development debugging and data issue resolution. Connects to Antigravity (the AI agent) so you can diagnose and fix data problems directly from your IDE chat.
🚀 Setup & Configuration
Configure the server directly inside your Antigravity (or any MCP client) configuration using environment variables:
{
"mcpServers": {
"sql-server-mcp": {
"command": "npx",
"args": ["-y", "@dkp5897/sql-server-mcp"],
"env": {
"DB_SERVER": "localhost",
"DB_NAME": "YourDatabaseName",
"DB_USER": "sa",
"DB_PASSWORD": "your_password",
"DB_PORT": "1433",
"DB_TRUST_CERT": "true"
}
}
}
}Environment Variables Reference
Variable | Description | Default |
| SQL Server host / instance name |
|
| Database name |
|
| SQL Server username |
|
| SQL Server password |
|
| SQL Server port |
|
| Trust self-signed certificate |
|
| Enable TLS encryption |
|
Related MCP server: SQL Server MCP
🛠️ Available Tools (13 total)
Query Execution
Tool | Description |
| Run a SELECT query — executes immediately |
| Run INSERT/UPDATE/DELETE/DDL — shows preview first, requires confirm=true to execute |
Schema Inspection
Tool | Description |
| List all tables (with row counts) |
| Full table details: columns, PKs, FKs, indexes |
| List all stored procedures |
| Get the source code of a stored procedure |
Data Diagnostics
Tool | Description |
| Search for a value across all columns in a table |
| Find orphaned records / FK violations |
| Row count + sample rows from a table |
| Find NULL values in specified columns |
| Compare parent/child table counts to find gaps |
| Full diagnostic report on a table |
| Get execution plan for a slow query |
🔐 Permission Model
Query Type | Behaviour |
| Runs immediately, no confirmation needed |
| Shows preview first. Must call again with |
| Shows preview first. Must call again with |
| Always blocked, cannot be executed |
💡 Example Questions to Ask the Agent
"List all tables in the database"
"Inspect the Orders table"
"Find all rows in OrderItems where ProductId is NULL"
"Are there any foreign key violations in the Payments table?"
"Show me 10 sample rows from Customers where IsActive = 0"
"Run a full diagnostic on the Orders table"
"Update the 3 orders with NULL CustomerId — set them to CustomerId = 1"
📦 Publishing to npm
To publish your own version to npm:
npm login
npm publish --access publicThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dkp5897/sql-server-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server