---
name: iblai-connect-esri-arcgis
description: "Read and write Esri ArcGIS data through the ArcGIS REST APIs (location services, feature services, portal/sharing API) and expose it to an ibl.ai agent as an MCP tool. Use when the user asks an agent to work with Esri ArcGIS data, or to set up an Esri ArcGIS MCP connection on ibl.ai."
metadata:
  kind: guide
---

# Esri ArcGIS connector for AI agents

> A starting point maintained on ibl.ai at https://ibl.ai/developer/connectors/esri-arcgis — not part of the iblai/vibe repository. Checked against Esri's documentation on October 20, 2026; test it against your own Esri ArcGIS setup before you rely on it.

ArcGIS Online and ArcGIS Enterprise host an organization's maps, feature layers (parcels, assets, incidents, zoning) and imagery, plus Esri location services for geocoding, routing, elevation and basemaps.

## Auth & conventions

- **API:** ArcGIS REST APIs (location services, feature services, portal/sharing API) (REST). Query and edit feature layers, search portal items, and call location services such as geocoding, routing, places, elevation and static maps. Also covers analysis services and Enterprise administration.
- **Base URL:** https://{root}/{serviceName}/FeatureServer/{layerId}/query; portal: https://{org}.arcgis.com/sharing/rest/
- **Access:** Public, self-serve. Anyone with an ArcGIS Location Platform or ArcGIS Online account can create developer credentials in their portal. Private org data needs a user in that organization; Enterprise is reached at the agency's own host.
- **Auth:** API key; OAuth 2.0 user authentication; OAuth 2.0 app authentication (client credentials). API key credentials are portal items whose privileges and expiration you set. User auth signs in an ArcGIS account via OAuth 2.0; app auth gets a short-lived token from a client ID and secret. Send it as the token parameter or header.
- **Limits:** Feature queries are capped by the layer's maxRecordCount; exceededTransferLimit signals more data, so page with resultOffset. Portal search returns at most 100 items per call. Stored geocodes need forStorage=true.
- Keep Esri ArcGIS credentials in environment variables or the ibl.ai credential store. Never print a token in chat and never commit one to a file.
- Destructive or outward-facing calls are marked **Confirm with the user first** — do.

## Reads

- **Feature layer records** — .../FeatureServer/{layerId}/query with where, outFields, f=json|geojson, resultOffset and resultRecordCount.
- **Portal items** — /sharing/rest/search with q, num (max 100) and start; returns only items the caller may access.
- **Geocoding** — World GeocodeServer findAddressCandidates converts addresses to coordinates; a token is required.
- **Routing and elevation** — Location services for routes, directions and elevation values.

## Writes

- **Add or update features** — POST .../FeatureServer/{layerId}/applyEdits with adds and updates arrays.
- **Delete features** — applyEdits deletes takes the object IDs of features to remove. **Confirm with the user first.**

## Expose it to an ibl.ai agent (MCP)

Esri publishes an official MCP server, MCP for ArcGIS Location Services (beta) (https://developers.arcgis.com/ai/mcp-arcgis-location-services/). Register it below as-is, or host your own server that wraps the calls in this skill.

First install the ibl.ai platform skills and connect your organization (writes `IBLAI_ORG`, `IBLAI_USERNAME` and `IBLAI_API_KEY` to `.env`):

```bash
npx skills add iblai/vibe --all
# then, in your coding agent:
/iblai-api-login
```

Every call below sends `Authorization: Api-Token $IBLAI_API_KEY`.

1. **Register the server** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-servers/` with `name`, `url`, `transport` (`sse` | `websocket` | `streamable_http`) and `auth_type` (`none` | `token` | `oauth2`). Capture the returned `id`.
   - For an API key or service credential use `auth_type=token` with `auth_scope=platform` for one key across the organization, or scope it to a single agent for one key per agent.
2. **Create the connection** — `POST https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mcp-server-connections/` with `server`, `scope` (`platform` | `mentor` | `user`), `auth_type`, and either `credentials` + `authorization_scheme` or a `connected_service` id for OAuth. Credentials are masked on read; never send a masked value back.
3. **Enable it on the agent** — `GET https://api.iblai.app/dm/api/ai-mentor/orgs/$IBLAI_ORG/users/$IBLAI_USERNAME/mentors/{agent_id}/settings/`, add `mcp-tool` to `tool_slugs` and the server id to `mcp_servers`, then `PATCH` the full lists back. They are replaced, not merged.

Full reference: https://ibl.ai/developer/platform/mcp/mcp-connections and the `/iblai-api-agent-mcp` skill.

## Example prompts

- "How many open potholes are in the street maintenance layer within District 4?"
- "Geocode these 25 permit addresses and return their coordinates"
- "Mark hydrant H-2231 as out of service in our hydrants feature layer"
- "Find all parcels zoned C-2 that touch Main Street"

## Guardrails

- Layers can hold resident addresses and other PII, critical infrastructure locations, or CUI in agency deployments. Geocoding results cannot be stored unless requested with forStorage=true.
- Request the narrowest Esri ArcGIS scopes or role the task needs, and prefer a read-only credential for agents that only answer questions.
- Return the fields the user asked for, not whole records; do not paste personal data into chat that the user did not request.
- Before any write, show the user exactly what will change and wait for a yes.
- Respect the documented limits above: page through results and back off on rate-limit responses instead of retrying in a loop.

## References

- ArcGIS REST APIs: https://developers.arcgis.com/rest/
- Security and authentication: https://developers.arcgis.com/documentation/security-and-authentication/
- MCP for ArcGIS Location Services: https://developers.arcgis.com/ai/mcp-arcgis-location-services/
- MCP for ArcGIS Location Services (beta): https://developers.arcgis.com/ai/mcp-arcgis-location-services/
- This connector on ibl.ai: https://ibl.ai/developer/connectors/esri-arcgis
- ibl.ai MCP server connections: https://ibl.ai/developer/platform/mcp/mcp-connections
