SQL Server MCP

SQL Server MCP

A Model Context Protocol server that enables AI assistants (Cursor, Windsurf, Claude Code) to interact with Microsoft SQL Server databases by providing connectivity through environment-configurable connections.

Category
Visit Server

Tools

get-tables

Get a list of all tables in the database

get-table

Get a specific table by name

get-stored-procedures

Get a list of all stored procedures in the database

get-stored-procedure

Get a specific stored procedure by name

query

Query the database with a SQL statement

start-transaction

Start a new transaction

commit-transaction

Commit a transaction

rollback-transaction

Rollback a transaction

README

mcp-node-mssql

Usage

Cursor

See the official Cursor docs for more information.

  1. Open (or create) the mcp.json file (it should be in ~/.cursor/mcp.json or <project-root>/.cursor/mcp.json, but see Cursor docs for more details).
  2. Add the following details and save the file:
{
  "mcpServers": {
    "mssql": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-node-mssql"
      ],
      "env": {
        "DB_HOST": "localhost",
        "DB_PORT": "1433",
        "DB_USERNAME": "<username>",
        "DB_PASSWORD": "<password>",
        "DB_DATABASE": "<database>"
      }
    }
  }
}

Windsurf

See the official Windsurf docs for more information.

  1. Open the Windsurf MCP Configuration Panel
  2. Click Add custom server.
  3. Add the following details and save the file:
{
  "mcpServers": {
    "mssql": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-node-mssql"
      ],
      "env": {
        "DB_HOST": "localhost",
        "DB_PORT": "1433",
        "DB_USERNAME": "<username>",
        "DB_PASSWORD": "<password>",
        "DB_DATABASE": "<database>"
      }
    }
  }
}

Claude Code

See the official Claude Code docs for more information.

You can add a new MCP server from the Claude Code CLI. But modifying the json file directly is simpler!

  1. Open the Claude Code configuration file (it should be in ~/.claude.json).
  2. Find the projects > mcpServers section and add the following details and save the file:
{
  "projects": {
    "mcpServers": {
      "mssql": {
        "command": "npx",
        "args": [
          "-y",
          "mcp-node-mssql"
        ],
        "env": {
          "DB_HOST": "localhost",
          "DB_PORT": "1433",
          "DB_USERNAME": "<username>",
          "DB_PASSWORD": "<password>",
          "DB_DATABASE": "<database>"
        }
      }
    }
  }
}

Issues and Troubleshooting

Before doing anything else, please make sure you are running the latest version!

If you run into problems using this MCP server, please open an issue on GitHub!

Development

Installation

npm install

Build

npm run build

Running the Development Server Locally

To test your local development version of the MCP server rather than using the published package, follow these steps:

  1. Build the project:
npm run build
  1. Create or modify your mcp.json file to reference your local build:
{
  "mcpServers": {
    "mssql": {
      "command": "node",
      "args": [
        "/path/to/your/local/mcp-node-mssql/dist/index.js"
      ],
      "env": {
        "DB_HOST": "localhost",
        "DB_PORT": "1433",
        "DB_USERNAME": "<username>",
        "DB_PASSWORD": "<password>",
        "DB_DATABASE": "<database>"
      }
    }
  }
}
  1. Place this mcp.json file in one of the following locations:

    • For Cursor: In your home directory (~/.cursor/mcp.json) or in your project directory (.cursor/mcp.json)
    • For Windsurf: Use the MCP Configuration Panel to add the custom server
  2. Restart your AI assistant (Cursor or Windsurf) to load the new configuration.

This allows you to instantly test changes to the MCP server without having to publish a new version.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured