CONTAM MCP
A Windows-based MCP server that exposes NIST's CONTAM simulation tools and ContamX bridge-mode controls to AI agents. It enables automated airflow and contaminant transport modeling, including project inspection, simulation execution, and real-time bridge session management.
README
CONTAM Plugin
CONTAM Plugin is a Windows-first public toolkit for using CONTAM from AI coding agents and MCP-capable desktop tools.
It combines three layers in one repository:
- a local
stdioMCP server for CONTAM command-line tools and ContamX bridge sessions - a Codex plugin wrapper with workflow guidance for project creation, diagnosis, and simulation
- guard scripts for PRJ hygiene, ContamW-safe result settings, and optional
contam_chineselinkage
The project is designed for public use. It helps an agent inspect .prj models, diagnose missing references, run simulations, compare outputs, generate simple ContamW SketchPad layouts, and separate solver failures from ContamW GUI result-display problems.
Quick Use Through MCP
For most users, the easiest setup is an npx-launched local MCP server:
command: npx
args: -y --package github:summer521521/CONTAM_plugin contam-mcp
The binary name remains contam-mcp because it launches the MCP server component. The repository and Codex plugin are named CONTAM_plugin.
Host-specific setup examples are in:
Codex Plugin Use
This repository can also be used as a Codex plugin source because the repository root contains:
.codex-plugin/plugin.json.mcp.jsonskills/contam-mcp/SKILL.mdscripts/start-contam-plugin-mcp.ps1scripts/Invoke-ContamProjectGuard.ps1
The plugin adds a CONTAM workflow skill that tells Codex to:
- inspect before editing
- keep case-specific data outside the plugin repository
- run ContamX input checks before GUI work
- keep only one active PRJ in a case folder unless scenarios are intentional
- use GUI-safe output settings when the user will run from ContamW
- record ContamW Building Check errors and fixes in case-local notes
Main Capabilities
- discover bundled or configured CONTAM executables
- list
.prj,.sim,.wth,.ctm, and related files - inspect project metadata and external references
- diagnose broken project references
- update supported
.prjfile references - clone baseline projects into named scenario folders
- create and optionally run small case matrices
- apply generated ContamW SketchPad layout data for rectangular rooms, zones, path icons, and source/sink icons
- run
contamx3.exeand collect outputs - run a PRJ guard for encoding, result profile, stale-output cleanup, XLog triage, and basic count checks
- discover and use optional
contamxpybindings for paper-style ContamX API co-simulation - discover Rhino/Grasshopper ANT availability for model-creation workflows
- upgrade old
.prjfiles withprjup.exe - compare
.simfiles withsimcomp.exe - export
simreadtext output - summarize generic CONTAM text outputs for quick result triage
- start, inspect, advance, and close ContamX bridge sessions
Project Guard
Before handing a generated PRJ to another user or asking someone to run it in ContamW, run:
.\scripts\Invoke-ContamProjectGuard.ps1 `
-ProjectPath "<case>\model.prj" `
-Mode InputCheck `
-ResultProfile GuiSafeResults `
-CleanOutputs `
-RequireSingleProject
For a command-line full run:
.\scripts\Invoke-ContamProjectGuard.ps1 `
-ProjectPath "<case>\model.prj" `
-Mode Run `
-ResultProfile GuiSafeResults
The guard does not prove a hand-drawn SketchPad layout is perfect, but it catches common project-sharing and simulation issues before the GUI step.
Link With contam_chinese
CONTAM_plugin can use the localized executables distributed by contam_chinese.
After extracting a contam_chinese release package, link it for the current PowerShell session:
.\scripts\link-contam-chinese.ps1 -Path "<extracted-contam-chinese-release>"
Or persist it for your Windows user:
.\scripts\link-contam-chinese.ps1 -Path "<extracted-contam-chinese-release>" -User
The launcher honors these variables in order:
- explicit tool overrides such as
CONTAMX_PATH CONTAM_HOMECONTAM_CHINESE_HOME- bundled executables in this repository
Use contam_chinese for localized ContamW and Chinese help. Use CONTAM_plugin for MCP automation, project checks, simulation workflows, and report-oriented result extraction.
Repository Layout
.codex-plugin/: Codex plugin manifest.mcp.json: MCP server launch definition for plugin hostsskills/: Codex workflow skill for CONTAM workscripts/: launch, guard, localization-link, setup, and maintenance scriptscontam-mcp/: MCP server source, developer guide, and regression scriptsdocs/: public quickstart and host setup guides.github/workflows/: GitHub Actions workflows- repository root: bundled CONTAM executables and supporting DLLs
Privacy And CI
This repository includes a privacy check that scans tracked files for personal filesystem paths before public sharing:
npm run privacy:check
Run the basic plugin launcher check with:
npm run plugin:check
Run official regression cases with:
npm run regression:official
Example Prompts
Call discover_contam_installation and confirm CONTAM is available.List CONTAM case files in this folder.Inspect this PRJ file and summarize its references and date range.Run a test input only check for this PRJ.Make this PRJ safe for ContamW Building Check and result review.Run this PRJ and list the generated outputs.Apply a rectangular SketchPad layout to this PRJ so ContamW opens with visible rooms and icons.Run a small case matrix from this baseline model.Analyze this CONTAM xlog or simread text export.Discover whether contamxpy and ANT are available.Start a CONTAM bridge session for this project.Advance the active bridge session by 300 seconds and return path flow updates.
References
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。