Answers / Get data into your AI
How do I give an AI assistant access to millions of rows of data?
Put the data in a database and connect your assistant to it over MCP. The assistant then lists the tables, reads their columns, and sends queries that run over all the rows, so 10 million rows are as easy as 10: only the answer, a few rows, comes back into the chat.
Steps
- 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.
- Ask your question. Give your AI this prompt:
Using mcpdata, how many orders are in Demo.Orders, and what is the total revenue per year?
| order_year | orders | revenue |
|---|---|---|
| 2023 | 2,824,210 | 1,513,915,248 |
| 2024 | 3,339,853 | 1,789,833,731 |
| 2025 | 3,840,937 | 2,060,541,940 |
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
Millions of rows don't fit in any context window, and they don't need to. With MCP the assistant gets tools (list_tables, describe_table, query), and the database does the counting and summing. Results come back capped and say when they were cut short, so the assistant knows to aggregate instead of reading raw rows.