IRIS Development Tools MCP Server

io.github.jbrandtmse由 GitHub 账号 jbrandtmse 发布v1.1.0更新于 Nov 22, 2026

IRIS Development Tools MCP Server

已验证STDIO仅桌面数据库开发者工具

概览

AI 生成的概览

面向 InterSystems IRIS 开发的 MCP 服务器:读取、编辑、编译和测试 ObjectScript 代码,执行 SQL,并查看全局变量与服务器配置。

可以做什么
  • 读取、搜索、列出并索引 ObjectScript 类、例程和包含文件,查询宏定义与编译中间代码
  • 编辑、新建、删除文档,从磁盘批量上传、导出和格式转换,然后编译
  • 执行 SQL 查询与语句,查看执行计划并获取索引与性能建议
  • 读取、设置和删除全局变量节点,执行 ObjectScript 命令或类方法
  • 运行单元测试并跟踪覆盖率与运行状态,统计代码行数
  • 比较两个 IRIS 配置并生成或执行环境提升计划
适用场景
适合让助手直接操作 InterSystems IRIS 实例:浏览和修改 ObjectScript 代码、借助 SQL 与全局变量排查问题、运行测试,或在 stage 与生产等环境之间比较并提升配置。
运行要求
通过 npm 包以 npx 在本地运行。需要可访问的 IRIS Web 服务器,并设置环境变量 IRIS_HOST、IRIS_PORT、IRIS_USERNAME 和 IRIS_PASSWORD,可选 IRIS_NAMESPACE 与 IRIS_HTTPS。多配置档案、治理策略、只读模式、工具预设和审计日志通过其他可选环境变量配置。
安装前请注意
必须提供 IRIS_PASSWORD 凭据,不要将其提交到版本控制。多个工具会写入或删除数据:文档写入、编辑、删除、上传和 XML 导入,全局变量设置与删除,SQL 语句,ObjectScript 命令与类方法执行,测试运行,以及环境提升执行。全局变量删除会永久移除数据,环境提升会改动目标环境。可用只读预设或治理策略限制写操作。

安装

在 SourceWeft 中

  1. 打开 控制台中的 IRIS Development Tools MCP Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

@iris-mcp/dev

IRIS Development Tools MCP Server -- ObjectScript document CRUD, compilation, SQL execution, analysis, and performance advisories, globals management, code execution, unit testing with line coverage (a verdict against a target, and a Cobertura file for CI), package browsing, bulk export, lines-of-code analysis, and cross-profile environment diff & promotion via the Model Context Protocol.

Part of the IRIS MCP Server Suite.


Installation

npm install -g @iris-mcp/dev

Or run directly without installing:

npx -y @iris-mcp/dev@1

Configuration

All servers use the same environment variables:

VariableDefaultDescription
IRIS_HOSTlocalhostIRIS hostname or IP
IRIS_PORT52773IRIS web server port
IRIS_USERNAME(required)IRIS username. There is no default: a server that starts without it fails, naming the variable.
IRIS_PASSWORD(required)IRIS password
IRIS_NAMESPACEUSERDefault IRIS namespace
IRIS_HTTPSfalseUse HTTPS instead of HTTP
IRIS_ACCEPT_LANGUAGEen-US,en;q=0.9Optional. Accept-Language header sent on every request, pinning %Status error text to a predictable language instead of whatever locale an unspecified header resolves to. IRIS also chooses the message language per request, by matching this header against the languages the instance has, so a localized prefix can still appear when the header names one — existing prefix-stripping is unaffected. Details: suite README.

Multiple servers & the server parameter

Optionally, set IRIS_PROFILES (a JSON map of named IRIS instances) and IRIS_GOVERNANCE (a JSON tool-action policy) to target several instances from one server and restrict which actions are allowed. Every tool accepts an optional server parameter (a profile name from IRIS_PROFILES) that selects which instance the call targets; omit it to use the default profile. It composes with the existing per-call namespace override. Both variables are optional and additive — omit them and this server behaves exactly as a single-instance, fully-enabled install. Full model, escaping, and worked examples: Multiple Servers & Governance.

Optionally, set IRIS_GOVERNANCE_FILE to the path of a JSON file of the same shape as IRIS_GOVERNANCE to load policy from a file shared across several MCP clients instead of inline JSON. Optional and additive — unset (the default) means inert: no file is ever read and behavior is byte-for-byte unchanged. An IRIS_GOVERNANCE env value always wins over the file. Details: Governance file.

Read-only mode (IRIS_GOVERNANCE_PRESET)

Set IRIS_GOVERNANCE_PRESET=read-only to block every write-classified action on this server with one environment variable — no IRIS_GOVERNANCE JSON needed. IRIS_GOVERNANCE_PRESET is framework configuration, not a tool — it applies identically across all five servers in the suite (@iris-mcp/dev included), not something this package registers or exposes. An explicit IRIS_GOVERNANCE override still wins over the preset. Omit (or set "full") for today's behavior (opt-in, default off). Details: Read-only mode.

Tool Visibility (IRIS_TOOLS_PRESET)

Set IRIS_TOOLS_PRESET=core to trim this server's tools/list to a 15-tool runtime roster (14 package tools + iris_server_profiles; about 13 is a guideline, not a hard limit) — the authoring loop (get/edit/put/list/compile/load), the execution & debug loop (command/classmethod/tests, global get/set/kill), and the SQL tools iris_sql_execute and iris_sql_query. iris_doc_get and iris_doc_edit are a pair and stay co-visible in every preset, and so are iris_test_coverage and iris_test_status (both outside core). IRIS_TOOLS_PRESET=developer keeps all 33 runtime tools (32 + iris_server_profiles) visible — every tool on this server is already dev-relevant, so developer behaves like full here. Omit (or set "full") for today's behavior — every tool visible, byte-for-byte. IRIS_TOOLS_DISABLE/IRIS_TOOLS_ENABLE hide/force-show individual tools independent of the preset. This is orthogonal to IRIS_GOVERNANCE_PRESET above (visibility = does the agent know a tool exists; governance = is an already-visible call allowed). Full model, exact per-tool roster, and the payload-size measurements: Tool Visibility Presets.

