
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
bilims/mcp-sqlserver は https://github.com/bilims/mcp-sqlserver. からインポートされた MCP サーバーの候補です
概要
bilims/mcp-sqlserver は https://github.com/bilims/mcp-sqlserver. からインポートされた MCP サーバーの候補です
概要(AI 翻訳)
Microsoft SQL Server 用の読み取り専用モデルコンテキストプロトコル (MCP) サーバーで、AI エージェントが SQL Server データベースを安全に探索およびクエリできるようにします。
クイックスタート
ステップ1:パッケージのインストール
ステップ2:SQL Server接続の設定
SQL Server の種類を選択し、設定に従ってください。
Azure SQL データベース
オンプレミス SQL Server
ローカル SQL Server Express
ステップ3:接続をテストする
ステップ4:Claudeデスクトップに追加
1。 Claudeデスクトップコンフィグファイルを修正:
-macOS: [~/Library/Application Support/Claude/claude_desktop_config.json
-Windows:[%APPDATA%\Claude\claude_desktop_config.json
2.MCP サーバーの設定を追加します。
3。 Claudeデスクトップを再起動
ステップ5: 探索を開始!
これらのコマンドをClaude Desktopで試してみましょう:
- [
"Test the SQL Server connection" - [
"List all databases on the server" - [
"Show me the tables in [database name]" - [
"Describe the structure of the Users table" - [
"Show me foreign key relationships"
##特徴
-** 読み込み専用操作**: 包括的なセキュリティ検証で、SELECTのクエリのみが許可されています。
- ️️ スキーマの発見: データベース、テーブル、ビュー、リレーション、メタデータ
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
以下は原文 README の抜粋です。原文を見る。
MCP SQL Server
A read-only Model Context Protocol (MCP) server for Microsoft SQL Server that enables AI agents to safely explore and query SQL Server databases.
Quick Start
Step 1: Install the Package
# Global installation (recommended)
npm install -g @bilims/mcp-sqlserver
# Verify installation
mcp-sqlserver --version
Step 2: Configure Your SQL Server Connection
Choose your SQL Server type and follow the configuration:
Azure SQL Database
export SQLSERVER_HOST="your-server.database.windows.net"
export SQLSERVER_USER="your-username"
export SQLSERVER_PASSWORD="your-password"
export SQLSERVER_DATABASE="your-database"
export SQLSERVER_ENCRYPT="true"
export SQLSERVER_TRUST_CERT="false"
On-Premises SQL Server
export SQLSERVER_HOST="your-sql-server.company.com"
export SQLSERVER_USER="your-username"
export SQLSERVER_PASSWORD="your-password"
export SQLSERVER_DATABASE="your-database"
export SQLSERVER_ENCRYPT="true"
export SQLSERVER_TRUST_CERT="true" # For self-signed certificates
Local SQL Server Express
export SQLSERVER_HOST="localhost\\SQLEXPRESS"
export SQLSERVER_USER="sa"
export SQLSERVER_PASSWORD="your-password"
export SQLSERVER_DATABASE="master"
export SQLSERVER_ENCRYPT="false"
export SQLSERVER_TRUST_CERT="true"
Step 3: Test the Connection
# Test your configuration
mcp-sqlserver --help
# Quick connection test (press Ctrl+C to exit)
mcp-sqlserver
Step 4: Add to Claude Desktop
-
Find your Claude Desktop config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
- macOS:
-
Add the MCP server configuration:
{
"mcpServers": {
"sqlserver": {
"command": "mcp-sqlserver",
"env": {
"SQLSERVER_HOST": "your-server.database.windows.net",
"SQLSERVER_USER": "your-username",
"SQLSERVER_PASSWORD": "your-password",
"SQLSERVER_DATABASE": "your-database",
"SQLSERVER_ENCRYPT": "true",
"SQLSERVER_TRUST_CERT": "false"
}
}
}
}
- Restart Claude Desktop
Step 5: Start Exploring!
Try these commands in Claude Desktop:
"Test the SQL Server connection""List all databases on the server""Show me the tables in [database name]""Describe the structure of the Users table""Show me foreign key relationships"
Features
- 🔒 Read-only operations: Only SELECT queries allowed, with comprehensive security validation
- 🗄️ Schema discovery: Explore databases, tables, views, relationships, and metadata
- 📊 Data exploration: Execute safe queries with built-in limits and timeouts
- 🔐 Enterprise-ready: Encrypted connections with certificate trust for production environments
- 🛡️ Security-first: Query validation, SQL injection protection, and access controls
Available Tools
Schema Discovery
インストール
npx mcp-sqlserver設定
{
"mcpServers": {
"sqlserver": {
"command": "mcp-sqlserver",
"env": {
"SQLSERVER_HOST": "your-server.database.windows.net",
"SQLSERVER_USER": "your-username",
"SQLSERVER_PASSWORD": "your-password",
"SQLSERVER_DATABASE": "your-database",
"SQLSERVER_ENCRYPT": "true",
"SQLSERVER_TRUST_CERT": "false"
}
}
}
}