segment-mcp
Provides read-only tools for auditing Twilio Segment workspaces, including event routing to destinations, event traceability and governance, stale source detection, destination delivery health checks, and identification of ungoverned sources.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@segment-mcpCheck delivery health for our Segment destinations and list any ungoverned sources."
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
segment-mcp
A read-first MCP server for Twilio Segment. Answers which destinations get which events, which sources are dead, and which are governed by nothing — the questions nobody can answer without clicking through forty screens.
Read-only by default
SEGMENT_MCP_MODE defaults to read, and every tool this server ships
today is a read. Shipping with zero write tools is a feature, not a
limitation — see BUILD-PLAN.md §2. write and admin modes exist in
the tier model (src/segment_mcp/modes.py) for when gated writes land;
right now there is nothing for them to unlock.
Related MCP server: mcp-azure-landing-zone
What this refuses to do — permanently, not "for now"
POST /regulations and POST /regulations/sources/{id} — workspace-scoped,
irreversible deletion or suppression of user data across every source —
are unreachable in every mode, with no configuration path to enable
them. Three independent things enforce this: the mode-authorization
layer refuses it before even checking the current mode, the API client
refuses to send the request before it reaches the network, and no tool
this server registers references it in any form.
This isn't a gate waiting for the right permission level. It's a line, because these endpoints accept an array of subjects and one malformed or hallucinated call can permanently delete thousands of profiles with no undo. Full reasoning: docs/what-this-refuses-to-do.md.
Quick start
Requires a Segment workspace on Team or Business tier and a Public API token (see Prerequisites below).
gh repo clone katekruger/segment-mcp
cd segment-mcp
uv sync
cp .env.example .env # fill in SEGMENT_API_TOKEN and SEGMENT_REGION
uv run segment-mcpPoint an MCP client (Claude Desktop, Claude Code, etc.) at it over stdio. The server refuses to start — loudly, with a clear message — if the token, region, or workspace tier isn't right; see Startup checks.
The five tools
Each composes several Public API calls into one structured answer, not a raw endpoint dump:
Tool | Question it answers |
| Which destinations get which events? |
| Given an event name: where does it go, and is it governed by anything? |
| Which sources have no recent data — dead instrumentation vs. simply new? |
| Is this destination silently failing? |
| Which sources are governed by nothing, or allowing unplanned events through? |
Prerequisites
Team or Business tier. The Public API is not available on Free or Add-on plans. There is no workaround, and the server's startup checks fail with a clear message rather than a raw 403 if your workspace doesn't qualify.
A Public API token. Only a Workspace Owner can mint one: Segment App → Workspace Settings → Access Management → Tokens → Create Token → Public API (not Config API).
Region configuration
SEGMENT_REGION=us # or euThere is no default — you must set this explicitly. An EU workspace whose API calls are pointed at the US endpoint doesn't error; it just silently returns nothing, which is a far worse failure mode than a crash. This server's startup checks call the API once with your configured region and fail loudly if the token doesn't actually belong to it, naming the region that does.
Startup checks
All fatal — the server refuses to start rather than fail confusingly on the first tool call:
SEGMENT_REGIONis set and one ofus/eu.SEGMENT_API_TOKENis present and actually authenticates against that region.The workspace's tier supports the Public API — a Free-tier workspace gets a clear "requires Team or Business tier" message, not a raw 403.
Modes
SEGMENT_MCP_MODE = read (default) | write | adminread— every tool above. No mutation reachable, at any mode.write— would add Tier 3 replace-semantics changes (none shipped yet), each echoed back for confirmation before executing.admin— would add Tier 2 deletes (none shipped yet), gated behind a typed confirmation naming the exact resource — not justconfirm=true.
See src/segment_mcp/modes.py for the full tier model and
docs/what-this-refuses-to-do.md for
what stays out of scope regardless of mode.
Profile API — a separate, higher trust tier
The Profile API returns PII on named individuals — traits, external IDs, event history, and identity links for a specific person. This is the most privacy-sensitive read anywhere in this server's surface, so it is walled off from everything else:
A separate credential,
SEGMENT_PROFILE_TOKEN— never the mainSEGMENT_API_TOKEN. Also requiresSEGMENT_PROFILE_SPACE_ID(your Unify Space ID, not your workspace ID).Explicit opt-in. If
SEGMENT_PROFILE_TOKENis unset, no profile tool is registered — the capability doesn't exist for that server instance.Every lookup is logged — collection, id_type, and the caller — before the request is even sent, via
client/profile_api.py'ssegment_mcp.profile_apilogger. The log records that a lookup happened and which profile, as a truncated SHA-256 digest of the lookup key, never the raw identifier — this client never logs the raw identifier itself, and it silenceshttpx's own request-URL log process-wide at construction so the identifier doesn't leak that way either, since the Profile API puts it in the URL path. The digest cannot be reversed back to the identifier, but repeated lookups of the same profile are still correlatable across log lines for auditing.Lookups are case-sensitive. The wrong case returns an empty result, not an error — this client lowercases every lookup value at its boundary and logs a warning when it had to.
No profile-lookup MCP tool is wired into server.py yet — this is the
client and trust-boundary machinery a future tool will be built on, per
BUILD-PLAN.md's v0.2 scope.
Development
uv sync
uv run pre-commit install
uv run ruff check . && uv run ruff format --check . && uv run pyright && uv run pytestSee CONTRIBUTING.md and AGENTS.md.
See also
Every project here shares one idea: a GTM system should refuse to act on data it cannot verify.
campaign-preflight — the same refusal to coerce missing evidence into a pass. insufficient_data is its own state in both.
pipeline-waterfall — downstream of this. Reconciles the bookings and pipeline waterfall, and fails the build rather than reporting a bridge that does not tie out.
License
MIT — see LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Query your org's data in natural language — read-only MCP access to SQL, NoSQL, files & warehouses.
Safe, read-only Postgres and MySQL access for AI agents. Audit log + column-level controls.
Read-only MCP access to sessions, funnels, campaigns, errors, live visitors, and anomalies.
Read-only finance and operations controls for AI agents with evidence and safe next actions.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceEnables read-only interaction with Salesforce orgs through the local sf CLI, providing tools for SOQL queries, object metadata, and field dependencies, while automatically blocking writes to Production orgs.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to inspect and audit Azure Landing Zones by inventorying resources, auditing tagging, evaluating policy compliance, and detecting infrastructure drift, all in read-only mode.-
- AlicenseAqualityCmaintenanceEnables read-only querying of Azure Log Analytics and Azure Resource Graph through MCP, supporting KQL queries, workspace discovery, and resource inventory exploration with Azure RBAC authentication.52MIT
- FlicenseNot gradedqualityCmaintenanceEnables approval-gated incident response workflows that gather evidence through read-only MCP tools, perform idempotent writes, and preserve a durable audit trail.1-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/katekruger/segment-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server