mcpdata Request an invite

Answers / Problems and fixes

ChatGPT's data analysis keeps timing out. What can I do?

Recipe verified on Ran on a private test instance
Short answer

Move the data out of the chat's sandbox into a database the assistant can query. Loading happens once, in the background, sent in parts; after that each question is a query that returns in seconds, however large the table.

Steps

  1. Connect your assistant to your instance (this writes, so it needs your own instance with a ReadWrite key from the accounts portal; the public demo is read-only). In Claude Code:
    claude mcp add --transport http mcpdata https://[you].mcpdata.org/mcp --header "Authorization: Bearer $CDB_API_KEY"

    Replace [you] with your instance's name. Other apps: Connect your AI.

  2. Install the client and sign it in.
    pip install https://[you].mcpdata.org/help/download/cdb-0.3.4-py3-none-any.whl
    cdb-localdata login --to https://[you].mcpdata.org
  3. Load the file once. Here the sample orders_sample.parquet:
    cdb-localdata add ./samples/parquet --to https://[you].mcpdata.org --namespace timeout --name timeout
    cdb-localdata sync
  4. Ask your question. Give your AI this prompt:
    Using mcpdata, revenue by month from timeout.orders_sample.
What your AI does: the tool call it makes for this prompt, and what came back
query(table_name="timeout.orders_sample", group_by=["order_month"], agg=[{"func": "sum", "column": "revenue", "alias": "revenue"}], sort=[{"column": "order_month", "desc": false}]) → 3 rows
What you should get · the recipe's real result from its last run
order_monthrevenue
2023-0122,338,470
2023-0220,706,610
2023-0310,329,609

The assistant needs mcpdata connected (step 1) to run the query.

Why this works

In-chat analysis loads the whole file into a short-lived sandbox for every session, with limits on memory and time. A database does the heavy part once and keeps it. The steps below load the 100,000-row sample, and the query after it runs over the whole table.

Related questions