# Segment setup for PopMCP

You paste one Segment Public API token, created by a Workspace Owner, that covers one Segment workspace. An optional Profile API token adds one-customer profile lookups.

- Auth: API credentials
- Setup time: 4 min
- API base URL: https://api.segmentapis.com (EU workspaces: https://eu1.api.segmentapis.com)
- Credentials screen: https://app.segment.com/
- Provider docs: https://docs.segmentapis.com/tag/Getting-Started#section/Get-an-API-token

## Approval required before this works

No one reviews you, but Segment only offers the Public API to workspaces on the Team or Business plan, and only a Workspace Owner can create its token. A Free workspace has no way to create the token PopMCP needs.

- Typical wait: None: the token can be created as soon as the workspace is on Team or Business
- Cost: Per Twilio's Segment pricing page: Free is $0 with no Public API; Team starts at $120/month (10,000 monthly tracked users) and lists Public API access; Business is custom pricing.
- Blocked until approved: The whole connector. Every PopMCP Segment tool, including sending identify and track events, goes through the Public API token.
- Works meanwhile: Team has a 14-day free trial, so you can create a token and connect PopMCP during the trial.

## Before you begin

- A Segment workspace on the Team or Business plan. The Free plan has no Public API access.
- The Workspace Owner role, because only Workspace Owners can create Public API tokens
- For the optional Profile API token: Unify, which needs a Business tier account (it is included with Engage)
- One PopMCP workspace per Segment workspace, since each token belongs to exactly one Segment workspace

## Get your credentials

### 1. Open Tokens under Access Management

Sign in at `app.segment.com` and pick the workspace you want to connect. Click Settings in the left menu, then Workspace settings, open the Access Management tab and click Tokens.

Screen: https://app.segment.com/

### 2. Create a Public API token with Workspace Owner access

Click + Create Token. Enter a description such as `PopMCP`, make sure it is a Public API token (not a Config API token), and assign Workspace Owner access so every tool works. Workspace Member also connects, limited to what that role can reach. Click Create.

Screen: https://app.segment.com/

### 3. Copy the token, then click Done

Copy the token (it starts with `sgp_`) into a password manager before you click Done, and treat it like a password.

Screen: https://app.segment.com/

### 4. Optional: generate a Profile API token

Only needed to look up one customer's traits and recent events, and only if your workspace has Unify. Go to Unify, then Unify settings, then API access. Name the token, click Generate token and copy it. Segment shows it once.

Screen: https://app.segment.com/

### 5. Paste the tokens into PopMCP

Paste the Public API token into Public API token and, if you made one, the Profile token into Profile API token (optional). You don't pick a region: PopMCP tries Segment's US and EU hosts and keeps the one that recognises the token.

## Fields PopMCP asks for

- Public API token (token) [required]: Segment → Settings → Workspace settings → Access Management → Tokens → Create Token → Public API. Use a Public API token, not a Config API token or a source write key. Each workspace needs its own token.
- Profile API token (optional) (profileToken): Only needed to look up one customer's traits and event history. Segment → Unify → Unify settings → API access → Generate token. The space it belongs to is found automatically.

## Verify

PopMCP shows Segment as Verified, labelled with your workspace name, such as `Segment · Acme Production`, with (EU) added for an EU workspace. Ask for your sources: segment_list_sources returns them instead of a 403.

## Troubleshooting

### "Segment didn't accept this token in its US or EU region" (Segment answers 403, not 401)

Cause: It is a Config API token or a source write key, the token was revoked, or the workspace is on the Free plan, which has no Public API.

Fix: Create a Public API token under Settings, Workspace settings, Access Management, Tokens on a Team or Business workspace, and paste it whole.

### Most tools work but some answer 403

Cause: The token has Workspace Member access without the resources those tools touch.

Fix: Create a new Public API token with Workspace Owner access and reconnect with it.

### "Segment rejected the Profile API token for every Unify space in this workspace"

Cause: The Profile field holds the wrong secret (often the Public API token again) or a token from another workspace.

Fix: Generate a new token in Unify, Unify settings, API access, or leave the field blank.

### "Segment has no Unify space this connection can see"

Cause: Unify isn't enabled for this workspace, or the Public API token's role can't read spaces.

Fix: Leave the Profile API token blank, or connect with a Workspace Owner token on a workspace that has Unify.

### A tracking call says the Source is disabled or has no write key

Cause: Segment drops data sent to a disabled Source, and a Source without a write key can't receive events at all.

Fix: Enable the Source with segment_update_source, or create a write key with segment_create_write_key_for_source, then send again.

### Events were accepted but never appear in Segment

Cause: Segment's Tracking API answers 200 and then drops some invalid events, such as batches over the event limit.

Fix: Ask the AI to check segment_get_delivery_overview_ingress_failed for that Source; PopMCP already rejects calls with no user id, no event name, or a payload over 32 KB before sending.

### 429 Too Many Requests

Cause: The Public API limits requests per token, sender IP and request complexity.

Fix: Wait for the Retry-After seconds when the response carries one, then retry with smaller pages.

---

Source: https://www.docs.popmcp.com/docs/integrations/segment/