Set up Segment in Metorial for Claude, ChatGPT and Cursor
Share Segment with your team in Claude, ChatGPT and Cursor through Metorial: write key only or public API token sign-in, 25 tools (8 read-only).
To give your team Segment in Claude, ChatGPT, Cursor and other AI clients, an admin shares the Segment integration in a Metorial portal, and each person connects with a write key only. Agents can collect, unify, and route customer event data across tools and platforms. The integration has 25 tools, 8 read-only, 10 write and 7 destructive, plus 2 triggers.
What you'll learn
- How an admin shares Segment in a portal and how each person connects
- What Segment asks for when you connect, and where to find it
- How to keep the 8 read-only tools and reject the other 17
Before you start
- A portal with at least one access group
- A write key only from Segment for each person, or one for a shared connection
- For the CLI steps: the Metorial CLI, signed in to your portal
Sign-in methods
| Method | Type | What a person provides |
|---|---|---|
| Write Key Only (default) | API token | writeKey |
| Public API Token | API token | token and writeKey |
The portal and metorial setup use Write Key Only unless someone picks another method.
Write Key Only
To connect, a person enters:
writeKey: Segment source write key for the Tracking API
Public API Token
To connect, a person enters these values:
token: Segment Public API token (created in Settings > Access Management > Tokens)writeKey(optional): Segment source write key for sending tracking data (optional, only needed for Tracking API calls)
Setup settings
Whichever method you pick, setup also asks for:
region(optional): Segment data region. Determines API base URLs for both Public and Tracking APIs. One of "us", "eu".
Admin: share Segment in a portal
In the dashboard
Open Shared Resources
Open Workforce, choose the portal, and select Shared Resources under Access.
Share a new integration
Select Share a Resource, then New Integration, and choose Segment. Under Auth Method, keep Write Key Only or pick another. For how members connect, choose Each person connects so everyone enters their own write key only, or Shared connection to enter one write key only for everyone.
Limit the tools
Under Tool Filters, set the write and destructive groups to Reject if agents should only read from Segment.
Choose who gets it
Add the access groups that should see Segment. When a person asks for access from the portal, the request appears under Access Requests.
With the CLI
The CLI cannot create the per-user Segment integration. Once it exists, check which groups have it:
Employee: connect Segment
In the portal
Open Segment in the catalog
Sign in to your portal and open Segment. The status reads Available.
Authenticate
Under Quick setup, select Authenticate. In the setup window, enter your write key only (writeKey).
Confirm
The status changes to Configured. If it later reads Needs reconnect, select Reconnect and sign in again.
With the CLI
catalog search prints the catalog item ID. metorial setup uses Write Key Only. To connect with Public API Token instead, find its ID with metorial catalog get <catalog-item-id> and add --auth-method <auth-method-id>.
Add it to your AI client
metorial install adds your Segment connection to a local MCP client such as Claude Code, Cursor or Codex. metorial list prints the integration ID and metorial client list the client identifiers.
For a client that takes a server URL, such as ChatGPT, metorial install custom <integration-id> creates an installation token and shows the endpoint details.
Make it read-only
Open the integration's Tool Filters and set the write and destructive groups to Reject. Agents keep the 8 read-only tools, such as get_usage and get_source, and lose the 10 write tools, such as alias_user or group_user, and the 7 destructive tools, such as manage_source or manage_warehouse.
Employees see the result on the integration's page in the portal under Tool access. For the full walkthrough, see Tool permissions.
Check it worked
metorial tools lists the 25 tools, minus any you rejected. get_usage needs metricType, so replace the placeholders. It queries current Segment monitoring data: daily API call usage, daily monthly tracked users (MTU), destination delivery metrics, and workspace event volume.
To see every input a tool takes, run metorial schema <integration-id> <tool-key>.
Tools
Read-only tools (8)
list_destinations: List all configured destinations in the Segment workspace.get_usage: Query current Segment monitoring data: daily API call usage, daily monthly tracked users (MTU), destination delivery metrics, and workspace event volume. NeedsmetricType.list_tracking_plans: List all tracking plans in the workspace.list_warehouses: List all data warehouses in the workspace, optionally with connected sources and connection state for a specific warehouse.browse_catalog: Browse the Segment integration catalog to discover available source, destination, and warehouse types. NeedscatalogType.list_sources: List all data sources in the Segment workspace.get_source: Retrieve detailed information about a specific source, including its connected destinations and warehouses. NeedssourceId.list_audit_events: List audit trail events for the workspace.
Write tools (10)
track_event: Send a Track event to Segment's Tracking API. Needsevent.alias_user: Send an Alias call to Segment's Tracking API. NeedspreviousIdanduserId.batch_events: Send a batch of Identify, Track, Page, Screen, Group, or Alias calls in a single request to Segment's Tracking API. Needsbatch.manage_reverse_etl: Create, update, list, or delete reverse ETL models. Needsaction.manage_function: Create, update, list, or delete custom JavaScript functions. Needsaction.manage_transformation: Create, update, list, or delete event transformations. Needsaction.page_screen: Send a Page or Screen call to Segment's Tracking API. Needstype.group_user: Send a Group call to Segment's Tracking API. NeedsgroupId.identify_user: Send an Identify call to Segment's Tracking API.manage_destination_filter: Create, update, or remove filters on a destination. NeedsactionanddestinationId.
Destructive tools (7)
create_regulation: Create a GDPR deletion or suppression request. Needsaction.manage_destination: Create, update, or delete a destination in your Segment workspace. Needsaction.manage_tracking_plan: Create, update, delete, or connect tracking plans. Needsaction.manage_source: Create, update, or delete a data source in your Segment workspace. Needsaction.manage_warehouse: Create, update, delete, or manage source connections for data warehouses. Needsaction.manage_destination_subscription: Create, retrieve, update, list, or remove Segment destination subscriptions. NeedsactionanddestinationId.manage_source_write_key: Create or remove Segment source write keys. NeedsactionandsourceId.
Triggers
Segment has 2 triggers, which fire on events in Segment:
workspace_activity: [Polling fallback] Polls for audit trail events in the Segment workspace.incoming_events: Receives Segment tracking events (identify, track, page, screen, group, alias) via webhook.
Next steps
- Claude Code, Cursor, Codex and ChatGPT: connect each client to your portal and use Segment there
- Tool permissions: tool filters and what employees see
- Segment on metorial.com: the integration overview