Skip to main content
Glama

tablebridge

Turn a folder of CSV / Parquet / JSON files into one SQL-queryable source for your AI agent.

CI PyPI Python MCP License: MIT

Small businesses don't have a data warehouse — they have a folder full of exports: customers.csv, last month's orders.xlsx, a regions.json someone emailed over. tablebridge is an MCP server that points DuckDB at that folder, exposes each file as a SQL table, and lets your agent run read-only SQL — including JOINs across files — to answer questions over all of them at once. Scattered spreadsheets become one queryable source of truth.

It's read-only and sandboxed: files are loaded into an in-memory database, the data directory is the only thing it can see, and queries are validated so an agent can't write, escape to other paths, or call raw file functions.


Why you'd want this

  • 🔗 One source over many files. JOIN orders.csv to customers.csv to regions.json in a single query — no ETL, no database to stand up.

  • 🦆 DuckDB-powered. Fast analytical SQL over CSV, TSV, Parquet, JSON/NDJSON.

  • 🔒 Safe by design. Files are materialized into memory; queries are validated read-only; raw file-access functions and out-of-sandbox paths are rejected.

  • 🤖 Agent-friendly. list_sourcesdescribequery is a natural flow the agent can follow on its own.

  • 🪶 Two dependencies (mcp, duckdb), fully typed and tested.

Related MCP server: TabulaRAG

Install

uvx tablebridge          # run directly
# or
pip install tablebridge  # then run: tablebridge

Claude Code

TABLEBRIDGE_DATA_DIR=/path/to/your/data claude mcp add tablebridge -- uvx tablebridge

Claude Desktop / Cursor

{
  "mcpServers": {
    "tablebridge": {
      "command": "uvx",
      "args": ["tablebridge"],
      "env": { "TABLEBRIDGE_DATA_DIR": "/path/to/your/data" }
    }
  }
}

Run with Docker

A Dockerfile is included. The server speaks MCP over stdio. Mount the folder you want to query at /data (read-only is fine) and run interactively (-i):

docker build -t tablebridge .
docker run --rm -i -v /path/to/your/data:/data:ro tablebridge

Tools

Tool

Description

list_sources

List the tables (one per data file) with column counts — start here

describe

A table's columns and types

preview

First N rows of a table

query

Run read-only SQL (DuckDB dialect) across the tables, JOINs included

refresh

Re-scan the data directory for added/changed files

server_info

Effective config (data dir, row cap, supported formats)

Example

With a folder containing customers.csv, orders.csv, and regions.json:

You: Who are my top 3 customers by total spend, and what region are they in?

Agent: (calls list_sources, then query)

SELECT c.name, r.region, SUM(o.total) AS spend
FROM customers c
JOIN orders o   ON o.customer_id = c.id
JOIN regions r  ON r.customer_id = c.id
GROUP BY c.name, r.region
ORDER BY spend DESC
LIMIT 3;

Configuration

Variable

Default

Description

TABLEBRIDGE_DATA_DIR

.

Directory of files to expose (the sandbox boundary)

TABLEBRIDGE_MAX_ROWS

1000

Max rows returned per query/preview

TABLEBRIDGE_RECURSIVE

1

Scan subdirectories too

Supported formats: .csv, .tsv, .parquet, .json, .ndjson.

Security model

  1. Sandboxed to TABLEBRIDGE_DATA_DIR — only files under it are loaded.

  2. Materialized into an in-memory DuckDB, then external filesystem access is disabled — queries can't reach other paths.

  3. Validated SQL — a single read-only statement only; writes and raw file-reader functions are rejected.

Development

git clone https://github.com/Michael-WhiteCapData/tablebridge-mcp
cd tablebridge-mcp
uv pip install -e ".[dev]"
ruff check .
pytest          # uses real DuckDB over temp files

See CONTRIBUTING.md.

License

MIT © Michael Tierney

Available Tools

6 tools
describeC

