# Segment MCP

> Segment MCP Server gives your AI agent read access to your entire data infrastructure within Segment. Audit sources, destinations, tracking plans, and connected data warehouses conversationally. It lets you map out complex data pipelines and verify event schemas exactly as they exist in production—no dashboard clicking required.

## Overview
- **Category:** growth-engine
- **Price:** Free
- **Tags:** customer-data-platform, data-pipelines, event-tracking, data-governance, schema-management, data-warehousing, api-integration, analytics

## Description

You connect your AI agent to Segment's data infrastructure. This setup lets you audit every piece of your customer data pipeline without clicking through a dozen tabs in the dashboard. You get raw visibility into sources, destinations, and schemas—it’s like having a live map of where every event goes.

*To start auditing sources*, your agent first runs `list_sources`. This gives you an exhaustive list of every active data source configured in your Segment account right now. Once you see the names you need to check, you run `get_source`, and it pulls the specific configuration details for that single data source, confirming its status and exactly how it's set up.

*To map out where this data is going*, you use `list_destinations`. This tool takes a specified source and lists every configured destination attached to it. You instantly see all the endpoints—the databases or services—where that source’s events are routed. It shows your full routing ecosystem at a glance.

*When you need to check schemas*, you start by running `list_tracking_plans`. This gives you an inventory of every defined tracking plan in your workspace, providing names and IDs so you know what structures exist. Next, you call `get_tracking_plan` with the specific ID you're looking at. It pulls the required event schema for that plan, detailing necessary properties and data types. You can confirm if a payload structure matches production standards instantly.

*To review compliance*, your agent runs `list_warehouses`. This provides a list of all data warehouses currently connected to this Segment workspace. When you need details on what's configured overall, calling `get_workspace` retrieves core metadata about the entire workspace configuration. You get a full picture of the environment that holds it all.

This means you can audit your whole setup conversationally: list sources, check their deep settings, trace where they send data via destinations, pull up every tracking plan, verify its schema structure using `get_tracking_plan`, and confirm which data warehouses are hooked into the system. You're skipping slow clicks and getting raw architectural facts directly from your agent.

## Tools

### get_source
Retrieves detailed configuration information for a single data source within the workspace.

### get_tracking_plan
Pulls the required event schema and properties for one specific tracking plan.

### get_workspace
Retrieves core metadata about the current Segment workspace configuration.

### list_destinations
Lists all configured data destinations for a given source, showing where its events go.

### list_sources
Provides an exhaustive list of every active data source in the Segment account.

### list_tracking_plans
Lists all available tracking plans, giving you names and IDs to audit their structures later.

### list_warehouses
Provides a list of all data warehouses that are connected for receiving Segment data.

## Prompt Examples

**Prompt:** 
```
List all active Workspaces configured in the environment.
```

**Response:** 
```
I've queried the workspace configurations. Your primary environment is currently named 'Global Operations (vinkius_corp)' containing 12 active sources and maintaining a stable 30-day API limit threshold.
```

**Prompt:** 
```
Lookup the Tracking Plan mapped to ID 'tp_123' to see the exact structure required for the Checkout Started event.
```

**Response:** 
```
The Tracking Plan requires the 'Checkout Started' event to pass an array of product mappings. Essential properties include: `cart_id` (string), `total_value` (float), and `currency` (string, ISO 4217). Knowing this, I can draft the necessary React context hook for you.
```

**Prompt:** 
```
Identify all data Warehouses we have feeding from this Segment workspace.
```

**Response:** 
```
I've located 2 active warehouses attached to this workspace. First is a Snowflake cluster stationed securely behind VPC ('snowflake_eu_prod'). Second is an Amazon Redshift instance ('redshift_analytic_db'). Both register with healthy ping statuses according to Segment.
```

## Capabilities

### List Sources
Lists every active data source configured in your Segment workspace.

### Get Source Details
Retrieves the specific details for one data source, confirming its status and configuration.

### List Destinations
Lists all destinations attached to a specified data source, showing where the data is routed.

### List Tracking Plans
Retrieves an inventory of every defined tracking plan within your workspace.

### Get Tracking Plan Schema
Pulls the required event schema for a specific tracking plan, detailing necessary properties and types.

### List Data Warehouses
Lists all data warehouses that are currently connected to this Segment workspace.

## Use Cases

### Fixing a Schema Breakage
A developer reports that the 'Purchase Complete' event is failing downstream. Instead of digging into the dashboard to find the schema rules, they ask their agent to run `get_tracking_plan` for that event. The agent returns the required properties (like `line_items` array structure), allowing the dev to write the exact tracking code needed immediately.

