Skip to main content
Glama

origin-mcp-kimi

origin-mcp-kimi is a Kimi Code CLI optimized fork of origin-mcp. It is a local Model Context Protocol (MCP) server that lets AI assistants control Origin/OriginPro on Windows through OriginLab's Python automation interface.

This fork adds adaptive Origin path detection so the bridge automatically finds Origin's embedded Python site-packages directory, fixing the common ModuleNotFoundError: No module named 'pandas' error that appears even after pip install pandas succeeds inside Origin.

简体中文

What is different from upstream?

Feature

origin-mcp

origin-mcp-kimi

Adaptive Origin install / site-packages detection

manual

automatic

Kimi Code CLI MCP config helper

no

included

Recommended client

any MCP client

Kimi Code CLI

The core tool surface (worksheet, plotting, analysis, export, template library, etc.) is inherited from the upstream project.

Related MCP server: OriginLab MCP Server

Requirements

  • Windows

  • Origin or OriginPro installed and licensed

  • Origin/OriginPro 2026 is the primary tested target; other versions are not guaranteed

  • Python 3.10+ for the MCP server core

  • Kimi Code CLI (recommended; any MCP client works)

Installation

  1. Clone this fork:

git clone https://github.com/wxxuan2000-gif/origin-mcp-kimi.git
cd origin-mcp-kimi
  1. Create a virtual environment and install in editable mode:

python -m venv .venv
.venv\Scripts\python.exe -m pip install -e ".[origin,dev]"

If you also plan to run pytest or linting, install the dev extra as shown above; for daily use .[origin] is enough.

Kimi Code CLI Configuration

The repository includes a helper that writes the correct MCP server entry into your Kimi CLI config file (%USERPROFILE%\.kimi\mcp.json):

.venv\Scripts\python.exe scripts\install_kimi_mcp.py

The resulting config looks like this:

{
  "mcpServers": {
    "origin-mcp-kimi": {
      "command": "D:\\path\\to\\origin-mcp-kimi\\.venv\\Scripts\\python.exe",
      "args": ["-m", "origin_mcp"]
    }
  }
}

Restart Kimi Code CLI or reload the MCP server list to pick up the new server.

If you prefer to edit mcp.json manually, replace the command path with the absolute path to your virtual environment's python.exe.

Start the Origin Bridge

The bridge must run inside Origin's embedded Python so originpro stays on the Origin UI thread.

Build and install the two bridge Apps once:

.venv\Scripts\python.exe scripts\build_origin_app.py --force --install

Then in Origin's Command Window run:

mkOPX app:="Origin MCP Bridge Start" opx:="%@AD:\BaiduSyncdisk\wxx_note\T0004_Origin\origin-mcp-kimi\build\origin-app\Origin MCP Bridge Start.opx";
mkOPX app:="Origin MCP Bridge Stop" opx:="%@AD:\BaiduSyncdisk\wxx_note\T0004_Origin\origin-mcp-kimi\build\origin-app\Origin MCP Bridge Stop.opx";

Use backslashes \ and wrap paths in quotes. If the command window shows no >> prompt, wait a few seconds; if Origin hangs, force-close and retry.

Drag the generated .opx files into Origin to register them. After that, click Origin MCP Bridge Start in the Apps gallery to start the bridge and Origin MCP Bridge Stop to stop it.

Option B: Origin Python Console (one-off / troubleshooting)

Open Origin's Python Console and run:

import runpy
runpy.run_path(r"D:\BaiduSyncdisk\wxx_note\T0004_Origin\origin-mcp-kimi\addon.py", run_name="__main__")

Use the absolute path to your addon.py. A Bridge is running inside Origin. message confirms startup; keep the console open while using the tools.

If pasting multi-line code gives SyntaxError: multiple statements found while compiling a single statement, wrap the code in exec("""...""") or run one line at a time.

Adaptive Origin Path Detection

origin-mcp-kimi automatically looks for Origin in common locations:

  • C:\Origin, C:\Program Files\OriginLab, C:\Program Files (x86)\OriginLab

  • D:\Origin, D:\Program Files\OriginLab, D:\Program Files (x86)\OriginLab

  • The directory containing sys.executable when running inside Origin

You can override detection with environment variables:

  • ORIGIN_INSTALL_DIR — root folder of the Origin installation

  • ORIGIN_EXE — full path to Origin64.exe or Origin.exe

  • ORIGIN_MCP_SITE_PACKAGES — exact site-packages path to use