Prompt-pack limitation. Two of this server's prompts call tools core hides: diagnose-slow-query calls iris_sql_analyze (hidden under core), and promote-environment-change calls iris_env_diff/iris_env_promote (both hidden together under core — they are always co-visible). Both prompts work unchanged under full or developer. Running under core, either switch to full/developer or set IRIS_TOOLS_ENABLE to re-show the specific tool(s) the prompt needs.


Audit Logging (IRIS_AUDIT_LOG)

For regulated deployments, set IRIS_AUDIT_LOG=/path/to/audit.jsonl to record every MCP tool call this server handles — success, error, or governance denial — as one secrets-free JSON line (session, sequence, tool, action, outcome, redacted parameter keys). It is off by default (unset ⇒ a mechanical no-op, zero filesystem writes) and framework-wide — the same interceptor covers every tool on this server. IRIS_AUDIT_LOG_MAX_MB (default 50) sets the single-generation rotation size; IRIS_AUDIT_LOG_PARAMS=true additionally records (redacted) parameter values. Because it is server-side configuration — not a governed tool action — an AI client cannot disable its own audit trail; only an operator with server-environment access can. Full record shape, redaction rules, and how it differs from IRIS's own iris_audit_* security-audit tools: Compliance & Auditability.

Server Manager connections (IRIS_SERVER_MANAGER)

Set IRIS_SERVER_MANAGER=auto to import IRIS connection definitions straight from the InterSystems Server Manager VS Code extension's intersystems.servers settings — one curated roster instead of re-typing host/port/username into every MCP client's config. IRIS_SERVER_MANAGER is framework configuration, not a tool — it applies identically across all five servers in the suite. Omit (or set "off", the default) for today's behavior: no settings file is ever read. A password-less imported definition is completed via an OS-keychain / IRIS_CREDENTIAL_HELPER credential chain (see the iris-mcp-credentials CLI — Server Manager passwords themselves are never readable outside VS Code, by design); iris_server_profiles reports where each profile's connection fields came from via source ("env"/"server-manager") and sourceFile. The companion variables are all optional, each with its own default: IRIS_SM_SERVERS (unset — import all), IRIS_SM_SETTINGS_PATHS (unset — normal discovery), IRIS_SM_WORKSPACE (unset — the process CWD) and IRIS_CREDENTIAL_HELPER (unset). Full model, discovery precedence, and the SecretStorage boundary explained plainly: Server Manager connections.

MCP Client Configuration

Claude Code (.mcp.json)

{
  "mcpServers": {
    "iris-dev-mcp": {
      "command": "npx",
      "args": ["-y", "@iris-mcp/dev@1"],
      "env": {
        "IRIS_HOST": "localhost",
        "IRIS_PORT": "52773",
        "IRIS_USERNAME": "_SYSTEM",
        "IRIS_PASSWORD": "SYS",
        "IRIS_NAMESPACE": "USER"
      }
    }
  }
}

Claude Desktop (claude_desktop_config.json)

{
  "mcpServers": {
    "iris-dev-mcp": {
      "command": "npx",
      "args": ["-y", "@iris-mcp/dev@1"],
      "env": {
        "IRIS_HOST": "localhost",
        "IRIS_PORT": "52773",
        "IRIS_USERNAME": "_SYSTEM",
        "IRIS_PASSWORD": "SYS",
        "IRIS_NAMESPACE": "USER"
      }
    }
  }
}

Cursor

Add to your Cursor MCP settings:

{
  "iris-dev-mcp": {
    "command": "npx",
    "args": ["-y", "@iris-mcp/dev@1"],
    "env": {
      "IRIS_HOST": "localhost",
      "IRIS_PORT": "52773",
      "IRIS_USERNAME": "_SYSTEM",
      "IRIS_PASSWORD": "SYS",
      "IRIS_NAMESPACE": "USER"
    }
  }
}

Note: Replace "SYS" with your actual IRIS password. Avoid committing real credentials to version control.


Tool Reference

Framework Tools

Provided by the shared framework and available on every suite server (Epic 19).

ToolDescriptionKey ParametersAnnotations
iris_server_profilesCall this first. Reports the configured server-profile roster (non-secret connection metadata — password is never included) and the effective governance policy (which actions are enabled/disabled).profile?, allProfiles?readOnly, idempotent

iris_server_profiles is a read tool, enabled by default. It reports in-memory config and does not connect to IRIS. Use it to choose the right server profile and avoid governance-disabled actions before invoking other tools.

Document Tools

