Chat with your spreadsheets in Claude
Using GRID API as an MCP tool.
Matt Riggott23 January 2025 · 6 min read
For many of us, LLMs have become an essential tool. The more we use them, the more we want to do with them. Instead of asking questions in isolation, we want these tools to be able to answer questions based on the data we have. Since spreadsheets run the world, it’s only natural that we want LLMs like Anthropic’s Claude to have access to our spreadsheet data and calculations seamlessly.
At GRID, we’ve developed an API that enables you to interact with spreadsheets over HTTP. Imagine integrating this API into a conversation with Claude: you could simply ask "What were the total sales for April?" or "If we manage to reduce churn to 2%, how will that impact 2025 revenue?", and Claude would fetch the answer directly from your spreadsheet. This is precisely what’s possible by connecting Claude to a Model Context Protocol (MCP) server, allowing interaction with your spreadsheets via GRID’s API.
In this tutorial, we’ll extend Claude’s desktop app so that it can write to cells, read cell values, and evaluate formulas in your spreadsheets. Here’s how to set it up step by step.
What you need
Before diving in, gather the essentials:
Ensure you have Claude for Desktop installed and updated
Install Git and Node.js. Git is your trusty tool for getting the MCP server’s code from GitHub, while Node.js runs the JavaScript server on your machine
Sign up for GRID, upload a spreadsheet, and keep your GRID API key handy
Setting up the local MCP server
With the prep done, it’s time to set up a local Node.js server that understands how to speak to GRID’s spreadsheet API. Open your terminal and navigate to whichever directory you use for development projects. You might keep everything nicely organised in a Development folder, you might throw it all on your Desktop. Whichever it is, the important bit is that you know where you’ve put it.
Once you’ve settled on a location, you need to get a copy of the MCP server code. Run:
git clone https://github.com/GRID-is/claude-mcp.git
Head into the new project folder:
cd claude-mcp
And install the project:
npm install
As well as installing all the project’s dependencies, this will also build the server. After it’s finished you’ll have a new sub-directory named dist. A file in there, dist/index.js, is the entrypoint that will let Claude connect to GRID.
Configuring Claude to use the MCP server
With your server ready to go, you need to tell Claude how to use it. Fire up Claude for Desktop and look for an option in its menus to access Developer settings — on MacOS it’s in the main Claude menu, under Settings and in the Developer tab. There, you should see a button labelled “Edit Config”. Click it, and you’ll either open an existing config file or create a fresh one.
Alternatively, you can access the config file directly. On MacOS you’ll find it at ~/Library/Application\ Support/Claude/claude_desktop_config.json, while on Windows you'll find it at %APPDATA%\Claude\claude_desktop_config.json.
In that file, you need to include JSON that tells Claude that when it wants to do spreadsheet things, it should use this Node.js script and this API key:
Make sure to change /ABSOLUTE/PATH/TO/claude-mcp to the real location of the Git repo, and YOUR_API_KEY to your GRID API key.
Save the config file and make sure to restart Claude for Desktop. Once you’ve done that, you’ll see a small hammer icon to the bottom-right of Claude’s chat interface, as shown in the screenshot below. The “3” next to the hammer tells you that Claude has three new tools to play with, all for reading and writing spreadsheets via GRID’s API.

Click the hammer icon and to see full details of the three tools. These represent the endpoints your MCP server provides, the most important of which is the query_workbook endpoint. This allows you to read and write from spreadsheet cells. If you don’t see any new tools, double-check that the path in your config is accurate and you haven’t inadvertently told Claude to look in your cat photos folder.

Chatting with a spreadsheet
Now for the good part: actually asking a question and watching Claude spring into action. Initiate a new chat in Claude and try a simple prompt along the lines of:
Please tell me the value in cell C7 from workbook id XXX.
(XXX is the GRID spreadsheet id, which you can find in your list of spreadsheets.)
You should see Claude mention it’s about to run the query, and then ask for permission to talk to the MCP server (“Allow tool from ‘grid’ (local)?”). Click “Allow for This Chat”, and then Claude with talk to your MCP server, the server will talk to GRID’s API, grab the data, and return it. Voilà: the value in cell C7 will appear in your chat.

For an encore, you can have your MCP perform spreadsheet calculations as well, applying values to input cells and returning calculated results. You might say:
Change the value in cell C7 to 42, and tell me what’s in cell C9 afterwards.
Your server will do precisely that, returning the calculated values a moment later.

