
ArcGIS MCP Bridge
io.github.muend由 GitHub 帳號 muend 發布v0.6.8更新於 Oct 25, 2026
Secure local-first MCP server for licensed ArcGIS Pro and ArcPy on Windows.
概覽
本機 Windows MCP 伺服器,透過 100 個宣告式地理處理工具,讓助理呼叫已授權的 ArcGIS Pro ArcPy 引擎。
- 可以做什麼
- 執行地理處理與分析:疊加、融合、連接、鄰近、網路分析、空間統計、柵格地圖代數、坡度與水文工具,以及座標參考定義、投影和 CRS 查詢。管理資料與地圖:要素類和地理資料庫生命週期、欄位、Describe、Excel/GeoJSON/CSV 交換,以及 .aprx 圖層順序、可見性、符號和儲存。編輯與驗證:幾何檢查與修復、附加、去重、差異比較和拓撲驗證,破壞性工具需明確確認權杖。將版面配置匯出為 PDF 或 PNG,可控制 DPI、地圖框、文字和圖例。透過影像對位將手繪草圖照片轉換為地理資料庫要素類。
- 適用情境
- 適用於在 Windows 上擁有已授權 ArcGIS Pro 安裝、希望助理直接對本機 GIS 資料執行 ArcPy 地理處理、地圖文件操作、資料轉換、版面配置匯出或空間分析的場景,無需手動操作 ArcGIS Pro 或撰寫指令碼。
- 執行需求
- Windows 上已授權的 ArcGIS Pro 安裝,以及 Python 3.11 或更新版本。安裝 PyPI 套件並用安裝命令複製 ArcGIS Pro 的 Python 環境。必須設定 ARCPY_PYTHON_PATH 指向已授權的 worker 解譯器;ARCGIS_MCP_ALLOWED_ROOTS、ARCGIS_MCP_SCRATCH_GDB(須已存在)和 ARCGIS_MCP_MAX_WORKERS 為選用。相關工具還需選用的 Spatial 和 Network 擴充授權。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 ArcGIS MCP Bridge,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[PyPI - Version] [PyPI - Downloads] [CI] [Python 3.11+] [License] [Tools] [Ruff] [uv] [arcgis-mcp-bridge MCP server] [smithery badge]
arcgis-mcp-bridge
Quick Start
arcgis-mcp-bridge requires Windows, a licensed ArcGIS Pro installation, and
Python 3.11 or newer for the bridge package.
Install the bootstrap package using one package manager:
Then clone ArcGIS Pro's Python environment:
If the installed console command is available on PATH,
arcgis-mcp-setup is equivalent to py -m arcgis_mcp.setup_env.
Important for Windows systems with multiple Python installations: the setup is not complete until
arcgis-mcp-bridgeis installed into the reportedarcgis-mcp-env\python.exe. Use that same interpreter for both the MCP servercommandandARCPY_PYTHON_PATH. This prevents worker failures caused by packages or native extensions being loaded from another Python environment.
See 05 — Installation for the complete setup and configuration.
100 declarative geoprocessing tools. Two isolated processes. One security floor.
A secure, local-first, asynchronous MCP server exposing ArcGIS Pro's ArcPy engine to Claude Desktop and other MCP hosts over stdio JSON-RPC.
Technical write-up: Building a Secure MCP Bridge for ArcGIS Pro and ArcPy
Why arcgis-mcp-bridge?
Highlight: Sketch → GIS Pipeline
Hand-drawn parcel boundary → photo → geodatabase feature class. ORB+RANSAC image registration, HSV ink segmentation, direct GDB commit. No manual digitizing required.
Demo coming soon. To preview the sketch-to-GIS pipeline:
- Draw a polygon on paper and photograph it.
- Ask Claude: "Use extract_sketch_to_gis to register this photo against my basemap and commit the result to my GDB."
- The feature class appears in ArcGIS Pro — no manual digitizing.
00 — Example Prompts
After health_check succeeds, talk to Claude naturally:
01 — Core Architecture & Philosophy
Layer A — Async Event-Driven Server (arcgis_mcp/server.py).
FastMCP on the bridge interpreter. Owns the stdio channel, validates every
request against frozen Pydantic v2 contracts, dispatches work via
asyncio.create_subprocess_exec — the event loop never blocks on a
geoprocessing call and never holds a thread lock. Layer A contains zero
module-level arcpy or cv2 imports (verified by grep in the audit
gate); it cannot crash on Esri's native code because it never touches it.
Layer B — Subprocess ArcPy Isolation Worker (arcgis_mcp/worker.py).
Spawned per job on the licensed ArcGIS Pro interpreter
(ARCPY_PYTHON_PATH). The only place import arcpy is legal; cv2 loads
lazily inside the one vision tool that needs it. Worker stdout is rebound
to stderr at startup — the single sanctioned stdout write is the final
NDJSON result frame, so native ArcObjects chatter can never corrupt the
JSON-RPC channel. A native crash terminates the worker, not the server:
the parent converts a non-zero exit into a structured error frame.
Declarative registry (arcgis_mcp/registry.py).
Each tool is one ToolSpec(name, category, description, input_model, worker_fn, destructive). One generic proxy factory materializes all 100
catalog MCP endpoints in Layer A; one generic run_tool dispatcher serves
them in Layer B. The catalog is exposed alongside three core endpoints:
health_check, list_layers, and execute_spatial_tool. Adding catalog
tool #101 touches two files — never the runtime loops.
Every failure crossing the process boundary is classified:
validation · security · not_found (an input path does not exist; the
message names the field and path) · license · geoprocessing (with the full
arcpy.GetMessages() stack, or ArcPy's own message for non-geoprocessing
calls such as Describe) · internal (exception type and message; the
traceback stays in the server log).
02 — The 100-Tool Census Matrix
Esri extension licenses (Spatial, Network) are managed through one shared
context manager and checked back in via finally on normal Python exception
paths. Worker-process isolation contains native failures to the current job,
while unavailable licenses return a structured error frame instead of
terminating the MCP server.
Destructive Mutation Safety Floor
Ten state-mutating tools refuse to run without an explicit
confirm: true payload token. The gate fires in the dispatcher before
the 10–30 s arcpy import is paid, and the registry refuses to even
register a destructive spec whose contract lacks a confirm field:
calculate_field carries an additional expression-channel floor: the
default expression_type is ARCADE (Esri's sandboxed expression
language), and PYTHON3 — which executes code inside the worker — is
rejected at the Layer-A contract boundary unless confirm: true is
explicitly supplied. raster_calculator expressions are constrained to a
pure map-algebra grammar (identifiers, numbers, operators; no quotes, no
dunder access) by a contract validator.
03 — Automated Quality Gate & Testing
Licensed-runtime evidence is reported separately in the
benchmarks/ method card. Its committed result uses a real
ArcGIS Pro worker and a dedicated scratch GDB; it is not pooled with the mocked
unit-test count or presented as validation of all 100 geoprocessing tools.
Scope, stated plainly: the automated gate currently consists of
86 unit tests spanning the PathGuard boundary, the Pydantic contracts,
the generic registry path-guard and registration invariants, the worker's
error-boundary mapping, and Settings environment validation. It exercises
the catalog's structural contracts and every security-critical seam — it does
not claim multi-scenario validation of the 100 geoprocessing tools themselves,
which execute against a licensed ArcGIS runtime that no CI runner has.
In-memory test architecture. tests/conftest.py injects MagicMock
proxies into sys.modules["arcpy"] and sys.modules["arcpy.sa"] (with
CheckExtension answering "Available") before any package import
resolves. The entire suite executes in well under a second, with no ArcGIS
installation, no license checkout, and no Esri runtime — locally and in CI
identically.
Test scopes.
tests/test_security.py&tests/test_pathguard.py— the PathGuard boundary firewall, exercised against real directories via pytest'stmp_pathfixture: valid reads/writes inside the sandbox pass; traversal (..-segments), UNC, relative, NUL-byte, reserved-device, over-length and out-of-root paths are rejected; write discipline (ArcGIS dataset-name rules, overwrite opt-in) is enforced.tests/test_contracts.py— Pydantic contract enforcement: per-tool parameter specs, cross-field validators,frozen/extra="forbid", and theok-xor-errorinvariant on the IPC envelope.tests/test_registry.py&tests/test_registry_guard.py— registry stream integrity plus genericapply_path_guardenforcement andregisterinvariants — every schema must be aToolInputsubclass, everypath_fieldsentry must reference a valid role, duplicate names are rejected, and every destructive spec must carry itsconfirmgate.tests/test_worker.py—process_frameerror-boundary mapping: every failure class (validation, security, license, geoprocessing, internal) maps to its distinctWorkerError.kind.tests/test_config.py—Settings.from_environmentvalidation: required variables, directory/file checks, integer bounds, and the fail-fast on a missing scratch geodatabase.
The side-effect import import arcgis_mcp.tools in the registry test is
what populates the catalog; it is # noqa-pinned so no linter ever strips
it again.
Static analysis. Ruff enforces canonical formatting plus
E/W/F/I/B/RUF at 88 columns against a py311 floor (code must parse on
the oldest supported interpreter — Layer B). Turkish comments are
first-class: the dotless ı/İ are registered under
allowed-confusables, so prose is configured around, never rewritten.
Mypy runs strict = true with the Pydantic plugin across all 31 source
files.
04 — Security Framework (PathGuard Sandbox)
Every filesystem argument in every contract declares its role —
"read", "write", or "read_list" — in the model's path_fields
mapping. One shared enforcement function applies those declarations in
both processes: Layer A pre-checks before a worker is ever spawned;
Layer B re-validates because it never trusts its parent.
Two boundary controls:
validate_read(raw: str)— fully resolves the path (symlinks,.., relative segments collapsed before any comparison) and requires containment inside a configuredallowed_rootsdirectory. Existence is enforced via a deepest-existing-prefix resolution strategy: the targeted path or its filesystem-resolvable geodatabase prefix must exist. This is what makes GDB-internal datasets (…\city.gdb\roads) first-class — the.gdbcontainer is validated on the filesystem, while the logical tail is constrained to plain dataset names only arcpy can resolve.validate_write(raw: str, *, overwrite: bool)— same resolution and containment, plus ArcGIS-legal dataset naming and the overwrite discipline: an existing target is never replaced unless the request explicitly setsoverwrite: true.
Any escape pattern — traversal sequences, UNC shares, NUL bytes, reserved
device names, out-of-root targets — raises PathSecurityError
immediately: the request is answered with a structured security frame
and no subprocess is ever orchestrated for it.
05 — 📦 Installation
Choose the onboarding path that matches your use case.
Prerequisites
- Windows with a licensed ArcGIS Pro installation
- Python 3.11 or newer for
arcgis-mcp-bridge - An existing writable directory for
ARCGIS_MCP_ALLOWED_ROOTS - An existing file geodatabase for
ARCGIS_MCP_SCRATCH_GDB, unless<first allowed root>\scratch.gdbalready exists
Path A: Pure PyPI Installation — Recommended for Windows Users
This is the simplest and most reliable setup for Claude Desktop and other MCP
hosts on Windows. The recommended configuration uses the same
arcgis-mcp-env\python.exe for both Layer A (the MCP server) and Layer B
(the ArcPy worker).
Choose one bootstrap installation command:
Then clone ArcGIS Pro's Python environment:
If the installed console command is available on PATH,
arcgis-mcp-setup is equivalent to py -m arcgis_mcp.setup_env.
Copy the python_exe value from the JSON report and assign it below:
Choose one installation command:
Do not run both commands; the second command already installs the standard
package together with the vision extra.
Use $ArcGISMcpPython as both the MCP server interpreter and
ARCPY_PYTHON_PATH. This prevents arcgis_mcp, Pydantic, pydantic-core,
and other native dependencies from being resolved from a different Python
installation.
Path B: Git Clone & Deterministic Development — GIS Contributors
This path keeps Layer A in a hermetic development environment while running
ArcPy work in a separately cloned, licensed arcgis-mcp-env worker.
Choose one worker-provisioning command:
--with-vision implies runtime-dependency installation, so the two commands
should not be run consecutively.
The setup command is idempotent, accepts --env-name (default:
arcgis-mcp-env) and --dry-run, and emits a JSON report. Set
ARCGIS_CONDA_EXE if ArcGIS Pro's conda.exe is not available on PATH.
Worker Interpreter Integrity
Layer B is launched as:
The interpreter referenced by ARCPY_PYTHON_PATH must be able to import the
complete worker stack:
For a first-time Windows installation, use the same
arcgis-mcp-env\python.exe for the server command and
ARCPY_PYTHON_PATH. Separate server and worker environments remain supported
for development, but the worker interpreter must contain its own compatible
installation of arcgis-mcp-bridge and all runtime dependencies.
Run this preflight check before configuring the MCP host:
Environment Variables
Claude Desktop Configuration
ARCPY_PYTHON_PATH is required in every configuration and must point to the
licensed interpreter reported by the setup command.
Replace every placeholder path below with an existing path on your machine. The scratch geodatabase must already exist.
Option 1: Unified PyPI Environment — Recommended on Windows
Use the same interpreter for the MCP server and ArcPy worker:
The command and ARCPY_PYTHON_PATH values should be identical in this
configuration. Use the python_exe value returned by the setup command.
Option 2: Local Git Development Environment
Use the repository .venv for Layer A and the provisioned
arcgis-mcp-env for Layer B:
This split-environment configuration assumes that the worker was provisioned
from the repository with one of the Path B setup commands above. PYTHONPATH
is not required when uv sync --locked has installed the project into the
repository .venv.
A globally resolved arcgis-mcp-server command can work, but it creates a
split-environment deployment. It is not recommended for first-time Windows
setup unless the worker environment has been provisioned and verified
separately.
After restarting the MCP host, call health_check first. It verifies the
server-to-worker IPC path and reports the selected worker interpreter without
importing ArcPy. Then run a read-only ArcGIS tool or the ArcPy preflight command
above to validate the licensed runtime.
06 — Troubleshooting
Worker process exited with code 1
If the MCP server starts but every ArcGIS tool fails, inspect the server log for the worker traceback. Common environment-related causes include:
These errors usually mean that the worker is using a different Python installation, the bridge was not installed into the worker interpreter, or the worker contains an incomplete or incompatible Pydantic installation. The recommended fix is the unified-environment configuration documented above.
For the recommended unified configuration, confirm that both values are identical:
Install or update the bridge inside that exact interpreter:
Verify the selected executable and bridge dependencies:
Then verify ArcPy separately:
If the bridge verification still fails specifically inside pydantic_core,
reinstall Pydantic in the same environment so pip restores the matching
compiled dependency:
Restart the MCP host completely after changing its Python environment or configuration.
ARCPY_PYTHON_PATH points to the wrong executable
A Windows conda environment normally places its interpreter at the environment root:
Do not use another global Python installation or a nonexistent
arcgis-mcp-env\Scripts\python.exe path.
Scratch geodatabase startup error
The default scratch workspace is:
It must already exist. Create it in ArcGIS Pro or set
ARCGIS_MCP_SCRATCH_GDB to an existing file geodatabase before restarting the
MCP host.
health_check succeeds but ArcGIS tools still fail
health_check intentionally verifies the server-to-worker process boundary
without importing ArcPy. A successful result confirms IPC and interpreter
selection, but it does not prove that ArcPy or an optional Esri extension
license can be loaded.
Run the ArcPy preflight command above and inspect the structured worker error
for not_found, license, geoprocessing, or internal details.
The first ArcGIS tool call times out
Every tool call starts a fresh worker that imports ArcPy. That usually takes
10–30 s, but a cold import has been measured at ~230 s on a machine where
real-time antivirus scans ArcGIS Pro's native DLLs; later calls are fast once
the DLLs are cached. Keep ARCGIS_MCP_TOOL_TIMEOUT at its 600 s default (or
higher) on such machines. Whether to exclude the ArcGIS Pro installation from
real-time scanning is a security decision for the machine's administrator.
import_from_geojson and geometry types
ArcPy's JSONToFeatures reads a .geojson file as polygons unless told
otherwise and silently drops other geometries. The bridge therefore detects the
geometry type from the file and passes it explicitly. A file that mixes points,
lines, and polygons is rejected with a count per type; import it once per type
with geometry_type set. An import that yields zero features fails loudly
instead of returning an empty feature class.
07 — Compatibility
Windows only. ArcPy requires a licensed ArcGIS Pro installation on Windows. Layer A can run on other platforms for development and mocked CI, but Layer B requires ArcGIS Pro.
The bridge package itself requires Python 3.11 or newer. ArcGIS Pro releases whose cloned Python environment is older than 3.11 cannot run the current worker package.
08 — License
Apache License 2.0. See LICENSE.
來源:README.md,提交 3f85729
工具
0版本歷史
3- v0.6.8最新Oct 2, 2026
- v0.6.7Sep 26, 2026
- v0.6.6Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分