Show a table's columns and types.

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It only states the basic action and result, but does not disclose behavioral traits like read-only nature, error handling, or permission requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very short and front-loaded, but could include more useful information without becoming verbose. It earns its keep but is minimal.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 parameter, output schema exists), the description is adequate but does not fully compensate for the lack of schema descriptions. It explains the basic functionality but not the return value structure.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With schema description coverage at 0%, the description should add meaning to the parameter 'table', but it only implies its purpose without providing format, examples, or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description 'Show a table's columns and types' clearly states the tool's purpose with specific verb and resource, and it distinguishes from siblings like query (which retrieves data) and list_sources (which lists tables).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no explicit guidance on when to use this tool vs alternatives. It does not mention exclusions or prerequisites, leaving the agent to infer usage from context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_sourcesA

List the tables available to query (one per data file) with column counts.

Start here: each CSV/Parquet/JSON file under the data directory is exposed as a table you can SELECT from and JOIN across.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries full burden. It discloses that the tool lists tables with column counts from files in the data directory, implying a read-only operation. No contradictions or missing critical behaviors.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, front-loaded with the primary purpose, no fluff. Every sentence provides essential information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has no parameters and an output schema, the description is complete. It explains what the tool does, what data it lists, and positions it as the starting point among siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With zero parameters, schema coverage is 100%. The description adds no parameter details but is not needed; baseline for 0 parameters is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List the tables available to query (one per data file) with column counts.' It distinguishes from siblings by being the starting point to discover available data sources.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly says 'Start here,' providing clear context that this tool should be used first. It does not exclude any scenarios but effectively guides the agent to begin with this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

previewA

Return the first n rows of a table (capped by TABLEBRIDGE_MAX_ROWS).

ParametersJSON Schema
NameRequiredDescriptionDefault
tableYes
nNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description mentions the cap by TABLEBRIDGE_MAX_ROWS, which is a useful behavioral trait. However, it does not disclose other aspects such as what 'first' means (ordering), whether the operation is read-only (likely, but not stated), or any authentication needs. With no annotations, more transparency would be beneficial.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single clear sentence, front-loaded with the core functionality. No unnecessary words or information, making it efficient for agent parsing.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with two parameters and an output schema, the description covers the basic functionality. It lacks detail on ordering and table identification, but these may be acceptable given the tool's simplicity and the presence of sibling tools for more detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds meaning to the 'n' parameter by mentioning the cap, which is not in the schema. However, it does not explain the 'table' parameter format or constraints. Given 0% schema description coverage, the description partially compensates but could be more thorough.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool returns the first n rows of a table, with a cap. The verb 'return' and resource 'rows of a table' are specific. It effectively distinguishes itself from siblings like describe (schema) or query (complex queries).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance is provided on when to use this tool versus alternatives like query or describe. The context is implied by naming, but explicit when-to-use/when-not-to-use instructions are absent.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

queryA

Run a read-only SQL query (DuckDB dialect) across the loaded tables.

Supports SELECT / WITH / DESCRIBE / SUMMARIZE and JOINs across files. Writes and raw file-access functions are rejected. Results are capped at TABLEBRIDGE_MAX_ROWS; a truncated flag indicates when more rows exist.

ParametersJSON Schema
NameRequiredDescriptionDefault
sqlYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full behavioral burden. It discloses read-only nature, allowed statement types, row cap with truncated flag, and that queries run across loaded tables. This is thorough and transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two sentences: first states purpose, second adds constraints and behaviors. It is front-loaded, concise, and every sentence adds value with no waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema, the description doesn't need to detail return values. It covers parameter usage, allowed/rejected operations, and result cap. For a SQL query tool with one parameter, this is fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description compensates fully. It explains that the 'sql' parameter must be a DuckDB dialect query, specifies supported constructs, and warns against writes. This adds significant meaning beyond the string type.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states the tool runs read-only SQL queries (DuckDB dialect) on loaded tables. The verb 'run' and resource 'read-only SQL query' are specific, and the distinction from siblings is implied by being the general query tool.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Description explicitly states supported (SELECT, WITH, DESCRIBE, SUMMARIZE, JOINs) and rejected (writes, raw file-access) operations. It lacks explicit comparison to siblings like 'describe' or 'preview', but provides clear boundaries.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

