Mcp Data Pipeline Connector

io.github.dbsectrainer由 GitHub 帳號 dbsectrainer 發布v1.0.1更新於 Nov 4, 2026

Universal data connector for CSV, Postgres, and REST APIs via DuckDB

概覽

AI 產生的概覽

本機 MCP 伺服器,可註冊 CSV 檔案、PostgreSQL 資料庫與 REST API,讓助理透過內嵌 DuckDB 以 SQL 查詢與轉換這些資料。

可以做什麼
  • 註冊、列出並檢查 CSV 檔案、Postgres 資料庫與 REST 端點等資料來源的連線狀態
  • 列出各資料來源中的資料表,檢視指定資料表的欄位名稱與型別
  • 以 DuckDB 執行 SQL 查詢,支援 CSV 來源之間的跨來源合併,並可限制列數與分頁
  • 對資料表執行彙總、篩選、重新命名或欄位選取,並回傳或儲存結果
適用情境
適合助理需要跨多個資料來源回答問題的情況,例如把銷售 CSV 與 Postgres 使用者資料表合併查詢,而不必為每種來源各設一個伺服器。若只查詢單一來源,專用連接器較為簡單。
執行需求
透過 npx 以 stdio 在本機執行,需要 Node.js v20.19 或更新版本與 npm。資料來源定義於 YAML 檔(預設 ~/.mcp/data-sources.yaml),連線字串應來自環境變數。使用 Postgres 連接器需要執行中的 PostgreSQL 實例,REST 來源需要網路存取。宣告了一個必要的環境變數 YOUR_API_KEY。
安裝前請注意
伺服器會對你設定的資料來源執行 SQL,應只授予助理所需的資料庫權限。預設開啟唯讀模式並拒絕非 SELECT 語句,但可關閉。憑證應放在環境變數中,例如 YOUR_API_KEY 與 Postgres 連線字串變數,不要寫進受版本控制的 YAML。REST 回應預設快取 300 秒。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Mcp Data Pipeline Connector,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

MCP Data Pipeline Connector

npm mcp-data-pipeline-connector package

One MCP server for all your data sources — with cross-source SQL joins and no external query service. DuckDB runs embedded in-process, so you can join a CSV file against a Postgres table against a REST API response in a single query, entirely on your machine. Agents work with your data without needing source-specific knowledge or multiple MCP server configs.

Tool reference | Configuration | Contributing | Troubleshooting

Key features

  • Unified query interface: SQL across all connected sources via DuckDB — including cross-source joins.
  • Multiple source types: CSV/JSON files, PostgreSQL databases, and REST API endpoints in a single server.
  • Auto schema detection: Infers column names and types from CSV headers and Postgres metadata.
  • REST caching: REST API responses are cached with a configurable TTL to avoid redundant calls.
  • Schema normalization: Maps source-specific types to a standard set (string, number, date, boolean, json).
  • In-process query engine: DuckDB runs embedded — no separate query service to install or manage.

Why this over separate per-source MCP servers?

The common alternative is running one MCP server per data source — a postgres MCP server, a CSV MCP server, a REST MCP server. Each works fine in isolation, but they can't talk to each other.

mcp-data-pipeline-connectorSeparate per-source servers
Cross-source joinsNative SQL via embedded DuckDBNot possible — agent must fetch and join manually
Config complexityOne server entry in your MCP configOne entry per source type
Query engineDuckDB in-process — no install, no serviceDepends on each source's query capabilities
Schema unificationNormalizes all types to string/integer/number/datetime/boolean/json/unknownEach source uses its own type system
Data residencyAll queries run locallyDepends on each connector's implementation

If you're asking questions that span multiple data sources — "join my sales CSV with the users table" — this is the right tool. If you only ever query one source type, a dedicated single-source server is simpler.

Disclaimers

mcp-data-pipeline-connector connects to data sources you configure and executes queries against them on behalf of your agent. Ensure agents only have the database permissions they need. Connection strings are never logged or transmitted; keep them out of version-controlled config files. Use environment variables for credentials.

Requirements

  • Node.js v20.19 or newer.
  • npm.
  • Optional: A running PostgreSQL instance for the Postgres connector.

Getting started

Add the following config to your MCP client:

json
{  "mcpServers": {    "data-connector": {      "command": "npx",      "args": ["-y", "mcp-data-pipeline-connector@latest"]    }  }}

