How would you use an Igor MCP Server (AI related)
We are exploring creating a Model Context Protocol (MCP) server for Igor Pro. If you currently use a tool such as Claude Desktop, GitHub Copilot, etc. you could let that program know about Igor's MCP server and then you could ask your AI client to do something in Igor Pro.
Here's a transcript of an example conversation:
User: use Igor to find the mean of these numbers: 1, 2, 3, 4, 5
GitHub Copilot:
I'll first make a wave with those numbers, then call the `mean` function on it.
Ran `execute_command`
Completed with input: {
"command": "Make/O/N=5 tempWave = {1, 2, 3, 4, 5}"
}
Ran `call_function`
Completed with input: {
"name": "mean",
"args": [
{
"wave": "root:tempWave"
}
]
}
The mean of 1, 2, 3, 4, 5 is **3**.
Please tell us what you might want to do with this type of workflow so that we can have some concrete use cases in mind.
To be clear, having AI write Igor code or having access to AI from within Igor Pro are separate issues and would not be part of an Igor Pro MCP server.
My question is what functionality the MCP would provide as unique and useful, not available to high level AI already.
Mathematical functions can be done in Python and AI understands Python lot better than Igor. Claude somehow got running Python and numpy when it needed on my Mac without asking. So math functions may be useful for those who have Igor but not Python - and at the same time know how to configure MCP... That might be smallish number of users.
I would find Igor MCP likely useful, if AI could use the MCP to look for data inside Igor experiments, as that is otherwise very difficult to do (unless one uses h5xp, which AI can read through Python). But in that case it will also be difficult to communicate properly back results to AI ( = what to actually return?).
My use case:
I wrote MCP server (and AI app) in Python with ~20 functions for my instrument users and it works. MCP functions let AI look inside HDF5 files instrument collects, automatically reduces, and optionally analyzes. MCP has functions to evaluate what data are available in which folder, what is inside those HDF5 files (raw data, reduced data, fitted results), understands the specific data structure, can tabulate various values, and even generate graphs. User can then come to instrument and ask AI about their experiment - what was done, which conditions were measured, what were the results and even generate trends of fitted values. To be fair, I have yet to really test this on users, but technically it works. If it will work for users is a good question I will answer soon. But was fun to see that AI figured out (on my development data) that we are doing metallurgy and looking for precipitates and start to provide materials suggestions ;-)
Similar to that, Igor MCP would be useful for my AI app, if user could have one or more Igor experiments and ask about them. But, to be fair, in that case it is likely better to let AI run inside Igor already and give AI access to Igor from inside.
June 2, 2026 at 07:43 pm - Permalink
For context, here is information on Matlab's MCP server and an MCP server for Origin Lab. They take very different approaches--Matlab's server provides only 5 tools (check_matlab_code, evaluate_matlab_code, run_matlab_file, run_matlab_test_file, detect_matlab_toolboxes). The MCP server for OriginLab has 65 tools (e.g. set_plot_line_style, set_plot_line_width, set_graph_font, set_tick_style).
The prototype Igor Pro MCP server I am working on currently has two tools, execute_command and call_function. execute_command is essentially a wrapper for Igor's Execute command, and call_function allows you to pass parameters (numeric, string, or Igor paths to waves/DFs) to functions (built-in, user-defined, or external) and get the result.
If the AI tool you are using are capable of writing good Igor code, I think a simplistic implementation like what Matlab does would be sufficient for Igor. The AI tool could write the code, then have Igor execute it (or call a function it wrote) to get information about the experiment, create a graph, export data, etc. If the AI tool you are using is not good at writing Igor code, then an approach like the Origin Lab MCP server makes more sense.
It's already possible to use Igor command line flags to load files and even execute functions, but getting the command right is difficult even for me. It's also not that straightforward to get results back using this approach--saving them to a file is usually the most straightforward approach. So I think even a basic MCP server would make it much easier for AI tools to do things in Igor and get results back.
A MCP server does essentially give AI access to Igor from the inside. But perhaps you want Igor to have its own AI chatbot or something similar? If so, what would you do with it? I doubt it's feasible for us to train a model such that it performs better than the frontier models at writing Igor code, but maybe you have other ideas for how our own AI model could be beneficial?
June 3, 2026 at 07:23 am - Permalink
The MatLab approach seems most appropriate for starting. I vote to include check_igorpro_code.
User: confirm that my Igor Pro procedure file is fully robust
-> confirmed headers
-> confirmed comments
-> confirmed if-then and switch case flows
-> ...
User: confirm that my Igor Pro procedure file has adequate comments
User: confirm that my Igor Pro procedure file will work with IP 8
User: does my Igor Pro procedure file have any redundant code
Otherwise, as a naive question: To what extent can users write their own MCP tool to work with content in Igor Pro? For example, suppose a developer has created a package AnalyzerPrime that provides utilities to analyze data using a method called the KXYZ model.
User: analyze the data in this CSV file using AnalyzerPrime package in Igor Pro against all primary variations using the KXYZ model: myCSVFile.csv
(not that I am inclined to want to start a new career writing MCP tools for my packages)
June 3, 2026 at 08:38 am - Permalink
Currently it would be slightly tricky, but doable for a user to write an MCP server in Python that then uses Igor's ActiveX COM interface to directly communicate with it. It's all about inter-process communication, and what mechanisms are available. In a future Igor version, Python will be able to connect to Igor from outside its process, meaning you'll be able to use the existing `igorpro` Python module to communicate from an MCP server run from VS Code or anything else, which is a much richer and easier to use API than what ActiveX provides.
June 3, 2026 at 11:09 am - Permalink
Put another way, again from someone so far on the outside of all this as to appear foolishly ignorant. You are developing a call_function tool. Presumably, this tool will be designed to access the wealth of built-in functions (and operations) in Igor Pro. Naively I presume, this must mean that the tool must be associated with a database search index to define specific things for each function, such as the required inputs, the expected output(s), and perhaps keywords. If so, can users tap into the structure of that database search index in such a way that a function inside their procedure file will be visible to the base MCP server without having to resort to coding in python.
I am thinking specifically of having a way for users to create functions that the built-in call_function tool in the default Igor Pro MCP server will recognize when and how to invoke it.
User: optimize the attached image using the ImageAnalyzer package in Igor Pro: image.tiff
-> loaded image.tiff file
-> ran `load_tiftowave` function in ImageAnalyzer
-> completed with inputs ...
-> resulted in outputs ...
-> ran `optimize_image` function in ImageAnalyzer
-> completed with inputs ...
Perhaps this could be through a specific encoding of prefix comments before the function
// MCP Input: tiff image file
// MCP Output: 3D image wave
Function load_tiftowave(string filename)
// MCP Input: 3D wave
// MCP Output: optimized image
Function optimize_image(wave image)
Or, perhaps this is to be handled by writing a companion MCP library in parallel to the .ipf procedure file where the MCP library could be developed either in Igor Pro or using a raw text editor.
Essentially, my vision is to have a way that developers working with Igor Pro can encode directly in Igor Pro how and what is needed to invoke their function via the default call_function tool.
Again, I appreciate if I am so far out in left field with my questions that I may as well climb the fence behind me and sit in the bleachers while the pros have at it.
June 3, 2026 at 11:44 am - Permalink
Pretty much none of the functionality that would be necessary to implement your suggestion currently exists in Igor. For an Igor Pro MCP server to provide direct access to some feature, the feature needs to exist in Igor. At best what we could currently do is something like compile a procedure file and report any compile errors, though at the moment our compiler stops at the first error so it can report it to the user. In the context of an MCP server, we'd really want to check the entire file (or perhaps all files being compiled). That may be doable but hasn't been done yet.
An MCP server is a separate process that the AI tool starts. The MCP server then would start Igor or open some interprocess communication with Igor to send commands and get information back. Igor currently can run as an ActiveX server, so the MCP server could act as an ActiveX client and communicate with Igor. Or it could require that one of a few interprocess communication XOPs be installed (ZeroMQ and Tango come to mind).
Our experimental implementation adds a new mechanism for interprocess communication that is a little easier to work with. If we document and expose that mechanism to users, they could in theory write their own MCP server to do whatever they wanted, assuming it's possible to do that via the interprocess communication mechanism.
June 3, 2026 at 12:00 pm - Permalink
Ben is the Python guy so the solution to every problem he sees involves Python 😀. However nothing that I'm talking about with respect to the Igor Pro MCP server requires or uses Python.
Sure. We already have FunctionList and OperationList, and the call_function method would allow the AI to figure out which functions and operations are available. Of course the AI tool needs to know about FunctionList and OperationList in the first place. If you're using Claude Opus, for example, it already knows about Igor's commands (more or less) so it probably wouldn't need to call FunctionList or OperationList. An AI model that is not so familiar with Igor may or may not make a lot of progress even if it knows a list of functions or operations that are available because it would also need to know what parameters to pass. It could use FunctionInfo to get parameters, but without documentation it would probably get stuck. Retrieving documentation is a separate method we've considered adding, but it's not clear yet how useful that would be.
June 3, 2026 at 12:18 pm - Permalink
I see any AI (cloud or local model) familiarity with Python as major issue. It brings question of "is it (=Igor mcp) worth it, will anyone use it" to my mind...
MCP server basically is automation service. Like Apple Script or other automating/scripting methods developed (and abandoned) over the last 40 years or so. It lets AI use Igor (Matlab, Origin) as a tool to do some work. Since all AI models know Python really well, unless they reside on computer without Python and with Igor (Matlab, Origin), they will choose Python. Import numpy (usually available) and they can get lots of stuff done more reliably for them than using our favorite other tools(s). You can force them if needed, but in that case you likely know enough what you do and AI may not be that helpful.
Personally, I see two useful ways to have AI available inside Igor:
AI for analysis help. This is where AI can help most to "basic" users in the future. Most of my Irena users fall into this category.
Help them plot dependencies, propose methods for analysis, help the write small chunks of code for such analysis. AI would need to have Igor skills (better version of https://github.com/jilavsky/igorpro-skills) which will let it be Igor expert on top of being well prompted into being appropriate type of expert for user specific area of science. It is here where we now have high friction between data Igor generates and any type of AI input which user needs to do to get proper AI suggestion... I do not even know, how to send data to AI from within Igor now, but I have it working in Python for data generated by Python analysis tools. Neither Matlab nor Origin seem to address this, yet this is where "GUI" users might find AI most helpful. May be, the jury is still out on if typical scientist is interested in this or not.
June 3, 2026 at 06:12 pm - Permalink
To return to the example that Adam posted, it seems you are asking why should we be enticed by a base MCP server in Igor Pro that can allow folks to do this ...
... when anyone and everyone who wants can instead already easily do this, pretty much by default ...
I work within Igor Pro (rather than python or elsewhere) because I can develop (what I hope are intuitive and well-structured) UI panels to manage the analysis workflows that I need and because I can create high-quality graphics to show the results of that work. These two aspects are not met to my standards by any other software package. I also appreciate/understand the programming syntax in Igor Pro better than the syntax in other analysis packages.
With the above in mind, the greatest benefit of having an MCP server for Igor Pro would be when I could easily develop hooks to allow AI tools to know about and properly access specific analysis routines in my (publicly posted) packages. Easy means developing the hooks within Igor Pro procedure files or (as seems possible) by including properly structured markdown "header" files for the package. So, I would like to see development heading toward allowing folks to do this ...
If the MCP tools needed to reach this vision must/can only be developed using python, I suggest a corresponding effort from Wavemetrics should be considered. In addition to developing a base MCP server for Igor Pro, develop a set of templates and (video) tutorials documenting how to roll your own MCP server for Igor Pro using python. Much like the separate x-code handbooks of olden days, we (package developers) might/could benefit by having resources about (How to Create) An Igor Pro MCP Server Toolbox.
BTW ... I am greatly impressed by your posting of Igor Pro Skills!
June 4, 2026 at 12:54 pm - Permalink
One of the filters I applied in my arguments on this subject is how many more IP licenses is the feature likely to sell. Wavemetrics is business, it needs to thrive... Number of users who will use some of the mcp ideas proposed above is likely small and most are likely members of this discussion site ;-)
****
I agree. Many users (some of my Irena users tell me so) buy Igor specifically for the add on packages which let them easily analyze their specific problem. For them generic mcp for Igor is not really helpful. But custom mcp for specific packages might provide features with real value.
Coming back to the Python :
...and note, that I am completely innocent in any Python code associated with me. It is the result of lucky combination of unlimited tokens for best-in-class models paid by my employer and Claude (which is easy to configure in VScode) work. And me bossing Claude around until things work to my satisfaction...
After getting Claude to write functional code which does the math, provides GUI, data plotting, import, export,... I asked it to make specific features into mcp server. Claude added mcp server package to Python environment and configured/documented the functions we agreed on after some discussion on what is useful, why, and how. It took may be two hours of my time and worked even without debugging round. It increased value of the package significantly, even for my own use. It was literally trivial - but high value - add on from my point of view.
I can see your argument, that having ability to add such custom mcp to our packages may be of real value... At the same time, I suspect this makes the originally discussed mcp problem order of magnitude more complex.
June 4, 2026 at 04:44 pm - Permalink