Skip to main content
Glama
CSOAI-ORG

Universal Database MCP Server

by CSOAI-ORG

ユニバーサルデータベースMCPサーバー

By MEOK AI Labs | meok.ai

AIエージェントをあらゆるSQLデータベースに接続します。データのクエリ、スキーマの探索、行の挿入、CSVへの結果エクスポートが可能です。SQLite(組み込み)、PostgreSQL、MySQLを単一の統合インターフェースでサポートしています。

ツール

ツール

説明

query_sql

安全性検証付きで任意のSQLクエリを実行

list_tables

データベース内の全テーブルを一覧表示

describe_table

カラム名、型、NULL許容、行数を取得

insert_row

シンプルなキー・バリュー辞書を使用して行を挿入

export_to_csv

SELECTを実行し、結果をCSVとして保存

インストール

# Core (SQLite support included)
pip install mcp

# PostgreSQL support
pip install psycopg2-binary

# MySQL support
pip install mysql-connector-python

使用方法

サーバーの実行

python server.py

Claude Desktopの設定

{
  "mcpServers": {
    "database": {
      "command": "python",
      "args": ["/path/to/database-universal-mcp/server.py"]
    }
  }
}

接続文字列の形式

データベース

形式

SQLite (ファイル)

sqlite:///path/to/db.sqlite または単に /path/to/file.db

PostgreSQL

postgresql://user:pass@localhost:5432/mydb

MySQL

mysql://user:pass@localhost:3306/mydb

呼び出し例

SQLiteデータベース内のテーブル一覧:

Tool: list_tables
Input: {"connection_string": "/Users/me/data/app.db"}
Output: {"tables": ["users", "orders", "products"], "count": 3, "db_type": "sqlite"}

テーブルの構造を確認:

Tool: describe_table
Input: {"connection_string": "/Users/me/data/app.db", "table_name": "users"}
Output: {"columns": [{"name": "id", "type": "INTEGER", "primary_key": true}, {"name": "email", "type": "TEXT", "nullable": false}], "row_count": 1523}

データのクエリ:

Tool: query_sql
Input: {"connection_string": "postgresql://admin:secret@localhost/myapp", "sql": "SELECT name, email FROM users WHERE created_at > '2026-01-01' LIMIT 10"}
Output: {"columns": ["name", "email"], "rows": [{"name": "Alice", "email": "alice@example.com"}, ...], "row_count": 10}

行の挿入:

Tool: insert_row
Input: {"connection_string": "/tmp/test.db", "table_name": "notes", "data": {"title": "Meeting notes", "body": "Discussed Q2 roadmap", "created_at": "2026-04-13"}}
Output: {"message": "Inserted 1 row into notes"}

CSVへのエクスポート:

Tool: export_to_csv
Input: {"connection_string": "/Users/me/data/app.db", "sql": "SELECT * FROM orders WHERE total > 100"}
Output: {"output": "/tmp/export_20260413_143022.csv", "rows_exported": 47}

安全性

  • 危険なクエリのブロック: DROP TABLE、TRUNCATE、WHERE句のないDELETE、GRANT/REVOKEは拒否されます

  • 書き込みガード: INSERT/UPDATE/DELETEには明示的な allow_write=True が必要です

  • 行制限: 無料プランではクエリごとに最大1000行まで返されます

  • 認証情報の非保存: 接続文字列は呼び出しごとに使用され、永続化されることはありません

料金

プラン

制限

価格

無料

1日30回まで、最大1000行

$0

Pro

無制限 + コネクションプーリング + バッチ操作

$12/月

Enterprise

カスタム + 監査ログ + VPCサポート

お問い合わせ

ライセンス

MIT

-
security - not tested
F
license - not found
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

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/CSOAI-ORG/database-universal-mcp'

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