Define your data sources in ~/.mcp/data-sources.yaml:

yaml
sources:  - name: sales    type: csv    path: ~/data/sales-2025.csv  - name: users    type: postgres    connection_string: "${POSTGRES_URL}"    tables: [users, subscriptions]

Store connection strings in environment variables, not directly in the YAML file.

MCP Client configuration

Amp · Claude Code · Cline · Cursor · VS Code · Windsurf · Zed

Your first prompt

Place a CSV file at ~/data/sample.csv, add it as a source in your config, then enter:

What columns are in the sample table? Show me the first 5 rows.

Your client should return the schema and a preview of the data.

Tools

Sources (2 tools)

  • connect_source
  • list_sources

Schema (2 tools)

  • list_tables
  • get_schema

Data (2 tools)

  • query
  • transform

Health (1 tool)

  • check_health

Configuration

--config / --sources-config

Path to the YAML file defining data sources.

Type: string Default: ~/.mcp/data-sources.yaml

--rest-cache-ttl

Time-to-live in seconds for cached REST API responses. Set to 0 to disable caching.

Type: number Default: 300

--max-rows

Maximum number of rows returned by a single query call. Prevents accidental large result sets.

Type: number Default: 1000

--read-only

Reject any SQL statements that are not SELECT queries. Enforces read-only access across all sources.

Type: boolean Default: true

Pass flags via the args property in your JSON config:

json
{  "mcpServers": {    "data-connector": {      "command": "npx",      "args": ["-y", "mcp-data-pipeline-connector@latest", "--max-rows=5000", "--rest-cache-ttl=60"]    }  }}

Verification

Before publishing a new version, verify the server with MCP Inspector to confirm all tools are exposed correctly and the protocol handshake succeeds.

Interactive UI (opens browser):

bash
npm run build && npm run inspect

CLI mode (scripted / CI-friendly):

bash
# List all toolsnpx @modelcontextprotocol/inspector --cli node dist/index.js --method tools/list
# List resources and promptsnpx @modelcontextprotocol/inspector --cli node dist/index.js --method resources/listnpx @modelcontextprotocol/inspector --cli node dist/index.js --method prompts/list
# Call a tool (example — replace with a relevant read-only tool for this plugin)npx @modelcontextprotocol/inspector --cli node dist/index.js \  --method tools/call --tool-name list_sources
# Call a tool with argumentsnpx @modelcontextprotocol/inspector --cli node dist/index.js \  --method tools/call --tool-name list_sources --tool-arg key=value

Run before publishing to catch regressions in tool registration and runtime startup.

Contributing

Each connector lives in src/connectors/ and must implement the DataConnector interface. Add fixture data files under tests/fixtures/ for integration tests. Never log connection strings or credentials — sanitize before any output or error message.

bash
npm install && npm test

Listings

mcp-data-pipeline-connector is listed on MCP Registry and MCP Market.

Troubleshooting

  • REST source fails to connect: Confirm the URL is reachable and any auth env var is set. Use check_health to retest after startup.
  • Cross-source join returns no results: Ensure both sources are CSV type and registered before using source='_all'.
  • Query returns truncated: true: Increase --max-rows or add a LIMIT clause to your SQL.

來源:README.md,提交 6914478

工具

7

connect_source

Register a data source (CSV file, Postgres database, or REST API). Credentials must be in environment variables or a YAML config file — never pass connection strings directly.

輸入參數urlname必填pathtype必填source_config_path

list_sources

List all registered data sources and their connection status.

無需輸入參數。

list_tables

List available tables across all sources, or just the named source.

輸入參數source

get_schema

Return the column names and types for a specific table.

輸入參數table必填source必填

query

Execute a SQL query against a registered data source using DuckDB. Returns up to --max-rows rows (default 1000). In read-only mode (default), only SELECT statements are allowed. Use source='_all' to query across all CSV sources with cross-source joins. Supports limit and offset for pagination.

輸入參數sql必填limitoffsetsourcesourcesmax_rows

transform

Apply aggregations, filters, renaming, or column selection to a source table and return or save results.

輸入參數table必填source必填operations必填output_format

check_health

Check whether registered data sources are still reachable and responsive.

輸入參數source

版本歷史

2
  1. v1.0.1最新Nov 4, 2026
  2. v1.0.0Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分