SQL Server MCP
mcp-node-mssql
使用法
カーソル
詳細については、公式の Cursor ドキュメントを参照してください。
mcp.jsonファイルを開きます (または作成します) (このファイルは~/.cursor/mcp.jsonまたは<project-root>/.cursor/mcp.jsonにありますが、詳細については Cursor のドキュメントを参照してください)。次の詳細を追加してファイルを保存します。
{
"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 の公式ドキュメントを参照してください。
Windsurf MCP Configuration Panelを開くAdd custom serverクリックします。次の詳細を追加してファイルを保存します。
{
"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 の公式ドキュメントを参照してください。
Claude Code CLIから新しいMCPサーバーを追加することもできますが、jsonファイルを直接変更する方が簡単です。
Claude Code 構成ファイルを開きます (
~/.claude.jsonにあります)。projects>mcpServersセクションを見つけて、次の詳細を追加し、ファイルを保存します。
{
"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>"
}
}
}
}
}Related MCP server: Microsoft SQL Server MCP Server
問題とトラブルシューティング
他のことを行う前に、最新バージョンを実行していることを確認してください。
この MCP サーバーの使用中に問題が発生した場合は、 GitHubで問題を報告してください。
発達
インストール
npm install建てる
npm run build開発サーバーをローカルで実行する
公開されたパッケージを使用するのではなく、MCP サーバーのローカル開発バージョンをテストするには、次の手順に従います。
プロジェクトをビルドします。
npm run buildローカル ビルドを参照するように
mcp.jsonファイルを作成または変更します。
{
"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>"
}
}
}
}この
mcp.jsonファイルを次のいずれかの場所に配置します。カーソルの場合: ホームディレクトリ (
~/.cursor/mcp.json) またはプロジェクトディレクトリ (.cursor/mcp.json)Windsurfの場合:MCP構成パネルを使用してカスタムサーバーを追加します
新しい構成をロードするには、AI アシスタント (Cursor または Windsurf) を再起動します。
これにより、新しいバージョンを公開しなくても、MCP サーバーへの変更を即座にテストできます。
Available Tools
8 toolscommit-transactionC
Commit a transaction
Inputs: transactionId (required).
get-stored-procedureC
Get a specific stored procedure by name
Inputs: procedureName (required).
get-stored-proceduresB
Get a list of all stored procedures in the database
get-tableC
Get a specific table by name
Inputs: tableName (required).
get-tablesB
Get a list of all tables in the database
queryC
Query the database with a SQL statement
Inputs: query (required).
rollback-transactionC
Rollback a transaction
Inputs: transactionId (required).
start-transactionC
Start a new transaction
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
Every tool has a clearly distinct purpose with no ambiguity. Tools are clearly separated by resource type (tables vs stored procedures) and action type (get specific vs get list vs transaction operations vs query). The query tool stands alone as a general-purpose operation.
All tools follow a consistent verb-noun pattern with hyphens. Transaction tools use verb-transaction pattern (start-transaction, commit-transaction, rollback-transaction), get operations use get-noun pattern (get-table, get-tables), and query stands alone as a clear single verb. The naming is perfectly predictable throughout.
8 tools is well-scoped for a database server. Each tool earns its place with clear responsibilities: 4 for data/metadata retrieval, 3 for transaction management, and 1 for general querying. This provides comprehensive coverage without bloat.
The toolset covers core database operations well with querying, transaction management, and metadata retrieval. Minor gaps exist in write operations beyond transactions (no explicit insert/update/delete tools) and schema modification (no create/alter/drop tools), but the query tool provides a workaround for most of these operations.
Maintenance
Related MCP Connectors
Hosted SQL Server MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
Text-to-SQL MCP server: read-only queries on PostgreSQL, MySQL and SQL Server with your real schema
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that enables secure and structured interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries with controlled access.62MIT
- AlicenseBqualityCmaintenanceA Model Context Protocol server that enables secure interaction with Microsoft SQL Server databases, allowing AI assistants to list tables, read data, and execute SQL queries through a controlled interface.1405MIT
- FlicenseNot gradedqualityCmaintenanceA Model Context Protocol server that allows Large Language Models like Claude to execute SQL queries, explore database schemas, and maintain persistent connections to SQL Server databases.-
- FlicenseAqualityCmaintenanceA Model Context Protocol server that enables LLMs like Claude to interact with Microsoft SQL Server databases through natural language, supporting queries, data manipulation, and table management.8-