MCP Server for Claude Code and AI Clients

Your spreadsheets become available to Claude Code, Claude Desktop and any AI client that speaks the Model Context Protocol. Claude reads the numbers and edits the cells, and your users watch the changes arrive in real time.

icon jspreadsheet

Published on October 5, 2026

Introducing

The Model Context Protocol is how AI clients discover and call tools. Claude Code, Claude Desktop, IDE assistants and agents built on the MCP SDKs speak it. @jspreadsheet/mcp turns Jspreadsheet Server into an MCP server: those clients list, read, create and edit your documents.

The server already holds the live copy of every document. MCP is one more door into it, next to the browsers and the REST API, behind the same authentication and the same rules.

An AI client connected to Jspreadsheet Server through MCP

One line on each side

On the server, register the extension next to the API:

const mcp = require('@jspreadsheet/mcp');

server({
    // ...
    extensions: { api, mcp },
});

In the AI client, point at /mcp with a token:

claude mcp add --transport http sheets https://sheets.example.com/mcp \
  --header "Authorization: Bearer <token>"

Claude Desktop and other clients take the same URL and header in their configuration. From then on, "summarize the Q3 sheet", "add a column with the margin" or "create a budget for the offsite" run on the real documents.

What the tools do

The extension publishes the spreadsheet as a catalog of tools:

  • Documents: listSpreadsheets, createSpreadsheet, destroySpreadsheet.
  • Reading: getConfig for the structure, getData for the values, with calculated formula results, the selection only, or filtered rows.
  • Writing: setValue for values and formulas, bulk writes with setData, setRowData and setColumnData, and paste for a 2D block.
  • Structure and presentation: rows, columns, worksheets, headers, column options, cell properties, styles, and charts, images and shapes with setMedia.

Read-only tools carry the MCP readOnlyHint annotation and the delete tool destructiveHint, so a client that auto-approves safe tools can tell them apart.

Authentication and permissions

The Authorization header on every tool call flows into the hooks that guard browsers and REST. beforeLoad decides what the client may open. beforeChange decides what it may modify. An AI client has the permissions of its token, no more.

Writes take the path a person's edit takes: validated, applied to the live document, persisted by your adapter, broadcast. Anyone with the document open sees the assistant's edits land as it works.

When to use MCP, the agent or REST

AI and code reach a document in three ways, all on the same live copy, so they mix:

  • MCP when the AI lives outside your product: a developer's Claude Code, an analyst's desktop assistant, an automation on an agent framework.
  • The server agent when the AI lives inside your product: a chat next to the spreadsheet, with your quotas, your sessions and your model.
  • The REST API when the caller is ordinary code: a sync job, an import, a webhook.

Useful links

MCP Server documentation
AI with Jspreadsheet Server
REST API routes