Skip to main content
Glama
RichardHan

Microsoft SQL Server MCP Server

by RichardHan

Microsoft SQL Server MCP サーバー

Microsoft SQL Server データベースとの安全なやり取りを可能にするモデルコンテキストプロトコル(MCP)サーバー。このサーバーにより、AI アシスタントは制御されたインターフェースを介してテーブルの一覧表示、データの読み取り、SQL クエリの実行が可能になり、データベースの探索と分析をより安全かつ構造化できます。

特徴

  • 利用可能な SQL Server テーブルをリソースとして一覧表示する

  • 表の内容を読む

  • 適切なエラー処理でSQLクエリを実行する

  • 環境変数による安全なデータベースアクセス

  • 包括的なログ記録

  • システム依存関係の自動インストール

Related MCP server: SQL Server MCP

インストール

パッケージは、MCP 経由でインストールされると、必要なシステム依存関係 (FreeTDS など) を自動的にインストールします。

pip install mssql-mcp-server

構成

次の環境変数を設定します。

MSSQL_SERVER=localhost
MSSQL_USER=your_username
MSSQL_PASSWORD=your_password
MSSQL_DATABASE=your_database

使用法

クロード・デスクトップ

これをclaude_desktop_config.jsonに追加します:

{
  "mcpServers": {
    "mssql": {
      "command": "uv",
      "args": [
        "--directory", 
        "path/to/mssql_mcp_server",
        "run",
        "mssql_mcp_server"
      ],
      "env": {
        "MSSQL_SERVER": "localhost",
        "MSSQL_USER": "your_username",
        "MSSQL_PASSWORD": "your_password",
        "MSSQL_DATABASE": "your_database"
      }
    }
  }
}

スタンドアロンサーバーとして

# Install dependencies
pip install -r requirements.txt

# Run the server
python -m mssql_mcp_server

発達

# Clone the repository
git clone https://github.com/RichardHan/mssql_mcp_server.git
cd mssql_mcp_server

# Create virtual environment
python -m venv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows

# Install development dependencies
pip install -r requirements-dev.txt

# Run tests
pytest

セキュリティに関する考慮事項

  • 環境変数や資格情報をコミットしないでください

  • 必要最小限の権限を持つデータベースユーザーを使用する

  • 本番環境での使用にクエリホワイトリストを実装することを検討する

  • すべてのデータベース操作を監視して記録する

セキュリティのベストプラクティス

このMCPサーバーは機能するためにデータベースへのアクセスが必要です。セキュリティのため:

  1. 最小限の権限を持つ専用の SQL Server ログインを作成する

  2. sa 資格情報や管理者アカウントは使用しないでください

  3. 必要な操作のみにデータベースアクセスを制限する

  4. 監査目的でログを有効にする

  5. データベースアクセスの定期的なセキュリティレビュー

詳細な手順については、 SQL Server セキュリティ構成ガイドを参照してください。

  • 制限付き SQL Server ログインの作成

  • 適切な権限の設定

  • データベースアクセスの監視

  • セキュリティのベストプラクティス

⚠️ 重要: データベース アクセスを構成するときは、常に最小権限の原則に従ってください。

ライセンス

MIT ライセンス - 詳細については LICENSE ファイルを参照してください。

貢献

  1. リポジトリをフォークする

  2. 機能ブランチを作成します( git checkout -b feature/amazing-feature

  3. 変更をコミットします ( git commit -m 'Add some amazing feature' )

  4. ブランチにプッシュする ( git push origin feature/amazing-feature )

  5. プルリクエストを開く

Install Server
A
license - permissive license
B
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity
Issues opened vs closed

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    B
    maintenance
    A 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.
    57
    MIT
  • A
    license
    B
    quality
    C
    maintenance
    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.
    8
    398
    8
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that provides AI assistants with comprehensive access to SQL databases, enabling schema inspection, query execution, and database operations with enterprise-grade security.
    70
    7
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    A Model Context Protocol server that provides comprehensive access to Microsoft SQL Server databases, enabling Language Models to inspect schemas, execute queries, manage database objects, and perform advanced database operations.
    8

View all related MCP servers

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

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/RichardHan/mssql_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server