SocialCalc MCP
Let any AI agent read, edit, style and analyse spreadsheets.
A Model Context Protocol server for SocialCalc workbooks. Your agent gets 39 tools to read sheets, write values and formulas, format cells, insert rows and columns, and move data in and out as CSV, all inside one folder it is allowed to touch.
npx -y socialcalc-mcp- Claude Desktop
- Claude Code
- Cursor
- VS Code
- Windsurf
- Tools
- 39
- GitHub Packages
- @aspiringsdgs/socialcalc-mcp
- Site
- AspiringApps
- Transport
- stdio, plus an optional local HTTP bridge
- Node.js
- 18+
- License
- MIT
- Related
- socialcalc-ai · the spreadsheet engine and React/Ionic UI suite it edits workbooks for
- Related
- socialcalc-ai on npm
In action
Set it up
Claude Code, one line
claude mcp add socialcalc-mcp -- npx -y socialcalc-mcpClaude Desktop, Cursor, Windsurf
{
"mcpServers": {
"socialcalc-mcp": {
"command": "npx",
"args": [
"-y",
"socialcalc-mcp"
]
}
}
}Restart the client, then ask it to list the tools on the socialcalc-mcp server to check the connection.
Things to ask it
Open data/invoice.msc, fill in the Acme Corp bill-to block and add a SUM for the amounts in F34.
Summarise every sheet in budget.json and tell me which months went over.
Import sales.csv into a new sheet called Q3, bold the header row and format column D as $#,##0.00.
All 39 tools
Workbook inspection & navigation8
list_workbooksLists workbook files in a directory (defaults to./data).directoryPath(opt)list_sheetsLists sheet names and metadata in a workbook.workbookPath(req)read_sheetReads a whole sheet as a Markdown table plus raw cell details.workbookPath(req),sheetName/sheetNumber(opt)read_rangeReads a range such asA1:C10as a Markdown table.workbookPath(req),range(req),sheetName/sheetNumber(opt)get_sheet_dimensionsReturns row and column counts.workbookPath(req),sheetName/sheetNumber(opt)describe_sheetReturns sheet details, column headers and size.workbookPath(req),sheetName/sheetNumber(opt)summarize_workbookSummarizes all sheets: dimensions, hidden status, cell counts.workbookPath(req)summarize_sheetReturns a numeric and textual summary of populated cells.workbookPath(req),sheetName/sheetNumber(opt)
Structure & workbook modification8
new_workbookCreates a new workbook file with an initial sheet.workbookPath(req),sheetName(opt)new_sheetAdds an empty worksheet.workbookPath(req),sheetName(req)rename_sheetRenames a worksheet.workbookPath(req),oldName(req),newName(req)insert_rowInserts row(s) before or after a row index.workbookPath(req),row(req),count(opt),position(opt)insert_colInserts column(s) before or after a column letter.workbookPath(req),column(req),count(opt),position(opt)delete_rowDeletes rows starting at an index.workbookPath(req),row(req),count(opt)delete_colDeletes columns starting at a letter.workbookPath(req),column(req),count(opt)set_col_widthSets a column width in pixels.workbookPath(req),column(req),width(req)
Editing & styling15
write_rangeWrites a value or a 2D array starting at a cell. Formulas are supported.workbookPath(req),range(req),value/data(opt)delete_textClears values and formulas, keeping styling.workbookPath(req),range(req)set_cell_to_defaultResets content, formula and layout to defaults.workbookPath(req),range(req)format_cellsApplies bold, text colour, background colour and alignment in one call.workbookPath(req),range(req),bold,textColor,bgColor,align(opt)set_font_colorSets text colour (rgb(255,0,0),#ff0000).workbookPath(req),range(req),color(req)set_cell_bgSets background colour.workbookPath(req),range(req),color(req)set_borderApplies a border shorthand or per-side overrides (1px solid rgb(0,0,0)).workbookPath(req),range(req),border/top/right/bottom/left(opt)set_paddingApplies padding (5px 10px).workbookPath(req),range(req),padding/top/right/bottom/left(opt)set_alignmentSets horizontal and vertical alignment.workbookPath(req),range(req),align/verticalAlign(opt)set_font_sizeSets font size (12pt,14px).workbookPath(req),range(req),size(req)set_font_familySets font family (Arial,Courier New).workbookPath(req),range(req),family(req)set_font_styleSets italic/normal and bold/normal.workbookPath(req),range(req),style/bold(opt)set_formatApplies a number or text format (HTML,0.00%,$#,##0.00).workbookPath(req),range(req),format(req)merge_cellsMerges a range.workbookPath(req),range(req)unmerge_cellsSplits merged cells.workbookPath(req),range(req)
Formula reference & server help4
get_formulasLists available SocialCalc formulas, optionally by category.category(opt)describe_formulaExplains one formula with an example.name(req)list_toolLists every tool registered on the server.nonedescribe_toolDescribes a tool's parameters.toolName(req)
CSV & XLSX import / export4
export_to_csvExports one sheet to a CSV file.workbookPath(req),csvPath(req),sheetName/sheetNumber(opt)import_from_csvImports a CSV file into a sheet.csvPath(req),workbookPath(req),sheetName(opt)export_to_xlsxNot implemented yet. Registered, but always returns an error.workbookPath(req),xlsxPath(req)import_from_xlsxNot implemented yet. Registered, but always returns an error.xlsxPath(req),workbookPath(req)
Every client's config (from the README)
Claude Desktop
Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"socialcalc-mcp": {
"command": "npx",
"args": ["-y", "socialcalc-mcp"]
}
}
}Claude Code
claude mcp add socialcalc-mcp -- npx -y socialcalc-mcpCursor / Windsurf
Add the same mcpServers block as above to ~/.cursor/mcp.json (Cursor) or ~/.codeium/windsurf/mcp_config.json (Windsurf).
VS Code
Add to .vscode/mcp.json:
{
"servers": {
"socialcalc-mcp": {
"type": "stdio",
"command": "npx",
"args": ["-y", "socialcalc-mcp"]
}
}
}Restart the client after changing its configuration. Ask it to "list the tools on the socialcalc-mcp server" to confirm the connection.
HTTP bridge and development
HTTP bridge
Besides stdio, the server can expose the same tools over HTTP for browser-based test UIs. It is off by default. Turn it on with --http or SOCIALCALC_HTTP=1:
SOCIALCALC_HTTP_TOKEN=choose-a-secret npx -y socialcalc-mcp --http| Setting | Default | Meaning |
|---|---|---|
--http / SOCIALCALC_HTTP=1 | off | Start the bridge |
SOCIALCALC_PORT | 5002 | Port. If it is taken, a warning is logged and stdio keeps working |
SOCIALCALC_HOST | 127.0.0.1 | Address to bind. Only loopback by default |
SOCIALCALC_HTTP_TOKEN | random | Bearer token. If unset, a random one is generated and printed to stderr at startup |
SOCIALCALC_CORS_ORIGINS | none | Comma-separated browser origins allowed to call the bridge, for example http://localhost:3000 |
Every request must send Authorization: Bearer <token>, and POST bodies must be application/json (max 10 MB). Files are confined to the allowed directory, the same as for the tools.
curl -H "Authorization: Bearer choose-a-secret" http://127.0.0.1:5002/tools| Endpoint | Purpose |
|---|---|
GET /tools | Lists registered tools. |
POST /call | Runs a tool. Body: { "name": "read_sheet", "arguments": { ... } }. |
POST /sync | Writes browser-side workbook data to disk. Body: { "workbookPath", "mscData" }. |
GET /read-file?path=... | Reads a workbook file back. |
[!WARNING] The bridge is meant for local development. Keep it on loopback, keep the token secret, and only add origins you trust to
SOCIALCALC_CORS_ORIGINS. Binding it to another address makes every tool reachable from that network to anyone who has the token.
Development
git clone https://github.com/aspiringsdgs/socialcalc-mcp.git
cd socialcalc-mcp
npm install
npm run build # compile TypeScript to dist/
npm start # run the compiled server
npm run dev # run from source with tsx
npm test # build, then run the tests in test/Project layout:
| Path | Contents |
|---|---|
src/index.ts | Entry point: stdio transport and HTTP bridge. |
src/server.ts | Tool definitions and request handlers. |
src/services/ | Workbook, sheet, style and formula operations. |
src/adapters/ | SocialCalc and CSV readers and writers. The XLSX adapter is a stub. |
src/models/, src/utils/ | Data models, validation and helpers. |
data/ | Sample workbooks used by list_workbooks. |


