Skip to main content
Glama
dataville-mcp

dataville-mcp

by datavilleorg

dataville-mcp

MCP 服务器,将 Dataville 的数据源 API 暴露为 MCP 客户端(Claude Desktop、Claude Code 等)可使用的工具。

需要 Dataville API 密钥 — 从 Dataville 控制台 获取。

工具

  • list_dataville_sources — 列出可通过 search_dataville 使用的数据源。

  • search_dataville — 查询数据源:{ source, keywords, params? }。

Related MCP server: data-analyst

设置

将此添加到您的 MCP 客户端配置(Claude Code / Claude Desktop),并将 DATAVILLE_API_KEY 设置为您的密钥:

{
  "mcpServers": {
    "dataville": {
      "command": "npx",
      "args": ["-y", "@dataville/dataville-mcp"],
      "env": {
        "DATAVILLE_API_KEY": "dataville_your_key_here"
      }
    }
  }
}

无需安装步骤 — npx 会按需获取并运行包。

DATAVILLE_API_BASE_URL 是可选的,默认为 https://api.dataville.com;设置为 http://localhost:5000 可在开发期间指向本地后端。

从源代码运行

git clone https://github.com/datavilleorg/dataville-mcp.git
cd dataville-mcp
npm install
npm run build

开发

npm run dev   # tsx watch

Available Tools

4 tools
describe_dataville_sourceDescribe a Dataville data sourceA
Read-onlyIdempotent
Inspect

Show how to use one data source: what search_dataville expects as keywords (with an example that returns a result), and the SQL tables and columns query_dataville can read for it. Sources with no tables can only be searched.

Inputs: source (required).

list_dataville_sourcesList Dataville data sourcesA
Read-onlyIdempotent
Inspect

List every Dataville data source with a one-line description and the SQL tables (if any) that query_dataville can read for it. Call describe_dataville_source for a source's keyword format and table columns.

Inputs: no named parameters.

query_datavilleQuery Dataville with SQLA
Read-onlyIdempotent
Inspect

Run a read-only SQL SELECT (DuckDB dialect) over Dataville's stored tables: wiki, arxiv, gutenberg, fooddata, pwc_methods, pwc_datasets, edgar, openalex, pypi, stackexchange. Use it to list, filter (WHERE … ILIKE '%term%'), sort, count, aggregate, or join across sources, and page through results with LIMIT/OFFSET. Get each table's columns from describe_dataville_source. Only SELECT is allowed; at most 1,000 rows are returned (a missing LIMIT becomes LIMIT 1000); queries time out after 30 s. Billed per row returned, so keep LIMIT as small as the task allows. The tables hold Dataville's stored copy: some sources are loaded in bulk, others only hold records fetched before, so a row missing here may still exist upstream — fall back to search_dataville for a specific item.

Inputs: sql (required).

search_datavilleSearch a Dataville data sourceA
Read-onlyIdempotent
Inspect

Look up one thing in a Dataville data source by keywords and get back the single best-matching record (full text in body, structured fields in metadata). Use describe_dataville_source to see what keywords a source expects. To get many records, filter, or page through results, use query_dataville instead.

Inputs: source (required), keywords (required), params, summary.

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    A4.3/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool targets a distinct phase of the workflow: list sources, describe a source, keyword search for one record, and SQL query for many records. The descriptions explicitly contrast search_dataville vs query_dataville, leaving no overlap.

    Naming Consistency4/5

    All names are snake_case with a clear verb prefix (list_, describe_, search_, query_), but the position of 'dataville' varies slightly (list_dataville_sources vs search_dataville). Still predictable and readable.

    Tool Count4/5

    Four tools is a lean but well-scoped set for a read-only data access server; each tool earns its place. It is slightly on the thin side (no dedicated fetch-by-id or schema tool), but nothing feels redundant.

    Completeness4/5

    Discovery (list/describe), retrieval (search), and flexible querying (SQL) cover the read-only domain well. Minor gap: no direct fetch-by-record identifier, though query_dataville can serve as a workaround.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers