Logo ArcGIS Pro MCP Bridge

ArcGIS Pro MCP Bridge

Cộng đồng
geo2004

Controlling and Automating ArcGIS Pro from Claude AI Desktop using MCP Connection

Nhà phát hànhgeo2004
Kho mãMCP-ArcGISPro
Ngôn ngữPython
Bản fork
7
Sao
42
Công cụ có sẵn
0
Phương thức truyền tảistdio
Danh mục
Liên kết
  • Kết nối công cụ với quy trình làm việc AI

    ArcGIS Pro MCP Bridge cung cấp các khả năng MCP mà ứng dụng khách và tác nhân AI tương thích có thể sử dụng.

  • 0 công cụ có sẵn

    Xem các thao tác có thể gọi bên dưới, kèm tên và mô tả nếu máy chủ cung cấp.

  • Cấu hình sẵn để sao chép

    Dùng các đoạn cấu hình cài đặt mẫu để thiết lập máy chủ này trong ứng dụng khách MCP bạn muốn dùng.

  • Chỉ số quan tâm đến mã nguồn mở

    42 sao và 7 bản fork từ kho mã được liên kết.

ArcGIS Pro MCP Bridge

Control ArcGIS Pro from Claude Desktop using the Model Context Protocol (MCP).
Pure Python — no C#, no .NET SDK, no Visual Studio required.


What It Does

Connects Claude Desktop (or any MCP client) to a live ArcGIS Pro session, enabling natural language control of:

  • Add / remove layers (vector and raster)
  • Run any ArcPy geoprocessing tool (buffer, clip, intersect, project, dissolve, and more)
  • Check coordinate systems and reproject data
  • Query and select features by attribute
  • List layers, fields, feature classes, rasters, and tables
  • Create layouts and export maps (PDF, PNG, JPG, TIF, SVG, EPS)
  • Zoom to layers, toggle visibility, save projects
  • Bulk-edit attribute values on features matching a query
  • Publish a layer as a hosted feature service to ArcGIS Online / Enterprise
  • Run one-call recipes: layer QC report, attribute export to CSV, batch layout export, field stats, value counts
  • Execute arbitrary ArcPy / arcpy.mp code

Requirements

  • ArcGIS Pro 3.x (tested on 3.6.1)
  • Claude Desktop
  • uv — lightweight Python package manager
  • The arcgis package (ArcGIS API for Python) in ArcGIS Pro's Python environment, for publish_web_layer only — bundled by default in ArcGIS Pro's arcgispro-py3 environment on recent versions; the rest of the bridge doesn't need it

Setup

1. Clone the repository

bash
git clone https://github.com/Geo2004/MCP-ArcGISPro.git

2. Install uv (if not already installed)

powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

uv handles the mcp package dependency automatically — no manual pip install needed.

3. Configure Claude Desktop

Open your Claude Desktop config file and add the arcgis-pro entry under mcpServers.

Config file location:

InstallationPath
Standard installer%APPDATA%\Claude\claude_desktop_config.json
Windows Store (Microsoft Store)%LOCALAPPDATA%\Packages\Claude_pzs8sxrjxfjjc\LocalCache\Roaming\Claude\claude_desktop_config.json

Not sure which you have? Open Claude Desktop → Settings → Developer → Hit Edit Config Button.

json
{
  "mcpServers": {
    "arcgis-pro": {
      "command": "C:/Users/<YourUsername>/.local/bin/uv.exe",
      "args": [
        "--directory",
        "C:/path/to/MCP-ArcGISPro",
        "run",
        "arcgis_mcp_server.py"
      ]
    }
  }
}

Replace <YourUsername> and the directory path with your actual values.

3. Start the bridge in ArcGIS Pro

Every session, before using Claude:

  1. Open ArcGIS Pro and load a project (or create a new one)
  2. Open a Map, Scene, or Globe so it is active
  3. Go to the Analysis tab → click Python to open the Python window
  4. Run:
python
p = r"C:/path/to/MCP-ArcGISPro/pro_bridge.py"
exec(open(p).read(), {"__file__": p})

Passing {"__file__": p} lets the optional hardening/recipes/socket layer (which lives next to pro_bridge.py) load. Plain exec(open(p).read()) still runs the core bridge, but only with built-in defaults (no safe_mode, no recipes, no socket transport).