refreshA

Re-scan the data directory (pick up added/changed files) and report the count.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It clearly indicates a non-destructive rescan that returns a count, suggesting safe repeated calls. However, it does not explicitly state the lack of side effects or required permissions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence that conveys the core action and output without any wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameterless tool with an output schema (presumably returning a count), the description fully explains the purpose and result. No additional information is necessary.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters in the input schema (0 params, 100% coverage), so baseline is 4. The description does not need to add parameter details.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Re-scan the data directory (pick up added/changed files) and report the count.' It specifies the action (re-scan), resource (data directory), and outcome (report count), clearly distinguishing it from sibling tools like 'describe' or 'list_sources'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when the user wants to detect added/changed files and get a count, but it does not explicitly state when to use this tool versus alternatives (e.g., 'preview' or 'query') or provide conditions when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

server_infoA

Report the effective configuration (data dir, row cap, supported formats).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description does not disclose behaviors beyond reporting configuration (e.g., is it read-only, any side effects). However, the action is clearly non-destructive. No annotations are provided, so the description carries the burden, but it is minimal.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no extraneous information. Every word is necessary and earned.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple info tool with no parameters and an output schema assumed, the description fully covers what the tool does. No additional context is needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, and schema coverage is 100%. The description adds no parameter details, but this is acceptable since no parameters exist. Baseline for zero parameters is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Report' and names the resource 'effective configuration', listing concrete items: data dir, row cap, supported formats. This clearly distinguishes it from sibling tools like describe or query.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit when-to-use or alternatives are mentioned, but the tool's name and description imply it's for checking server configuration. Sibling tools are data-focused, so the usage context is implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 6 tool updatesv0.1.0
    • First observeddescribe
    • First observedlist_sources
    • First observedpreview
    • First observedquery
    • First observedrefresh
    • First observedserver_info

TDQS

A3.9/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: describe for schema, list_sources for table listing, preview for row sampling, query for SQL execution, refresh for data reload, and server_info for configuration. No overlap.

Naming Consistency4/5

Most tools use single imperative verbs (describe, preview, query, refresh) but list_sources uses verb_noun and server_info uses noun_noun. The pattern is mostly consistent but has minor deviations.

Tool Count5/5

With 6 tools, the server covers all core functionalities needed for data exploration and querying without excess or deficiency. The scope is well-matched.

Completeness4/5

The tool set provides essential operations: listing, describing, previewing, querying, refreshing, and configuration. A minor gap could be the absence of a statistical summary tool, but the core workflow is fully covered.

Maintenance

ActivityStale
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    C
    maintenance
    Query SQL databases (SQLite, PostgreSQL, BigQuery, Databricks) in natural language through a business semantic layer — glossary, metrics, and a data dictionary grounded against your real schema. Read-only by default, with an embedded SQLite + sqlite-vec metadata store and no external infra required.
    25
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables AI assistants to query tabular data (CSV/TSV) using natural language with cell-level citations, supporting multi-tenant workspaces, access control, and semantic search.
    27
    MIT
  • A
    license
    Not graded
    quality
    A
    maintenance
    Query local CSV, Parquet, JSON and TSV files with real SQL via DuckDB. Gives your AI coding tool ground-truth data access instead of hallucinated answers.
    4
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables read-only SQL querying and exploration of data files (CSV, Parquet, JSON, Excel, etc.) via DuckDB, supporting local paths, globs, URLs, and S3 buckets.
    5
    MIT

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/Michael-WhiteCapData/tablebridge-mcp'

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