Turn an Excel model into tools an AI assistant can call (MCP)
Generate a Model Context Protocol server from an Excel workbook, so Claude and other AI assistants call your real calculation instead of guessing at the maths.
Large language models are good at conversation and bad at arithmetic they can't check. Ask an assistant to price a policy or work out a loan schedule from a description, and it will produce a plausible number. Not your number.
The Model Context Protocol (MCP) solves this by letting an assistant call tools. Codcel can generate an MCP server from your workbook, so the tool the assistant calls is your actual, tested calculation.
What gets generated
- A Rust MCP server binary,
<project-name>-mcp-server, built withcargo build --release. - Tools, parameters and results that you define in a
codcel-mcpconfiguration sheet in the workbook. - Communication over stdio, the standard transport for local MCP servers.
Because it is built on the same Rust calculation engine as every other Codcel target, the assistant gets the same answer your API, your web app and your workbook give.
Connect it to Claude Desktop
Add the server to Claude Desktop's configuration file (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"my-project": {
"command": "/path/to/target/release/my-project-mcp-server",
"env": {
"CODCEL_TABLE_PATH": "/path/to/tables/"
}
}
}
}Restart Claude Desktop, and your calculations appear as tools it can call.
Where this is useful
- Quoting assistants. "What would the premium be for a 35-year-old in SW1A with five years without claims?" The assistant calls your rating engine.
- Internal analysts. Run scenarios in conversation against the approved model, not an approximation of it.
- Customer support. Explain a figure by re-running the real calculation with the customer's inputs.
Watch it
- From Excel to AI in one click (MCP)
- We turned an insurance Excel sheet into an AI server (in minutes)
The docs cover MCP server setup and defining MCP tools in Excel. Or download Codcel and try it.
Keep reading
Excel vs code for business calculations: when to move, and how
Spreadsheets are a great place to build a model and a risky place to run one. A practical comparison of keeping logic in Excel, rewriting it by hand, and generating code from the workbook.
Turn an Excel spreadsheet into a REST API
Expose the calculations in an Excel workbook as a documented REST API, with one POST endpoint per calculation, in Rust, Java, Kotlin, C# or Go, plus typed clients and an OpenAPI spec.