If pandas and numpy are already importable, no path manipulation is performed.

Troubleshooting

No module named 'pandas' inside Origin

Even if pip install pandas appeared to succeed, the package may have been installed into <Origin>\Lib\site-packages, which Origin's Python Console does not always put on sys.path. This fork detects that directory and adds it automatically. If it still fails, set:

set ORIGIN_MCP_SITE_PACKAGES=D:\Origin\Lib\site-packages

and restart the bridge.

SyntaxError: multiple statements in Origin Python Console

Origin's Python Console sometimes rejects multi-line paste. Use:

exec("""
import runpy
runpy.run_path(r"D:\\BaiduSyncdisk\\wxx_note\\T0004_Origin\\origin-mcp-kimi\\addon.py", run_name="__main__")
""")

mkOPX shows no >> prompt

mkOPX can take several seconds. If Origin becomes unresponsive, force-close Origin, reopen it, and retry. Make sure the App folder path uses backslashes.

Security

The bridge listens only on 127.0.0.1 and uses a per-session token by default. Keep the handshake file (%TEMP%\origin-mcp\bridge.json) owner-readable. See the upstream Security notes for details.

License

MIT. See LICENSE.

Acknowledgments

This fork is based on Ge-Shun/origin-mcp. All credit for the original MCP server and tool surface goes to the upstream authors.

Available Tools

63 tools
origin_add_calculated_columnsB

Add several worksheet columns from LabTalk formulas in one call.

columns is a list of {"name": ..., "formula": ...}. Formulas use LabTalk column syntax. To reference another sheet, use the [Book]Sheet!index form, e.g. "[Book2]Sheet1!2 * 2" (col(...) resolves against the active sheet and ignores the [Book]Sheet! prefix, so use the column-index form for cross-sheet references).

Inputs: columns (required), book_name, sheet_name. Returns: object

origin_add_insetA

Add an inset (small embedded layer) to an existing graph.

A new layer is placed inside the graph at left/top with width/height (all percentages of the page) and the worksheet x_col/y_cols are plotted into it. Give x_start/x_end and/or y_start/y_end to zoom the inset to a sub-range (useful for a magnified detail view); otherwise the inset auto-scales.

Inputs: worksheet, x_col, y_cols, graph_name, +9 more. Returns: object

origin_add_plot_to_graphC

Add a worksheet X/Y plot to an existing graph layer.

Inputs: worksheet, x_col, y_col, graph_name, +5 more. Returns: object

origin_bridge_cancel_taskB

Cancel a queued Origin bridge task or mark a running task for cancellation.

Inputs: task_id (required), host, port, token, +1 more. Returns: object

origin_bridge_list_tasksC

List recent Origin bridge background tasks.

Inputs: limit, host, port, token, +1 more. Returns: object

origin_bridge_shutdownA

Ask the Origin GUI bridge to stop serving requests.

By default this releases the Origin automation connection without closing Origin itself. Set close_origin=True to force-close Origin as part of shutdown.

Inputs: release_origin, close_origin, host, port, +2 more. Returns: object

origin_bridge_submit_taskC

Submit a supported Origin bridge method as a queued background task.

Inputs: method (required), params, host, port, +2 more. Returns: object

origin_bridge_task_statusA

Read status, result, or optional recent logs for an Origin bridge background task.

Inputs: task_id (required), include_logs, log_limit, include_result, +4 more. Returns: object

origin_browse_knowledgeC

Browse the local Origin knowledge base by collection and path.

Inputs: collection, topic, version. Returns: object

origin_capabilitiesC

Report Origin/originpro versions and runtime feature availability.

Inputs: show, refresh. Returns: object

origin_concat_worksheetsA

Concatenate the primary worksheet with one or more others.

The primary worksheet is book_name/sheet_name; others is a list of {"book": ..., "sheet": ...}. axis="rows" stacks rows (a SQL UNION ALL, aligning by column name); axis="columns" places sheets side by side. Provide output_book/output_sheet to write to a new sheet instead of overwriting the primary worksheet.

Inputs: others (required), axis, book_name, sheet_name, +2 more. Returns: object

origin_delete_templateA

Delete a saved user template (its .otpu/.json/.png) and drop it from the index.

Returns deleted: false with reason not_found when no template carries that name.

Inputs: name (required). Returns: object

origin_diagnose_worksheetA

Check worksheet data quality before plotting or analysis.

Reports per-column dtype, missing count/fraction, and unique count, plus structured issues: empty_worksheet and all_null_column (error), high_missing and duplicate_columns (warning), non_numeric_column and constant_column (info). high_missing_threshold is the missing fraction (0-1) that triggers a high_missing warning. "passed" is false when any error-severity issue is found.

Inputs: book_name, sheet_name, columns, high_missing_threshold. Returns: object

origin_doctorC

Diagnose Origin bridge configuration, status file, and connectivity.

Inputs: host, port, token, timeout, +2 more. Returns: object

origin_drop_duplicatesB

Remove duplicate worksheet rows.

subset limits the columns considered for duplication (default: all columns). keep is "first", "last", or "none" (drop every duplicated row). Provide output_book/output_sheet to write to a new sheet instead of in place.

Inputs: subset, keep, book_name, sheet_name, +2 more. Returns: object

origin_execute_figure_specB

Execute a declarative FigureSpec.

The current executor supports worksheet-backed single-panel and grid multi-panel figures with common plot types. Unsupported features are reported in the plan instead of being guessed.

Inputs: spec (required), dry_run. Returns: object

origin_export_graphB

Export the active or named Origin graph to an image/PDF file.

Inputs: path (required), graph_name, overwrite. Returns: object

origin_fill_missingB

Handle missing worksheet values.

strategy is one of: drop_rows, drop_columns, value (requires value), ffill, bfill, mean, median. columns limits which columns are affected (default: all). Provide output_book/output_sheet to write to a new sheet instead of in place.

Inputs: strategy, value, columns, book_name, +3 more. Returns: object

origin_filter_rowsB

Keep worksheet rows matching structured conditions.

Each condition is {"column": name_or_index, "op": ..., "value": ...} where op is one of eq, ne, gt, ge, lt, le, in, not_in, contains, startswith, isna, notna. Conditions are joined by combine ("and" or "or"). Provide output_book or output_sheet to write the result to a new sheet; otherwise the source worksheet is overwritten in place.

Inputs: conditions (required), combine, book_name, sheet_name, +2 more. Returns: object

origin_format_graphB

Set graph long name, axis labels, legend visibility, and optional rescale.

Inputs: graph_name, title, x_label, y_label, +2 more. Returns: object

origin_get_graph_infoC

Inspect a graph page, its layers, axes, and plots.

Inputs: graph_name. Returns: object

origin_get_layer_infoB

Inspect one graph layer, its axes, and plots.

Inputs: graph_name, layer_index. Returns: object

origin_import_tableC

Import a CSV, TSV, TXT, DAT, XLS, or XLSX file into a new Origin worksheet.

Inputs: path (required), book_name, sheet_name, excel_sheet, +6 more. Returns: object

origin_linear_fitC

Run Origin linear fitting.

Inputs: worksheet, x_col, y_col, output_sheet, +3 more. Returns: object

origin_list_fit_functionsA

List common Origin nonlinear fit function names and parameters.

Inputs: no named parameters. Returns: object

origin_list_user_templatesA

List every saved user template, most recent first.

Inputs: no named parameters. Returns: object

origin_melt_worksheetA

Reshape wide data into long format (unpivot).

id_vars columns are kept as identifiers; value_vars columns (default: all other columns) are unpivoted into a var_name/value_name column pair. Provide output_book/output_sheet to write to a new sheet instead of in place.

Inputs: id_vars, value_vars, var_name, value_name, +4 more. Returns: object

origin_merge_worksheetsA

Join two worksheets on key columns (database-style merge).

The left worksheet is book_name/sheet_name; the right is right_book/right_sheet. Specify the key with on (shared name) or with left_on plus right_on; when omitted, shared column names are used. how is inner, left, right, outer, or cross. Provide output_book/output_sheet to write to a new sheet instead of overwriting the left worksheet.

Inputs: right_book, right_sheet, on, left_on, +6 more. Returns: object

origin_nonlinear_fit_structuredC

Run nonlinear fitting with explicit function and parameter hints.

Inputs: worksheet (required), x_col (required), y_col (required), function (required), +4 more. Returns: object

origin_palette_catalogC

List built-in palette names, semantic roles, and source links.

Inputs: palette_name, colors_count, min_colors, max_colors, +3 more. Returns: object

origin_pingC

Connect to Origin/OriginPro and report basic status.

Inputs: show. Returns: object

origin_pivot_worksheetB

Reshape long data into a wide pivot table.

index columns stay as rows, the distinct values of columns become new column headers, and values are aggregated with aggfunc (mean, sum, count, min, max, median, std). Provide output_book/output_sheet to write to a new sheet instead of in place.

Inputs: index (required), columns (required), values, aggfunc, +4 more. Returns: object

origin_plan_figure_specB

Validate a declarative FigureSpec and return the planned Origin operations.

Inputs: spec (required). Returns: object

origin_plotA

Create a table-based plot selected by kind.

A single parameterized entry point for the table plot kinds that each also have a dedicated origin_plot_* tool, so the compact tool profile can reach every kind without enabling the full profile. kind must be one of: area, stack_area, fill_area, bar, stack_bar, floating_bar, column_stack, pie, ternary, ternary_contour, bubble, bubble_color_mapped, color_mapped, vector_xyam, vector_xyxy, vector_3d, high_low_close, candlestick, waterfall, ribbon_3d, bars_3d, errorbar_3d, polar_xr_ytheta, smith, dendrogram. For line/scatter/column/histogram/box use the dedicated tools; for matrix-range plots use origin_plot_matrix_id.

Inputs: path (required), kind (required), selected_cols, graph_name, +3 more. Returns: object

origin_plot_autoD

Choose a chart route from table data and create the plot.

Inputs: path (required), intent, x_col, y_cols, +19 more. Returns: object

origin_plot_boxC

Import table data and create a box plot.

Inputs: path (required), x_col, y_cols, book_name, +16 more. Returns: object

origin_plot_chart_atlasC

Create a plot using chart-atlas intent routing.

Inputs: path (required), intent (required), x_col, y_cols, +20 more. Returns: object

origin_plot_columnC

Import table data and create a column/bar-style graph.

Inputs: path (required), x_col, y_cols, book_name, +18 more. Returns: object

origin_plot_dual_yB

Import table data and create a double-Y (two Y axes) graph.

y1_cols are plotted against the left Y axis (layer 1) and y2_cols against the right Y axis (layer 2), sharing one X axis. Both lists are required. plot_type is "line", "scatter", "line_symbol", or "column".

Inputs: path (required), x_col, y1_cols, y2_cols, +17 more. Returns: object

origin_plot_from_rangeC

Create a graph from an existing Origin range and template.

Inputs: data_range (required), template, plot_type, graph_name, +4 more. Returns: object

origin_plot_histogramC

Import table data and create a histogram graph.

Inputs: path (required), x_col, y_cols, book_name, +16 more. Returns: object

origin_plot_lineC

Import table data and create a line graph.

Inputs: path (required), x_col, y_cols, book_name, +18 more. Returns: object

origin_plot_line_symbolC

Import table data and create a line+symbol graph.

Inputs: path (required), x_col, y_cols, book_name, +18 more. Returns: object

origin_plot_scatterC

Import table data and create a scatter graph.

Inputs: path (required), x_col, y_cols, book_name, +18 more. Returns: object

origin_plot_style_capabilitiesB

List semantic plot style controls by chart type, Plot Type ID, or term.

Inputs: chart_type, plot_type_id, query. Returns: object

origin_plot_style_setter_coverageC

Report which implemented style registry entries have executable safe setters.

Inputs: chart_type, plot_type_id. Returns: object

origin_plot_table_idC

Create a graph from table data using an Origin Plot Type ID and template.

Inputs: path (required), plot_type_id (required), template (required), selected_cols, +16 more. Returns: object

origin_query_knowledgeC

Search the local Origin knowledge base by keyword.

Inputs: query (required), collection, version, limit. Returns: object

origin_read_worksheetC

Read a window of Origin worksheet data as structured rows.

Inputs: book_name, sheet_name, start_row, max_rows, +1 more. Returns: object

origin_recommend_chartC

Recommend chart types from table shape, column semantics, and optional intent.

Inputs: path (required), intent, x_col, y_cols, +11 more. Returns: object

origin_rename_templateA

Rename a saved user template without redrawing the graph.

Renames the template's .otpu/.json/.png files and updates the index. Returns renamed: false with a reason such as not_found or name_exists.

Inputs: old_name (required), new_name (required). Returns: object

origin_run_analysisC

Run a named Origin analysis X-Function through LabTalk.

Inputs: analysis (required), worksheet, x_col, y_col, +4 more. Returns: object

origin_run_labtalkC

Execute LabTalk script text inside Origin and optionally return captured output.

Inputs: script (required), capture_log. Returns: object

origin_save_graph_templateA

Save a finished graph as a reusable user template with searchable metadata.

