Connect AI Tools to Pack with MCP

Pack's Model Context Protocol (MCP) server lets compatible AI tools read and manage content in your Pack storefront. OAuth is the recommended way to connect: you sign in to Pack in your browser, choose the storefront the client can access, and approve the connection without copying a Pack access token into the client.

Use this MCP server URL for production connections:

https://pack-agent.packdigital.workers.dev/mcp

Connect with OAuth

You need a Pack account with access to at least one storefront and an MCP client that supports OAuth for remote MCP servers.

  1. Add https://pack-agent.packdigital.workers.dev/mcp as a remote MCP server in your client.
  2. Choose Connect or start authentication. Your client opens Pack in your browser.
  3. Sign in to Pack if prompted.
  4. Review the client name, callback URL, and requested pack:mcp scope.
  5. Select the organization and storefront the client should access.
  6. Choose Allow access. Pack returns you to the MCP client to finish the connection.

The authorization applies only to the storefront you select. To connect another storefront, add a separate MCP connection and complete the flow again.

Claude Code

Add the Pack MCP server without custom authentication headers:

claude mcp add --transport http pack https://pack-agent.packdigital.workers.dev/mcp

Claude opens the browser authorization flow when the connection authenticates. Check the connection afterward:

claude mcp list

Claude Desktop

In Claude Desktop, add a custom connector and enter this URL:

https://pack-agent.packdigital.workers.dev/mcp

Choose Connect, complete the Pack authorization flow in your browser, and return to Claude Desktop. OAuth connections do not require Node.js, npx, custom request headers, or manual changes to the Claude Desktop configuration file.

Access and permissions

Each OAuth connection:

  • is limited to the Pack user and storefront approved during authorization;
  • uses the single pack:mcp scope;
  • gives the MCP client a short-lived access token and a refresh token instead of a Pack access token; and
  • stops working if the authorization is disconnected or the user loses access to the storefront.

The Pack actor token remains encrypted in the Pack MCP service and is never sent to the MCP client.

OAuth connections currently expose guarded tools for:

  • reading, updating, publishing, and unpublishing pages, product pages, collection pages, articles, blogs, and templates;
  • reading, publishing, and unpublishing sections; and
  • reading, updating, and publishing site settings.

Some operations are temporarily unavailable on OAuth connections, including content creation and deletion, section upserts, A/B testing tools, advanced operations, and media management. The tools returned by your client's MCP tool list are the source of truth for the current connection.

Pack MCP is stateless and does not add its own confirmation step before a tool runs. Your MCP client is responsible for asking for confirmation before destructive or customer-visible changes.

Content environments

If the connection does not specify a content environment, Pack uses the selected storefront's primary environment for both reads and writes.

Clients that support custom headers can pin the connection to another environment by sending the environment handle in this header:

x-pack-content-environment-id: <CONTENT_ENVIRONMENT_HANDLE>

For example, Claude Code can create an OAuth connection pinned to a non-primary environment:

claude mcp add --transport http pack-preview \
  https://pack-agent.packdigital.workers.dev/mcp \
  --header "x-pack-content-environment-id: hydrogen-preview"

Use a separate named connection for each environment when you need to work across multiple environments. Clients that cannot add a custom header use the primary environment.

Manage connected apps

To review or remove MCP access:

  1. In Pack, open User settings.
  2. Find Connected apps.
  3. Review the client, organization, storefront, connection date, and scope.
  4. Choose Disconnect next to an app and confirm.

Disconnecting an app takes effect immediately. Remove the connection from the MCP client as well if you no longer plan to use it.

To switch a connection to another storefront, disconnect it and authorize a new connection for the correct storefront.

Legacy authentication

Existing integrations that send Pack credentials in request headers remain supported during the OAuth migration. Use OAuth for new desktop and remote connections.

Legacy clients must send:

Authorization: Bearer <PACK_ACCESS_TOKEN>
x-pack-store-id: <PACK_STORE_ID>
x-pack-content-environment-id: <CONTENT_ENVIRONMENT_HANDLE>

x-pack-content-environment-id is optional. If it is omitted, Pack uses the storefront's primary content environment. The access token determines the storefront it can access; x-pack-store-id cannot be used to select a different storefront.

Troubleshooting

The browser authorization flow does not open

Confirm that the client supports OAuth for remote MCP servers, dynamic client registration, and S256 PKCE. Remove the incomplete connection, add the production MCP URL again, and restart authentication.

No storefronts are available to select

The signed-in Pack user does not have access to a storefront that can be connected. Ask an organization administrator to grant access, then restart the authorization flow.

The connection uses the wrong storefront

Open User settings in Pack, disconnect the app under Connected apps, and authorize a new connection. Select the intended organization and storefront in the consent screen.

The connection uses the wrong content environment

Connections without an environment header use the storefront's primary environment. If your client supports custom headers, create a separate connection with x-pack-content-environment-id set to the intended environment handle.

Authentication expires or is revoked

OAuth-compatible clients refresh access automatically. If the connection continues to request authentication, remove it from the client and connect again. If the app was disconnected in Pack or the user lost storefront access, a new authorization is required.

Was this page helpful?