Connect an agent
exploreda mcp is an MCP server for AI agents such as Claude Code, Cursor, or Codex. Add it to your agent once, with the project folder:
claude mcp add exploreda -- npx exploreda mcp /path/to/folderFor an agent that reads an mcpServers JSON block, such as Cursor or Claude Desktop:
{
"mcpServers": {
"exploreda": {
"command": "npx",
"args": ["exploreda", "mcp", "/path/to/folder"]
}
}
}The agent then works on the same folder as the app:
- If
exploredaalready runs on the folder, the agent joins it. Every analysis the agent saves shows up in your open tab. - If nothing runs, the agent's first call starts a server and prints its link in the agent's log. Open the link to watch the agent's work. That server stops when the agent does.
- Restart
exploredaas often as you like, on any port. The agent finds the new server on its next call.
Leave out the folder to use the folder the agent starts in. Add --example to work on the sample shop project.
How the agent finds the server
Each exploreda run writes .exploreda/server.json with its port and its key. Only your user account can read the file, .exploreda/.gitignore keeps it out of Git, and a clean stop removes it. The app's file list never shows it.
You can also connect over HTTP without exploreda mcp. The server answers at /mcp on its own port, and the key is the token= in the link it prints:
claude mcp add --transport http exploreda http://127.0.0.1:3939/mcp --header "Authorization: Bearer <token>"That key changes on every run, so exploreda mcp is the easier choice.
What the agent can do
| Tool | What it does |
|---|---|
project | Shows the folder at a glance: the project text's path, each source with its file and row count, the queries, every analysis and notebook, the data files. |
fields | Lists each query's fields as an analysis names them, such as orders.amount, with types and example values. |
reference | Returns the dashboard grammar, the project and notebook grammar, or every setting of one chart, such as hist. |
check | Builds an analysis's text against your data without saving it, and returns its views, chart counts, and each problem with its fix. |
add_data | Adds a data file from a local path, rows the agent sends, or a CSV or JSON address, and a source for it in the project text. |
summarize | Returns a query's real numbers: rows grouped by a field and counted or measured, largest first, with an optional filter such as orders.amount > 100. The agent uses it to check a chart or to cite figures. |
read_eda | Returns a file's text and its version. |
write_eda | Saves an analysis (.eda), a notebook (.eda.md), or the project text (exploreda.eda), then returns what check returns. |
rename_eda | Moves an analysis or notebook to a free path. |
delete_eda | Deletes an analysis or notebook. It never deletes the project text. |
format | Indents and tidies text the way the app saves it, without saving. |
describe | Lists each view's query, row count, and charts, the charts that were skipped, and every problem. |
submit_feedback | Reports a problem with these tools, with a proposed fix, as a file under .exploreda/feedback/. |
An agent works in a loop: it reads the fields and the grammar, writes an analysis, and fixes each problem the result lists until the analysis is complete. Everything it saves is ordinary dashboard text that you can open, edit, and commit.
Part of a real check result, from an agent whose second view named the wrong query's field:
{
"path": "product-mix.eda",
"complete": false,
"views": [
{ "name": "Large orders", "query": "order-lines", "charts": 1 },
{ "name": "Product mix", "query": "item-lines", "charts": 3 }
],
"charts": 4,
"problems": [
{
"path": "product-mix.eda",
"line": 4,
"column": 30,
"severity": "warning",
"message": "orders.channel is not a field, alias, or calculation, so group @largeShare (line 4) has no group field.",
"fix": "Did you mean order.channel?"
}
]
}write_eda returns the same, with the path it saved and the file's new version. When something builds but would read poorly, such as two charts with the same title, the result also has notes.
You and the agent can edit at the same time
The open app shows each file the agent saves, renames, or deletes within about a second.
To change a file that already exists, the agent sends the version that read_eda gave. If you edited the file since then, the agent's change is refused and your edit stays on disk. The agent then reads the file again and merges its change. A new file needs no version.
When the agent writes the project text in a folder that has none, it goes where the app would put it: exploreda.eda, or .exploreda/project.eda when the server runs with --hidden.
Start a project from data
An agent can start from an empty folder. add_data takes one of three kinds of data:
from: the full path of a CSV or JSON file on this computer. It copies the file into the folder.rows: CSV text, JSON text, or an array of rows that the agent writes itself.- Nothing but
path: for a data file already in the folder. It adds the source and leaves the file alone.projectlists such files asunsourced. url: the address of a CSV or JSON file. The project text records where it came from, as# data/sales.csv fetched from <address> on <date>above the source line.
Each call writes the file where the agent names it, such as data/sales.csv, and adds a source for it to the project text, which it creates if needed. The result lists the new source's fields, ready for an analysis that starts with eda query=sales.
add_data never replaces a file. It refuses a file over 100 MB, a web page, an address that redirects more than five times, and an address that doesn't answer in 30 seconds. A refused call writes nothing.
An example session
A real session, from an empty folder with exploreda open on it. The request: start from the shop's orders CSV, then build a dashboard of revenue by channel, orders per month, and the spread of order amounts.
-
add_datawithpath: "data/orders.csv"and the CSV's address. It saved 80 rows, wroteexploreda.edawith a source namedorders, and returned its fields:orders.channel,orders.orderedAt,orders.amount, and two IDs. -
reference, thenreferenceforlineandrow, to learn the grammar and those charts' settings. -
write_edaoforders.eda, which came back complete on the first try:Texteda query=orders dashboard "Orders" group @revenueByChannel sum(orders.amount) by=orders.channel metric @revenue sum(orders.amount) title="Total revenue" row @byChannel orders.channel group=revenueByChannel title="Revenue by channel" line @perMonth x=orders.orderedAt { time.interval=month time.aggregation=count } hist @amounts orders.amount bins=20 title="Spread of order amounts" -
describeoforders.eda, to confirm each chart built on 80 rows.
The open tab showed the new data and the dashboard as each file saved. The session took six tool calls and 15 seconds. The text above is shortened; the saved file also has an order count, a box plot, and a layout.
Read the agent's feedback
When a tool confuses the agent or lacks something it needs, the agent saves a short report in .exploreda/feedback/: what it called, what came back, and the change it proposes. Read these files to see where the tools fall short for your data.