Refactored to 8 development tools, removed deprecated WorkMgr async pattern
The IRIS Execute MCP server provides 8 fully functional tools for comprehensive IRIS development integration, including basic operations, compilation tools, and advanced unit testing capabilities with a custom VS Code-friendly TestRunner.
# Clone the repository git clone https://github.com/jbrandtmse/iris-execute-mcp.git cd iris-execute-mcp
Create virtual environment
python -m venv venv
Activate virtual environment
Windows:
venv\Scripts\activate
Linux/Mac:
source venv/bin/activate
Install dependencies
pip install -r requirements.txt
Create a .env
file (copy from .env.example
):
IRIS_HOSTNAME=localhost
IRIS_PORT=1972
IRIS_NAMESPACE=HSCUSTOM
IRIS_USERNAME=*username*
IRIS_PASSWORD=*password*
src/ExecuteMCP/Core/
and src/ExecuteMCP/TestRunner/
directoriesDo $System.OBJ.CompilePackage("ExecuteMCP")
Add this to your Cline MCP settings:
{
"iris-execute-mcp": {
"autoApprove": [
"execute_command",
"execute_classmethod",
"get_global",
"set_global",
"get_system_info",
"compile_objectscript_class",
"compile_objectscript_package",
"execute_unit_tests"
],
"disabled": false,
"timeout": 60,
"type": "stdio",
"command": "C:/iris-execute-mcp/venv/Scripts/python.exe",
"args": ["C:/iris-execute-mcp/iris_execute_mcp.py"],
"env": {
"IRIS_HOSTNAME": "localhost",
"IRIS_PORT": "1972",
"IRIS_NAMESPACE": "HSCUSTOM",
"IRIS_USERNAME": "*username*",
"IRIS_PASSWORD": "*password*"
}
}
}
✅ Server Name: iris-execute-mcp
✅ Script Name: iris_execute_mcp.py
(consolidated server with all features)
✅ 8 Tools: 5 basic + 2 compilation + 1 unit testing tool
✅ Virtual Environment: Uses isolated dependencies for reliability
✅ Environment Variables: Proper IRIS connection configuration
✅ Auto-Approve: All 8 tools approved for seamless AI workflows
# Navigate to project directory cd C:/iris-execute-mcp
Activate virtual environment
venv\Scripts\activate
Test server startup
python iris_execute_mcp.py
Expected output:
INFO - Starting IRIS Execute FastMCP Server
INFO - IRIS Available: True
INFO - ✅ IRIS connectivity test passed
INFO - 🚀 FastMCP server ready for connections
# Validate MVP implementation
python validate_mvp.py
Execute ObjectScript commands with I/O capture:
# Examples: "Execute: WRITE $ZV" → Returns actual IRIS version string
"Execute: SET ^MyGlobal = 123"
→ Returns "Command executed successfully"
Dynamically invoke ObjectScript class methods:
# Examples: "Call GetVersion on %SYSTEM.Version" → Returns IRIS version details
"Call ABS on %SYSTEM.SQL.Functions with parameter -456"
→ Returns 456
Manage IRIS globals dynamically:
# Set a global "Set global ^MyApp('Config','Version') to '1.0.0'"
Get a global
"Get the value of ^MyApp('Config','Version')"
Retrieve IRIS system information:
"What version of IRIS is running?"
→ Returns version, namespace, timestamp
Compile one or more ObjectScript classes with comprehensive error reporting.
IMPORTANT: Class names MUST include the .cls suffix for proper compilation.
# Compile single class (note the .cls suffix) "Compile ObjectScript class MyPackage.MyClass.cls" → Returns compilation status and any errors
Compile multiple classes (all with .cls suffix)
"Compile classes MyPackage.Class1.cls, MyPackage.Class2.cls"
→ Returns status for each classCustom compilation flags
"Compile MyPackage.MyClass.cls with flags 'bckry'"
→ b=rebuild, c=compile, k=keep source, r=recursive, y=display infoNote: If .cls suffix is omitted, it will be automatically added
"Compile MyPackage.MyClass" → Internally becomes "MyPackage.MyClass.cls"
Compile all classes in a package recursively:
# Compile entire package "Compile ObjectScript package MyPackage" → Compiles all classes in package and sub-packages
With custom flags
"Compile package MyPackage with flags 'bc'"
→ Basic compile without recursion
Execute tests using the DirectTestRunner instead of %UnitTest.Manager.
✅ 5,700x Performance Improvement!
This tool provides a VS Code-friendly alternative to the standard %UnitTest.Manager, eliminating file path dependencies and VS Code sync issues. The DirectTestRunner executes tests directly from compiled classes without filesystem interaction, achieving execution times of 6-21ms instead of the previous 60-120 second timeouts.
# Run all tests in a package "Execute unit tests for ExecuteMCP.Test" → Executes all test classes in the package
Run tests in a specific class
"Execute unit tests for ExecuteMCP.Test.SimpleTest"
→ Executes all test methods in the classRun a specific test method
"Execute unit tests for ExecuteMCP.Test.SimpleTest:TestAddition"
→ Executes only the specified test methodResponse includes:
- Summary with pass/fail counts
- Individual test results
- Execution times
- Full assertion details
Advantages over %UnitTest.Manager:
If you see “MCP error -32000: Connection closed”:
python iris_execute_mcp.py
Do $System.OBJ.CompilePackage("ExecuteMCP")
Write $SYSTEM.Security.Check("%Development","USE")
// Compile test classes (VS Code syncs but doesn't compile)
Do $System.OBJ.CompilePackage("ExecuteMCP.Test")
ExecuteMCP.Test
- Run all tests in packageExecuteMCP.Test.SampleUnitTest
- Run all tests in classExecuteMCP.Test.SampleUnitTest:TestMethod
- Run specific method# Complete test workflow with compilation
1. "Compile ObjectScript package ExecuteMCP.Test"
2. "Execute unit tests for ExecuteMCP.Test.SampleUnitTest"
3. "Get global ^TestRunnerResults to see detailed results"
The DirectTestRunner returns structured JSON with detailed test results:
{
"status": "success",
"summary": {
"passed": 5,
"failed": 1,
"errors": 0,
"skipped": 0,
"total": 6
},
"tests": [
{
"class": "ExecuteMCP.Test.SimpleTest",
"method": "TestAddition",
"status": "passed",
"duration": 0.001
}
],
"executionTime": 0.125
}
Contributions welcome! Please ensure:
MIT License - See LICENSE file for details
/documentation
directory/memory-bank
for project contextStatus: ✅ All 8 tools operational with DirectTestRunner breakthrough
Last Updated: September 15, 2025