- Home
- MCP servers
- MathCAD
MathCAD
- python
6
GitHub Stars
python
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"hvkshetry-mathcad-mcp": {
"command": "python",
"args": [
"path/to/mathcad-mcp/standalone.py"
],
"env": {
"MATHCAD_VISIBLE": "true"
}
}
}
}You can connect Claude-like assistants to MathCAD Prime through a dedicated MCP server that automates worksheet management, input handling, calculation control, and export operations. This enables you to open, modify, run, and export MathCAD worksheets from your MPC-enabled AI workflows with consistent, scriptable actions.
How to use
From an MCP client, you interact with the MathCAD MCP Server to manage worksheets, set inputs, run calculations, and retrieve results. You can open a worksheet file, configure numerical inputs and strings or matrices, trigger recalculation, pause or resume calculations, and save or export results in PDF, RTF, or XPS formats. Outputs and inputs can be queried with units conversions when needed, and worksheets can be kept in sync or opened and brought to the foreground for review.
Key workflows you will perform include:
- Open a worksheet to begin work
- Set inputs such as real numbers, strings, or matrices with units
- Recalculate or pause/resume calculations as you refine inputs
- Retrieve outputs with or without unit conversions
- Save worksheets and export to PDF, RTF, or XPS as needed
- Manage multiple worksheets simultaneously and check their status at a glance
How to install
Prerequisites you need before installing the MathCAD MCP Server:
- Windows operating system for MathCAD COM automation
- Python 3.10 or higher
- PTC MathCAD Prime 3.0 or higher installed
- Dependencies: MathcadPy, pywin32, and MCP Python SDK (see requirements.txt)
Step-by-step installation commands you will run:
- Install required dependencies
- Run the installation script
- Restart your environment to apply changes
Exact commands you execute:
pip install -r requirements.txt
python install_standalone.py
Optional: hide MathCAD window during run
python install_standalone.py --hide
After installation, restart Claude Desktop to apply the changes.
Configuration and environment
Configure the MCP server in your client’s settings to point to the local Python runner that hosts the MathCAD MCP Server. The following example shows the manual configuration you place in your configuration file to start and expose the server.
{
"mcpServers": {
"mathcad": {
"type": "stdio",
"command": "python",
"args": [
"path/to/mathcad-mcp/standalone.py"
],
"env": {
"MATHCAD_VISIBLE": "true"
}
}
}
}
Environment variables
Control the MathCAD application visibility and behavior through environment variables. The primary variable shown is MATHCAD_VISIBLE, which can be set to true to display the MathCAD window or false to run in the background.
{
"MATHCAD_VISIBLE": "true"
}
Troubleshooting
If you encounter issues during setup or runtime, consider these common steps:
- Verify that MathCAD is installed, licensed, and accessible via COM automation on Windows
- Ensure you are running on a supported Windows environment
- Restart both MathCAD and the MCP server if settings do not take effect
- Use absolute file paths for worksheet locations to avoid path resolution errors
- Confirm the requested input/output names exist within the worksheet and are correctly typed when you query or set them
Architecture and components
This MCP server uses a Python-based FastMCP framework. The server consists of a self-contained script that integrates with MathCAD Prime, and a utility installer used to deploy the server in Claude Desktop.
Notes and capabilities
The server exposes a comprehensive set of tools to manipulate MathCAD worksheets programmatically, including opening, closing, saving worksheets, setting inputs, calculating, pausing, resuming, and exporting results. It also provides a rich set of resources to query worksheets, inputs, and outputs, and to fetch results with unit conversions when needed.
Tools
The server provides a broad set of tool commands to interact with MathCAD worksheets, including all input, output, and control operations described in the capability list.
Example workflows
Example workflows illustrate common tasks such as opening worksheets, configuring inputs, running calculations, and exporting results. Follow these steps in your client to reproduce typical use cases.
Available tools
list_mathcad_version
Retrieve the currently running MathCAD version.
open_worksheet
Open a MathCAD worksheet from a file path.
close_worksheet
Close a specific worksheet.
close_all_worksheets
Close all open worksheets.
quit_mathcad
Quit the MathCAD application entirely.
save_worksheet
Save a worksheet to a specified path and format.
save_worksheet_inplace
Save the worksheet in place.
activate_worksheet
Bring a worksheet to the front.
set_real_input
Set a numerical input, with optional units.
set_string_input
Set a string input.
set_matrix_input
Set a matrix input, with optional units.
get_input
Retrieve the current value of a designated input.
get_matrix_input
Retrieve the current value of a designated matrix input.
calculate_worksheet
Recalculate a worksheet.
sync_worksheet
Alias for calculating the worksheet.
pause_calculation
Pause worksheet calculation.
resume_calculation
Resume worksheet calculation.
get_output
Get a designated output value.
get_real_output
Get a numerical output value from a worksheet.
get_real_output_with_units
Get a numerical output value with unit conversion.
get_matrix_output
Get a matrix output from a worksheet.
get_matrix_output_with_units
Get a matrix output with unit conversion.
save_as_pdf
Save the worksheet as a PDF file (Mathcad Prime 5+ only).
save_as_rtf
Save the worksheet as an RTF file.
save_as_xps
Save the worksheet as an XPS file.
is_worksheet_readonly
Check if a worksheet is read-only.
is_worksheet_modified
Check if a worksheet has unsaved changes.
set_worksheet_modified
Force-set the 'modified' status of a worksheet.