# Segment — MCP server on mcp.ai > Connect your Segment account and use 17 tools for analytics straight from your AI agent. Connect with your own API key. Twilio Segment is a customer data platform that helps businesses collect, clean, and control their customer data. By: mcp.ai · official Page: https://mcp.ai/segment ## Connect (MCP protocol) Remote MCP endpoint (HTTP, streamable): https://api.mcp.ai/p_segment?ms=1787293740000 Add it as a custom/remote MCP connector, then authenticate when prompted. ## REST API (no MCP client required) Every tool is also a REST endpoint, authed with a workspace API key. Discover: GET https://api.mcp.ai/api/segment/_endpoints # public; lists every endpoint Call: POST https://api.mcp.ai/api/segment/ Authorization: Bearer sk_live_… # create one at https://mcp.ai/settings/api-keys Content-Type: application/json Body: { …args } → { "ok": true, "tool": "", "result": { … } } ## Developer docs How to use (MCP or REST), markdown: https://mcp.ai/segment/skill.md Postman collection (v2.1): https://mcp.ai/segment/postman.json ## Tools - segment_add_labels_to_source(labels: object[], sourceId: string) — Tool to add existing labels to a Source. Use when you have the source ID and want to tag it with metadata labels. - segment_alias(userId?: string, context?: object, timestamp?: string, previousId: string, anonymousId?: string, integrations?: object) — Tool to alias a previous user ID to a new user ID. Use when merging anonymous and known identities. - segment_batch(batch: object[], context?: object, writeKey?: string, integrations?: object) — Tool to send multiple analytics calls in a single batch request. Use when you want to reduce HTTP overhead by batching Identify/Track/Page/Screen/Group calls into one request. - segment_delete_source(sourceId: string) — Tool to delete a Segment Source. Use when you need to permanently remove a Source by its ID after confirmation. - segment_get_daily_per_source_api_calls_usage(period: string, pagination?: object) — Tool to fetch daily API call counts per source for a given period. Use when you need daily breakdown of API usage by source after determining the reporting period. - segment_get_destination(destinationId: string) — Tool to retrieve a Destination by ID. Use when you need to fetch the full configuration of a Segment Destination instance by its unique identifier. Falls back US→EU public API and legacy app endpoint; - segment_group(traits?: object, userId?: string, context?: object, groupId: string, writeKey?: string, timestamp?: string, anonymousId?: string, integrations?: object) — Tool to associate an identified user with a group via Segment HTTP Tracking API. Use when grouping users with traits. - segment_identify(traits?: object, userId?: string, context?: object, writeKey?: string, messageId?: string, timestamp?: string, anonymousId?: string, integrations?: object) — Tool to identify a user and set/update traits via Segment HTTP Tracking API. - segment_import_historical_data(batch: object[], context?: object, integrations?: object) — Tool to import historical data in bulk with support for historical timestamps. Use when you need to backfill or import past events with their original timestamps into Segment. - segment_list_connected_warehouses_from_source(sourceId: string, pagination: object) — Tool to list warehouses connected to a Source. Use when you need to retrieve warehouses for a given source ID. - segment_list_delivery_metrics_summary_from_destination(endTime?: string, sourceId: string, startTime?: string, granularity?: string, destinationId: string) — Get an event delivery metrics summary from a Destination. Primary attempt uses Segment Public API; fallback to legacy app host if needed. On HTML fallback responses, returns a minimal valid envelope t - segment_list_schema_settings_in_source(sourceId: string) — Retrieve schema configuration settings for a Source. - segment_page(name?: string, userId?: string, context?: object, writeKey?: string, messageId?: string, timestamp?: string, properties?: object, anonymousId?: string, integrations?: object) — Tool to record a page view via Segment HTTP Tracking API. Use when sending page views with optional page name and properties. - segment_remove_source_write_key(sourceId: string, writeKey: string) — Tool to remove a write key from a Source. Use when you need to revoke an existing write key for security or rotation. - segment_screen(name?: string, userId?: string, context?: object, writeKey?: string, timestamp?: string, properties?: object, anonymousId?: string, integrations?: object) — Tool to record a mobile app screen view. Use when tracking screen views in a mobile app via Segment HTTP Tracking API. - segment_track(event: string, userId?: string, context?: object, writeKey?: string, timestamp?: string, properties?: object, anonymousId?: string, integrations?: object) — Tool to record a custom user event via Segment HTTP Tracking API. Use when sending events to Segment with valid identity. - segment_update_source(name?: string, slug?: string, enabled?: boolean, settings?: object, sourceId: string) — Tool to update a Source's metadata and settings. Use when you need to modify an existing Source after confirming its ID. ## Example prompts - "What can I do in Segment?" - "Show me a summary of my Segment account" ## Links Docs: https://mcp.ai/docs/mcps/segment Website: https://mcp.ai/mcps/segment