MCP Server
The Model Context Protocol (MCP) is an open standard that lets AI agents such as Claude Code, Cursor and GitHub Copilot call external tools. The Calcs.com MCP server offers the calculator API as 13 tools: an agent can find a calculator, read its inputs, create a project, run the calculation on the same engine as the Calcs.com app, and hand back the result with a link to the calculation. Each tool carries instructions for the agent, including the unit rules, so you do not need to paste them into your prompt.
Terms
- Calculator: the template you pick, such as an HSS base plate.
list_calculatorsandget_calculatorfind and describe them. - Calculation: one instance of a calculator in a project, with its own inputs and results. It is what the Calcs.com app shows. In the API a calculation is called a sheet:
sheetIdidentifies it andsheetUrllinks to it. - Project: holds your calculations.
create_projectmakes one; keep related calculations in the same project.
An agent makes a calculation in one of two ways: step by step (create_calculation, then set_calculation_inputs, then solve_calculation), or in a single call with create_and_solve_calculation. To change a calculation, update it with set_calculation_inputs and solve_calculation; don't create a new one.
Connection details
| Server URL | https://api.calcs.com/mcp |
| Transport | Streamable HTTP |
| Authentication | Authorization: Bearer YOUR_API_KEY header, with the same API key as the REST API (see Authentication) |
| OAuth | Not supported |
| Tool timeout | At least 120 seconds (see Timeouts) |
Keep your API key out of files you commit. The Cursor, VS Code, Codex and Gemini setups below read the key from an environment variable or prompt for it, so their config files hold no key. Claude Code and Claude Desktop store the key in your user configuration, outside any project.
The MCP Server entry in the API reference shows generic setup snippets that leave out the Authorization header, so they fail as pasted. Use the setups on this page.
Claude Code
Code
In Windows PowerShell, set the key with $env: and keep the command on one line:
Code
$env: lasts for the current window. To keep the key for windows you open later, run setx CALCS_API_KEY "YOUR_API_KEY" and open a new window.
Run /mcp inside Claude Code to check that calcs is connected.
get_calculator returns a calculator's full input list, and on the larger steel connection calculators that list can pass Claude Code's default limit on tool output. Raise the limit before you start Claude Code:
Code
In Windows PowerShell:
Code
Even with the higher limit, Claude Code saves the input list of most connection calculators (70 to 650 KB) to a file, and the agent searches that file for the fields it needs. If Claude Code asks to read a file under ~/.claude/projects/…/tool-results, allow it. A calculation that starts from a preset (list_presets) and sends only the fields you change takes about a minute, and validate_inputs checks those fields before anything is created. When the agent first reads a large calculator's full input list, expect 3 to 10 minutes.
Cursor
Add the server to .cursor/mcp.json in your project (or ~/.cursor/mcp.json for every project), with CALCS_API_KEY set in your environment:
Code
Cursor adds a new MCP server switched off. Open Cursor Settings, find calcs in the MCP list and switch it on.
Cursor reads CALCS_API_KEY from the environment it was started in, so start it from a terminal where the variable is set (for example cursor .). Opened from the macOS Dock, Cursor does not see variables set in a terminal: it sends an empty key and the server replies 401 Unauthorized. To open Cursor from the Dock, write the key itself in ~/.cursor/mcp.json, your user-level configuration outside any project.
VS Code (GitHub Copilot)
Add the server to .vscode/mcp.json. VS Code prompts for the key the first time the server starts and stores it securely:
Code
Use Copilot Chat in Agent mode and turn on the calcs tools under Configure Tools. On Copilot Business or Enterprise, an organization admin must first enable the MCP servers in Copilot policy, which is off by default.
Claude Desktop
Claude Desktop connects to this server through the mcp-remote bridge, which needs Node.js. Open Settings → Developer → Edit Config. The file already holds Claude Desktop's own settings. Keep them, and add the "mcpServers" part below after them, with a comma at the end of the line before it. If the file already has "mcpServers", add only the "calcs" part inside it.
Code
Write Authorization:${CALCS_AUTH} exactly as shown, with no space after the colon. On Windows, Claude Desktop does not escape spaces inside arguments when it starts npx, so the space lives inside the CALCS_AUTH value instead. Restart Claude Desktop after saving.
Codex CLI and Gemini CLI
Codex CLI: with CALCS_API_KEY set in your environment, run:
Code
Run /mcp inside Codex to check that calcs is connected. The command writes the server to ~/.codex/config.toml. Codex stops a tool call after 60 seconds by default, so add tool_timeout_sec to that entry (or write the whole entry yourself instead of running the command):
Code
Gemini CLI, in ~/.gemini/settings.json. Its default tool timeout is 10 minutes, so it needs no timeout setting:
Code
Other clients
Any MCP client that supports Streamable HTTP and lets you set a custom Authorization header can connect with the details in Connection details.
Clients that cannot connect yet
- ChatGPT connectors sign users in with OAuth or use no authentication. They cannot send an API key, so they cannot use this server.
- claude.ai custom connectors (the connector settings in Claude on the web and in Claude Desktop) also expect OAuth. Sending a fixed header is a limited beta that only an organization Owner can set, with one key shared by the whole organization. Use the Claude Desktop setup above instead.
- Microsoft 365 Copilot and Copilot Studio are not covered here yet. Adding an MCP server there can be blocked by your organization's data policies or need approval in the Microsoft 365 admin center, so expect to involve your tenant admin.
Timeouts
Most calculations finish in 5 to 8 seconds. HSS connection calculators take 11 to 15 seconds, and the HSS truss calculator 30 to 40 seconds. Make sure your client allows a tool call at least 120 seconds. Claude Code and Gemini CLI allow 10 minutes by default; Codex CLI allows 60 seconds unless you raise it as shown above.
solve_calculation is safe to retry. create_and_solve_calculation is not: if it times out on your side it may still have created the calculation, and a retry creates a second one. The tool descriptions steer the agent to the create_calculation, set_calculation_inputs, solve_calculation path for slow calculators.
Tools
| Tool | What it does |
|---|---|
list_calculators | Lists the calculators you can run. The agent pages through all of them. |
get_calculator | Returns a calculator's input fields, units, options, outputs and presets. |
list_presets | Lists a calculator's presets: complete sets of valid inputs. |
validate_inputs | Checks inputs against a calculator without running it. |
create_project | Creates a project to hold calculations. |
create_and_solve_calculation | Creates a calculation and solves it in one call, and returns the results and the calculation link. |
create_calculation | Creates an unsolved calculation. |
set_calculation_inputs | Writes input values to a calculation. |
solve_calculation | Solves a calculation and returns the results. |
get_calculation | Reads a calculation's inputs, results and status. |
list_project_calculations | Lists the calculations in a project. |
export_project_pdf | Starts a PDF export of a project. |
get_export | Checks an export and returns the download link when it is ready. |
Every calculation result includes a sheetUrl that opens the calculation in the Calcs.com app, so you can check the calculation the agent ran.