Easiest of all: in the Catalog pane → Toolboxes → right-click → Add Toolbox → select MCP_Bridge.pyt. Then double-click Start MCP Bridge under it (Run) — no need to open the Python window or type anything. Stop MCP Bridge / MCP Bridge Status work the same way. This loads the hardening layer automatically, same as passing __file__ above.

You should see:

[MCP Bridge] Project cached: C:\path\to\your.aprx
[MCP Bridge] Running in background thread. IPC: C:\Users\..\.arcgis_mcp
[MCP Bridge] Python window is free.  To stop: _bridge_active = False

4. Restart Claude Desktop

Restart Claude Desktop after updating the config. The ArcGIS Pro tools will appear automatically.


Usage

Just talk to Claude naturally. Examples:

"Add the roads shapefile from C:/data to the map"

"Check the coordinate system of parcels.shp and run a 500m buffer, dissolve all overlaps"

"List all layers in my current map"

"Export the layout as PNG to C:/output/map.png"

"Select all features where KECAMATAN = 'Semarang Tengah' and count them"

"Set STATUS to 'Verified' for every feature where INSPECTED = 1"

"Publish the parcels layer to ArcGIS Online as a private hosted layer named 'Parcels_2026'"

"Run a slope analysis on my DEM raster"


Available Tools (32)

CategoryTools
Connectionping
Projectget_project_info, save_project
Mapget_active_map_name, create_map
Layerslist_layers, add_vector_layer, add_raster_layer, remove_layer, zoom_to_layer, set_layer_visibility
Datadescribe_data, list_directory, list_fields, get_layer_features, get_unique_values
Workspaceset_workspace, get_workspace, list_feature_classes, list_rasters, list_tables
Selectionselect_by_attribute, clear_selection, count_features
Editingupdate_features (bulk-set field values on matching rows)
Geoprocessingrun_geoprocessing (any arcpy tool by dotted name)
Layout & Exportlist_layouts, create_layout, export_layout
Sharingpublish_web_layer (hosted feature service to ArcGIS Online/Enterprise)
Recipesrun_recipe (qa_layer, export_attributes_csv, batch_export_layouts, field_stats, value_counts — requires the hardening layer loaded)
Advancedexecute_python (arbitrary arcpy/arcpy.mp code)

How It Works

Claude Desktop
    ↓  stdio (MCP)
arcgis_mcp_server.py   ← runs via uv, any Python
    ↓  file-based IPC  (~/.arcgis_mcp/)
pro_bridge.py          ← runs in ArcGIS Pro's Python window, on a background thread
    ↓                                          ↓
arcpy / arcpy.mp                        arcgis (ArcGIS API for Python)
    ↓                                          ↓
ArcGIS Pro (live session)               ArcGIS Online / Enterprise portal, over REST

File-based IPC (command / result JSON files in ~/.arcgis_mcp/) always works and needs no setup. When the hardening layer loads (see below), a localhost socket transport starts alongside it and becomes the preferred path — lower latency, no polling — with file IPC as the automatic fallback if the socket is ever unavailable. Either way, no compilation required.

Almost everything goes through arcpy/arcpy.mp against the live local session. publish_web_layer is the one exception, and deliberately so: arcpy.server/arcpy.mp.CreateWebLayerSDDraft are COM-based and need the signed-in portal session in a way that's only available on ArcGIS Pro's true main thread — not the background thread this bridge dispatches every command from. Rather than block on that, publish_web_layer uses the arcgis package instead, which talks to the portal over plain REST (reusing the same Pro sign-in via arcpy.GetSigninToken(), no separate login) — REST has no thread affinity, so it works fine from here. Same pattern is available for other portal-side operations (content management, sharing, editing an already-published layer, user/group admin) if this bridge grows in that direction later — those aren't subject to the thread limitation either.


Safety & Configuration

