Skip to main content
Glama

MSSQL MCP Server

by JexinSam

テスト

MSSQL MCP サーバー

MSSQL MCPサーバーは、 Microsoft SQL Server(MSSQL)データベースとの安全かつ構造化されたインタラクションを可能にするモデルコンテキストプロトコル(MCP)サーバーです。AIアシスタントは、このサーバーを使用することで、以下のことが可能になります。

  • 利用可能なテーブルの一覧
  • 表の内容を読む
  • 制御されたアクセスでSQLクエリを実行する

これにより、より安全なデータベース探索、厳格な権限の適用、データベース操作のログ記録が保証されます。

特徴

  • 環境変数によるMSSQL データベースアクセスの保護
  • エラー処理による制御されたクエリ実行
  • テーブル一覧とデータ取得
  • クエリと操作を監視するための包括的なログ記録

インストール

pip install mssql-mcp-server

構成

データベース アクセスを構成するには、次の環境変数を設定します。

MSSQL_DRIVER=mssql_driver MSSQL_HOST=localhost MSSQL_USER=your_username MSSQL_PASSWORD=your_password MSSQL_DATABASE=your_database #optional TrustServerCertificate=yes Trusted_Connection=no

使用法

クロード・デスクトップ

Claude Desktopと統合するには、次の構成をclaude_desktop_config.jsonに追加します。

{ "mcpServers": { "mssql": { "command": "uv", "args": [ "--directory", "path/to/mssql_mcp_server", "run", "mssql_mcp_server" ], "env": { "MSSQL_DRIVER": "mssql_driver", "MSSQL_HOST": "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/yourusername/mssql_mcp_server.git cd mssql_mcp_server # Set up a virtual environment python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate # Install development dependencies pip install -r requirements-dev.txt # Run tests pytest

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

  • 最小限の権限を持つ専用の MSSQL ユーザーを使用します
  • ルート資格情報や完全な管理者アカウントは使用しないでください
  • 必要な操作のみにデータベース アクセスを制限します
  • セキュリティ監視のためのログ記録と監査を有効にします
  • 権限を定期的に確認し、最小限の権限アクセスを確保します。

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

安全なセットアップのために:

  1. 制限された権限を持つ専用の MSSQL ユーザーを作成します
  2. 資格情報をハードコーディングすることは避け、代わりに環境変数を使用してください。
  3. 必要なテーブルと操作のみへのアクセスを制限します
  4. 監査のためにSQL Server のログ記録と監視を有効にします
  5. 不正アクセスを防ぐために、データベース アクセスを定期的に確認してください

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

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

ライセンス

このプロジェクトはMITライセンスに基づいてライセンスされています。詳細はLICENSEファイルをご覧ください。

貢献

貢献を歓迎します!貢献するには:

  1. リポジトリをフォークします。
  2. 機能ブランチを作成する: git checkout -b feature/amazing-feature
  3. 変更をコミットします: git commit -m 'Add amazing feature'
  4. ブランチにプッシュ: git push origin feature/amazing-feature
  5. プルリクエストを開きます。

ヘルプが必要ですか?

ご質問や問題がある場合は、お気軽に GitHub **Issue**を開くか、メンテナーに問い合わせてください。

-
security - not tested
A
license - permissive license
-
quality - not tested

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Microsoft SQL Server データベースとの安全で構造化されたインタラクションを可能にするモデル コンテキスト プロトコル サーバー。これにより、AI アシスタントは制御されたアクセスでテーブルの一覧表示、データの読み取り、SQL クエリの実行が可能になります。

  1. 特徴
    1. インストール
      1. 構成
        1. 使用法
          1. クロード・デスクトップ
          2. スタンドアロンサーバーとして実行
        2. 発達
          1. セキュリティに関する考慮事項
            1. セキュリティのベストプラクティス
              1. ライセンス
                1. 貢献
                  1. ヘルプが必要ですか?

                Related MCP Servers

                • A
                  security
                  A
                  license
                  A
                  quality
                  A 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.
                  Last updated -
                  1
                  108
                  Python
                  MIT License
                  • Linux
                  • Apple
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server implementation that enables AI assistants to securely interact with GreptimeDB, allowing them to explore database schema, read data, and execute SQL queries through a controlled interface.
                  Last updated -
                  17
                  Python
                  MIT License
                  • Apple
                • -
                  security
                  -
                  license
                  -
                  quality
                  A Model Context Protocol server that enables AI assistants to securely interact with ClickHouse databases, supporting table exploration and SQL query execution through a controlled interface.
                  Last updated -
                  6
                  Python
                  Apache 2.0
                • -
                  security
                  A
                  license
                  -
                  quality
                  A Model Context Protocol server implementation that enables AI assistants to execute SQL queries and interact with SQLite databases through a structured interface.
                  Last updated -
                  6
                  TypeScript
                  MIT License

                View all related MCP servers

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

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