mcpdata Request an invite

Answers / Explainers

What is a context window and why does it limit data analysis?

Recipe verified on Ran on the public demo (read-only)
Short answer

The context window is how much text a model can hold at once: the conversation, files and tool results together. A large table doesn't fit, and what does fit crowds out everything else. A database keeps the data outside the window, so only the answer to each question has to fit.

Steps

  1. Connect your assistant to the public demo. It's a read-only instance with 10 million synthetic orders, so you can try this before you have your own. In Claude Code:
    claude mcp add --transport http mcpdata-demo https://demo.mcpdata.org/mcp --header "Authorization: Bearer cdb_live_PkVoldus8qcE-hqffjajNZzQwiA7rTHMoR4RLSAxsCE"

    The key is public on purpose: it can only read the demo's sample data. For Claude Desktop, Cursor and other apps, see Connect your AI.

  2. Ask your question. Give your AI this prompt:
    Using mcpdata, total revenue by channel in Demo.Orders.
What your AI does: the tool call it makes for this prompt, and what came back
query(table_name="Demo.Orders", group_by=["channel"], agg=[{"func": "sum", "column": "revenue", "alias": "revenue"}, {"func": "count", "column": "order_id", "alias": "orders"}]) → 3 rows
What you should get · the recipe's real result from its last run
channelrevenueorders
Partner643,704,2381,201,830
Store1,768,785,2243,301,229
Online2,951,801,4565,501,941

Synthetic data: the demo's orders are generated, not real customers.

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

Why this works

Demo.Orders has 10 million rows: far more than any context window. The query below reads all of them in the database and returns three rows, a few hundred characters, to the assistant. That is the whole trick: move the question to the data, not the data to the question.

Related questions