When the bridge is started via the toolbox (or manual exec with __file__), an optional hardening layer loads and applies safe defaults:

  • execute_python is disabled unless you opt in — arbitrary code execution is off by default.
  • run_geoprocessing is restricted to an allowlist of toolbox prefixes (analysis., management., conversion., cartography., sa., ddd., stats., ca., intelligence.), plus a blocklist for destructive tools (Delete, DeleteFeatures, DeleteRows, DeleteField, DeleteIdentical, TruncateTable) even within an allowed toolbox. The blocklist check is case- and alias-insensitive (management.delete and Delete_management are both caught).
  • Bridge no longer silently creates a map if none exists — it asks instead, unless auto_create_map is turned back on.
  • Timeout is configurable (default 60s) instead of a hardcoded 15s that was too short for slower geoprocessing/publish calls.
  • run_recipe is gated the same way — each recipe declares which GP tools (if any) it needs, and those go through the same allowlist/blocklist check.

To change any of this, copy hardening/config.example.json to ~/.arcgis_mcp/config.json and edit. If the hardening layer fails to load for any reason, the bridge falls back to its original, fully-open behavior (with a console message saying so) — so a broken hardening/ install never silently blocks you, but also isn't a safety net you should rely on.


Known Limitations

  • Opening a map view automatically is not possible via Python/ArcPy alone — it's an application-shell action that lives in the compiled ArcGIS Pro SDK, not the arcpy document API. The user must open the map view manually once per session by double-clicking it in the Catalog pane. All other operations work without an open view — for zooming/visualizing a layer specifically, create_layout() + export_layout() render headlessly and don't need an open view at all.
  • Interactive sketch-tool digitizing (drawing features by hand) requires the ArcGIS Pro UI and cannot be automated — by definition, freehand digitizing needs a human at the screen. Non-interactive attribute edits don't have this limitation: use update_features.

Stopping the Bridge

If you started it via the MCP Bridge toolbox, double-click Stop MCP Bridge.

If you started it manually in the Python window:

python
_bridge_active = False

Or simply close the Python window or restart ArcGIS Pro.


License

MIT

Cài đặt

TypingMind
{
  "mcpServers": {
    "mcp-arcgispro": {
      "command": "uv",
      "args": [
        "--directory",
        "C:/path/to/MCP-ArcGISPro",
        "run",
        "arcgis_mcp_server.py"
      ]
    }
  }
}

Dùng MCP ArcGIS Pro MCP Bridge với nhiều mô hình AI

TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên sau khi kết nối ArcGIS Pro MCP Bridge, bạn có thể dùng với nhiều mô hình AI khác nhau trong TypingMind thay vì phải thiết lập riêng cho từng mô hình. MCP này chạy cục bộ thông qua trình kết nối MCP của TypingMind trên thiết bị của bạn.

Hướng dẫn thiết lập để dùng trình kết nối cục bộ

Dùng cách này khi máy chủ MCP cần truy cập các tệp, ứng dụng hoặc tài nguyên riêng tư trên máy tính của bạn.

1

Mở cài đặt MCP

Trong TypingMind, vào Cài đặt, Cài đặt nâng cao, rồi đến Giao thức ngữ cảnh mô hình và chọn Cài trình kết nối.

  1. Mở TypingMind trong trình duyệt của bạn.
  2. Nhấp vào biểu tượng Cài đặt.
  3. Vào Cài đặt nâng cao.
  4. Mở mục Giao thức ngữ cảnh mô hình.
  5. Nhấp vào Cài trình kết nối rồi chọn Thiết bị này.
Màn hình thiết lập trình kết nối MCP của TypingMind với tùy chọn Thiết bị này được chọn
2

Chạy lệnh trình kết nối

Chọn Thiết bị này, sao chép lệnh từ TypingMind và chạy trong Terminal. Giữ tiến trình chạy trong khi bạn dùng MCP.

  1. Sao chép lệnh thiết lập hiển thị trong TypingMind.
  2. Mở Terminal trên macOS hoặc Windows Terminal trên Windows.
  3. Dán và chạy lệnh.
  4. Xác nhận cài đặt gói nếu Terminal hỏi bạn có muốn tiếp tục không.
  5. Giữ tiến trình trong cửa sổ Terminal chạy trong khi dùng các công cụ MCP.
3

Thêm ArcGIS Pro MCP Bridge làm máy chủ

Khi trạng thái trình kết nối là Sẵn sàng, nhấp vào Sửa máy chủ và dán cấu hình máy chủ MCP.

  1. Đợi đến khi trạng thái trình kết nối hiển thị Sẵn sàng.
  2. Nhấp vào Sửa máy chủ.
  3. Dán cấu hình máy chủ MCP của ArcGIS Pro MCP Bridge.
  4. Lưu danh sách máy chủ.
  5. Làm mới nếu bạn muốn xác nhận trình kết nối vẫn sẵn sàng.
