ProCowork: Letting Claude Drive ArcGIS Pro
This past July, I had the pleasure of presenting ProCowork at the Esri User Conference in San Diego. For those who could not make it (or were busy chasing the next session across the convention center), here is the short version of what I showed, and why I built it.
I have been playing with GenAI and GIS for a while now. Asking a language model to write ArcPy is old news. What I really wanted was a model that could do the work, on my open project, inside my running ArcGIS Pro session, while I watch.
ProCowork is an experimental ArcGIS Pro add-in that puts the Claude Code engine in a dockable chat panel. You type a request, Claude writes the Python, the add-in runs it against the live map, and the code and the results come back into the same panel. So I can type things like:
- “List the layers in the current map.”
- “Add a DOUBLE field POP_DEN to Parcels and set it to POP / AREASQMI.”
- “Select parcels where POP_DEN > 5000 and zoom to them.”
- “Buffer Roads by 100 meters and add the result to the map.”
And it just does it. No copy and paste into the Python window. It even knows about my current selection, so “calculate this for the selected parcels” touches only the selected parcels :-)
Summarize the water mains by material, then symbolize them. Claude noticed Web
Mercator inflates SHAPE_Length by about 34% at this latitude and used
true ground length instead.
The one tricky part
Here is the catch. arcpy.mp.ArcGISProject("CURRENT"), the thing that
gives you the open project, only works inside Pro's own Python, on Pro's own thread.
Claude Code runs outside of Pro, as a separate process. From out there it can see
files on disk, but not your open map.
My first try kept a long-running Python process inside Pro. It worked, until it went stale. So I flipped it around. A small C# bridge now lives inside Pro for the whole session and listens only on the local machine. Claude talks to it using the Model Context Protocol (MCP). Quick questions, like “what layers do I have?”, are answered right away by the .NET SDK. Anything that changes data runs as one fresh ArcPy geoprocessing tool that does its job and goes away. Nothing is left behind to go stale.
Chat panel (inside ArcGIS Pro)
-> Claude Code (headless, on my machine)
-> MCP over http://127.0.0.1:<random-port>
-> C# bridge (inside ArcGIS Pro)
-> .NET SDK for reads, or one fresh ArcPy tool for writes
-> the live map
The bridge offers 14 tools. Most are simple ones like list_layers,
add_field, and run_geoprocessing. The star of the show is
run_python_current, which lets Claude run any ArcPy it needs when the
simple tools are not enough. And it uses your existing Claude Code login, so there is
no API key baked into the add-in.
A word of caution
By default, ProCowork runs in what I call YOLO mode. The generated code runs on your open project right away, with no approval prompt. That is what makes it fun, and it is also exactly as dangerous as it sounds. ArcPy can edit and delete real data. Keep backups, and please do not point it at the only copy of anything you care about.
This is my personal experiment, not an Esri product, and it is not supported by Esri. It needs Windows, ArcGIS Pro 3.7, and Claude Code.
The source code and build steps are in the ProCowork repository. Next on my list is a proper review-and-approve step, so you can see what Claude is about to do before it touches your data. Thanks to everyone who came to the session in San Diego.
More to come :-)
Comments