ArcGIS Pro MCP
Controls a live ArcGIS Pro session, allowing AI assistants to manage layers, run geoprocessing tools, adjust symbology, export maps, and execute arcpy code.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@ArcGIS Pro MCPList all layers in the current map"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ArcGIS Pro MCP
MCP (Model Context Protocol) server สำหรับให้ AI assistant — Claude Code, OpenAI Codex CLI และ Gemini CLI — ควบคุม ArcGIS Pro ที่เปิดอยู่จริง: ดู/จัดการ layer, query ข้อมูล attribute, รันเครื่องมือ geoprocessing, ปรับ symbology, export แผนที่และ layout รวมถึงรันโค้ด arcpy ใดก็ได้
MCP server that lets AI assistants (Claude Code, Codex, Gemini CLI) control a live ArcGIS Pro session through arcpy.
สถาปัตยกรรม
Claude Code / Codex / Gemini CLI
│ MCP (stdio)
▼
arcgis-pro-mcp (แพ็กเกจนี้ — รันบน Python ≥3.10 ทั่วไป ไม่ต้องมี arcpy)
│ JSON over TCP (localhost:6510)
▼
MCP Bridge (arcgis_pro_plugin/ — รัน "ภายใน" ArcGIS Pro ผ่าน Python Toolbox
จึงเข้าถึงโปรเจกต์ที่เปิดอยู่ผ่าน arcpy ได้เต็มรูปแบบ)ต้องแบ่งเป็น 2 ส่วน เพราะ arcpy จะเข้าถึงโปรเจกต์ที่ เปิดอยู่ ("CURRENT")
ได้เฉพาะจาก Python runtime ภายใน ArcGIS Pro เท่านั้น
ส่วน | รันที่ไหน | โฟลเดอร์ |
MCP server | Python 3.10+ ทั่วไป (ไม่ต้องมี arcpy) |
|
Bridge plugin | ภายใน ArcGIS Pro (Python Toolbox) |
|
Related MCP server: ArcGIS Pro Bridge MCP Server
การติดตั้ง
1. ติดตั้ง plugin ฝั่ง ArcGIS Pro
เปิด ArcGIS Pro พร้อมโปรเจกต์ของคุณ
ไปที่หน้าต่าง Catalog → คลิกขวา Toolboxes → Add Toolbox → เลือกไฟล์
arcgis_pro_plugin/ArcGISMCP.pytจาก repo นี้รันเครื่องมือ Start MCP Server (พอร์ตเริ่มต้น 6510)
เปิด ArcGIS Pro ทิ้งไว้ตลอดการใช้งาน — server จะหยุดเมื่อปิด Pro ดังนั้นเปิด Pro ใหม่เมื่อไหร่ต้องรัน Start MCP Server อีกครั้ง
ทางเลือก (ไม่ใช้ toolbox): วางโค้ดนี้ใน Python window ของ Pro
import sys; sys.path.insert(0, r"D:\Developing\ArcGIS-MCP\arcgis_pro_plugin")
import mcp_bridge; print(mcp_bridge.start_server())2. ติดตั้ง MCP server
ใช้ Python ≥3.10 ตัวไหนก็ได้ในเครื่อง (ไม่จำเป็นต้องเป็น Python ของ ArcGIS Pro) จากโฟลเดอร์ repo นี้:
pip install -e .หรือใช้ uv โดยไม่ต้องติดตั้ง — ใช้คำสั่ง
uv run --directory D:\Developing\ArcGIS-MCP arcgis-pro-mcp แทนในขั้นตอนถัดไป
3. ลงทะเบียนกับ AI client ที่ใช้
ตัวอย่างด้านล่างใช้
python -m arcgis_pro_mcpซึ่งใช้ได้เสมอ (ถ้าarcgis-pro-mcp.exeอยู่ใน PATH จะใช้"command": "arcgis-pro-mcp"เฉย ๆ ก็ได้)
Claude Code — repo นี้มี .mcp.json ให้แล้ว ใช้ได้ทันทีเมื่อเปิด Claude Code ในโฟลเดอร์นี้ หรือลงทะเบียนแบบ global:
claude mcp add arcgis --scope user -- python -m arcgis_pro_mcpหรือเขียนเองใน .mcp.json (ระดับโปรเจกต์) / ~/.claude.json (ทุกโปรเจกต์):
{
"mcpServers": {
"arcgis": {
"command": "python",
"args": ["-m", "arcgis_pro_mcp"]
}
}
}OpenAI Codex CLI — เพิ่มใน ~/.codex/config.toml:
[mcp_servers.arcgis]
command = "python"
args = ["-m", "arcgis_pro_mcp"]Gemini CLI — เพิ่มใน ~/.gemini/settings.json
(หรือ .gemini/settings.json ในโปรเจกต์):
{
"mcpServers": {
"arcgis": {
"command": "python",
"args": ["-m", "arcgis_pro_mcp"]
}
}
}4. ทดสอบ
เปิด ArcGIS Pro + รัน Start MCP Server แล้วลองถาม AI ว่า:
"ping ArcGIS แล้วบอกหน่อยว่าโปรเจกต์ที่เปิดอยู่มี layer อะไรบ้าง"
ตัวแปร environment (ไม่บังคับ)
ตัวแปร | ค่าเริ่มต้น | ความหมาย |
|
| host ของ bridge |
|
| พอร์ตของ bridge (ต้องตรงกับที่ตั้งใน Start MCP Server) |
|
| วินาทีที่รอ geoprocessing ที่ใช้เวลานาน |
Tools ทั้งหมด (31 ตัว)
Session / โปรเจกต์
Tool | หน้าที่ |
| เช็คว่าเชื่อมต่อ bridge ใน ArcGIS Pro ได้ |
| เวอร์ชัน Pro, license, path โปรเจกต์ |
| รายละเอียดโปรเจกต์: gdb เริ่มต้น, maps, layouts |
| รายชื่อ map ทั้งหมดพร้อม CRS และจำนวน layer |
| สร้าง map ใหม่ (MAP หรือ SCENE) |
| บันทึกโปรเจกต์ (.aprx) |
Layer
Tool | หน้าที่ |
| รายชื่อ layer และ table ใน map |
| เพิ่มข้อมูลจาก path/URL (feature class, shapefile, raster, .lyrx, service) |
| ลบ layer ออกจาก map |
| เปิด/ปิดการแสดง layer |
| ตั้ง definition query (SQL) ให้ layer |
| รายละเอียด layer: source, CRS, extent, fields, จำนวน feature |
| ซูมไปยัง extent ของ layer |
| เปลี่ยน basemap เช่น Imagery, Topographic |
ข้อมูล attribute
Tool | หน้าที่ |
| อ่าน feature (where clause, เลือก field, geometry เป็น WKT ได้) |
| ค่าที่ไม่ซ้ำของ field |
| min / max / mean / sum / std ของ field ตัวเลข |
| select ด้วย SQL (NEW / ADD / REMOVE / SUBSET) |
| ล้าง selection ของ layer เดียวหรือทั้ง map |
Schema / แก้ไขข้อมูล
Tool | หน้าที่ |
| เพิ่ม field (TEXT, LONG, DOUBLE, DATE, …) |
| ลบ field |
| คำนวณค่า field (PYTHON3 / ARCADE / SQL) |
| สร้าง feature class ใหม่ใน gdb |
Geoprocessing
Tool | หน้าที่ |
| รัน arcpy tool ใดก็ได้ เช่น |
| ค้นหา tool ด้วย wildcard เช่น |
Symbology / Export
Tool | หน้าที่ |
| เปลี่ยน symbology: simple (สี RGB), unique values, graduated colors |
| รายชื่อ layout ในโปรเจกต์ |
| export layout เป็น PDF / PNG / JPEG / SVG |
| export map view เป็น PNG (ให้ AI "เห็น" แผนที่ได้) |
Raster / อื่น ๆ
Tool | หน้าที่ |
| ข้อมูล raster: จำนวน band, ขนาด, cell size, สถิติ |
| รันโค้ด Python ใดก็ได้ภายใน ArcGIS Pro (arcpy พร้อมใช้) |
ตัวอย่าง prompt
"What layers are in my current map and how many features does each have?"
"Buffer ชั้นข้อมูลถนน 500 เมตร แล้วเพิ่มผลลัพธ์ลงแผนที่"
"ลงสีชั้นข้อมูลจังหวัดตาม field POP แบบ graduated 5 คลาส ใช้ color ramp Viridis"
"export map view เป็น PNG แล้วดูให้หน่อยว่าแผนที่เป็นยังไง"
"สรุปจำนวน feature แยกตามชนิดป่าใน layer forest_type"
โปรโตคอลภายใน (สำหรับผู้พัฒนา)
Bridge ใช้ newline-delimited JSON ผ่าน TCP:
request : {"id": 1, "command": "get_layers", "params": {"map_name": null}}\n
response: {"id": 1, "success": true, "data": {...}}\n
error : {"id": 1, "success": false, "error": "...", "traceback": "..."}\nเพิ่มคำสั่งใหม่ได้โดยเขียนฟังก์ชัน handler ใน
mcp_bridge.py + ลงทะเบียนใน HANDLERS
แล้วเพิ่ม @mcp.tool() ที่เรียก _call() ใน
server.py
ข้อควรระวังด้านความปลอดภัย
Bridge รับเฉพาะ localhost แต่โปรเซสใดก็ได้ในเครื่องเชื่อมต่อได้ และ
execute_arcpy_code/run_geoprocessing_toolแก้ไขหรือลบข้อมูลได้จริง — เปิด server เฉพาะตอนใช้งาน บนเครื่องที่เชื่อถือได้เท่านั้นAI ทำงานกับ โปรเจกต์จริงที่เปิดอยู่ — ควร save/backup ก่อนให้แก้ไขข้อมูลจำนวนมาก
แก้ปัญหาเบื้องต้น
อาการ | สาเหตุ / วิธีแก้ |
"Cannot connect to ArcGIS Pro MCP bridge" | ยังไม่ได้เปิด ArcGIS Pro, ยังไม่ได้รัน Start MCP Server, หรือพอร์ตไม่ตรงกับ |
Tool ค้างนาน | geoprocessing ใช้เวลานาน — เพิ่มค่า |
"Layer not found" | ใช้ชื่อ layer ตรงตามที่ |
แก้โค้ด bridge แล้วไม่มีผล | รันเครื่องมือใดก็ได้ใน toolbox หนึ่งครั้งเพื่อ reload โมดูล (server ที่รันอยู่ไม่หลุด) |
โครงสร้าง repo
ArcGIS-MCP/
├── arcgis_pro_plugin/
│ ├── ArcGISMCP.pyt # Python Toolbox: Start / Stop / Status
│ └── mcp_bridge.py # socket server + handler 31 คำสั่ง (รันใน Pro)
├── src/arcgis_pro_mcp/
│ ├── server.py # FastMCP stdio server (31 tools)
│ └── connection.py # TCP client + auto-reconnect
├── .mcp.json # config สำเร็จรูปสำหรับ Claude Code
├── pyproject.toml
└── README.mdMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Knight60/ArcGIS-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server