db-mcp-tool
データベースエクスプローラーMCPツール
PostgreSQL、MySQL、Firestore などのさまざまな種類のデータベースを探索および管理するための強力なモデル コンテキスト プロトコル (MCP) ツール。
特徴
複数のデータベースのサポート
PostgreSQL
MySQL
ファイアストア
データベース操作
データベースに接続する
テーブルの一覧
トリガーを表示
リスト関数
SQLクエリを実行する(PostgreSQLとMySQL)
テーブルスキーマをエクスポートする
テーブルデータをエクスポートする
Related MCP server: Database MCP Server
カーソルとの統合
ツールをカーソルに追加する前に、プロジェクトをビルドする必要があります。
リポジトリをクローンする
依存関係をインストールします:
npm installプロジェクトをビルドします。
npm run build
ツールをカーソルに追加するには:
カーソル設定を開く
「モデルコンテキストプロトコル(MCP)」セクションに移動します
「新しいツールを追加」をクリックします
以下の詳細を入力してください。
{ "name": "database-explorer", "command": "node /path/to/project/dist/index.js", "description": "Database Explorer MCP Tool" }注:
/path/to/projectプロジェクト ディレクトリへの実際のパスに置き換えます。設定を保存する
カーソルを再開
ツールの使用:
セットアップ後、次のいずれかのコマンドを使用してデータベースに接続できます。
PostgreSQLの場合: 接続の詳細を指定した
!pgを使用するMySQLの場合: 接続詳細に
!mysqlを使用するFirestoreの場合: 接続の詳細とともに
!firestoreを使用します
接続すると、さまざまなデータベース操作を使用できるようになります。
すべての
!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の
pgMySQL 用の
mysql2Firestore の
@google-cloud/firestore
使用法
必要なデータベース資格情報があることを確認してください
適切な接続コマンドを使用してデータベースに接続します
利用可能なコマンドを使用してデータベースを探索および管理します
エラー処理
このツールには、次の包括的なエラー処理が含まれています。
接続失敗
クエリ実行エラー
スキーマとデータのエクスポートの問題
無効なデータベース操作
注記
Firestore のサポートは、NoSQL の性質上、基本的な操作に限定されています。
SQL操作はPostgreSQLとMySQLでのみ利用可能です
Maintenance
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
- AlicenseBqualityBmaintenanceA Model Context Protocol server that enables powerful PostgreSQL database management capabilities including analysis, schema management, data migration, and monitoring through natural language interactions.182,467198AGPL 3.0
- Flicense-qualityDmaintenanceA 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
- -license-quality-maintenanceA Model Context Protocol server that provides tools for interacting with databases, including PostgreSQL, DuckDB, and Google Cloud Storage Parquet files.2
- Alicense-qualityCmaintenanceA 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.13MIT
Related MCP Connectors
MCP server for managing Prisma Postgres.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Analytical memory for AI agents: a real Postgres queried in plain English over MCP. One command.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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