arcgis-portal-mcp
Allows AI assistants to search, query, and manage content, features, users, and groups in ArcGIS Enterprise Portal or ArcGIS Online, including publishing services, running geoprocessing tasks, and administrative operations.
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-portal-mcpfind all feature services in my portal"
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-portal-mcp
MCP server for ArcGIS Portal and Online — lets AI assistants search content, query feature layers, manage features, handle content operations, and administer users and groups.
Built on the Model Context Protocol for integration with Claude Desktop, Cursor, VS Code Copilot, and other MCP clients.
Features
Connect to any ArcGIS Enterprise Portal or ArcGIS Online
Search for items (feature services, web maps, layers, dashboards)
Inspect item metadata, tags, and descriptions
List layers in a feature service with geometry types and counts
Query features with attribute filters, spatial filters, field selection, and pagination
Add, update, and delete features in hosted feature layers
Manage content — update item properties, share/unshare, delete items, read web map definitions
Manage users — list users, get detailed user profiles
Manage groups — list groups, create groups, invite users
Publish services — upload files and publish as hosted feature services
Run geoprocessing — execute synchronous and asynchronous GP tasks
Portal admin — system info, license management, usage statistics
Batch operations — bulk delete, share, and update multiple items
Health check portal system status (requires admin privileges)
Related MCP server: arcpro-mcp
Design Principles
No
arcgisPython package dependency — uses raw REST API calls viarequestsfor maximum compatibility (thearcgispackage has installation issues on Windows)Works with Enterprise Portal AND ArcGIS Online — same tools, same API
Token-first auth — supports existing tokens for zero-friction MCP integration
Auto-connect — reads
.envfile on startup, no manual auth needed per session2FA-friendly — works with Enterprise portals that require two-factor authentication (client_credentials, no browser)
Self-signed cert friendly — handles Enterprise portals with self-signed certificates
Installation
# From source
cd arcgis-portal-mcp
pip install -e .
# Or install from GitHub
pip install git+https://github.com/Asem-D/arcgis-portal-mcp.gitWindows users: pywin32 is installed automatically as a platform-specific dependency.
Configuration
.env File (recommended)
Create a .env file in the project root for automatic connection on startup. A template is provided:
cp .env.example .env
# Edit .env with your portal credentialsportal_url=https://gis.example.com/portal
oauth_client_id=your-oauth-app-client-id
oauth_client_secret=your-oauth-app-client-secretThe server reads these on startup and connects via client_credentials automatically — no manual connect_portal call needed.
Note: The
.envfile is gitignored. Never commit credentials..env.exampleis safe to commit.
MCP Client Configuration
For MCP clients (Claude Desktop, Cursor, etc.), the simplest setup uses a .env file:
{
"mcpServers": {
"arcgis-portal": {
"command": "python",
"args": ["-m", "arcgis_portal_mcp.server"],
"cwd": "/path/to/arcgis-portal-mcp"
}
}
}The server auto-connects from .env in the working directory. No env vars needed in the MCP config.
Alternatively, pass credentials via MCP client env vars:
{
"mcpServers": {
"arcgis-portal": {
"command": "python",
"args": ["-m", "arcgis_portal_mcp.server"],
"env": {
"portal_url": "https://gis.example.com/portal",
"oauth_client_id": "your-client-id",
"oauth_client_secret": "your-client-secret"
}
}
}
}connect_portal Tool Parameters
The connect_portal tool accepts these auth_method values:
Value | Behavior |
| Read from |
| Use explicit portal token |
| Use explicit client_id/secret |
| Browser-based OAuth2 (blocks ~2 min) |
Usage
Connect and Search
User: Search for all feature services in my portal
Agent: [calls connect_portal, then search_content with item_type="Feature Service"]Query a Layer
User: Show me the first 10 parcels from the cadastral layer
Agent: [calls list_layers to find the parcel layer, then query_features with limit=10]Audit Users
User: Who are the administrators in our portal?
Agent: [calls list_users, filters by role]Add Features
User: Add these 3 buildings to the infrastructure layer
Agent: [calls add_features with the feature service URL and JSON features]Share a Web Map
User: Share item abc123 with the "Planning Team" group and the whole org
Agent: [calls share_item with org=true and groups=<planning-team-id>]Read a Web Map
User: What basemap and layers are in this web map?
Agent: [calls get_item_data to read the web map JSON, summarizes basemap and operational layers]Publish a Shapefile
User: Publish this shapefile as a hosted feature service
Agent: [calls upload_item to upload the .zip, then publish_from_item to create the service]Run a Geoprocessing Task
User: Run the buffer analysis on the parcels layer with a 100m distance
Agent: [calls execute_gp_task with the GP service URL and input parameters]Bulk Operations
User: Delete all my draft items
Agent: [calls search_content to find items, then batch_delete_items to remove them]Portal Administration
User: How many licenses do we have left?
Agent: [calls list_licenses to show license allocation and usage]Available Tools
Phase 1 — Read-only (v0.1)
Tool | Description |
| Authenticate with the portal (auto, token, client_credentials, or OAuth2) |
| Search items by keyword, type, and owner |
| Get detailed metadata for a specific item |
| List layers in a feature/map service |
| Query features with filters and pagination |
| List portal users with roles and status |
| List portal groups with access levels |
| Check portal health and system status |
| Check MCP server connection state |
Phase 2 — Feature CRUD, User/Group & Content Management (v0.2)
Tool | Description |
| Add new features to a hosted feature layer |
| Update existing features (by OBJECTID) |
| Delete features by OBJECTIDs or WHERE clause |
| Get detailed user profile (role, privileges, storage, last login) |
| Create a new group with access control |
| Invite users to a group with a role assignment |
| Update item properties (title, description, tags, access) |
| Delete an item from the portal |
| Share/unshare an item with everyone, org, or specific groups |
| Read item data (web map JSON, app config, feature collections) |
Phase 3 — Publishing, Geoprocessing, Admin & Batch (v1.0)
Tool | Description |
| Upload a local file (CSV, Shapefile, etc.) to portal content |
| Publish an uploaded item as a hosted feature service |
| Create an empty hosted feature service with schema |
| Run a synchronous geoprocessing task |
| Submit an async GP job and get a job ID for polling |
| Check status of a running async geoprocessing job |
| Get portal version, platform, and system info (admin) |
| Get license information and assignments (admin) |
| Get portal usage statistics — users, API calls, storage (admin) |
| Delete multiple items at once |
| Share/unshare multiple items with the same audiences |
| Update properties of multiple items at once |
Authentication Methods
Method | Pros | Cons |
Auto (default) | Zero-config, reads | App-level only (no user identity) |
Token | Quick, no dependencies | Tokens expire, must be obtained separately |
Client Credentials | No browser needed, auto-refresh | App-level only (no user identity) |
OAuth2 | Full user permissions, 14-day tokens | Opens browser, blocks for ~2 min |
Recommendation for Enterprise portals with 2FA: Use auto (.env with client_credentials). Token auth won't work because 2FA blocks token generation. The client_credentials flow uses app-level OAuth2 — no browser, no 2FA, no user interaction.
For ArcGIS Online or portals without 2FA: Token auth is the fastest for MCP. Use OAuth2 once to get a long-lived token, then use that token for MCP sessions.
Development
# Install dev dependencies
pip install -e ".[dev]"
# Run tests
pytest
# Run linting
ruff check arcgis_portal_mcp/License
MIT — see LICENSE.
Author
Asem Daaboul — asem.daaboul@gmail.com
This server cannot be installed
Maintenance
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
- 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/Asem-D/arcgis-portal-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server