Origin Pro MCP Server
An MCP (Model Context Protocol) server that enables AI assistants like Claude to control OriginLab Origin Pro via COM automation. All operations are reflected in Origin's GUI in real-time — you watch as the AI creates worksheets, plots graphs, and styles figures.
What Can It Do?
- Worksheet Management — Create workbooks, read/write data, import CSV files
- Graph Creation — Scatter, line, line+symbol, bar, histogram, box, contour, pie, bubble plots
- Plot Styling — Colors, symbols, line width, publication-ready formatting in one call
- Curve Fitting — Linear, polynomial, exponential, Gaussian, Lorentz, Voigt, and more
- Project Management — New/save/load projects, export all graphs
- LabTalk Scripting — Direct LabTalk execution for advanced operations
Quick Start
1. Prerequisites
- Windows with Origin Pro 2020+ installed and running
- Python 3.10+ (Windows Python, not WSL)
2. Install & Configure
Option A: uvx (recommended — zero setup)
No manual install needed. Just add to your Claude Code MCP settings:
{
"mcpServers": {
"origin-pro": {
"command": "uvx",
"args": ["origin-pro-mcp"]
}
}
}
uvx automatically downloads and runs the server in an isolated environment. Nothing else to install.
Option B: pip install from GitHub
pip install git+https://github.com/youngminsw/Origin-Pro-MCP.git
Then configure Claude Code:
{
"mcpServers": {
"origin-pro": {
"command": "origin-pro-mcp"
}
}
}
Option C: Clone and run directly
git clone https://github.com/youngminsw/Origin-Pro-MCP.git
cd Origin-Pro-MCP
pip install -e .
{
"mcpServers": {
"origin-pro": {
"command": "origin-pro-mcp"
}
}
}
Note: If Claude Code runs in WSL, make sure the
uvxorpythoncommand points to your Windows Python, not WSL Python. Origin COM only works from Windows.
4. Start Origin Pro
Open Origin Pro before starting the server. The server attaches to the running instance via Origin.ApplicationSI.
5. Use It
Just ask Claude to work with Origin:
"Create a scatter plot from this data: x=[1,2,3,4,5], y=[2.1,4.0,5.9,8.1,10.0]"
"Apply publication styling to Fig1 with axis labels Temperature (K) and Absorbance (a.u.)"
"Fit a Gaussian to the data in Book1"
"Export all graphs to C:\Users\me\figures\"
Architecture
Claude Code (WSL or Windows)
| stdio (MCP protocol)
v
MCP Server (Windows Python + win32com)
| COM automation
v
Origin Pro (GUI visible in real-time)
Available Tools (23 total)
Project Management
| Tool | Description |
|---|---|
new_project |
Create new empty Origin project |
save_project |
Save project to .opju file |
load_project |
Open existing .opj/.opju file |
Data
| Tool | Description |
|---|---|
create_worksheet |
Create new workbook |
set_worksheet_data |
Write column data (JSON arrays) |
get_worksheet_data |
Read worksheet data as JSON |
import_csv_to_worksheet |
Import CSV/text file |
list_worksheets |
List all open workbooks and graphs |
Graphing
| Tool | Description |
|---|---|
create_graph |
Create graph (scatter, line, line+symbol, bar, etc.) |
add_plot_to_graph |
Add another dataset to existing graph |
set_axis_labels |
Set X/Y axis labels and title |
set_axis_range |
Set axis min/max values |
export_graph |
Export graph to PNG/JPG image |
export_all_graphs |
Export every graph in the project |
Styling
| Tool | Description |
|---|---|
apply_publication_style |
One-call publication formatting (recommended) |
set_plot_style |
Set color, symbol, line width per plot |
set_graph_font |
Set font family and size |
set_legend |
Configure legend text and position |
set_tick_style |
Set tick direction and length |
Analysis
| Tool | Description |
|---|---|
curve_fit |
Curve fitting with R², SSR statistics |
list_fitting_functions |
Show available fit functions |
Advanced
| Tool | Description |
|---|---|
run_labtalk |
Execute any LabTalk script directly |
get_labtalk_variable |
Read a LabTalk variable value |
Example: Publication-Quality Figure
# 1. Start fresh
new_project()
# 2. Create data
create_worksheet(book_name="Data")
set_worksheet_data(
book_name="Data", sheet_name="Sheet1",
columns="[[300,350,400,450,500,550,600],[0.12,0.35,0.89,1.62,1.95,1.92,1.25],[0.08,0.22,0.62,1.35,1.88,1.90,1.12]]",
column_names="Temperature,Pristine,Annealed"
)
# 3. Create line+symbol graph
create_graph(graph_name="Fig1", data_book="Data", data_sheet="Sheet1",
x_col=1, y_col=2, plot_type="line+symbol")
add_plot_to_graph(graph_name="Fig1", data_book="Data", data_sheet="Sheet1",
x_col=1, y_col=3, plot_type="line+symbol")
# 4. One call does everything: colors, fonts, ticks, frame, legend
apply_publication_style(
graph_name="Fig1",
x_label="Temperature (K)",
y_label="Absorbance (a.u.)",
x_min=280, x_max=620, y_min=0, y_max=2.2,
legend_entries="Pristine,Annealed",
legend_position="top-right"
)
# 5. Export
export_graph(graph_name="Fig1", file_path="C:\\Users\\me\\fig1.png")
Result: A publication-ready figure with bold Arial labels, colorblind-safe colors (blue circles + red triangles), filled symbols, solid lines, inward ticks, closed frame, and positioned legend.
Claude Code Skill: Publication Figure
This repo includes a skill file (skills/publication-figure.md) that teaches Claude how to create journal-quality figures step by step. To use it:
- Copy
skills/publication-figure.mdto your Claude Code skills directory - When you ask Claude to "make a publication figure", it will automatically follow the skill's workflow:
- Ask about data source, figure type, target journal
- Use colorblind-safe color palette (blue → red → green → orange → purple → cyan)
- Apply proper typography (Arial, bold, correct sizes)
- Follow a pre-export checklist
The skill also documents Origin 2020 COM quirks — what works, what doesn't, and tested workarounds. This is invaluable if you need to customize beyond apply_publication_style.
Customizing the Skill for Your Style
The included skill is a starting template. You should customize it to match your lab's or journal's requirements:
- Font: Change from Arial to your journal's preferred font (e.g., Helvetica, Times New Roman)
- Font sizes: Adjust axis title/tick label/legend sizes to match your journal's figure guidelines
- Color palette: Replace the default colorblind-safe palette with your group's standard colors
- Default export path: Set to your working directory
- Figure recipes: Add templates for your common figure types (XRD patterns, IV curves, etc.)
- Journal presets: Add specific formatting rules for your target journals (Nature, ACS, RSC, etc.)
Copy skills/publication-figure.md to your project and edit freely — it's meant to be a starting point, not a rigid template.
Key Origin 2020 COM Quirks (documented in skill)
| Issue | Workaround |
|---|---|
Bold axis titles (xb.bold) doesn't exist |
Use \b(text) markup in xb.text$ |
legend.text$ doesn't support multiline via COM |
Set column Long Names, then legend -r |
legend.x/y uses data coordinates, not % |
Calculate from layer.x.from/to |
%C notation fails via COM |
Use actual plot names from DataPlots |
expGraph doesn't produce files via COM |
Use CopyPage + Pillow clipboard |
nlr.r2 returns 0 after nlend |
Read statistics BEFORE nlend |
| Plot styling commands can conflict | Add 0.2s delay between set commands |
Supported Plot Types
| Type | Description |
|---|---|
scatter |
Scatter plot (symbols only) |
line |
Line plot (no symbols) |
line+symbol |
Line with symbols (recommended for publications) |
column |
Vertical bar chart |
bar |
Horizontal bar chart |
area |
Area plot |
histogram |
Histogram |
box |
Box plot |
contour |
Contour plot |
pie |
Pie chart |
bubble |
Bubble chart |
Supported Fitting Functions
| Category | Functions |
|---|---|
| Linear | line |
| Polynomial | poly2, poly3, poly4, poly5 |
| Exponential | exp1, exp2, expgrow1, expdecay1 |
| Peak | gauss, lorentz, voigt |
| Growth/Sigmoidal | boltzmann, hill, logistic, lognormal |
| Other | power, sine |
Color Palette
Default colorblind-safe order used by apply_publication_style:
| Order | Color | Best for |
|---|---|---|
| 1st | Blue | Primary dataset |
| 2nd | Red | Comparison dataset |
| 3rd | Green | Third dataset |
| 4th | Orange | Fourth dataset |
| 5th | Purple | Fifth dataset |
| 6th | Cyan | Sixth dataset |
Tip: Never use red + green as the only two colors — colorblind users cannot distinguish them. Use blue + red or blue + orange instead.
Troubleshooting
| Problem | Solution |
|---|---|
| "Origin.ApplicationSI" error | Make sure Origin Pro is running before starting the server |
| Tools timeout | Origin may be showing a dialog — check the Origin window |
| Export returns empty | Increase the clipboard wait time; check if Origin window is minimized |
| Legend missing after styling | Legend uses data coordinates — verify axis range is set before positioning |
| Symbols appear hollow | Do NOT use set -d flag (it's for dash patterns, not fill) |
License
MIT
Metadata
Release files for origin-pro-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| origin_pro_mcp-0.1.0.tar.gz | 17.2 kB | Without provenance | Details for origin_pro_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| origin_pro_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for origin_pro_mcp-0.1.0-py3-none-any.whl |
Total release size: 34.7 kB
Release files / origin_pro_mcp-0.1.0.tar.gz
| Download URL | origin_pro_mcp-0.1.0.tar.gz |
|---|---|
| Size | 17.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b31bc50f1e87908955ed7fa89d1cfd14beea2df5aa2c71d728495fba0ad780cc
|
|
BLAKE2b-256 checksum How to use checksums |
792b02cb23d54ff63eeabb7cef9b9a85ba2d05f28c8fb90e344c9e26790122a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / origin_pro_mcp-0.1.0-py3-none-any.whl
| Download URL | origin_pro_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0e05e03c7b943c91c97533d77077ab1c10f44f2b8fdd5db3166a2adc5046a0f9
|
|
BLAKE2b-256 checksum How to use checksums |
577dd940ced7db6e45b6f74aff8ef3bd04fcce0a680f528713cc7e586684e22d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for origin-pro-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.