ToolDescriptionKey ParametersAnnotations
iris_doc_getRetrieve a document by name (UDL or XML format), or a numbered line range of a UDL text documentname, namespace?, format?, metadataOnly?, startLine?, endLine?readOnly, idempotent
iris_doc_putDebug/scratch — write a document directly to IRIS without creating a file on disk (use iris_doc_load for production code). An existing document is saved only if it has not changed since the tool read its current version; a put to an existing class that drops one of its Storage definitions is refusedname, content, namespace?, ignoreConflict? (default: false; skips the version check), allowStorageRegeneration? (default: false; lets a put that drops Storage definitions through)destructive, idempotent
iris_doc_editSurgical line edits of an existing class, routine or include file: insert, delete or replace lines addressed by the numbers of a ranged iris_doc_get, each guarded by its expected text; all edits apply or none, in one version-checked save, and the answer (a unified diff, an excerpt per edit, totalLines, ts) comes from a re-read. Does not compile. apply is a write that is enabled by default (Project Lead decision S-3: every edit is guarded by expected, the save is version-checked and never retried, and a class edit that would drop a Storage definition is refused); disable it with {"global": {"iris_doc_edit:apply": false}}, or by disabling iris_doc_put. regenerateStorage (the Storage-guard override) is disabled by defaultaction (apply | regenerateStorage), name, edits (each: op, afterLine?, startLine?, endLine?, text?, expected), namespace?destructive
iris_doc_deleteDelete one or more documentsname (string or array), namespace?destructive, idempotent
iris_doc_listList documents with optional filterscategory?, type?, filter?, generated?, namespace?, modifiedSince? (refused: IRIS cannot filter documents by modification time, so a call with a non-empty value is refused and lists nothing; compare the ts of the listed documents instead), cursor?readOnly, idempotent
iris_doc_loadBulk upload files from disk into IRISpath (glob), baseDir?, compile?, flags?, namespace?, ignoreConflict? (default: true: each file overwrites its server copy without a version check; false: a file whose document already exists is saved under a version check, and fails with DOCUMENT_CONFLICT if the document changes on the server while it is being saved, while the other files continue), allowStorageRegeneration? (default: false: a class file whose content drops one of the Storage definitions the existing class has is refused as a failures entry with STORAGE_DROPPED, nothing is stored for that file and the other files continue; true: the file is uploaded, IRIS generates new storage at the next compile, and the result's storageDrops names the dropped definitions)destructive, idempotent
iris_doc_exportBulk-download documents to a local directory (inverse of iris_doc_load)destinationDir, prefix?, category?, type?, generated?, system?, modifiedSince? (refused, as for iris_doc_list), namespace?, includeManifest?, ignoreErrors?, useShortPaths?, overwrite?, continueDownloadOnTimeout?destructive, idempotent

Package Browsing Tools

ToolDescriptionKey ParametersAnnotations
iris_package_listRoll up namespace documents into packages at a chosen depthdepth?, prefix?, category?, type?, generated?, system?, modifiedSince? (refused, as for iris_doc_list), namespace?readOnly, idempotent

Compilation Tools

ToolDescriptionKey ParametersAnnotations
iris_doc_compileCompile one or more documentsdoc (string or array), flags?, async?, namespace?idempotent

Code Intelligence Tools

ToolDescriptionKey ParametersAnnotations
iris_doc_indexGet class structure (methods, properties, superclasses)name, namespace?readOnly, idempotent
iris_doc_searchSearch across code with regex/wildcard optionsquery, regex?, word?, case?, wild?, files?, sys?, gen?, max?, namespace?readOnly, idempotent
iris_macro_infoLook up macro definitions and source locationsname, document?, includes?, namespace?readOnly, idempotent
iris_routine_intermediateFetch the compiled-intermediate routine (.1.int) for a class by its bare name — macro-expanded form IRIS executes at runtimename, namespace?, format?readOnly, idempotent

Format and Export Tools

ToolDescriptionKey ParametersAnnotations
iris_doc_convertConvert document between UDL and XMLname, targetFormat, namespace?readOnly, idempotent
iris_doc_xml_exportExport, import, or list documents in XML format. Import loads definitions WITHOUT compiling by default (the response says so); pass compile: true to compile in the same call. An import that would drop a Storage definition an existing class has (its XML lacks it) is refused with STORAGE_DROPPED before anything is loadedaction, docs?, content?, compile?, flags?, namespace?, allowStorageRegeneration? (default: false: the import is refused if the XML of an existing class lacks one of the Storage definitions the class has; true: the import goes ahead, IRIS generates new storage at the next compile, and the result's storageDrops names the dropped definitions; import only)destructive (import), not idempotent

SQL Tools

ToolDescriptionKey ParametersAnnotations
iris_sql_executeExecute a SQL statement with parameterized values; optionally read-only (readOnly, default false), capped by rows affected (maxRowsAffected, default no cap; 0 is a dry count), or count-only (countOnly, default false)query, parameters?, maxRows?, readOnly?, maxRowsAffected?, countOnly?, namespace?destructive
iris_sql_queryRun a SQL query (SELECT only) with parameterized values; read, enabled by default, available under the read-only presetquery, parameters?, maxRows?, countOnly?, namespace?readOnly, idempotent
iris_sql_analyzeAnalyze SQL: show query plan (explain), parse maps/indexes from the plan (indexUsage), cached-statement stats (stats), currently-running statements (running), or get SQL Performance Advisor findings (advise)action, query?, filter?, maxRows?, workload?, topN?, namespace?readOnly, idempotent

Governance defaults: all five iris_sql_analyze actions (explain/stats/indexUsage/running/advise) are classified read and are therefore enabled by default — none is gated behind IRIS_GOVERNANCE. (A read classification is still required for every new tool key, but reads resolve enabled under the default seed.)

advise — SQL Performance Advisor (Epic 28): given query (or workload: true to advise the top-topN recent statements instead, mutually exclusive with query), returns evidence-cited findings — full-scan, missing-index (with a suggested CREATE INDEX DDL), stale-stats, unused-index, plan-anomaly — each carrying a plan excerpt and a confidence level. Strictly advisory: recommendations are heuristic; verify with explain before applying any change — advise never applies anything itself (no write/applyIndex action ships in v1). topN (default 5, max 20) bounds real analysis work in workload mode, not just output size — each statement analyzed is a full endpoint round-trip (EXPLAIN + dictionary reads), so a larger topN is proportionally more work. If the recent-statement workload source is unavailable on your IRIS edition/version, workload mode returns a clear capability message rather than a raw SQL error.

Governance defaults (SQL): iris_sql_execute keeps its pre-governance classification (a write that is enabled by default, so it is blocked by the read-only preset). iris_sql_query (Story 38.5) is classified read and is therefore enabled by default, and it stays enabled under the read-only preset. Its parent key is iris_sql_execute: when an operator explicitly disables iris_sql_execute, iris_sql_query is disabled too (a GOVERNANCE_DISABLED refusal with inheritedFrom: "iris_sql_execute"), unless iris_sql_query is set explicitly, e.g. {"global":{"iris_sql_execute":false,"iris_sql_query":true}}. See Parent keys.

SQL write safety (optional, opt-in — Story 38.5): iris_sql_execute takes readOnly (default false: only queries run; any other statement is refused with SQL_READ_ONLY before it runs), maxRowsAffected (default: no cap; 0 is a dry count: an INSERT, UPDATE or DELETE that changes more rows is rolled back and refused with SQL_ROWS_AFFECTED_CAP; under a cap only SELECT, INSERT, UPDATE and DELETE run, and an INSERT, UPDATE or DELETE whose text contains the %NOJOURN token (a comment or a string counts) is refused before it runs, because it turns journaling off and the rollback could not undo it; the count is the statement's own row count, so rows that triggers, cascades or functions change are not counted and a SELECT is not bounded by it) and countOnly (default false: returns totalCount and no rows). An operator may set IRIS_SQL_READ_ONLY=true (every call read-only; unset by default) and IRIS_SQL_MAX_ROWS_AFFECTED (a non-negative integer ceiling; unset by default); a call can only tighten them, and the result carries readOnlyForced or maxRowsAffectedCapped when one applied. IRIS_SQL_READ_ONLY accepts true or false (case-insensitive) and IRIS_SQL_MAX_ROWS_AFFECTED a non-negative integer (0 is valid); an empty value counts as unset, and any other value fails startup, naming the variable. Both variables are global: every profile inherits them, and there is no per-profile key. An INSERT, UPDATE or DELETE result carries rowsAffected (-1 for TRUNCATE TABLE). Read-only is statement-level read-only, not side-effect-free: the statement runs inside a transaction that is always rolled back, which does not undo $INCREMENT/$SEQUENCE counters (row ID counters included), process-private or IRISTEMP globals, changes made with %NOJOURN by a function, procedure or trigger the statement runs, work that parallel query worker processes do (%PARALLEL), JOB or device output, other external effects, or a function, procedure or trigger that starts, commits or rolls back a transaction (reported as an error when the transaction level the tool opened has changed, which a commit followed by a new TSTART does not show; some changes may be saved). A capped statement that is rolled back leaves the same effects. A capped INSERT, UPDATE or DELETE on a table stored in IRISTEMP (not journaled) keeps its row changes even when the cap rolls it back. Both tools run through the ExecuteMCPv2 /dev/sql/execute endpoint, which the bootstrap deploys; iris_sql_query always runs read-only.

SQL resource caps (optional, opt-in): an operator may set IRIS_SQL_MAX_ROWS (a ceiling on the number of rows iris_sql_execute and iris_sql_query return — the response carries rowsCapped: true when it clamps the caller's request, distinct from the pre-existing truncated/totalAvailable; it bounds the returned row count post-fetch, not the server-side result set or transfer) and/or IRIS_SQL_TIMEOUT (a per-request timeout in seconds) as environment variables. Both are unset by default (no cap, today's behavior) and apply regardless of IRIS_GOVERNANCE_PRESET. Details: suite README.

iris_execute_tests and iris_test_coverage wait budget (optional, opt-in — Story 36.1; Story 40.1): an operator may set IRIS_TEST_TIMEOUT (the tools' DEFAULT wait budget, in seconds, before either returns a "running" result instead of blocking further) as an environment variable. Unset by default — each tool keeps its 120-second default. It applies to every server profile (named IRIS_PROFILES entries inherit it, like IRIS_SQL_TIMEOUT). A per-call timeout argument, when given, takes precedence over IRIS_TEST_TIMEOUT. See the iris_execute_tests detail section below for the full running-result contract.

Server Tools

ToolDescriptionKey ParametersAnnotations
iris_server_infoGet IRIS version, platform, instance name(none)readOnly, idempotent
iris_server_namespaceGet namespace details and featuresnamespace?readOnly, idempotent

Global Tools

ToolDescriptionKey ParametersAnnotations
iris_global_getRead a global node valueglobal, subscripts?, namespace?readOnly, idempotent
iris_global_setSet a global node value (verified)global, value, subscripts?, namespace?destructive, idempotent
iris_global_killDelete a global node or subtreeglobal, subscripts?, namespace?destructive, idempotent
iris_global_listList globals with optional filterfilter?, caseSensitive?, cursor?, namespace?readOnly, idempotent

Execution Tools

ToolDescriptionKey ParametersAnnotations
iris_execute_commandExecute an ObjectScript commandcommand, namespace?destructive
iris_execute_classmethodInvoke a class method by name with up to 20 positional arguments (plain scalars or {byRef, value?} markers for ByRef/Output parameters). Captures any Write output from the target (no wrapper class needed for narrating methods, stock runners like %UnitTest.Manager.RunTest, or targets that switch namespace mid-call) and returns marked positions' post-call valuesclassName, methodName, args?, namespace?destructive
iris_execute_testsRun unit tests (package, class, or method level). A run that outlives its wait budget returns a non-error "running" result carrying jobId/runIndex handles instead of a timeout error — see detail below. Since Story 40.3 a run that includes %UnitTest.TestProduction tests is refused with PRODUCTION_BUSY while a different production runs in the namespace (the tool stays enabled; no new key). Classified write because it runs test code, and enabled by default (a key of the frozen baseline); since Story 40.4 its annotations say so (not read-only, not idempotent)target, level, timeout?, namespace?--

Code Metrics Tools

ToolDescriptionKey ParametersAnnotations
iris_loc_countCount lines of code in the namespace's ObjectScript documents (CLS/MAC/INT/INC): blank / source code / source comment / test code / test comment buckets, percentages, and the top-N largest documents. spec is REQUIRED (whole-namespace scans need an explicit * and risk the ~60s gateway timeout); compiler-generated documents are excluded by defaultspec, namespace?, includeGenerated?, topN?, format?readOnly, idempotent

Governance defaults: iris_loc_count is classified read and is therefore enabled by default — it is not gated behind IRIS_GOVERNANCE. (A read classification is still required for every new tool key, but reads resolve enabled under the default seed.)

Environment Tools

ToolDescriptionKey ParametersAnnotations
iris_env_diffCompare two configured IRIS profiles (source vs target) across up to five domains — documents, mappings, defaultSettings, webapps, config — and report a structured drift report. Default domains (no spec needed): mappings, defaultSettings, webapps, config; documents is opt-in only and requires spec (a bare * is refused unless allowWide is set). Credential-ish System Default Settings values are redactedsource, target, domains?, spec?, allowWide?, namespace?, ignoreTimestamps?readOnly, idempotent
iris_env_promoteTurn a prior iris_env_diff result into an ordered promotion plan (action: "plan"), or execute an allowlisted subset of that plan against target (action: "execute") behind four refuse-before-any-write gates: confirm, a steps allowlist, plan-hash freshness (the same diff re-hashed), and the target profile's own governance. Halts on the first failed step; never deletes a target-only item. Before the confirmation dialog and any write, execute reads the source and target copy of each class it would promote, and a source copy that drops a Storage definition the target class has refuses the whole execute with STORAGE_DROPPEDaction, source, target, diff?, plan?, steps?, confirm?, namespace?, allowStorageRegeneration? (default: false: execute is refused before any write if a source class lacks a Storage definition the target class has; true: the classes are promoted, IRIS generates new storage on the target at the next compile, and the dialog and the result's storageDrops name the dropped definitions; execute only)destructive

Governance defaults: iris_env_diff and iris_env_promote's plan action are classified read and are therefore enabled by default — neither is gated behind IRIS_GOVERNANCE. iris_env_promote's execute action is truthfully classified write and is DEFAULT-DISABLED (unlike iris_production_control:clean, it deliberately does not use the defaultEnabled mechanism — promotion is a real environment-mutating write, not a recovery action); enable it via IRIS_GOVERNANCE, e.g. {"global":{"iris_env_promote:execute":true}} — execute ALSO requires the target profile's own governance to allow the underlying write families it uses (a fourth gate on top of this one). Safety: nothing on the target is ever deleted — items that exist on the target only (onlyInTarget) are always informational warnings, never steps — and System Default Settings values that look like credentials are redacted in both diff and plan/execute output; their plaintext never appears in any tool result. Credentials/users/roles promotion is out of scope entirely.

Human confirmation (Story 43.3): iris_env_promote action execute (a write, default-disabled) also asks the person right before its first write, after the four gates pass, when the MCP client declares form elicitation; any other client keeps today's contract (confirm: true and the gates), and declining ends the call with CONFIRMATION_DECLINED and changes nothing. A Claude Code Elicitation hook can answer the dialog for the person, which is the user's choice and removes the person from the loop. See Human confirmation (elicitation).

Storage guard (Story 42.11): execute runs a read-only preflight after its four gates and the blank-namespace check, and before the confirmation dialog: for each allowlisted class step it reads the source copy and the target copy of the class. A source copy that lacks a Storage definition the target class has refuses the whole execute with STORAGE_DROPPED (structuredContent is {code, source, target, storageDrops}) and nothing is changed in any domain. allowStorageRegeneration: true (default false) lets it through; the dialog's scope then names the drops (; drops Storage definitions: ...) and the result gains storageDrops. Each class is written with the source text the preflight read, so the text checked is the text written. A preflight read that fails fails that step when its turn comes, as today's source-read failure does; a declined dialog leaves reads only.

Test Status Tools

ToolDescriptionKey ParametersAnnotations
iris_test_statusCompanion to iris_execute_tests (Story 36.2): re-attach to a test run by jobId and/or read it by runIndex (action: "poll"), or stop a running one (action: "cancel") — see detail below. Since Story 40.1 it is also the companion of iris_test_coverage: pass coverageRunId alone to poll or cancel a coverage run. Since Story 40.2 action: "export" writes a completed coverage run's Cobertura XML file to an absolute outputPath. Defaults: poll is a read, enabled by default; cancel and export are writes, DEFAULT-DISABLED (enable them through IRIS_GOVERNANCE)action, jobId?, runIndex?, coverageRunId?, namespace?, outputPath?, sourceRoot?destructive

Governance defaults: iris_test_status:poll is classified read and is therefore enabled by default. iris_test_status:cancel is truthfully classified write and is DEFAULT-DISABLED (it deliberately does not use the defaultEnabled mechanism — stopping a run is not a recovery-of-last-resort action like iris_production_control:clean); enable it via IRIS_GOVERNANCE, e.g. {"global":{"iris_test_status:cancel":true}}. The optional coverageRunId (Story 40.1) added no action and changed neither key. iris_test_status:export (Story 40.2) is a third key: it is truthfully classified write (it writes a local file) and is DEFAULT-DISABLED; enable it via IRIS_GOVERNANCE, e.g. {"global":{"iris_test_status:export":true}}. It is outside the frozen governance baseline and carries no defaultEnabled marker; the tool's annotations (destructiveHint: true) already cover overwriting a file, and iris_test_coverage itself never writes a file.

Test Coverage Tools

ToolDescriptionKey ParametersAnnotations
iris_test_coverageRun unit tests and measure which lines of the listed classes they execute (Stories 40.1 and 40.2): per class and per method over the class's own source lines with the uncovered ranges, per-routine INT lines, an optional minCoverage verdict, plus the classes that could not be measured; since Story 40.3 it asks the same TestProduction guard as iris_execute_tests and refuses a run with PRODUCTION_BUSY. A write, DEFAULT-DISABLED (it starts an instance-wide Line-by-Line session and runs test code; enable it with IRIS_GOVERNANCE={"global":{"iris_test_coverage":true}}); minCoverage omitted means no verdict — see detail belowtarget, level, classes, timeout?, namespace?, minCoverage?destructive

Governance defaults: iris_test_coverage is truthfully classified write (it starts an instance-wide monitor session, runs test code and prunes its own older run records) and is DEFAULT-DISABLED; enable it via IRIS_GOVERNANCE, e.g. {"global":{"iris_test_coverage":true}}. It is outside the frozen governance baseline, uses no defaultEnabled marker, and is hidden under IRIS_TOOLS_PRESET=core (shown under developer); it and iris_test_status are a declared pair and stay co-visible.


Prompts

Workflow-shaped MCP prompts (Epic 25) served via prompts/list/prompts/get. Prompts are a separate protocol capability from tools — they carry no governance key and do not change this server's tool count.

PromptDescription
diagnose-slow-queryRuns iris_sql_analyze (explain → indexUsage → stats) and recommends a fix — never auto-applies one.
deploy-and-test-classDeploys an ObjectScript class or package (iris_doc_load, glob-path form), resolves compile errors, then runs its unit tests (iris_execute_tests) with a total-count check. It tells the model what a PRODUCTION_BUSY refusal means (a production other than the tests' own is running, or the production state could not be read), and, only when the user asks for coverage, adds an optional last step that runs iris_test_coverage and copes with a hidden tool (outside core), a GOVERNANCE_DISABLED or MONITOR_BUSY refusal and a running result (Story 40.4).
promote-environment-changeReviews and promotes configuration/code drift from a source IRIS environment to a target using the review-before-write iris_env_diff → iris_env_promote workflow — scoped diff, review with the user, plan, an explicit user-selected step allowlist, confirmed execute, then re-diff to verify. Never acts on onlyInTarget warnings; states the no-deletions guarantee and that execute is default-disabled.
edit-and-test-classChanges a few lines of a class in place: a ranged iris_doc_get, a guarded iris_doc_edit (apply, enabled by default; expected built from the read, with a STALE_CONTENT retry using mismatches[].current), iris_doc_compile, then iris_execute_tests with a check of total against the number of Test* methods. Takes className, change and an optional testClass; every tool on its main path is in the core preset. It tells the model what a PRODUCTION_BUSY refusal means (a production other than the tests' own is running, or the production state could not be read) and not to stop a production without the user's confirmation.

objectscript-review was retired in Story 41.2: its checklist is now the always-on rule in the skills pack, which iris-mcp-clients skills install puts where each client loads it (.claude/rules/ for Claude Code, .cursor/rules/ for Cursor, a marked block in GEMINI.md for Gemini CLI and in AGENTS.md for every other client).

Also installable as Agent Skills.


Tool Examples

iris_doc_get -- Retrieve a document

Input:

{
  "name": "MyApp.Service.cls",
  "namespace": "USER"
}

Output:

{
  "name": "MyApp.Service.cls",
  "content": ["Class MyApp.Service {", "", "ClassMethod Hello() As %String", "{", "  Quit \"Hello World\"", "}", "", "}", ""],
  "ts": "2026-04-07 10:30:00.000"
}
iris_doc_get with a line range -- Read part of a UDL text document

Pass startLine and/or endLine (1-based, inclusive) to read part of a class, routine or include file instead of the whole document. Use a range for large classes, and to read the exact lines before changing them with iris_doc_edit, which uses the same line numbers. A ranged read is still one request for the whole document; the lines are cut from it afterwards, so it saves the agent's context, not IRIS's work.

Input:

{
  "name": "MyApp.Service.cls",
  "startLine": 3,
  "endLine": 5
}

Output (text): a header line, then the lines in the cat -n layout: the line number right-aligned in 6 columns, a tab, then the line exactly as IRIS holds it (leading tabs, trailing spaces and empty lines included).

Document 'MyApp.Service.cls' in namespace 'USER': lines 3-5 of 9 (ts 2026-04-07 10:30:00.000)
     3	ClassMethod Hello() As %String
     4	{
     5	  Quit "Hello World"

Output (structuredContent):

{
  "name": "MyApp.Service.cls",
  "ts": "2026-04-07 10:30:00.000",
  "startLine": 3,
  "endLine": 5,
  "totalLines": 9,
  "lines": ["ClassMethod Hello() As %String", "{", "  Quit \"Hello World\""]
}
  • Numbering. Line N is element N-1 of the line array that IRIS returns, after one leading byte-order mark is removed. A class ends with an empty last line, and it counts: totalLines is 9 for the 9-element content array of the full-read example above, whose last element is that empty line. iris_loc_count reports the same totalLines for a class. A routine's or include file's line 1 is its ROUTINE header: ROUTINE <name> for a .mac routine (IRIS drops the type), ROUTINE <name> [Type=INC] for an include file.
  • Defaults and clamp. startLine alone reads to the last line; endLine alone reads from line 1. An endLine past the end is clamped to the last line, and the response shows the effective startLine and endLine.
  • ts. The document's version timestamp, the same string metadataOnly returns as etag. iris_doc_edit sends it back to IRIS so that an edit cannot overwrite a change it did not see.
  • Without the parameters the request and the result are unchanged: the whole document, as before.
  • Errors (isError: true, nothing is read into the result):
    • startLine or endLine is not a whole number of at least 1: the argument check refuses it before the tool runs (an Invalid arguments error that names the parameter).
    • startLine is after endLine, or past the last line (the message states the document's totalLines).
    • A range with metadataOnly, or with format: "xml": ranges apply only to UDL text.
    • A binary document (the message names it), or a document IRIS cannot read (the message names it and carries IRIS's reason).
iris_doc_put -- Debug/scratch: write a document directly to IRIS

Debug/scratch tool — for production code, use iris_doc_load to ensure source control and review. This tool writes content directly to IRIS without creating a file on disk, and is intended for one-off inspection, quick reproductions, or throwaway test classes only. A leading byte-order mark is stripped from the content before it is sent, and a write IRIS refuses (a non-empty result.status inside an HTTP 200 response) is returned as an error carrying IRIS's text; nothing is stored then.

README 较长,此页只显示开头部分,请在 GitHub 上阅读其余内容。

来源:packages/iris-dev-mcp/README.md,提交 704b410

工具

33

iris_doc_get

Get Document

Retrieve an ObjectScript class, routine, CSP page, or include file by name. Pass startLine and/or endLine (1-based, inclusive) to read part of a UDL text document: use a range for large classes, and to read the exact lines before changing them with `iris_doc_edit`, which uses the same line numbers. A ranged read returns the lines numbered (`cat -n` layout: the number right-aligned in 6 columns, a…

输入参数name必填formatserverendLinenamespacestartLinemetadataOnly

iris_doc_put

Put Document

**Debug/scratch tool** — for production code, use iris_doc_load to ensure source control and review. This tool writes content directly to IRIS without creating a file on disk, and is intended for one-off inspection, quick reproductions, or throwaway test classes only. A leading byte-order mark is stripped from the content before it is sent, and a write IRIS refuses (a non-empty result.status…

输入参数name必填servercontent必填namespaceignoreConflictallowStorageRegeneration

iris_doc_delete

Delete Document

Delete one or more ObjectScript documents from IRIS.

输入参数name必填servernamespace

iris_doc_list

List Documents

List ObjectScript documents in a namespace with optional category and type filters. WARNING: Without a filter, this returns ALL documents including system classes — use the filter parameter or category to limit results. For a structural overview at package granularity, see `iris_package_list`. To pull many documents at once, see `iris_doc_export`.

输入参数typecursorfilterservercategorygeneratednamespacemodifiedSince

iris_doc_compile

Compile Document

Compile one or more ObjectScript classes, routines, or include files. Returns detailed compilation errors with line/character positions when compilation fails. Use async mode for large packages to avoid timeouts.

输入参数doc必填asyncflagsservernamespace

iris_doc_index

Document Index

Retrieve the structure of an ObjectScript class, including its methods, properties, parameters, and superclasses. Each member includes its type, signature, and relevant metadata.

输入参数name必填servernamespace

iris_macro_info

Macro Info

Look up a macro definition, including its expanded value and source location. Requires a document context and optionally a list of include files to resolve the macro. For the fully-expanded routine body as IRIS compiles it, see `iris_routine_intermediate`.

输入参数name必填serverdocumentincludesnamespace

iris_doc_convert

Convert Document Format

Convert an ObjectScript document between UDL and XML formats. Retrieves the document in the specified target format using the Atelier API format parameter.

输入参数name必填servernamespacetargetFormat必填

iris_doc_xml_export

XML Export/Import

Export, import, or list ObjectScript documents in legacy XML format. Use action "export" to export documents to XML, "import" to import from XML content, or "list" to list documents contained in XML without importing. By default an import LOADS definitions WITHOUT compiling them — an imported class is not usable until compiled (pass compile: true to compile in the same call, or use…

输入参数docsflagsaction必填servercompilecontentnamespaceallowStorageRegeneration

iris_sql_execute

Execute SQL

Execute a SQL query against an IRIS namespace and return column names and row data. Supports parameterized queries to prevent SQL injection. Use maxRows to limit result set size (default: 1000). An operator may set IRIS_SQL_MAX_ROWS (a ceiling on the number of rows returned — the response carries rowsCapped: true when it clamps the caller's request; it bounds the returned row count post-fetch,…

输入参数query必填servermaxRowsreadOnlycountOnlynamespaceparametersmaxRowsAffected

iris_sql_analyze

Analyze SQL

Diagnose SQL performance against an IRIS namespace (read-only). Actions: - **explain** (read): show the query plan via `EXPLAIN <query>` (returns the plan text). Requires 'query'. - **stats** (read): per-statement cumulative runtime statistics from INFORMATION_SCHEMA.STATEMENTS. Optional 'filter' (substring on the Statement text) and 'maxRows'. - **indexUsage** (read): the maps/indexes a query…

输入参数topNqueryaction必填filterservermaxRowsworkloadnamespace

iris_server_info

Server Info

Retrieve IRIS server information including version, platform, and instance name. No namespace context is needed.

输入参数server

iris_server_namespace

Namespace Info

Retrieve details about an IRIS namespace, including associated databases and enabled features.

输入参数servernamespace

iris_global_get

Get Global

Read the value of an IRIS global node. Returns the value and whether the node is defined. Supports multi-level subscripts passed as a comma-separated string.

输入参数global必填servernamespacesubscripts

iris_global_set

Set Global

Set the value of an IRIS global node. The value is verified after writing and the response includes a verification flag.

输入参数value必填global必填servernamespacesubscripts

iris_global_kill

Kill Global

Delete an IRIS global node or entire subtree. Use with caution — this permanently removes data.

输入参数global必填servernamespacesubscripts

iris_global_list

List Globals

List globals in an IRIS namespace. Optionally filter by a plain substring match on the global name. Filter is case-insensitive by default (matches `iris_doc_list` semantics); use caseSensitive:true for the prior behavior. Filtering is client-side — all globals are fetched from the server, then filtered locally. Large namespaces with thousands of globals may experience slower responses when a…

输入参数cursorfilterservernamespacecaseSensitive

iris_execute_command

Execute Command

Execute an ObjectScript command on IRIS with captured I/O output. Write statements and other output are captured and returned in the response's `output` field, capped at 32768 RAW characters — measured BEFORE JSON escaping, not the serialized wire size — output beyond the ceiling is cut off and replaced with a structured, machine-detectable marker (`[IRIS-MCP-TRUNCATED ceiling=32768chars]`),…

输入参数servercommand必填namespace

iris_execute_classmethod

Execute Class Method

Invoke an ObjectScript class method by name with optional positional arguments. Supports up to 20 arguments. Each entry in `args` is either a plain scalar (string, number, or boolean), passed by value, or a `{byRef: true, value?}` marker object, passed by reference — use this for `ByRef`/`Output` parameters. Omit `value` entirely for Output-style undefined-in (e.g. `{"byRef": true}`); `value` may…

输入参数argsserverclassName必填namespacemethodName必填

iris_execute_tests

Execute Tests

Run ObjectScript unit tests at package, class, or method level with structured results. Uses the Atelier async work queue. Default wait budget: 120 seconds — override per-call with `timeout` (seconds) or set the IRIS_TEST_TIMEOUT environment variable (precedence: `timeout` argument > IRIS_TEST_TIMEOUT > 120s default; hard-capped at 3600s, and a larger value is silently clamped with…

输入参数level必填servertarget必填timeoutnamespace

iris_doc_load

Bulk Load Documents

Upload multiple ObjectScript files from a local directory into IRIS. Accepts a glob pattern to match files. File paths are mapped to IRIS document names (path separators become dots). Optionally compiles all uploaded documents afterward. This is the preferred way to deploy ObjectScript classes to IRIS — always create or edit .cls files on disk first, then use this tool to upload and compile. This…

输入参数path必填flagsserverbaseDircompilenamespaceignoreConflictallowStorageRegeneration

iris_doc_export

Bulk Export Documents to Local Files

Download every document matching a filter from an IRIS namespace to a local directory. Dots in dotted class names become subdirectories ('EnsLib.HTTP.GenericService.cls' → '<destinationDir>/EnsLib/HTTP/GenericService.cls'). CSP paths keep their forward slashes. Writes a manifest.json recording every file and every skipped item with a reason. Supports prefix/category/type filters, system/generated…

输入参数typeprefixserversystemcategorygeneratednamespaceoverwrite另有 6 个

iris_package_list

List Packages

List ObjectScript packages in a namespace, rolled up to a chosen dotted depth. Use iris_package_list when you want a structural overview (what packages exist, how many documents each contains); use iris_doc_list when you want individual document names. Supports prefix narrowing, system-package tri-state, and category/type filters — the same filtering surface as iris_doc_list, aggregated…

输入参数typedepthprefixserversystemcategorygeneratednamespace另有 1 个

iris_routine_intermediate

Routine Intermediate

Given a class name, fetch the compiled-intermediate routine — the macro-expanded form IRIS actually executes at runtime. Auto-resolves the class name to the `.1.int` / `.int` candidate IRIS emits during compilation; use `iris_doc_get` when you need a specific doc by exact name with extension. Use `iris_macro_info` when you need individual macro definitions and source locations rather than the…

输入参数name必填formatservernamespace

iris_loc_count

Count Lines of Code

Count lines of code in the namespace's ObjectScript documents (CLS, MAC, INT, INC), bucketing every line as blank, source code, source comment, test code, or test comment — with comment-density and test-footprint percentages plus the top-N largest documents. Test code is detected via transitive %UnitTest.TestCase inheritance and Test*/lifecycle method scoping; embedded-python method bodies honor…

输入参数spec必填topNformatservernamespaceincludeGenerated

iris_env_diff

Diff Two IRIS Environments

Compare two configured IRIS server profiles (source vs target, e.g. 'stage' vs 'prod') and report a structured drift report -- what's different between them -- in one call. Covers FIVE domains; only the requested domains are fetched. DEFAULT (when 'domains' is omitted): the FOUR no-spec config domains -- 'mappings', 'defaultSettings', 'webapps', 'config'. 'documents' is OPT-IN ONLY -- list it…

输入参数specserversource必填target必填domainsallowWidenamespaceignoreTimestamps

iris_env_promote

Promote Environment Changes (Plan / Execute)

Turn a prior iris_env_diff result into an ordered, reviewable promotion PLAN (source -> target), or EXECUTE an allowlisted subset of that plan against 'target'. Actions: - **plan** (read, enabled by default): a PURE TRANSFORM of a prior iris_env_diff 'structuredContent' result -- pass it as 'diff'. No IRIS connection is made; the result is deterministic and idempotent given the same diff. Steps…

输入参数diffplanstepsaction必填serversource必填target必填confirm另有 2 个

iris_test_status

Test Run Status

Companion to iris_execute_tests: re-attach to a test run by its jobId (Atelier work-queue id) and/or runIndex (%UnitTest_Result InstanceIndex), or cancel one. Use this after iris_execute_tests returns status:"running" (or after your own client abandoned a long call) instead of re-submitting the same target — re-submitting starts a SECOND concurrent run against shared fixtures. Pass the run's own…

输入参数jobIdaction必填serverrunIndexnamespaceoutputPathsourceRootcoverageRunId

iris_doc_edit

Edit Document Lines

Change a few lines of an existing class, routine or include file without resending the whole document. Read the exact lines first with a ranged `iris_doc_get` (startLine/endLine): both tools use the same 1-based line numbers. Each edit is an `insert` (afterLine, text, expected; afterLine 0 inserts before line 1), a `delete` (startLine, endLine, expected) or a `replace` (startLine, endLine, text,…

输入参数name必填edits必填action必填servernamespace

iris_sql_query

Query SQL

Run a SQL query (SELECT) against an IRIS namespace and return column names and row data. Use it for queries, including under the read-only governance preset, where iris_sql_execute is blocked. Supports parameterized queries to prevent SQL injection. Use maxRows to limit result set size (default: 1000). Returns {columns, rows, rowCount}; with countOnly it returns totalCount, the number of rows the…

输入参数query必填servermaxRowscountOnlynamespaceparameters

iris_test_coverage

Test Coverage

Run ObjectScript unit tests and measure which lines of the listed classes they execute. Use it to see how well a test target covers specific classes, and which lines of their source it misses. It returns the test summary (total, passed, failed, skipped, details) and the coverage twice. Per class and per method, over the class's own source lines (coverage.classes[].source): executable lines,…

输入参数level必填servertarget必填classes必填timeoutnamespaceminCoverage

iris_server_profiles

Server Profiles & Governance

CALL THIS FIRST. Discover the IRIS server profiles this MCP server can target and the effective governance policy (which tool actions are enabled/disabled) — so you can choose the right `server` profile and avoid calling disabled actions, without reading the client's config files. Returns: (1) a profile roster with non-secret connection metadata (name, host, port, username, namespace, https,…

输入参数serverprofileallProfiles

版本历史

1
  1. v1.1.0最新Nov 22, 2026

评分

已满足适用检查项的 90%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分
  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分