Cài đặt MCP của TypingMind hiển thị máy chủ đang hoạt động và nút Sửa máy chủ
{
  "mcpServers": {
    "mcp-arcgispro": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Dùng kết nối với nhiều mô hình

Lưu danh sách máy chủ, mở Plugin, bật các công cụ MCP của ArcGIS Pro MCP Bridge, sau đó chọn bất kỳ mô hình AI nào được hỗ trợ trong TypingMind và dùng các công cụ trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.

  1. Mở trang Plugin trong TypingMind.
  2. Bật các công cụ MCP của ArcGIS Pro MCP Bridge.
  3. Bắt đầu cuộc trò chuyện và chọn mô hình AI bạn muốn dùng.
  4. Dùng các công cụ MCP trong cuộc trò chuyện hoặc gán chúng cho một tác nhân AI.
  5. Chuyển sang mô hình AI khác bất cứ khi nào cần mà không phải kết nối lại MCP.
Cuộc trò chuyện TypingMind dùng các công cụ MCP đã bật với một mô hình AI được chọn
Bạn có thể dùng ArcGIS Pro MCP Bridge giúp tôi làm việc này không?
ArcGIS Pro MCP Bridge
Được. Tôi đã đọc.
Đây là kết quả tôi tìm được bằng ArcGIS Pro MCP Bridge.

Câu hỏi thường gặp

Máy chủ MCP ArcGIS Pro MCP Bridge dùng để làm gì?

ArcGIS Pro MCP Bridge là máy chủ MCP cho phép các ứng dụng AI tương thích kết nối với công cụ và ngữ cảnh bên ngoài. Trong TypingMind, bạn chỉ cần thêm máy chủ MCP này một lần để các công cụ của nó có sẵn trong không gian làm việc AI của bạn.

Bạn có thể dùng MCP ArcGIS Pro MCP Bridge với nhiều mô hình AI trong TypingMind không?

Có. TypingMind kết nối các công cụ MCP ở cấp không gian làm việc, nên bạn có thể dùng ArcGIS Pro MCP Bridge với nhiều mô hình AI như Claude, ChatGPT, Gemini hoặc các mô hình khác đã cấu hình trong TypingMind mà không cần thiết lập máy chủ MCP riêng cho từng mô hình.

Vì sao nên dùng MCP ArcGIS Pro MCP Bridge với TypingMind?

TypingMind là một trong những giao diện trò chuyện với LLM tốt nhất vì tập hợp nhiều mô hình AI, prompt, plugin, tác nhân AI, khóa API và công cụ MCP vào một không gian làm việc. Khi kết nối ArcGIS Pro MCP Bridge, bạn có thể dùng các công cụ MCP của dịch vụ này với những mô hình ưa thích, đồng thời giữ quy trình trò chuyện gọn gàng trong TypingMind.

Làm cách nào để kết nối MCP ArcGIS Pro MCP Bridge với TypingMind?

ArcGIS Pro MCP Bridge hoạt động thông qua trình kết nối MCP cục bộ của TypingMind. Đây là lựa chọn phù hợp nhất khi máy chủ MCP cần truy cập tệp cục bộ, ứng dụng máy tính, công cụ dòng lệnh hoặc tài nguyên riêng trên máy tính của bạn.

MCP ArcGIS Pro MCP Bridge cung cấp những công cụ nào trong TypingMind?

ArcGIS Pro MCP Bridge cung cấp các chức năng MCP mà bạn có thể bật từ trang Plugin của TypingMind để dùng trong trò chuyện hoặc gán cho tác nhân AI.

Bạn có cần chia sẻ khóa API với TypingMind để dùng MCP ArcGIS Pro MCP Bridge không?

Không. TypingMind ưu tiên xử lý cục bộ và cho phép bạn kiểm soát nhà cung cấp mô hình, khóa API, prompt và cấu hình MCP. Nếu ArcGIS Pro MCP Bridge yêu cầu xác thực, hãy thêm các header, cài đặt OAuth hoặc cấu hình cục bộ cần thiết cho máy chủ MCP đó khi tạo kết nối.

Máy chủ MCP liên quan

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