Skip the install. Get this working in under 2 minutes.
Start a free trial on cloud.anythingmcp.com, add the Twilio Segment in one click, then point your AI client (Claude, ChatGPT, Copilot or Cursor) at the generated MCP endpoint. No Docker, no git clone, zero engineering experience required.
Summary
Let your AI work with your Twilio Segment workspace: list sources, destinations and warehouses, check event volume, delivery and warehouse syncs, read tracking plans, Functions, usage and the audit trail. US and EU workspaces.
Try asking
Example prompts for Twilio Segment
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Twilio Segment, paste your credentials, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
Twilio Segment + Gemini
Let your AI work with your Twilio Segment workspace: list sources, destinations and warehouses, check event volume, delivery and warehouse syncs, read tracking plans, Functions, usage and the audit trail. US and EU workspaces.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
SEGMENT_API_HOST, SEGMENT_API_TOKEN
Step 1 — Get credentials
- As a Workspace Owner, open Settings → Workspace settings → Access Management → Tokens (
https://app.segment.com/goto-my-workspace/settings/access-management/tokens) and click Create Token. - Choose a Public API token, not a Config API token. Give it the smallest role that covers what you need: Workspace Member with read-only roles (for example Source Read-only and Tracking Plan Read-only) for reading, Workspace Owner only if the write tools will be switched on.
- Segment shows the token once: copy it into
SEGMENT_API_TOKENstraight away. It is sent as a Bearer token and only to Segment. - Set
SEGMENT_API_HOSTto the workspace's region:https://api.segmentapis.comfor a US workspace,https://eu1.api.segmentapis.comfor an EU workspace. A token only works in its own region. - Install the connector and run
segment_get_workspaceto check the connection. A token belongs to one workspace, so install one connector per workspace.
What it reads: sources, destinations with their Actions mappings, warehouses with their connection state and recent syncs, event volume over time, Delivery Overview (where events are dropped, step by step, with discard reasons), delivery metrics per destination, tracking plans and their rules (Protocols), Functions with their code, daily API call and MTU usage, and the Audit Trail of who changed what. Tracking plans need Protocols, Functions need the Functions feature, and mappings need Destination Subscriptions in the workspace.
Secrets: settings fields that usually hold the credentials of destinations and warehouses (API keys, secrets, tokens, passwords) are left out. segment_get_source does return the source's write keys, which let anyone send data into that source.
Limits: Segment limits requests per token, IP address and endpoint, and answers 429 with a Retry-After header. Some endpoints are stricter: warehouse syncs allow 2 calls a minute, event volume 60 a minute, tracking plan rules and warehouse connection state 200 a minute. Lists come in pages of up to 1,000 items, and the AI follows pagination.next until it has everything.
Switched off at install: segment_update_source and segment_update_destination rename a source or destination or switch it on or off, and a disabled one drops data until it is enabled again. segment_delete_source and segment_delete_destination cannot be undone. An administrator turns these tools on deliberately, and even then the AI confirms each change with you first; a delete waits until you confirm the id and name.
Common errors: 403 "Not authorized to perform this operation": the token is wrong or revoked, belongs to a workspace in the other region, is a Config API token, or its role does not cover this resource. 401: no token was sent. 404: there is no resource with that id in this workspace. 422: a parameter is missing or invalid, for example a Delivery Overview time range longer than its granularity allows. A message about a feature means the workspace has no Protocols, Functions or Destination Subscriptions. 429: wait for the time in Retry-After.
The connector does not send events: Segment's Tracking API uses a source's write key on a different host. It does not create sources, destinations or warehouses either, and does not cover filters, transformations, Reverse ETL, Engage audiences and computed traits, access management, deletion and suppression regulations or the catalog.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Gemini
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Gemini CLI reads MCP servers from ~/.gemini/settings.json (on Windows %USERPROFILE%\.gemini\settings.json). Add:
{
"mcpServers": {
"anythingmcp": {
"httpUrl": "https://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID",
"headers": { "X-API-Key": "YOUR_MCP_API_KEY" }
}
}
}
- Create an MCP API key in AnythingMCP under MCP Servers → your server → API keys, and paste it in place of
YOUR_MCP_API_KEY. - Save the file and restart
gemini. - Run
/mcpinside Gemini CLI (orgemini mcp listin your shell):anythingmcpshould show as connected. - Start prompting: Gemini CLI can now call the
Twilio Segmenttools.
Available tools
| Tool | What it does |
|---|---|
segment_get_workspace | Get the Segment workspace the token belongs to (id, slug, name) |
segment_list_sources | List the workspace's sources (websites, apps, servers and cloud apps that send data) with id, name, slug, enabled flag, source type… |
segment_get_source | Get one source by id: name, slug, enabled flag, source type, labels, write keys, settings and the id of the tracking plan connected to it |
segment_list_source_destinations | List the destinations connected to one source (id, name, enabled flag, destination type) |
segment_list_source_warehouses | List the warehouses connected to one source (id, name, enabled flag, warehouse type) |
segment_get_source_schema_settings | Get a source's schema settings: whether unplanned track events, properties and traits are allowed or blocked, what happens on tracking plan… |
segment_list_destinations | List the workspace's destinations (tools Segment sends data to) with id, name, enabled flag, destination type, catalog metadata id and the… |
segment_get_destination | Get one destination by id: name, enabled flag, destination type, source id and its settings |
segment_list_destination_subscriptions | List the mappings (subscriptions) of an Actions destination: id, name, action, trigger (which events it fires on) and enabled flag |
segment_get_destination_delivery_metrics | Delivery metrics summary of one destination for one source: totals per metric (delivered, discarded, retried and so on) with breakdowns |
segment_list_warehouses | List the workspace's warehouses (id, name, enabled flag, warehouse type such as Snowflake, BigQuery, Redshift, Postgres) |
segment_get_warehouse | Get one warehouse by id: name, enabled flag, warehouse type and its connection settings without passwords, keys and other secrets |
segment_get_warehouse_connection_state | Check whether Segment can currently connect to a warehouse with its saved settings (e.g |
segment_list_warehouse_syncs | Recent sync reports of a warehouse for every connected source: source id, start and end, status, duration, rows synced and notices |
segment_list_tracking_plans | List the tracking plans (id, name, slug, description, type, created and updated) |
segment_get_tracking_plan | Get one tracking plan by id (name, slug, description, type, created and updated) |
segment_list_tracking_plan_rules | List the rules of a tracking plan: per event or trait the rule type, key, JSON Schema of the allowed properties, version and dates |
segment_list_tracking_plan_sources | List the sources connected to a tracking plan (id, name, slug, enabled flag, source type) |
segment_list_functions | List the workspace's Functions of one type (id, name, description, type, created) |
segment_get_function | Get one Function by id, including its JavaScript code, declared settings (names and types, not values) and type |
segment_get_event_volume | Event volume of the workspace over time: totals and series per bucket, optionally grouped by event name, event type or source and filtered… |
segment_get_delivery_overview | Delivery Overview counts for one step of a source's pipeline: successfully-received and failed-on-ingest (events reaching Segment)… |
segment_get_daily_api_calls_usage | Daily cumulative API call counts of the workspace for one usage month (the volume Segment bills on for API-based plans) |
segment_get_daily_mtu_usage | Daily cumulative monthly tracked users (MTU) of the workspace for one usage month: anonymous, identified, anonymous then identified and… |
segment_list_audit_events | List Audit Trail events (who changed what and when): id, timestamp, type (e.g |
segment_update_source | Rename a source or switch it on or off |
segment_update_destination | Rename a destination or switch it on or off |
segment_delete_source | Delete a source for good, with its settings and connections; data sent with its write key is no longer accepted |
segment_delete_destination | Delete a destination for good, with its settings and mappings |
Example prompts
- "Which of our destinations are disabled, and which sources do they read from?"
- "Show me the Delivery Overview of our iOS source for the last 24 hours and where events were dropped."
- "How did event volume develop per source over the last 7 days, and how many MTUs have we used so far this month?"
- "Who changed sources or destinations in the last two weeks, according to the audit trail?"
FAQ
Where does Gemini CLI look for MCP servers? In ~/.gemini/settings.json for your user, or in .gemini/settings.json inside a project. gemini mcp list shows each server and whether it connects.
Next steps
Was this guide helpful?