Troubleshooting
Of course, it’s all fun and games until something goes awry. If you don’t see any new tools in Claude after you restart, first confirm you’re running the latest version of Claude, that the path to your server file (the absolute location of claude-mcp/dist/index.js) is correct, and that the config file you're editing is indeed the right one. If you encounter authorisation errors, consult Claude's log directory (for instance ~/Library/Logs/Claude on MacOS) to see if any complaints have been logged. You'll also want to check your GRID API key is valid.
What next?
By connecting Claude to GRID’s spreadsheet API through an MCP server, you’ve made it possible to query, update, and analyse workbook data simply by asking questions. But this is only scratching the surface. If you want to take things further, here are a few ideas:
Develop richer LLM instructions: Going further than simple questions, you can provide more context in chats. For example, if cell C7 is labelled “Yearly sales target”, you should be able to use that label in chats (“What’s the yearly sales target?” instead of “What’s in cell C7?”). When you add a spreadsheet to GRID’s API environment, instructions for LLMs — including labels for cells — are auto-generated. To find them, select your spreadsheet in the API environment and click GPT setup in the sidebar.
Create a project to bundle instructions and spreadsheets: a Claude project combines instructions, cell labels, and information about your workbook into a tidy package. You can then chat within the project without needing to specify workbook ids or cell references, making your interactions easier to write and understand.
Explore advanced formulas and analysis: GRID is a full spreadsheet engine, supporting over 600 formula functions. This gives you powers beyond simply reading and writing cell values — it means Claude can evaluate formulas for complex calculations.
Combine all these and you can start to phrase queries in your own words: “What’s the average monthly revenue over the last two years, and in which months did we achieve the highest and lowest sales?” Using your MCP server Claude can interpret references, evaluate formulas, do almost everything Excel can do — all within a chat interface.
Wrapping up
With a few shell commands and a little bit of tinkering, you’ve transformed Claude for Desktop into a powerful tool for managing spreadsheets. Using a local MCP server and GRID’s API, Claude can fetch data, update cells, and perform complex calculations — all from within a conversational interface. Instead of rummaging through various windows in Excel, you can now ask questions and receive instant answers. It’s a small change that might leave your colleagues green with envy.
Happy querying!
News
Updates and announcements
27.11.2026
The Python was right. The spreadsheet was wrong.
On 400 spreadsheet tasks, the agent without an engine scored 78% and the agent with GRID scored 90.75%. When we required formulas where the reference workbook had formulas, the same workbooks scored 54.25% without an engine and 87% with GRID.
19.11.2026
How AI builds a spreadsheet: openpyxl, then 430 MB of LibreOffice
In September, Simon Willison went poking around his disk and found 1.7 GB of runtime inside OpenAI's Codex desktop app, since renamed ChatGPT. Next to Python, Node and git sat a complete headless LibreOffice: 430 MB of office suite, shipped so the agent can work with documents. This did not surprise us. We have watched this pipeline since the first AI spreadsheet experiments, and it is still how most of the industry builds spreadsheets with AI. It made sense as a stopgap. It doesn't anymore: next to an engine built for the job, it is less accurate, far slower and more than a hundred times bigger. The recipe Ask an AI agent for an Excel model and it will almost always write the file with openpyxl, the Python library all over its training data. openpyxl writes formulas but cannot calculate them, so the formula cells hold no values. Anything that reads the stored values sees blanks: the Python data library pandas, file previews, and the agent itself, checking its own work. And the model writes formulas the way a person types them, not the way Excel stores them. Leave out the _xlfn. prefix Excel expects on XLOOKUP inside the file and the cell opens in Excel as #NAME?. Write a LET without its _xlpm. prefixes, or a spill reference like A1#, and Excel greets the whole file with "We found a problem with some content". So the pipeline needs something to calculate the file, and the answer is nearly always LibreOffice. Anthropic's public xlsx skill runs LibreOffice to recalculate the workbook. Alibaba's QwenPaw agent ships an adapted copy of the same script. Moonshot's Kimi checks its files against LibreOffice's recalculation, according to an extracted copy of its skills. OpenAI bundles the whole suite into its desktop app. LibreOffice is free, it is already there, and it opens xlsx. None of that means it calculates like Excel. So how close does it get? Missing one case in eight Last week we published the GRID Spreadsheet Benchmark: over 100,000 test cases from eight open source test suites, 13 engines, every case checked against Excel itself. LibreOffice matches Excel on 87.4% of them. That sounds respectable, and LibreOffice Calc is a good spreadsheet app. The test is deliberately hard: it is built from edge cases, not the SUMs that fill most of a real model. But edge cases are where a model goes quietly wrong, matching Excel on them is a high bar, and the last few percent are where the hard work is. 87.4% is 126 misses in every 1,000 cases. The GRID engine gets 1.2 wrong. LibreOffice isn't sloppy. It is a different spreadsheet app with its own opinions. On its own project's test suite it agrees with Excel only about 84% of the time, because many of those tests expect LibreOffice's answer: it converts units Excel has never heard of, and it finds interest rates where Excel gives up with #NUM!. Of the nearly 500 Excel functions in the benchmark, only 16 pass every test in LibreOffice. In GRID, 439 do. Then the tool starts dictating the spreadsheet. Anthropic's skill tells the model to never use XLOOKUP, XMATCH, SORT, FILTER, UNIQUE or SEQUENCE, saying the LibreOffice it runs can't evaluate them. LibreOffice has handled them since 2024, but the rule stands: the agent builds an older, worse spreadsheet to suit its calculator. "We found a problem with some content" In most of these pipelines, when LibreOffice recalculates a file, it also saves it, and it saves it the way LibreOffice understands it. Usually the file still opens in Excel. Sometimes it doesn't. Take the sensitivity table, a fixture of every financial model: a what-if data table showing, say, the implied share price under different WACC and terminal growth assumptions. Put a workbook with one through a pipeline that saves through LibreOffice, like QwenPaw's, open it in Excel, and you get "We found a problem with some content". LibreOffice has written the table back as a formula Excel doesn't have. Click Yes, and Excel repairs the file by turning every cell of the table into a fixed number. The numbers are right for today's inputs. Change the WACC and nothing moves. The model still looks finished. It just stopped being a model. Anthropic's skill was recently changed to recalculate on a copy and write only the values back into the file. That is a sensible patch, and an admission that LibreOffice can't be trusted to save the file. It is still trusted to calculate it, and to tell the agent the file is fine. That trust is misplaced too, because LibreOffice waves through problems it didn't cause. Ask an agent for a table with years as column headings, 2025 and 2026, as in nearly every financial model. openpyxl writes the headings as numbers, and Excel requires table headings to be text. Name a table Q1 and it is the same story, since Excel reads that as a cell address. LibreOffice opens these files, recalculates them without complaint and saves them. The agent's check passes. Excel opens the file with "We found a problem with some content". 430 MB and a second and a half Even when it gets the answer right, LibreOffice is the wrong shape for the job. Every check boots a desktop office suite in headless mode, loads the file, calculates, and writes the file back. On nearly 1,800 benchmark workbooks, run on the same machine, that took a median of 1.6 seconds per workbook. The GRID engine took 18 milliseconds, and it doesn't need to save: it holds the workbook in memory and writes the file once, when the agent is done. These are small workbooks, so most of that time is LibreOffice starting up, and today's agent skills pay it on every check. Anthropic's starts it twice. The obvious fix is to keep it running. In a separate test it still took about 80 milliseconds per workbook, and now the client keeps an office suite running in the background whenever a spreadsheet might come up in any thread. Then there is the weight. ChatGPT's headless LibreOffice is 430 MB. The GRID engine is a 3.5 MB package that runs in process, in Node or in the browser. The embedded LibreOffice may actually be doing other jobs too, like rendering documents and converting them to PDF. But those jobs have lighter tools as well. SuperDoc builds, edits and renders Word documents in the browser: an engine for DOCX, the way GRID's is for XLSX. A couple of small JavaScript libraries turn DOCX into PDF without a desktop suite. However you slice it, 430 MB of LibreOffice in a client is a kludge. Calculate it right AI is about to write more spreadsheets than people ever did. Those files will be opened in Excel, sent to clients and used for decisions, and Excel is where the numbers are checked. If an agent's model shows one figure and the same file shows another in Excel, the user doesn't conclude that LibreOffice and Excel differ on a corner case. They conclude the AI got it wrong. They start rechecking every number, and they stop trusting the next model before they open it. One wrong cell is enough to spend the trust that was supposed to save them the work. The GRID engine calculates the way Excel does, in milliseconds, without an office suite attached. The benchmark and its harness are open, so check the numbers. If you build agents that write spreadsheets, talk to us.