Pack MCP

Pack MCP lets AI assistants connect to Pack through the Model Context Protocol. Once connected, your assistant can use Pack tools to work with content, sections, templates, site settings, preview URLs, content environments, and A/B tests from an MCP-compatible client.

Use Pack MCP when you want to ask an assistant to inspect content, prepare changes, summarize test results, or automate repetitive Pack workflows without switching between tools.

Requirements

  • A Pack access token issued for the store you want to connect.
  • The Pack store ID for the same store.
  • An MCP-compatible client that can connect to remote HTTP MCP servers, or a client that can run mcp-remote as a local bridge.

Server URL

Use Pack's hosted MCP endpoint:

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

Pack MCP uses request headers for authentication:

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

x-pack-content-environment-id is optional. When it is omitted, Pack uses the store's primary content environment. The value should be the content environment handle, such as production or a branch-specific environment handle.

The access token determines which store the connection can access. x-pack-store-id identifies the store for the MCP connection, but it cannot switch a token to a different store.

Connect Claude Code

Set your credentials in your shell:

export PACK_ACCESS_TOKEN="pat_..."
export PACK_STORE_ID="store_..."
export PACK_CONTENT_ENVIRONMENT_ID="production"

Add Pack MCP:

claude mcp add --transport http pack https://pack-agent.packdigital.workers.dev/mcp \
  --header "Authorization: Bearer $PACK_ACCESS_TOKEN" \
  --header "x-pack-store-id: $PACK_STORE_ID" \
  --header "x-pack-content-environment-id: $PACK_CONTENT_ENVIRONMENT_ID"

Then run:

claude mcp list

Open Claude Code and run /mcp to confirm Pack is connected.

Connect Codex

Codex supports remote HTTP MCP servers with bearer tokens and custom headers in config.toml.

Choose where to add the Pack MCP configuration:

  • Global scope: edit ~/.codex/config.toml to make Pack MCP available across your Codex workspaces.
  • Project scope: in a trusted project, edit .codex/config.toml at the project root to make Pack MCP available only for that project.

Set your credentials in your shell:

export PACK_ACCESS_TOKEN="pat_..."
export PACK_STORE_ID="store_..."
export PACK_CONTENT_ENVIRONMENT_ID="production"

Add Pack MCP to the chosen config file:

[mcp_servers.pack]
url = "https://pack-agent.packdigital.workers.dev/mcp"
bearer_token_env_var = "PACK_ACCESS_TOKEN"
env_http_headers = { "x-pack-store-id" = "PACK_STORE_ID", "x-pack-content-environment-id" = "PACK_CONTENT_ENVIRONMENT_ID" }

Then run:

codex mcp list

Start a new Codex session after changing MCP configuration. In the Codex TUI, run /mcp to confirm Pack is connected.

Connect Claude Desktop

Claude's remote custom connectors are configured with a server URL and, optionally, OAuth client credentials. They do not support user-pasted static bearer tokens yet. Pack MCP currently uses static Pack credentials in request headers, so add Pack to Claude Desktop as a local MCP server that runs mcp-remote instead of adding it as a remote custom connector.

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Add Pack to mcpServers:

{
  "mcpServers": {
    "pack": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://pack-agent.packdigital.workers.dev/mcp",
        "--header",
        "Authorization:${PACK_AUTH_HEADER}",
        "--header",
        "x-pack-store-id:${PACK_STORE_ID}",
        "--header",
        "x-pack-content-environment-id:${PACK_CONTENT_ENVIRONMENT_ID}"
      ],
      "env": {
        "PACK_AUTH_HEADER": "Bearer pat_...",
        "PACK_STORE_ID": "store_...",
        "PACK_CONTENT_ENVIRONMENT_ID": "production"
      }
    }
  }
}

Each header must be passed as its own --header argument followed by one complete header string. The examples omit spaces after the colon so the same config works reliably on Windows. Keep the Pack token in the env block instead of hardcoding it directly in args, because Claude Desktop stores this file locally in plaintext.

Fully quit and reopen Claude Desktop after editing the config file.

Connect Other Clients

For clients that support remote HTTP MCP servers with headers, use:

Name: pack
URL: https://pack-agent.packdigital.workers.dev/mcp
Headers:
  Authorization: Bearer <PACK_ACCESS_TOKEN>
  x-pack-store-id: <PACK_STORE_ID>
  x-pack-content-environment-id: production

For clients that only support local stdio MCP servers, configure mcp-remote:

{
  "mcpServers": {
    "pack": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://pack-agent.packdigital.workers.dev/mcp",
        "--header",
        "Authorization:${PACK_AUTH_HEADER}",
        "--header",
        "x-pack-store-id:${PACK_STORE_ID}",
        "--header",
        "x-pack-content-environment-id:production"
      ],
      "env": {
        "PACK_AUTH_HEADER": "Bearer pat_...",
        "PACK_STORE_ID": "store_..."
      }
    }
  }
}

Example Use Cases

Try prompts like these after Pack MCP is connected:

  • "Find the homepage in Pack and summarize its title, handle, SEO fields, template, and published status."
  • "Review the sections on this product page and suggest a safer ordering for mobile shoppers. Do not make changes yet."
  • "Update the SEO description for this collection page, then show me exactly what changed before publishing."
  • "List active A/B tests, summarize each variant, and call out any tests that are paused or missing a clear winner."
  • "Show conversion rate and revenue per visitor for this saved test goal, grouped by variant."
  • "Compare the latest revision of this page to the published version and summarize the visible changes."

What Pack MCP Can Do

Pack MCP exposes tools for common Pack workflows:

  • Content: read, list, update, publish, and unpublish pages, product pages, collection pages, blogs, articles, templates, sections, and site settings.
  • Search and history: search content, inspect revisions, review references, and compare draft changes.
  • Content environments and localization: inspect environments, target a connected environment, and work with locale-aware content.
  • Preview URLs: list, create, update, and delete preview URLs.
  • Scheduling: inspect and manage scheduled content.
  • Product data: search and read product catalog data, and trigger product sync operations.
  • A/B testing: list tests, update tests and variants, start, pause, end, or delete tests, and read saved goal metrics.

Some admin-only workflows are not available through Pack MCP yet, including media-manager uploads and A/B goal creation or deletion.

Troubleshooting

Pack tools do not appear

Restart your client after changing MCP configuration. In Claude Code, run claude mcp list; in Claude Desktop, fully quit and reopen the app.

If your client runs npx and cannot find it, replace "command": "npx" with the absolute path from:

which npx

You see a 401 error

Check that the connection sends both required headers:

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

Also confirm the access token was issued for the same store as x-pack-store-id.

The assistant is using the wrong environment

Set x-pack-content-environment-id on the MCP connection. For parallel work, register separate MCP connections for each environment instead of asking the assistant to switch environments per prompt.

A write action does not happen immediately

Many MCP clients ask for confirmation before running mutating tools. Review the proposed tool call and approve it only when the target store, content environment, and action are correct.

Was this page helpful?