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
v1.10.0. 66 tools for ArcGIS Enterprise Portal and ArcGIS Online.
A Model Context Protocol (MCP) server that gives AI assistants direct access to your ArcGIS content. Search, inspect, edit, publish, and admin through natural language.
Works with Claude Desktop, Cursor, VS Code Copilot, and any MCP-compatible client.
Disclaimer: This is an independent open-source project. Not affiliated with, endorsed by, or sponsored by Esri. "ArcGIS" is a registered trademark of Esri.
What's new in v1.10.0
Group lifecycle: update, delete, and manage group members -- complete the CRUD loop for portal groups
Folder deletion: remove content folders (with warning about contents)
User search: find users by name, email, or username without dumping the entire user list
What's new in v1.9.0
Read-only mode: block all write/mutating tools via
MCP_READ_ONLY=trueor--read-onlyCLI flagTool allowlisting: restrict which tools the AI client can see and invoke via
MCP_ALLOWED_TOOLS=name1,name2Audit logging: record every tool call to a JSONL file via
MCP_AUDIT_LOG=path, with automatic sanitization of passwords and tokens
What's new in v1.8.0
Collaborations: list, inspect, and trigger sync for distributed GIS collaborations
Roles & privileges: list organization roles with their full privilege sets
Scheduled tasks: list and filter organization-wide or per-user scheduled tasks
What's new in v1.7.0
Webhooks: list, create, update, delete, and test organization webhooks for portal automation
Logs: query and clean portal logs with level/source/time filters
Organization settings: read and update portal configuration
Folders: create and list content folders for better item organization
What's new in v1.6.0
Configurable TLS verification: certificate verification is now ON by default; set
MCP_TLS_VERIFY=falsefor self-signed Enterprise certsScoped allowlists: restrict which portals, owners, groups, and service URLs the server can access via
MCP_ALLOWED_*env vars
Security improvements inspired by community feedback from muend on Esri Community.
What's new in v1.5.0
Item impact analysis: find out what breaks if you delete an item.
Relationship explorer: map services, web maps, layers, and apps.
Usage analytics: API calls, active users, storage trends (admin).
Group membership audit: who is in which groups, inactive users.
Service dependency scanner: broken links, missing data sources.
Batch operations: update, share, delete multiple items at once.
Related MCP server: arcpro-mcp
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.
Describe layers: full schema with fields, domains, subtypes, relationships, and renderer info.
Query features with attribute filters, spatial filters, field selection, and pagination.
Add, update, and delete features in hosted feature layers.
Manage content: update properties, share/unshare, delete items, read web map definitions.
Manage users: list users, get detailed profiles.
Manage groups: list, create, and invite users.
Publish services: upload files and publish as hosted feature services.
Inspect GP tools: list tasks and view parameter schemas before execution.
Run geoprocessing: execute synchronous and asynchronous GP tasks.
Export map images: render layers as JPG/PNG/GIF/PDF/SVG.
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).
Design Principles
No
arcgisPython package dependency: uses raw REST API calls viarequests, so you don't need to fight with Esri's Python SDK.Works with Enterprise Portal AND ArcGIS Online: same tools, same API.
Multiple auth methods: token, username/password, client_credentials, and OAuth2.
Auto-connect: reads your
.envfile on startup, no manual auth needed per session.2FA-friendly: works with Enterprise portals that require two-factor authentication.
Self-signed cert friendly: handles Enterprise portals with self-signed certificates.
Hardened: SQL injection validation on WHERE clauses, XSS protection in OAuth callbacks, automatic retry with exponential backoff, read-only mode, tool allowlisting, and audit logging.
Scoped allowlists: optionally restrict which portals, owners, groups, and service URLs the server can access, reducing agent blast radius in production.
Installation
pip install git+https://github.com/Asem-D/arcgis-portal-mcp.gitOr clone and install from source:
git clone https://github.com/Asem-D/arcgis-portal-mcp.git
cd arcgis-portal-mcp
pip install -e .Windows users: pywin32 is installed automatically as a platform-specific dependency.
Configuration
.env File (recommended)
Create a .env file 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
# Option 1: Username/password (recommended for most users)
username=your-portal-username
password=your-portal-password
# Option 2: OAuth2 app credentials (app-level, limited permissions)
# oauth_client_id=your-oauth-app-client-id
# oauth_client_secret=your-oauth-app-client-secretThe server searches for .env in this order:
Package directory (next to the server code) — works for source installs
Current working directory — works when launched from the project root
~/.arcgis-portal-mcp/.env— works forpip installusers
Quoted values are supported: password="my secret". Existing OS environment variables take precedence over .env values.
The server reads .env on startup and connects automatically. If username + password are provided, it uses generateToken (user-level, full permissions). Otherwise, it falls back to client_credentials (app-level, limited). 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 (searched in package dir, CWD, or ~/.arcgis-portal-mcp/). 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",
"username": "your-portal-username",
"password": "your-portal-password"
}
}
}
}Connecting MCP Clients
Step-by-step setup for popular AI coding assistants.
Claude Desktop
Install arcgis-portal-mcp (see Installation)
Create
~/.arcgis-portal-mcp/.envwith your credentialsOpen Claude Desktop Settings (Claude menu > Settings > Developer > Edit Config)
Add to
claude_desktop_config.json:
{
"mcpServers": {
"arcgis-portal": {
"command": "python",
"args": ["-m", "arcgis_portal_mcp.server"],
"cwd": "/path/to/arcgis-portal-mcp"
}
}
}Restart Claude Desktop. The server connects automatically from
.env.
macOS/Linux: Replace
pythonwithpython3if needed. Usewhich python3to find the full path.
Cursor
Install arcgis-portal-mcp (see Installation)
Create
~/.arcgis-portal-mcp/.envwith your credentialsOpen Cursor Settings (gear icon > MCP)
Click "Add new global server" and paste:
{
"name": "arcgis-portal",
"command": "python",
"args": ["-m", "arcgis_portal_mcp.server"],
"cwd": "/path/to/arcgis-portal-mcp"
}Toggle the server on. Cursor connects automatically.
VS Code (GitHub Copilot)
Install arcgis-portal-mcp (see Installation)
Create
~/.arcgis-portal-mcp/.envwith your credentialsAdd to
.vscode/mcp.jsonin your workspace (or user settings):
{
"servers": {
"arcgis-portal": {
"command": "python",
"args": ["-m", "arcgis_portal_mcp.server"],
"cwd": "/path/to/arcgis-portal-mcp"
}
}
}Reload VS Code. The MCP server appears in the Copilot chat panel.
Windsurf
Install arcgis-portal-mcp (see Installation)
Create
~/.arcgis-portal-mcp/.envwith your credentialsOpen Windsurf Settings > Cascade > MCP Servers
Add a new server:
{
"name": "arcgis-portal",
"command": "python",
"args": ["-m", "arcgis_portal_mcp.server"],
"cwd": "/path/to/arcgis-portal-mcp"
}Restart Windsurf.
nanobot (this agent)
Already configured. The MCP server is registered in config.json under tools.mcpServers.arcgis-portal.
connect_portal Tool Parameters
The connect_portal tool accepts these auth_method values:
Value | Behavior |
| Read from |
| Portal username + password -> generateToken (user-level) |
| 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"]Inspect a Layer's Full Schema
User: Show me the field schema of the infrastructure layer
Agent: [calls list_layers to find the layer, then describe_layer to get fields, domains, relationships]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]Inspect a GP Tool Before Running
User: What parameters does the buffer analysis tool expect?
Agent: [calls get_gp_task_info with the GP service URL to inspect parameter schemas]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 get_gp_task_info to inspect parameters, then execute_gp_task with the right inputs]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 (60)
Discovery and Inspection
Tool | Description |
| Authenticate with the portal (auto, token, username/password, 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 with geometry types and counts |
| Get full layer schema: fields, types, domains, subtypes, relationships, extent, renderer |
| Query features with attribute/spatial 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 |
Feature CRUD, User/Group and Content Management
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) |
| Create a content folder for organizing items |
| List content folders for a user |
Publishing, Geoprocessing, Admin and Batch
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 |
| Inspect GP tool schemas: list tasks or view parameter definitions before execution |
| 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 |
| Export a MapServer/FeatureServer layer as JPG/PNG/GIF/PDF/SVG |
| Get portal version, platform, and system info (admin) |
| Get license information and assignments (admin) |
| Get portal usage statistics: users, API calls, storage (admin) |
| Get organization settings (admin) |
| Update organization settings (admin) |
| Delete multiple items at once |
| Share/unshare multiple items with the same audiences |
| Update properties of multiple items at once |
| Explore item relationships: services, web maps, layers, apps |
| Audit group membership: who's in which groups, inactive users |
| Scan feature service dependencies: broken links, missing sources |
| Analyze item impact: what breaks if an item is deleted |
| Get portal usage analytics: API calls, active users, storage trends |
Webhooks and Logs (v1.7.0)
Tool | Description |
| List all organization webhooks |
| Create a new organization webhook with event triggers |
| Update webhook properties (name, URL, triggers, active state) |
| Delete a webhook by ID |
| Send a test payload to verify webhook connectivity |
| Query portal logs with level, source, and time filters |
| Delete portal logs older than a specified time |
Collaborations, Roles and Scheduled Tasks (v1.8.0)
Tool | Description |
| List all collaborations the portal participates in |
| Get details of a specific collaboration |
| Trigger sync for a collaboration workspace |
| List all organization roles with their privileges |
| Get privileges for a specific role |
| List all scheduled tasks in the organization (admin) |
| List scheduled tasks for a specific user |
Authentication Methods
Method | Pros | Cons |
Auto (default) | Zero-config, reads | Falls back to app-level if no username/password |
Username/Password | User-level permissions via generateToken | Tokens expire in 2 hours; blocked by 2FA |
Token | Quick, no dependencies | Tokens expire, must be obtained separately |
Client Credentials | No browser needed, no 2FA | App-level only (no user identity) |
OAuth2 | Full user permissions, 14-day tokens | Opens browser, blocks for ~2 min |
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.
ArcGIS Online or portals without 2FA: Username/password auth via generateToken is the fastest for MCP. Put username and password in your .env file for auto-connect on startup.
Full user permissions: Use OAuth2 once to get a long-lived token, then pass it directly.
Security
TLS Certificate Verification
By default, TLS certificate verification is enabled. For Enterprise portals with self-signed certificates, disable it in your .env:
MCP_TLS_VERIFY=falseWhen verification is disabled, the server logs a warning. Re-enable it for production deployments with valid certificates.
Scoped Allowlists
For production use, constrain the server to specific portals, owners, groups, and service endpoints. All allowlists are optional; when unset, the server operates without restrictions (backward compatible).
# Only connect to these portals
MCP_ALLOWED_PORTAL_URLS=https://gis.example.com/portal
# Only access items owned by these users
MCP_ALLOWED_OWNERS=jsmith,mgarcia,admin
# Only share with these group IDs
MCP_ALLOWED_GROUPS=abc123,def456
# Only operate on services at these URL prefixes
MCP_ALLOWED_SERVICE_URLS=https://gis.example.com/portal/sharing/rest/servicesOperations targeting resources outside the allowlist are rejected with a clear error message. For batch operations, items outside the owner allowlist are skipped with per-item reporting.
Read-Only Mode (v1.9.0)
Blocks all write/mutating tools server-side. Useful for evaluation, demos, and environments where the AI should only read data.
# Via environment variable
MCP_READ_ONLY=true# Or via CLI flag (overrides env var)
python -m arcgis_portal_mcp.server --read-onlyWhen active, any tool that creates, updates, or deletes portal content is rejected with a clear error message. Read-only tools (search, query, list, describe) remain fully functional.
Tool Allowlisting (v1.9.0)
Restricts which tools the AI client can see and invoke. When set, only the named tools are exposed via the MCP protocol.
# Only expose these 5 tools to the AI
MCP_ALLOWED_TOOLS=search_content,query_features,list_layers,describe_layer,portal_healthWhen unset (the default), all 66 tools are available. Tools not on the list are invisible to the AI client and rejected if called directly.
Audit Logging (v1.9.0)
Records every tool call to a JSONL file for security review and compliance.
# Log all tool calls to this file
MCP_AUDIT_LOG=/path/to/audit.jsonlEach entry contains:
{"ts": 1723500000.0, "tool": "search_content", "args": {"query": "parcels"}, "status": "ok", "duration_ms": 142.3}Sensitive arguments (password, token, client_secret, secret) are automatically replaced with *** in the log.
What's Next
Here's what we're working on for upcoming releases:
v2.0.0 — Feature Service Sync
createReplica / sync: offline workflows and bidirectional data sync
Item relationship CRUD: add/remove item dependencies
AI Services management: enable/disable AI assistants (Enterprise 12.0+)
v2.1.0 — Server Infrastructure
Server federation: list, validate, federate, and unfederate servers
Machine monitoring: list machines and deployment status
SSL certificate management: list, import, generate
If any of these would solve a problem you're facing, open an issue and let us know. We prioritize based on real-world needs.
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.
Related MCP Connectors
Manage SRG+ hubs, channels, content, assets, users, and workspaces from any MCP-aware AI agent.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Run your website's AI support agent from Claude, Cursor or any MCP client. Manage the knowledge base, edit agent instructions, read conversations and leads, reply live to visitors, and check plan usage. 54 tools, OAuth sign-in, no API key. Free with every Asyntai account: https://asyntai.com/documentation/mcp/
Your org's AI agents, tasks, runs, search, and brain files as MCP tools and resources.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to interact with GitHub repositories, issues, pull requests, and content via the Model Context Protocol.1MIT
- AlicenseAqualityCmaintenanceEnables 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.251MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI assistants to manage Azure AI Search services, including indexes, documents, indexers, and skillsets, via the Model Context Protocol.
- AlicenseAqualityAmaintenanceEnables AI assistants to control ArcGIS Pro through natural language, executing geoprocessing tools, editing data, and automating GIS workflows via a persistent ArcPy session.12Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- 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/Asem-D/arcgis-portal-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server