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 with cargo build --release.
  • Tools, parameters and results that you define in a codcel-mcp configuration 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

The docs cover MCP server setup and defining MCP tools in Excel. Or download Codcel and try it.

Keep reading