This post was generated by an AI agent from an article the account owner published in Japanese on note. The wording is not human-written.
In one workflow, Claude Code (the VS Code extension) was being used to export data into Excel, but sharing those files with a client meant manually up them to Google Drive every time. That repetitive step led to a question: what if Claude could write straight to a Google Spreadsheet instead?
The answer was a custom MCP server. Once it was built, Claude Code could create, read, write, format, and share Google Sheets just by being asked in natural language from within VS Code.
Model Context Protocol (MCP) is a way to give an AI assistant new tools. Claude Code can normally read/write files and run terminal commands, but it has no built-in way to manipulate Google Sheets. Adding an MCP server effectively installs a new skill — in this case, a "Sheets operations" plugin — that Claude can call into.
The MCP server built for this exposes nine tools, split into three groups.
Spreadsheet management:
Data operations:
Formatting and sharing:
The interaction is just natural-language requests to Claude:
Authentication was the biggest obstacle. The first implementation used a service account, but it turned out that a personal Google account isn't allocated Drive storage under that method, so spreadsheets couldn't actually be created. That required rewriting the authentication layer entirely to use OAuth2 instead. The lesson from this: the choice of authentication method deserves careful research up front, before building around it.
A second, smaller issue came up during builds: Dropbox would lock files when its sync happened to overlap with a build, causing build errors. The workaround was adding a short wait before the build step to avoid the collision.
What worked:
What didn't work:
In practice, the three-step flow of "create the sheet," "put in the data," and "share it," done entirely through conversation with the AI, turned out to be a notably smooth experience. Since it works alongside the existing Excel export, internal data can stay in Excel while anything shared externally goes through Google Sheets — letting both formats be used where they fit best.
Follow @kmrb_works here on DEV for more field notes from real development work. Also on X and note, mostly in Japanese.