The template is stored in the user template library (default ~/.origin-mcp/templates). Reuse it later by passing template=<name> to any plotting tool. Provide plot_types, roles, and n_columns to make the template easier to find via origin_search_templates.

Inputs: name (required), description, tags, plot_types, +4 more. Returns: object

origin_search_templatesA

Search the user template library for templates matching an intended plot.

Ranks saved templates by plot type, data shape, tags, and keywords. Call this before plotting to reuse a matching style; each result carries a score and match_reasons. Returns an empty list when nothing matches.

Inputs: query, plot_type, n_columns, tags, +1 more. Returns: object

origin_set_axisC

Set axis scale, limits, tick step, and title.

Inputs: graph_name, layer_index, axis, scale, +4 more. Returns: object

origin_set_axis_breakA

Add or remove an axis break on a graph axis.

Hides the range between break_from and break_to on the chosen axis ("x" or "y"), so data on either side is shown closer together. position is the break location as a percent of the axis length; post_break_increment sets the tick spacing after the break. Pass enabled=false to remove the break.

Inputs: break_from, break_to, axis, graph_name, +4 more. Returns: object

origin_set_plot_propertyD

Set one registry-backed plot style property if it is implemented.

Inputs: property_name (required), value (required), graph_name, layer_index, +3 more. Returns: object

origin_set_plot_styleC

Set line, color, symbol, column/bar gap, and transparency style on plots.

Inputs: graph_name, layer_index, plot_index, color, +6 more. Returns: object

origin_transpose_worksheetA

Transpose a worksheet so rows become columns.

When label_column is given, that column's values become the new column headers; otherwise headers are R1, R2, .... The original column names become a leading "Field" column. Provide output_book/output_sheet to write to a new sheet instead of in place.

Inputs: label_column, book_name, sheet_name, output_book, +1 more. Returns: object

origin_update_template_metadataA

Edit a saved template's searchable metadata in place (no redraw needed).

Only the fields you pass are changed; omitted fields are left untouched. The .otpu template file itself is not modified. Use this to fix tags, description, or matching hints without re-saving from a graph. Returns updated: false with reason not_found when no template carries name.

Inputs: name (required), description, tags, plot_types, +2 more. Returns: object

origin_view_graphA

Render an Origin graph and return it as an image the model can see.

Unlike origin_export_graph this leaves no file behind: the graph is rendered to a temporary PNG, returned as an image content block alongside a small text summary, and the temp file is deleted. Use it to visually verify a plot and iterate on it. max_width bounds the rendered pixel width to keep the returned image (and its token cost) small. Requires a vision-capable client to be useful.

Inputs: graph_name, max_width.

origin_write_worksheetC

Write structured rows into a new or existing Origin worksheet.

Inputs: rows (required), columns, book_name, sheet_name, +2 more. Returns: object

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3/5.0

    Scored across 63 tools

    Disambiguation4/5

    Most tools have distinct purposes, but there is potential confusion among the many plot creation tools (e.g., 'origin_plot' with a 'kind' parameter vs. dedicated 'origin_plot_*' tools) and between 'origin_execute_figure_spec' and 'origin_plan_figure_spec'. Overall, descriptions are clear enough to differentiate.

    Naming Consistency5/5

    All tools follow a consistent 'origin_verb_noun' pattern (e.g., 'origin_add_calculated_columns', 'origin_plot_scatter'). The naming is uniform and predictable, enhancing usability.

    Tool Count3/5

    With 63 tools, the server is extensive but covers a complex domain (Origin software). It exceeds the typical 'heavy' threshold (25+), which may be overwhelming, but each tool serves a specific purpose, and the count is reasonable given the breadth of functionality.

    Completeness4/5

    The tool surface is comprehensive, covering data import, manipulation, multiple plot types, analysis, graph customization, template management, and background tasks. Minor gaps exist, such as no explicit data export tool (other than graph export), but the core workflows are well-covered.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables AI assistants to control Origin/OriginPro on Windows, including data import, worksheet editing, graphing, analysis, and figure export.
      25
      153
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      A lightweight MCP HTTP server giving AI assistants real tools to interact with your Windows machine, including running commands, file access, system info, web search, and browser automation.
      1
      -
    • A
      license
      Not graded
      quality
      D
      maintenance
      An open-source MCP server for Windows that provides traceable system operations (file, screenshot, clipboard, process, power management) to AI assistants via HTTP/SSE.
      14
      GPL 3.0