### Auditing Data Movement
The RevOps manager suspects a new marketing tool isn't sending data anywhere. They ask the agent to 'list all sources.' When they see the source ID for the new tool, they then use `list_destinations` to confirm if any destination is attached, solving the connectivity problem instantly.

### Compliance Audit
The compliance officer needs a list of all data sinks. They ask the agent to 'list all connected warehouses.' The agent uses `list_warehouses` and returns names like Snowflake and Redshift, providing an immediate inventory for audit reports.

### Onboarding a New App
A new mobile app is ready to send data. Instead of manually checking the dashboard, the team uses the agent to `list_sources` first. They get the correct source ID and then use `get_source` to understand its exact setup requirements before writing any code.

## Benefits

- Schema Validation: Use `get_tracking_plan` to pull the exact event schema required for an event. You don't have to guess what properties or types are needed—the agent tells you, saving hours of back-and-forth with developers.
- Full Data Map: By combining `list_sources` and `list_destinations`, your agent creates a map of every data flow. You can immediately see if an app source is pointing to the wrong destination or if a critical pipeline is missing.
- Governance Checkup: `list_warehouses` confirms which data lakes (Snowflake, Redshift, etc.) are receiving data from Segment. This keeps your compliance teams happy and verifies data integrity.
- Speed Over Clicks: Instead of navigating through the dashboard menus to find an ID or a source name, you ask for it. The agent uses `get_workspace` to pull core IDs instantly.
- Cross-Platform View: You can quickly check if multiple sources are configured correctly by running `list_sources`, ensuring consistency across Web, iOS, and Android data inputs.

## How It Works

The bottom line is that it lets you audit your entire data routing system using natural language commands instead of clicking through menus.

1. First, subscribe to the integration and provide your 'Public API Token' from your Segment admin panel.
2. Next, command your agent. For example: 'List all sources.' The agent runs the appropriate tool call against the Segment API.
3. Finally, you get a clean, structured output detailing the data source names, connected destinations, or schema properties.

## Frequently Asked Questions

**How can I use list_sources with the Segment MCP Server?**
You simply instruct your agent to 'List all sources.' It executes `list_sources` and returns a list of every data source in your workspace, giving you an immediate inventory.

**Do I need get_tracking_plan if I just want to check my schemas?**
Yes. While `list_tracking_plans` gives you the names, `get_tracking_plan` is required because it pulls the actual schema details—the required properties and data types—for that plan.

**What is the difference between list_sources and get_source?**
`list_sources` gives you a bulleted inventory of all sources. `get_source` requires you to name one specific source, then it pulls deep details about that single source's configuration.

**Can I check which data warehouses are connected using list_warehouses?**
Yes. Asking the agent to 'list all connected warehouses' triggers `list_warehouses`. It confirms exactly where your data is flowing in the backend, helping with compliance audits.

**What essential information does running `get_workspace` provide?**
It returns core metadata about your current Segment workspace. This includes the workspace name, API limits, and a count of active sources. You need this first to verify which environment your agent is connected to.

**When I use `list_destinations`, what input must I provide?**
You must supply a valid Source ID in the request parameters. The tool then returns every destination configured exclusively for that specific source, helping you map data flow endpoints.

**If `get_tracking_plan` fails, what does that usually mean?**
A failure typically means one of two things: either the Tracking Plan ID is wrong, or your API token lacks read access to that specific plan. Double-check both the ID format and your permissions.

**Does `list_tracking_plans` show me every plan I've ever made?**
No. The tool only lists plans active within the current workspace scope defined by your API key. It confirms the operational boundaries of the data you can query.

**Can the AI create new sources or configure tracking events?**
No. By design, this MCP server uses read-only capability endpoints (`list`, `get`). It's engineered strictly to audit, report, and ingest context about your existing architecture to ensure absolute safety and prevent accidental destructiveness.

**Can it tell me which downstream destinations are linked to a specific source?**
Absolutely. You can prompt the AI: 'List all destinations tied to the Web App Source [ID]'. Using the `list_destinations` tool, the agent parses the explicit router table to confirm exact tools receiving your events.

**Why use an AI agent to read tracking plans?**
Because it radically accelerates coding. If you are developing a new feature in Cursor and need to dispatch tracking info, simply invoke the `get_tracking_plan` tool. The AI reads the exact structural interface from Segment and writes perfectly matching telemetry code, avoiding human typos.