luiccian-vulcan-mcp
v0.5.1Vulcan 12 integration through the Model Context Protocol (MCP)
Vulcan MCP Model Context Protocol (MCP) server connecting Maptek Vulcan 12 Desktop with AI Agents Quick Start • Capabilities • MCP Tools • Practical Examples • Tutorial • How-To Guides • Documentation • Contributing Connect Vulcan 12 directly to Artificial Intelligence assistants (Google Antigravity, Claude Desktop, Claude Code, Cursor, VS Code) via the open Model Context Protocol (MCP) standard.
Summary extracted from the README.
Connect Vulcan 12 directly to Artificial Intelligence assistants (Google Antigravity, Claude Desktop, Claude Code, Cursor, VS Code) via the open Model Context Protocol (MCP) standard.
Seamlessly query block models (.bmf), audit 3D triangulations and solids (.00t), explore ISIS drillhole databases (.dhd.isis), interact with CAD design layers (.dgd.isis), inspect color legends (.scd), capture the Envisage 3D viewport, and execute native PyVulcan automation scripts using natural language.
Key Capabilities
Communication Architecture
Maptek Vulcan 12 Desktop embeds Python 3.5.2 tightly linked to its C++/SWIG graphics engine (maptek.vulcan). Modern MCP servers require Python 3.11+.
The system bridges both worlds across two processes using a local TCP loopback socket on 127.0.0.1:9877:
flowchart LR
A["AI Agent<br/>(Claude / Cursor / Antigravity)"] <-->|"MCP (Stdio)<br/>uvx luiccian-vulcan-mcp"| B["MCP Server<br/>(src/vulcan_mcp)"]
B <-->|"TCP 127.0.0.1:9877<br/>uint32 framing + JSON"| C["Vulcan Listener<br/>(vulcan_listener/server.py)"]
C <-->|"C++ / SWIG Bindings"| D["Maptek Vulcan 12 Desktop<br/>(maptek.vulcan & vulcan_gui)"]
Quick Start (in 2 Steps)
You don't need to manually create or configure virtual environments if you have uv / uvx installed.
[!IMPORTANT] Strict Execution Order:
- STEP 1 (Always First): Start the socket listener inside Maptek Vulcan 12 Desktop. This opens and binds local TCP port
127.0.0.1:9877.- STEP 2 (Afterwards): Connect your AI Client (Claude Desktop, Cursor, Antigravity, VS Code).
⚠️ Connecting your AI assistant before starting the listener in Vulcan will result in a
ConnectionError.
Step 1: Start the Socket Listener inside Maptek Vulcan 12
- Download
vulcan_listener.zipfrom the Latest GitHub Release and extract it to any folder (or usevulcan_listener/from a cloned repository). - Open your mining project in Maptek Vulcan 12 Desktop (Envisage).
- In Vulcan's top menu, go to File > Python Script (or type
pyin Vulcan's command window). - Select the extracted
vulcan_listener/server.py. - Check the box "Run in shell window" and click OK.
- A Windows console window will open confirming the listener is running:
==============================================================
[Vulcan MCP] Vulcan MCP Listener started on 127.0.0.1:9877
[Vulcan MCP] Working directory: C:\your_mining_project
[Vulcan MCP] Registered domains: block_model, canvas, design, drillholes, execute_code, legend, system, triangulation
[Vulcan MCP] Token authentication: DISABLED (localhost open mode)
[Vulcan MCP] Keep this window open while using your AI client. Ctrl+C to stop.
==============================================================
[!TIP] Keep this console window open while chatting with your AI assistant. If closed, the TCP socket will terminate.
Step 2: Connect your AI Client
Choose the mode that best fits your workflow:
Mode A: For End Users (Zero-Install via uvx)
No repository cloning required. The AI client pulls and runs the MCP server on the fly:
-
In Claude Desktop / Cursor / VS Code: Add this block to your MCP config file (
claude_desktop_config.json,.cursor/mcp.json, etc.):{ "mcpServers": { "vulcan": { "command": "uvx", "args": [ "luiccian-vulcan-mcp" ] } } }[!TIP] Dynamic Port Configuration: Port
9877is used by default. If9877is already in use or you are running multiple Vulcan sessions, define a custom port via"env"without touching code:"env": { "VULCAN_MCP_PORT": "9878" } -
In Claude Code (CLI):
claude mcp add -s user vulcan -- uvx luiccian-vulcan-mcp
Mode B: For Developers (with uv run on a local clone)
If you are developing or modifying the codebase and want hot-reloading:
- Manual Local Configuration:
To connect directly to your local clone:
{ "mcpServers": { "vulcan": { "command": "uv", "args": [ "run", "--directory", "C:\\path\\to\\vulcan-mcp", "vulcan-mcp-server" ] } } }
The 9 Master Tools Catalog
See complete parameter specifications and JSON schemas in docs/MCP_TOOLS_REFERENCE.md.
| # | MCP Tool | Mining Domain | Actions (action=) |
Description |
|---|---|---|---|---|
| 1 | vulcan_system |
System & Project | ping, project_info, capabilities, reload |
Connection health, complete active project file inventory, available SDK modules, and handler hot-reload. |
| 2 | vulcan_block_model |
Block Models (.bmf) |
list, info, query_xyz, stats, grade_tonnage_curve |
Block model schema, $(X,Y,Z)$ point query, tonnage, volume, volume-weighted mean grade, and grade-tonnage curves. |
| 3 | vulcan_triangulation |
Triangulations (.00t/.tri) |
list, info, elevation, profile, cut_fill, point_inside, load, unload |
Nodes, faces, volume, topological consistency, centroid, $Z$ elevation, profiles, cut/fill volumes, and point-in-solid test. |
| 4 | vulcan_design |
3D CAD Design (.dgd.isis) |
list_dbs, list_layers, layer_info, load_layer, clear_temp, create_polyline |
CAD layer inspection, planar area ($m^2$), centroid, 3D layer loading, and polyline creation. |
| 5 | vulcan_drillholes |
ISIS Drillholes (.dhd.isis) |
list_dbs, schema, holes, hole, high_grade, display, clear_display, qaqc_validation, stats |
Drillhole database exploration, high-grade intercept search, QA/QC audits, interval stats, and desurveyed 3D display. |
| 6 | vulcan_legend |
Legends (.scd) |
list, inspect, update, restore |
Color scheme inspection and interval color updates with automatic .scd.bak backup. |
| 7 | vulcan_screenshot |
Visual 3D Viewport | (Direct: max_width, quality) |
Viewport screenshot of Envisage compressed as JPEG for multimodal vision analysis. |
| 8 | vulcan_canvas |
UI & Macros | macro, report |
Envisage Workbench macro execution and writing messages to Vulcan's report window. |
| 9 | vulcan_execute_code |
PyVulcan Scripting | (Direct: code) |
Direct execution of Python scripts inside Maptek Vulcan (vulcan, vulcan_gui, project_dir). |
Practical & Simple Examples
Here are 4 representative mining workflows demonstrating the natural language user prompt, the resulting MCP tool call in JSON, and the returned data.
1. Project Health Diagnostic & File Inventory
-
Natural Language Prompt:
"What mining files and block models are available in the open Vulcan project?"
-
MCP Tool Call:
{ "tool": "vulcan_system", "arguments": { "action": "project_info" } } -
Returned Response:
{ "connected": true, "project_dir": "C:\\MiningProjects\\Deposit_Cu_Au", "inventory": { "block_models": { "count": 2, "files": ["global_deposit.bmf", "phase1.bmf"] }, "triangulations": { "count": 4, "files": ["topo_2026.00t", "final_pit.00t"] }, "drillhole_dbs": { "count": 1, "files": ["rc_drilling.dhd.isis"] } } }
2. Mineral Resource Estimation with Cutoff Grade
-
Natural Language Prompt:
"Calculate the tonnage and mean copper grade (CUT) in 'phase1.bmf' using a cutoff >= 0.40% and density of 2.7 t/m³."
-
MCP Tool Call:
{ "tool": "vulcan_block_model", "arguments": { "action": "stats", "name": "phase1.bmf", "variable": "CUT", "cutoff": 0.40, "default_density": 2.7 } } -
Returned Response:
{ "total_blocks": 120500, "blocks_above_cutoff": 35210, "total_volume": 2816800.0, "tonnage": 7605360.0, "mean_grade": 0.785, "variable": "CUT", "cutoff": 0.4 }
3. High-Grade Intercept Detection & 3D Display
-
Natural Language Prompt:
"Find the top 5 gold intercepts in the ASSAYS table of 'rc_drilling.dhd.isis' and display them in Envisage."
-
MCP Tool Call:
{ "tool": "vulcan_drillholes", "arguments": { "action": "high_grade", "name": "rc_drilling.dhd.isis", "table": "ASSAYS", "field": "AU", "top_n": 5 } } -
Returned Response:
{ "database": "rc_drilling.dhd.isis", "table": "ASSAYS", "field": "AU", "intercepts": [ { "hole_id": "RC-104", "from": 84.0, "to": 88.0, "grade": 12.45, "length": 4.0 }, { "hole_id": "RC-112", "from": 120.0, "to": 126.0, "grade": 8.70, "length": 6.0 } ] }
[!WARNING] Graphics Safeguard: When using the
displayaction to render drillhole intervals in Envisage, keep thelimitparameter moderate ($\le 300$) to prevent freezing the OpenGL graphics thread.
4. Direct Automation with PyVulcan Scripting
-
Natural Language Prompt:
"Run a script inside Vulcan that reports the active window title in the report console."
-
MCP Tool Call:
{ "tool": "vulcan_execute_code", "arguments": { "code": "import maptek.vulcan_gui as vg\nresult = {'window_name': vg.get_window_name() if hasattr(vg, 'get_window_name') else 'Envisage'}" } } -
Returned Response:
{ "success": true, "result": { "window_name": "Envisage - [C:\\MiningProjects\\Deposit_Cu_Au]" } }
Configuration & Environment Variables
Both the plugin inside Maptek Vulcan and the external MCP server automatically read operating system environment variables (os.environ):
| Variable | Default | Type | Description | When is it used? |
|---|---|---|---|---|
VULCAN_MCP_HOST |
127.0.0.1 |
String | IP address where the plugin listens and the MCP server connects. | Optional. Change if running Vulcan on a separate VM or container. |
VULCAN_MCP_PORT |
9877 |
Integer | TCP port for binary uint32 message transport. |
Optional. Change if port 9877 is used by another application. |
VULCAN_MCP_TOKEN |
"" (Disabled) |
String | Shared secret authenticated via constant-time HMAC. | Required if VULCAN_MCP_HOST is non-loopback (!= 127.0.0.1). Optional on localhost. |
Authentication & Security
CLI Diagnostics & Token Generation (--version, --check, --generate-token)
You can inspect the MCP server, verify live connectivity with Maptek Vulcan, or generate a shared HMAC secret directly from your terminal without blocking stdin:
# Print the installed MCP server version
uvx luiccian-vulcan-mcp --version
# Run a live TCP health check against vulcan_listener (checks version parity & domains)
uvx luiccian-vulcan-mcp --check
# Generate a shared HMAC token in ~/.vulcan_mcp/token (automatically read by both MCP & listener)
uvx luiccian-vulcan-mcp --generate-token
Both vulcan_mcp and vulcan_listener/server.py prioritize VULCAN_MCP_TOKEN from the environment and automatically fall back to ~/.vulcan_mcp/token (stored outside the repository).
Zero .env Philosophy
You do not need to create or manage insecure .env files containing plain text passwords that might accidentally be committed to Git. Tokens are managed at the Windows OS environment level:
# 1. Generate and save a token permanently in your Windows user account:
$token = python -c "import secrets; print(secrets.token_urlsafe(32))"
[System.Environment]::SetEnvironmentVariable('VULCAN_MCP_TOKEN', $token, 'User')
# 2. Verify that it was stored correctly:
[System.Environment]::GetEnvironmentVariable('VULCAN_MCP_TOKEN', 'User')
# 3. (Optional) To revoke and revert to open mode:
[System.Environment]::SetEnvironmentVariable('VULCAN_MCP_TOKEN', $null, 'User')
Strict Non-Loopback Network Rule
- If you bind
VULCAN_MCP_HOSTto a non-loopback interface (e.g.,0.0.0.0or a LAN IP), the plugin strictly refuses to start (RuntimeError) unlessVULCAN_MCP_TOKENis set, preventing unauthorized remote script execution.
🛠️ Diagnostics & FAQ
[!NOTE] Is the assistant hanging on Timeout or not responding?
Maptek Vulcan Desktop is an interactive MFC/C++ application. When an operation triggers a modal dialog popup (e.g. file overwrite confirmation, coordinate system prompt), Vulcan's main Python thread is completely suspended until a human clicks OK or Cancel in Vulcan. As soon as the modal is dismissed, processing resumes instantly. See How to Resolve Modal Dialog Freezes.
3-Layer Automated Testing Harness
The project includes automated testing infrastructure organized across 3 validation tiers:
🤝 Contributing
Contributions, bug reports, and suggestions are warmly welcomed! Please read our Contributing Guide (CONTRIBUTING.md) to learn about:
- Setting up the local development environment with
uv. - Feature branch workflows (
feat/*,fix/*) to keepmasterstable. - Strict Python 3.5.2 compatibility in
vulcan_listener/(no f-strings). - Release automation and synchronized version bumping (
scripts/bump_version.py). - Conventional Commits and submitting Pull Requests with GitHub CLI (
gh).