gainsight-px-mcp
v1.0.4
Published
MCP server for the Gainsight PX REST API — query and manage users, accounts, engagements, features, segments, events, and more from any MCP-compatible AI tool.
Downloads
355
Maintainers
Readme
Gainsight PX MCP Server
An MCP (Model Context Protocol) server that connects AI tools like Claude, Cursor, and Windsurf to the Gainsight PX REST API.
Query and manage your PX data — users, accounts, engagements, features, segments, events, and more — directly from your AI assistant.
Prerequisites
- Node.js 18 or later
- A Gainsight PX API key (how to generate one)
Quick Start
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"gainsight-px": {
"command": "npx",
"args": ["-y", "@gainsight/px-mcp-server"],
"env": {
"PX_API_KEY": "your-api-key-here"
}
}
}
}Claude Code
Add to your project's .mcp.json:
{
"mcpServers": {
"gainsight-px": {
"command": "npx",
"args": ["-y", "@gainsight/px-mcp-server"],
"env": {
"PX_API_KEY": "your-api-key-here"
}
}
}
}Cursor
Add to your Cursor MCP settings:
{
"mcpServers": {
"gainsight-px": {
"command": "npx",
"args": ["-y", "@gainsight/px-mcp-server"],
"env": {
"PX_API_KEY": "your-api-key-here"
}
}
}
}Configuration
| Environment Variable | Required | Default | Description |
|---------------------|----------|---------|-------------|
| PX_API_KEY | Yes | — | Your Gainsight PX API key |
| PX_API_BASE_URL | No | https://api.aptrinsic.com | API base URL for your data center |
Data Centers
| Region | Base URL |
|--------|----------|
| US | https://api.aptrinsic.com (default) |
| EU | https://api-eu.aptrinsic.com |
| US2 | https://api-us2.aptrinsic.com |
If your PX instance is in EU or US2, set the PX_API_BASE_URL environment variable accordingly.
Available Tools
Users
| Tool | Description |
|------|-------------|
| px_list_users | List users with filtering, sorting, and pagination |
| px_get_user | Get a user by identifyId |
| px_create_user | Create a new user |
| px_update_user | Update a user |
| px_delete_user | Delete a user |
Accounts
| Tool | Description |
|------|-------------|
| px_list_accounts | List accounts with filtering, sorting, and pagination |
| px_get_account | Get an account by ID |
| px_create_account | Create a new account |
| px_update_account | Update an account |
| px_delete_account | Delete an account |
Engagements
| Tool | Description |
|------|-------------|
| px_list_engagements | List engagements with optional content type filter |
| px_get_engagement | Get an engagement by ID |
| px_set_engagement_state | Start or pause an engagement |
| px_delete_engagement | Delete an engagement |
Features
| Tool | Description |
|------|-------------|
| px_list_features | List features |
| px_get_feature | Get a feature by ID |
| px_get_feature_adoption | Get feature adoption statistics |
Segments
| Tool | Description |
|------|-------------|
| px_list_segments | List segments |
| px_get_segment | Get a segment by ID |
Events
| Tool | Description |
|------|-------------|
| px_get_events | Query events by type (pageView, identify, click, email, formSubmit, lead, sessionInitialized, segmentMatch, engagementView, feature_match) |
| px_get_custom_events | Query custom events |
| px_create_custom_event | Create a custom event |
Survey
| Tool | Description |
|------|-------------|
| px_get_survey_responses | Query survey responses |
Knowledge Center
| Tool | Description |
|------|-------------|
| px_list_kc_bots | List Knowledge Center bots |
| px_get_kc_bot | Get a Knowledge Center bot by ID |
Admin
| Tool | Description |
|------|-------------|
| px_get_subscription | Get subscription details |
| px_get_model_attributes | Get user or account model attributes |
Filtering and Pagination
Filter Syntax
List tools support filtering with the format fieldName{operator}fieldValue:
| Operator | Description | Example |
|----------|-------------|---------|
| == | Equals | [email protected] |
| != | Not equals | status!=INACTIVE |
| < | Less than | lastSeenDate<1700000000000 |
| <= | Less than or equal | score<=50 |
| > | Greater than | signUpDate>1700000000000 |
| >= | Greater than or equal | score>=80 |
| ~ | Contains (like) | [email protected] |
| !~ | Does not contain | name!~test |
Pass multiple filters as an array — they are combined with AND logic.
Pagination
- Users, Accounts, Events: Scroll-based — use the
scrollIdfrom the response to fetch the next page. - Engagements, Features, Segments, KC Bots: Page-number-based — use
pageSizeandpageNumber(0-indexed).
Rate Limits
The PX API enforces rate limits of approximately 200 requests per second and 1 million requests per day per subscription.
License
MIT
