Skip to main content
Glama
wirdes

db-mcp-tool

by wirdes

データベースエクスプローラーMCPツール

鍛冶屋のバッジ

PostgreSQL、MySQL、Firestore などのさまざまな種類のデータベースを探索および管理するための強力なモデル コンテキスト プロトコル (MCP) ツール。

特徴

  • 複数のデータベースのサポート

    • PostgreSQL

    • MySQL

    • ファイアストア

  • データベース操作

    • データベースに接続する

    • テーブルの一覧

    • トリガーを表示

    • リスト関数

    • SQLクエリを実行する(PostgreSQLとMySQL)

    • テーブルスキーマをエクスポートする

    • テーブルデータをエクスポートする

Related MCP server: Database MCP Server

カーソルとの統合

ツールをカーソルに追加する前に、プロジェクトをビルドする必要があります。

  1. リポジトリをクローンする

  2. 依存関係をインストールします:

    npm install
  3. プロジェクトをビルドします。

    npm run build

ツールをカーソルに追加するには:

  1. カーソル設定を開く

  2. 「モデルコンテキストプロトコル(MCP)」セクションに移動します

  3. 「新しいツールを追加」をクリックします

  4. 以下の詳細を入力してください。

    {
      "name": "database-explorer",
      "command": "node /path/to/project/dist/index.js",
      "description": "Database Explorer MCP Tool"
    }

    注: /path/to/projectプロジェクト ディレクトリへの実際のパスに置き換えます。

  5. 設定を保存する

  6. カーソルを再開

ツールの使用:

  1. セットアップ後、次のいずれかのコマンドを使用してデータベースに接続できます。

    • PostgreSQLの場合: 接続の詳細を指定した!pgを使用する

    • MySQLの場合: 接続詳細に!mysqlを使用する

    • Firestoreの場合: 接続の詳細とともに!firestoreを使用します

  2. 接続すると、さまざまなデータベース操作を使用できるようになります。

    • すべての!tables

    • トリガーを表示するには!triggers

    • 関数をリストするには!functions

    • !queryでSQLクエリを実行する

    • テーブルスキーマをエクスポートするには!export-db

    • !export-dataでテーブルデータをエクスポートする

詳細な使用例については、以下のコマンドのセクションを参照してください。

コマンド

接続コマンド

  • !pg - PostgreSQLデータベースに接続する

    {
      "connection": {
        "host": "hostname",
        "port": 5432,
        "database": "dbname",
        "user": "username",
        "password": "password"
      }
    }
  • !mysql - MySQLデータベースに接続する

    {
      "connection": {
        "host": "hostname",
        "port": 3306,
        "database": "dbname",
        "user": "username",
        "password": "password"
      }
    }
  • !firestore - Firestore データベースに接続する

    {
      "connection": {
        "projectId": "your-project-id",
        "keyFilename": "path/to/keyfile.json"
      }
    }

データベース操作コマンド

  • !tables - 接続されたデータベース内のすべてのテーブルを一覧表示します

  • !triggers - 接続されたデータベース内のすべてのトリガーを一覧表示します

  • !functions - 接続されたデータベース内のすべての関数を一覧表示します

  • !query - SQLクエリを実行する(PostgreSQLとMySQLのみ)

    {
      "query": "SELECT * FROM table_name"
    }
  • !export-db - テーブルスキーマをエクスポートする

    {
      "table": "table_name"
    }
  • !export-data - テーブルデータをINSERT文としてエクスポートする

    {
      "table": "table_name"
    }

要件

  • Node.js

  • 必要なデータベース ドライバー:

    • PostgreSQLのpg

    • MySQL 用のmysql2

    • Firestore の@google-cloud/firestore

使用法

  1. 必要なデータベース資格情報があることを確認してください

  2. 適切な接続コマンドを使用してデータベースに接続します

  3. 利用可能なコマンドを使用してデータベースを探索および管理します

エラー処理

  • このツールには、次の包括的なエラー処理が含まれています。

    • 接続失敗

    • クエリ実行エラー

    • スキーマとデータのエクスポートの問題

    • 無効なデータベース操作

注記

  • Firestore のサポートは、NoSQL の性質上、基本的な操作に限定されています。

  • SQL操作はPostgreSQLとMySQLでのみ利用可能です

Install Server
A
license - permissive license
D
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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
    B
    quality
    B
    maintenance
    A Model Context Protocol server that enables powerful PostgreSQL database management capabilities including analysis, schema management, data migration, and monitoring through natural language interactions.
    18
    2,467
    198
    AGPL 3.0
  • F
    license
    -
    quality
    D
    maintenance
    A Model Context Protocol server that provides tools for connecting to and interacting with various database systems (SQLite, PostgreSQL, MySQL/MariaDB, SQL Server) through a unified interface.
    3
  • A
    license
    -
    quality
    C
    maintenance
    A Model Context Protocol server for interacting with MSSQL and PostgreSQL databases, offering tools for schema exploration and SQL execution. It features configurable query modes for safety and supports advanced authentication methods like Windows Auth and SSL.
    13
    MIT

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/wirdes/db-mcp-tool'

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