Select an authentication technique
Before an AI application or agent can access an MCP catalog, it must authenticate. MCP for ArcGIS Enterprise supports three authentication techniques:
API key authentication
Portal token authentication
OAuth 2.0 with manual configuration
Choose a technique based on how access should be authorized, your ArcGIS Enterprise version, your MCP client's capabilities, and your organization's security requirements.
Choose how access is authorized
Authentication establishes the identity or credential associated with a connection. Authorization determines which content, data, and services that connection can use.
When you select an authentication technique, consider whether the application needs access defined by a configured credential, or access on behalf of an individual user.
Access using an API key
With API key authentication, access is determined by the privileges and item access configured for the key. People who use the connection do not need to sign in individually.
Consider this approach when a reusable credential with a defined scope of access meets your workflow and organizational requirements.
Access on behalf of a user
Portal tokens and OAuth 2.0 provide access on behalf of an ArcGIS Enterprise user. Access to resources depends on that user's permissions, including their role, privileges, and access to shared content.
For example, two employees may connect to the same catalog but have different permissions for a feature layer. One employee can edit the layer, while the other can only view it. Because each connection uses the employee's own identity, those differences in access are preserved.
The two techniques differ in how the application gets the credential:
Portal token—You generate a token manually and supply it to the connection.
OAuth 2.0—The application gets an access token through a sign-in and authorization workflow.
Note:
Connecting to a catalog does not automatically grant permission to use every resource that its tools reference.
Compare authentication techniques
| Technique | When to consider it | Requirements and considerations |
|---|---|---|
| API key | You need a reusable credential with configured privileges and item access. | Requires ArcGIS Enterprise 11.4 or later. Plan for secure storage, expiration, and replacement. |
| Portal token | You need temporary user-based access to test a catalog or evaluate an MCP client connection. | Generate the token from your ArcGIS Enterprise organization, and replace it when it expires. |
| OAuth 2.0 | Users need to sign in and authorize access on their own behalf. | Requires an MCP client that accepts manual OAuth configuration. Dynamic Client Registration (RFC 7591) is not supported. |
API key authentication
An API key is a long-lived access token that you create using API key credentials in your organization. You configure the privileges, item access, and expiration for the key.
Before you select this technique, complete the following steps:
Identify the resources and operations that the workflow requires.
Verify that the required access can be assigned to the key.
Confirm that your account has permission to create API key credentials.
Decide who will manage the key and update client configurations when the key is replaced.
Assign only the access that the application requires. For workflows that involve confidential or sensitive data, review your organization's security requirements.
Note:
API key credentials require ArcGIS Enterprise 11.4 or later. Of the versions that MCP for ArcGIS Enterprise supports, this technique is available on 11.5, 12.1, and 12.2. It is not available on 11.1 or 11.3.
For requirements and configuration instructions, see Create an API key.
Portal token authentication
A portal token is a short-lived credential that you generate using your ArcGIS Enterprise username and password. Consider this technique for a limited evaluation, such as checking catalog access before you configure a longer-term connection.
Choose an expiration that suits the evaluation. When the token expires, generate a new one and update the connection.
Generate a portal token
Use your portal's token endpoint:
https://<domain>/<portal-context>/sharing/rest/generateToken
Replace the placeholders as follows:
<domain>—The domain of your portal.<portal-context>—The name of your portal's Web Adaptor or its context name.
Important:
The token must be generated by the portal. A token generated from the ArcGIS Server administration endpoint cannot be used to access the catalog.
OAuth 2.0 authentication
OAuth 2.0 allows users to sign in and authorize an application to access ArcGIS resources on their behalf. Consider this technique when users should connect using their own ArcGIS identities.
The application gets an access token through the authorization workflow. The user's permissions determine the resources and operations available through that connection.
Check client compatibility
OAuth 2.0 support in MCP for ArcGIS Enterprise requires manual configuration. Confirm that your MCP client:
Lets you enter a client ID
Provides a redirect URI to register in ArcGIS
Supports OAuth discovery, or lets you enter the authorization and token URLs
MCP for ArcGIS Enterprise does not support Dynamic Client Registration (RFC 7591), in which a client registers itself automatically. If a client requires Dynamic Client Registration and does not accept manual configuration, it cannot use this technique. If you cannot use a client that accepts manual configuration, use API key or portal token authentication instead, depending on your deployment and security requirements.
For information about preparing the credentials, see OAuth 2.0 credentials for user authentication.
Supply a credential in the catalog URL
To access the default catalog from a browser using an API key or a portal token, supply the credential using the token query parameter:
https://<domain>/<server-context>/mcp/default?token=<credential>
Replace the placeholders as follows:
<domain>—The domain of your deployment.<server-context>—The ArcGIS Server context path of your deployment.<credential>—Your API key or portal token.
Important:
The portal context that you use to generate a token (<portal-context>) is different from the ArcGIS Server context that you use to access the catalog (<server-context>). Do not use one in place of the other.
When you connect from an MCP client, supply the credential through the client's authentication settings instead.
Plan the connection
A short evaluation might use a portal token, a connection that needs a reusable credential might use an API key, and a workflow in which employees need their own permissions might use OAuth 2.0. Whichever technique you choose, assign responsibility for creating, storing, replacing, and removing the credentials.
Protect connection credentials
Treat API keys and tokens like passwords. Store them using your organization's approved credential-management practices.
Caution:
Do not include credentials in shared documents, sample prompts, or source control. URLs that contain credentials can be kept in browser history and logs, so avoid sharing catalog URLs that include a token.
Review access periodically. Replace credentials when they expire or are exposed, and remove credentials that are no longer needed.
Next steps
After you select an authentication technique, see Connect from MCP clients for general connection guidance.
Verify the connection using content or a service that the selected user or credential is authorized to access.