arcpro-mcp

arcpro-mcp

Enables natural language control of live ArcGIS Pro sessions through the Model Context Protocol, allowing inspection of projects, layers, and attributes, and execution of geoprocessing tasks.

Category
访问服务器

README

arcpro-mcp

Control ArcGIS Pro with natural language through the Model Context Protocol (MCP). Works with Cursor, Claude, and Codex — bring your own LLM, keep your data local.

CI License: MIT Python 3.10+

arcpro-mcp lets an AI agent drive a live ArcGIS Pro session: inspect projects, explore layers and attributes, check coordinate systems, and (soon) run geoprocessing and build layouts — all from a chat prompt in your favorite MCP client.

Unlike Esri's built-in assistant, this is open source, connects to any LLM via your MCP client, and acts on your actual open session rather than only generating code.


Architecture

ArcGIS Pro hosts arcpy, and arcpy.mp.ArcGISProject("CURRENT") only works inside the running app. So the MCP server (a separate process started by your client) talks to a small bridge running in ArcGIS Pro's Python window over a local socket:

Cursor / Claude / Codex
        │  stdio (MCP)
        ▼
arcpro-mcp  (this package, separate process)
        │  TCP socket, length-prefixed JSON  (127.0.0.1:18748)
        ▼
arcpro_bridge.py  (runs in ArcGIS Pro's Python window)
        │  arcpy / arcpy.mp
        ▼
ArcGIS Pro  (live session)

Design choices vs. existing tools:

  • Socket, not file polling — lower latency, cleaner framing for big payloads.
  • Layered + tested — src/ package, dependency-free bridge, pytest, CI.
  • Safety first — read-only by default; destructive tools ask for confirmation; execute_python is off unless explicitly enabled; every call is audit-logged.
  • Great UX — structured output, MCP resources, and live layer-name auto-complete.

Requirements

  • ArcGIS Pro 3.x (provides arcpy)
  • Python 3.10+ for the MCP server (the arcgispro-py3 conda env works well)
  • An MCP client: Cursor, Claude Desktop, or Codex
  • uv recommended (or plain pip)

Install

git clone https://github.com/qiobn/arcpro-mcp
cd arcpro-mcp
uv sync          # or: pip install -e .

Usage

1. Start the bridge in ArcGIS Pro

Open ArcGIS Pro with a project, open the Python window, and run:

exec(open(r"C:/path/to/arcpro-mcp/bridge/arcpro_bridge.py").read())

You should see [ArcPro MCP Bridge] Listening on 127.0.0.1:18748.

2. Configure your MCP client

See examples/mcp-config.example.json. For Cursor or Claude Desktop:

{
  "mcpServers": {
    "arcgis-pro": {
      "command": "uv",
      "args": ["--directory", "C:/path/to/arcpro-mcp", "run", "arcpro-mcp"]
    }
  }
}

3. Talk to it

"Ping ArcGIS Pro and tell me what's in the project." "List the layers, then show me the first 10 rows of the roads layer." "What's the coordinate system of C:/data/parcels.shp?"


Tools

Read-only

Tool Description
ping Connectivity + project status
get_project_info Project path, default GDB, maps
list_directory List files (confirm paths before loading)
describe_data Data type, geometry, extent, CRS
list_feature_classes Feature classes in a workspace
list_layers Layers on the active map
list_fields Fields of a dataset/layer
count_features Row count of a layer
get_layer_features Preview attribute rows
get_unique_values Distinct values of a field
get_workspace / list_layouts Inspect workspace / layouts

Write / map-modifying

Tool Description
add_vector_layer / add_raster_layer Add data to a map
remove_layer Remove a layer (asks for confirmation)
set_layer_visibility / zoom_to_layer Toggle / navigate
create_map / save_project Map and project management
select_by_attribute / clear_selection SQL-based selection
set_workspace Set default GP workspace
run_geoprocessing Run any ArcPy tool by dotted name
create_layout / export_layout Build and export print layouts (PDF/PNG/...)

execute_python (arbitrary arcpy) exists but is disabled unless you set ARCPRO_MCP_ALLOW_EXEC=1 in both the client env and the ArcGIS Pro env.

Configuration

Variable Default Description
ARCPRO_MCP_HOST 127.0.0.1 Bridge host
ARCPRO_MCP_PORT 18748 Bridge port
ARCPRO_MCP_TRANSPORT stdio stdio or streamable-http
ARCPRO_MCP_ALLOW_EXEC (off) Enable execute_python (1/true)
ARCPRO_MCP_AUDIT_LOG ~/.arcpro_mcp/audit.log Audit log path (empty to disable)
ARCPRO_MCP_LOG_LEVEL INFO Server log level

Safety

  • Read-only tools are annotated readOnlyHint and are always safe.
  • Destructive tools (coming next) require confirmation via MCP elicitation.
  • execute_python is opt-in and double-gated (client + bridge).
  • Every requested operation is appended to an audit log for review/replay.

Roadmap

  • [x] v0.1 — socket bridge, read-only tools, audit log, CI, tests
  • [ ] v0.2 — write tools (add/remove layer, selection, geoprocessing) with HITL confirm
  • [ ] v0.3 — execute_python hardening, reflection middleware (CRS/units sanity), layouts & export
  • [ ] v0.4 — main-thread dispatch queue / optional .NET Add-In (QueuedTask) for rock-solid arcpy.mp
  • [ ] v1.0 — installer, multi-client docs, compound tool mode to cut tokens

License

MIT — see LICENSE.

Acknowledgements

Architecture informed by the excellent nkarasiak/qgis-mcp, jjsantos01/qgis_mcp, geo2004/MCP-ArcGISPro, and the safety patterns in gdal-mcp.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选