# mcpdata > mcpdata is a hosted database that AI assistants use over MCP (Model Context Protocol). Connect Claude, Cursor or > any MCP client once; the assistant loads files and tables of any size, keeps its own working tables, queries every > row exactly, and builds charts, pivots and scheduled reports. Each instance is encrypted at rest with its own key. Free shared instances are available by invitation. Every answer on this site is a recipe run against a live instance; each page shows the date it last passed. A public read-only demo (10 million synthetic orders) is at https://demo.mcpdata.org/mcp; its API key is printed on the answer pages and can only read sample data. ## Product - [Home](https://mcpdata.org/): what mcpdata is - [Move data](https://mcpdata.org/move-data/): files, Python uploads, agent tables, versions - [Report](https://mcpdata.org/report/): exact queries, saved views, charts, pivots, scheduled reports - [Connect your AI](https://mcpdata.org/connect/): Claude Code, Claude Desktop, Cursor, Python - [Security](https://mcpdata.org/security/): per-instance encryption keys, roles, API keys, audit - [Plans](https://mcpdata.org/plans/): the free plan's limits - [MCP tools](https://mcpdata.org/mcp-tools/): every tool the MCP server offers ([JSON](https://mcpdata.org/mcp-tools.json)) - [Full text of every answer](https://mcpdata.org/llms-full.txt) ## Answers ### Get data into your AI - [My CSV is too large for ChatGPT to analyse. What can I do?](https://mcpdata.org/answers/my-csv-is-too-large-for-chatgpt-to-analyse-what-can-i-do/): Chat assistants analyse uploaded files in a sandbox with limited memory and time, so a large CSV gets cut short or fails. Load the file into a database your AI can query instead: it's loaded once,... - [How do I give an AI assistant access to millions of rows of data?](https://mcpdata.org/answers/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... - [How do I let Claude query a CSV file on my computer?](https://mcpdata.org/answers/how-do-i-let-claude-query-a-csv-file-on-my-computer/): Sync the folder with the CSV to an mcpdata instance with `cdb-localdata`, and connect Claude to that instance. Claude then queries the file as a table. The file is only read, and it stays in step:... - [How do I turn a folder of CSV files into tables my AI can query?](https://mcpdata.org/answers/how-do-i-turn-a-folder-of-csv-files-into-tables-my-ai-can-query/): Point `cdb-localdata` at the folder: every CSV becomes a table named after the file, under a namespace you choose (`shop.orders`, `shop.customers`, ...). Your AI lists them with `list_tables` and... - [How do I load Parquet files so an AI can query them?](https://mcpdata.org/answers/how-do-i-load-parquet-files-so-an-ai-can-query-them/): Sync the folder with `cdb-localdata`, the same as CSV: each `.parquet` file becomes a table, with its column types kept. Your AI queries it over MCP with exact results. ORC files work the same way. - [How do I load an Excel workbook into a database my AI can use?](https://mcpdata.org/answers/how-do-i-load-an-excel-workbook-into-a-database-my-ai-can-use/): Sync the folder with the workbook using `cdb-localdata`: each sheet becomes a table named `..`. Your AI then queries the sheets like any table, over all their rows. - [How do I load every sheet of an Excel file as separate tables?](https://mcpdata.org/answers/how-do-i-load-every-sheet-of-an-excel-file-as-separate-tables/): `cdb-localdata` does it by default: every sheet of every workbook in the folder becomes its own table, `..`. Sync once and your AI sees one table per sheet. - [How do I keep a daily snapshot of a CSV export so my AI can compare days?](https://mcpdata.org/answers/how-do-i-keep-a-daily-snapshot-of-a-csv-export-so-my-ai-can-compare-days/): Save each day's export with its date in the file name in one folder, and mark that folder as a history folder. `cdb-localdata` then loads every file as a dated version of a single table, so you... - [How do I upload a pandas DataFrame so Claude can query it?](https://mcpdata.org/answers/how-do-i-upload-a-pandas-dataframe-so-claude-can-query-it/): Write it with the `cdb` client: `s.write_table("name", df)`. It becomes a table Claude can query over MCP straight away, and `replace=True` swaps in a new version later while keeping the old one. - [How do I give Claude a persistent memory table?](https://mcpdata.org/answers/how-do-i-give-claude-a-persistent-memory-table/): Let Claude create its own table with the `create_table` tool (names under `agent.*`) and add to it with `append_rows`. What it writes is still there in the next conversation, for Claude and for... ### Report with AI - [How do I get Claude to make a weekly sales report from my data?](https://mcpdata.org/answers/how-do-i-get-claude-to-make-a-weekly-sales-report-from-my-data/): Ask Claude to save the weekly query as a view (`create_view`), turn it into a report with a chart (`create_report`), and run it (`run_report`). The report re-queries the view every time, so next... - [How do I email a report every Monday morning automatically?](https://mcpdata.org/answers/how-do-i-email-a-report-every-monday-morning-automatically/): Make the report once (a saved view plus `create_report`), then ask your AI to schedule it with the cron `0 8 * * 1`: every Monday at 08:00 UTC it re-runs the view and emails the result to the... - [How do I get an AI to make a chart from my data?](https://mcpdata.org/answers/how-do-i-get-an-ai-to-make-a-chart-from-my-data/): Ask it to summarise the data into a view and create a report with a chart on top: `create_report` with `chart = {"chart": "bar", "x": ..., "y": ...}`. Bar, line, area, scatter, pie and histogram... - [How do I pivot data by month and region with AI?](https://mcpdata.org/answers/how-do-i-pivot-data-by-month-and-region-with-ai/): Ask for the value grouped by both month and region: one query returns a row per month and region, which is a pivot table once the regions become columns. Your AI can lay it out, and a saved report... - [How do I export a report as Excel from an AI conversation?](https://mcpdata.org/answers/how-do-i-export-a-report-as-excel-from-an-ai-conversation/): Ask your AI to create the report with `format = "xlsx"`. Each run renders the view to an Excel file, which is attached when the report is emailed (`run_report` with recipients, or on a schedule). - [How do I make an HTML report from a query?](https://mcpdata.org/answers/how-do-i-make-an-html-report-from-a-query/): Save the query as a view, then `create_report` with `format = "html"` (the default). Running it renders a self-contained HTML page: a title, an optional chart, and the table of results. - [How do I stop my AI making up numbers when analysing data?](https://mcpdata.org/answers/how-do-i-stop-my-ai-making-up-numbers-when-analysing-data/): Give it a database to query and ask it to answer only from query results. Numbers then come from the database (sums and counts over every row), and the tool call and its result are there to check,... - [Why does my AI give different answers to the same data question?](https://mcpdata.org/answers/why-does-my-ai-give-different-answers-to-the-same-data-question/): When an AI reads data as text, each answer is a fresh estimate, so it can change from one try to the next. When it queries a database, the number comes from the query: run the same query twice and... - [How do I make a line chart of monthly totals with Claude?](https://mcpdata.org/answers/how-do-i-make-a-line-chart-of-monthly-totals-with-claude/): Ask Claude to save a monthly-totals view and create a report with a line chart over it (`chart = {"chart": "line", "x": "order_month", "y": "revenue"}`). Running the report draws the chart from... - [How do I see whether my scheduled report ran?](https://mcpdata.org/answers/how-do-i-see-whether-my-scheduled-report-ran/): Ask your AI for the report's run history: `list_report_runs` returns every run, newest first, with its status (ok, failed or running), the number of rows, how long it took and any error. ### Analyse data - [How do I get monthly totals from daily data with AI?](https://mcpdata.org/answers/how-do-i-get-monthly-totals-from-daily-data-with-ai/): Ask your AI to group the rows by month and sum the value column, and give it a database to do it in. Over MCP it sends one structured query (group by the month, sum the revenue) and gets back one... - [How do I find the top 10 customers by revenue with AI?](https://mcpdata.org/answers/how-do-i-find-the-top-10-customers-by-revenue-with-ai/): Have your AI group the orders by customer, sum the revenue, sort it descending and keep ten rows. With a database behind it that's one query over every order, so the ranking is exact even with... - [How do I calculate totals by week?](https://mcpdata.org/answers/how-do-i-calculate-totals-by-week/): Group by a week column and sum. In the demo every order carries `order_week` (ISO weeks such as `2025-W10`), so your AI asks for revenue and order counts per week in one query and gets a row per week. - [How do I compare two time periods in one query?](https://mcpdata.org/answers/how-do-i-compare-two-time-periods-in-one-query/): Filter to both periods and group by the period as well as what you're comparing. Your AI asks for revenue by region for 2024 and 2025 in one query and gets a row per region and year, ready to put... - [How do I calculate an average per group?](https://mcpdata.org/answers/how-do-i-calculate-an-average-per-group/): Ask for the average of the value column grouped by the category you care about. Your AI sends `avg` with a group-by and gets one exact average per group, here the average order value per sales channel. - [How do I find duplicate rows in a large table?](https://mcpdata.org/answers/how-do-i-find-duplicate-rows-in-a-large-table/): Count rows per key and look for counts above one. Your AI groups by the id column, counts, and sorts the counts descending: any id with a count of 2 or more is duplicated. On a very large table,... - [How do I see which rows changed between two versions of a table?](https://mcpdata.org/answers/how-do-i-see-which-rows-changed-between-two-versions-of-a-table/): Read both versions at once with `AS OF ALLVERSIONS BETWEEN` the two dates, group by the row's key, and keep the keys whose values differ (`MIN(x) <> MAX(x)`) or that appear in only one version... - [How do I find the min and max per group?](https://mcpdata.org/answers/how-do-i-find-the-min-and-max-per-group/): Ask for `min` and `max` of the column with a group-by. Your AI gets the lowest and highest value per group in one query, here the smallest and largest order per product category, with the order count. ### Connect your AI - [How do I connect Claude Desktop to a database?](https://mcpdata.org/answers/how-do-i-connect-claude-desktop-to-a-database/): Add a database's MCP server to Claude Desktop's config file. For mcpdata that's a remote server (`https://[you].mcpdata.org/mcp`) with your API key, reached through the `mcp-remote` bridge; after... - [How do I connect Claude Code to a database?](https://mcpdata.org/answers/how-do-i-connect-claude-code-to-a-database/): Run `claude mcp add` with the database's MCP address and your key as a header. For mcpdata: `claude mcp add --transport http mcpdata https://[you].mcpdata.org/mcp --header "Authorization: Bearer... - [How do I connect Cursor to a database?](https://mcpdata.org/answers/how-do-i-connect-cursor-to-a-database/): Add the database's MCP server to `~/.cursor/mcp.json` (or `.cursor/mcp.json` in a project) with its URL and your key as a header. For mcpdata that's `https://[you].mcpdata.org/mcp` with... - [How do I add a remote MCP server to Claude Desktop?](https://mcpdata.org/answers/how-do-i-add-a-remote-mcp-server-to-claude-desktop/): Two ways. Servers that support sign-in (OAuth) are added under Settings, Connectors, Add custom connector, with just their URL. Servers that use an API key go in `claude_desktop_config.json`... - [Is there a hosted MCP server for databases?](https://mcpdata.org/answers/is-there-a-hosted-mcp-server-for-databases/): Yes: mcpdata is a hosted database with its MCP server built in, at `https://.mcpdata.org/mcp`. There's nothing to install or run: connect your assistant with the address and a key, and... - [Which MCP server lets an AI write to a database?](https://mcpdata.org/answers/which-mcp-server-lets-an-ai-write-to-a-database/): mcpdata's MCP server has write tools: `create_table`, `append_rows` and `replace_rows`, for tables under `agent.*`, with a ReadWrite key. The AI keeps its own logs, snapshots and state there; a... - [How do I use the same data from Python and from my AI?](https://mcpdata.org/answers/how-do-i-use-the-same-data-from-python-and-from-my-ai/): Point both at the same instance: your AI over MCP, Python with the `cdb` client and the same address. They read the same tables, so the number in your notebook and the number in the AI's answer... ### By industry - [How do I let AI analyse trading positions and risk?](https://mcpdata.org/answers/how-do-i-let-ai-analyse-trading-positions-and-risk/): Load the positions into a database (one version per business day) and connect your AI to it. It can then total exposure by desk, find the largest positions, and compare days, with every figure... - [How do I see what my positions looked like on a past date?](https://mcpdata.org/answers/how-do-i-see-what-my-positions-looked-like-on-a-past-date/): Keep each day's positions as a dated version of one table, then query it `AS OF` that date: `SELECT ... FROM risk.book AS OF LASTDATA BETWEEN #2026-10-01# AND #2026-10-01#` returns the book as it... - [How do I keep every version of a table so I can audit changes?](https://mcpdata.org/answers/how-do-i-keep-every-version-of-a-table-so-i-can-audit-changes/): Write each change as a new version instead of overwriting: every load, sync or `replace_rows` in mcpdata is kept, with its time. `AS OF ALLVERSIONS` reads all of them at once, so "when did this... ### Explainers - [What is MCP (Model Context Protocol)?](https://mcpdata.org/answers/what-is-mcp-model-context-protocol/): MCP is an open protocol that lets an AI assistant use outside tools and data: a server lists the tools it offers (with their arguments and descriptions), and the assistant calls them and reads the... - [What is the difference between an MCP server and an API?](https://mcpdata.org/answers/what-is-the-difference-between-an-mcp-server-and-an-api/): An API is made for programs that already know how to call it; an MCP server is made for an AI to discover and use by itself. It describes each tool in words (what it does, what each argument... - [What is a context window and why does it limit data analysis?](https://mcpdata.org/answers/what-is-a-context-window-and-why-does-it-limit-data-analysis/): 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... - [What is the difference between giving AI a file and giving it a database?](https://mcpdata.org/answers/what-is-the-difference-between-giving-ai-a-file-and-giving-it-a-database/): A file is read: the assistant takes in as much as fits and reasons over that. A database is queried: the assistant asks questions and the database computes the answers over every row. Files suit... - [Is it safe to let AI query my data?](https://mcpdata.org/answers/is-it-safe-to-let-ai-query-my-data/): It can be, if access is controlled: give the assistant a key with only the role it needs (Read can't change anything), limit the key to known addresses and an expiry date, and keep an audit log.... - [How do I give an AI read-only access to data?](https://mcpdata.org/answers/how-do-i-give-an-ai-read-only-access-to-data/): Give it an API key with the Read role. In mcpdata, a Read key can list, describe and query tables and run saved views, and every tool that writes (tables, views, reports, exports) refuses it. Make... ### Problems and fixes - [Claude says the conversation is too long after I paste data. What now?](https://mcpdata.org/answers/claude-says-the-conversation-is-too-long-after-i-paste-data-what-now/): Stop pasting the data and let Claude query it instead. Load it once into a database connected over MCP; Claude then asks for totals or the rows it needs, and only those come into the conversation,... - [My AI only analysed the first few thousand rows. Why?](https://mcpdata.org/answers/my-ai-only-analysed-the-first-few-thousand-rows-why/): Raw rows come back in pages, and an assistant that reads rows instead of asking for totals sees only the first page. Ask for the summary instead (group and aggregate in the query) and check the... - [My AI invented a column that isn't in my data. How do I stop it?](https://mcpdata.org/answers/my-ai-invented-a-column-that-isn-t-in-my-data-how-do-i-stop-it/): Make it look before it asks: `describe_table` lists the real columns and their types. And query through a database, which refuses a column that doesn't exist with an error, instead of letting the... - [ChatGPT's data analysis keeps timing out. What can I do?](https://mcpdata.org/answers/chatgpt-s-data-analysis-keeps-timing-out-what-can-i-do/): 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... ### Comparisons - [Uploading files to ChatGPT vs connecting a database: which is better for analysis?](https://mcpdata.org/answers/uploading-files-to-chatgpt-vs-connecting-a-database-which-is-better-for-analysis/): Uploading a file is quicker for a one-off look at a small file. Connecting a database is better once the data is large, used again, shared, or needs exact numbers: it's loaded once, every question... - [Spreadsheet vs database for AI analysis: when should I switch?](https://mcpdata.org/answers/spreadsheet-vs-database-for-ai-analysis-when-should-i-switch/): Switch when the spreadsheet stops being the easy option: more rows than it opens comfortably, several files that should be one table, numbers you need the AI to get exactly right, or a report you...