Skip to main content
Glama
Local DB MCP Server

Local DB MCP Server

by sotanengel

Local DB MCP Server

AIエージェントがユーザーが提供したデータを分析できるようにするMPCサーバーです。

データの格納もUI経由で行うことができるため、誰でも簡単にAIエージェントに分かりやすい形式でデータを提供することができます。

機能

Web UI機能

  • CSV/TSVファイルのアップロード

  • DuckDBファイルのインポート

  • Web UIでのデータ管理・編集

  • テーブル定義の編集(コメント、カラム名変更)

MCPサーバー機能

  • AIがデータベースにアクセス可能

  • テーブル一覧の取得

  • テーブルスキーマ・メタデータの取得

  • SQLクエリの実行

Related MCP server: DataPilot AI MCP Server

初期設定

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

git clone https://github.com/sotanengel/local-db-mcp-server
cd local-db-mcp-server

2. Dockerのアプリケーションをダウンロード

公式サイトよりアプリケーションをダウンロードしてください。 ダウンロード後はアプリケーションを起動してください。

3. Dockerコンテナを起動

docker compose up --build

使用方法

データの格納する

AIエージェントに利用させたいデータを以下の手順で登録してください。

  1. データの格納画面 にアクセス

  1. CSVまたはTSVファイルをアップロード

データに説明を追加する

AIエージェントがデータ分析を行う際に、テーブルの情報が明確に定義されていると分析の精度が上がるため以下の手順で設定を行なってください。

  1. テーブル情報を定義したいテーブル名をクリックする

  1. 画面上部のテーブルの定義を編集をクリック

  1. 入力欄に定義を入力し、保存する

AIエージェントがデータを利用する

AIエージェントは以下のツールを利用できます。

利用可能なツール

  1. list_tables - データベース内のすべてのテーブル一覧を取得

  2. get_table_schema - 指定されたテーブルのスキーマ情報を取得

  3. get_table_metadata - テーブルのメタデータ(説明、レコード数、カラム情報)を取得

  4. execute_query - SQLクエリを実行して結果を返す

AIエージェントへのMCPサーバーの登録方法

Cursor への登録手順(mcp.json)

Cursor からこの MCP サーバー(local-db)を使うには、MCP 設定ファイル mcp.json を作成します。

  • プロジェクト専用: プロジェクト直下に .cursor/mcp.json

  • グローバル: ~/.cursor/mcp.json

どちらか一方でOKです(プロジェクト内に置くとそのプロジェクトでのみ有効)。

設定例(macOS 推奨設定):

{
  "mcpServers": {
    "local-db": {
      "command": "/usr/local/bin/docker",
      "args": [
        "exec",
        "-i",
        "local-db-mcp-server-mcp-server-1",
        "python",
        "mcp_server.py"
      ],
      "env": {},
      "disabled": false,
      "autoApprove": ["execute_query", "get_table_info"]
    }
  }
}

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    • The all-in-one data stack for agents. Upload files, run SQL, evolve tables, and render charts.

      https://oleander.dev/mcp
    • Query, join, profile, clean and convert CSV/JSON/Parquet with server-side DuckDB over MCP.

    • Query your warehouse or a CSV with Claude/ChatGPT over MCP, governed by table-level ACL + audit.

      https://mcp.contextflo.com/mcp
    • ParseHub.dev is a hosted document-to-records service with a remote MCP server. Agents can upload a CSV, PDF, or Word file, summarize and analyze CSV data (filter, sort, group_by, and more), read text from PDF and Word files, extract attendees, agenda items, and action items from meeting notes, ask a question about an uploaded document, and store files as database records to list and read later. Each account sees only its own files and records. **Endpoint:** `https://parsehub.dev/mcp` (Streamable HTTP, stateless) **Auth:** API key in the `X-API-Key` header (keys start with `mcp_`), or `Authorization: Bearer <API key or JWT>`. Every request without credentials returns 401. **Plans:** Free (100 API requests/month, 1 document upload), or 5,000 requests/month on the $9/month or $42/year plan. Every MCP request counts toward the allowance. **Tools:** upload_csv, summarize_csv, analyze_csv, upload_document, read_document, extract_meeting_notes, ask_document, database_status, list_database_documents, get_database_document, store_document, extract_stored_meeting_notes, export_database (administrators only). Not affiliated with ParseHub (parsehub.com), the web-scraping tool. ParseHub.dev does not scrape websites. By Poietes LLC. Docs: https://parsehub.dev/guide#connect-via-mcp

      https://parsehub.dev/mcp

    Related MCP Servers

    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables natural language data analysis on uploaded CSV files by converting them to SQLite and exposing read-only database tools via MCP. Integrates with Ollama LLM to translate user questions into safe SQL queries.
      -
    • A
      license
      A
      quality
      D
      maintenance
      Enables AI agents to discover and execute analytical queries on a DuckDB dataset through typed MCP tools, with guarded read-only SQL support for complex calculations without direct database access.
      6
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to run SQL analytics directly on CSV files in place via MCP, avoiding imports and token-heavy data pasting. It provides read-only querying, schema inspection, and file listing while keeping data local.
      31
      MIT