# Prismatic MCP

> Prismatic lets your AI client manage the full lifecycle of B2B integrations. Use it to list customers, create new instances, deploy configurations live, and fetch detailed execution logs—all through natural language commands. It gives you direct API access to Prismatic's core functionality without opening the UI.

## Overview
- **Category:** developer-tools
- **Price:** Free
- **Tags:** embedded-ipaas, integration-platform, workflow-automation, api-management, saas-integrations

## Description

You connect your AI client directly to Prismatic's core functionality with this MCP Server. You don't gotta jump through dashboards or mess around in terminals just to run a simple integration task; you tell your agent what you need, and it handles the structured calls for you.

### Managing Your Customer Base

You can manage every aspect of who's using Prismatic. To see who’s on board right now, you simply use `list_customers`, which pulls up a complete list of all customer accounts currently registered in the system. If you gotta onboard a new client or add another account, you kick off `create_customer`. This tool lets your agent write and submit a brand-new customer record into Prismatic.

### Controlling the Integration Lifecycle

The process for getting an integration running is straightforward. First, when you're ready to set up a new connection for a specific client, your agent executes `create_instance`. This provisions and sets up a fresh, clean integration instance tied to that customer account. Once the base setup is done, but before it’s live, you use `deploy_instance`. That pushes all the configuration changes—the settings, the endpoints, whatever's configured—out to the existing integration instance, making sure it runs properly in production.

### Debugging and Performance Analysis

When something breaks or you just gotta check how well an old connection is running, `fetch_logs` is what you use. This tool lets your agent retrieve detailed execution logs for a specific customer within a precise time range. You point it to the right user and give it start and end timestamps; that's how you pinpoint exactly where the failure happened or confirm performance metrics for a given window.

### Deep Platform Access with GraphQL

For everything else—the stuff that isn't covered by standard tools like customer creation or log fetching—you use `run_graphql`. This tool lets your agent execute any custom GraphQL query or mutation. You don’t have to guess what data is available; you just run the specific, arbitrary graph query against the schema. This gives you direct access to deep platform data, whether it's related to user settings, component statuses, or complex actions that need specialized querying.

## Tools

### create_customer
Adds a brand new customer record to the Prismatic system.

### create_instance
Provisions and sets up a fresh integration instance for a specific customer account.

### list_customers
Fetches an immediate list of all customers currently registered in Prismatic.

### deploy_instance
Pushes configuration changes to an existing integration instance, making the setup live.

### fetch_logs
Retrieves detailed execution logs for a given customer and time range. This is how you debug failures.

### run_graphql
Allows execution of any custom GraphQL query or mutation to access deep platform data.

## Prompt Examples

**Prompt:** 
```
List all customers currently configured in Prismatic.
```

**Response:** 
```
I've retrieved your customer list. You have 3 customers: 'Acme Corp' (ID: cust_123), 'Globex' (ID: cust_456), and 'Soylent Corp' (ID: cust_789).
```

**Prompt:** 
```
Deploy the instance with ID inst_98765.
```

**Response:** 
```
Deployment triggered for instance inst_98765. The configuration changes are now being applied to the runtime environment.
```

**Prompt:** 
```
Fetch logs from the last 10 minutes (between 2023-10-27T10:00:00Z and 2023-10-27T10:10:00Z).
```

**Response:** 
```
I've fetched the logs for that period. I found 12 events, including a 'Webhook Received' success and one 'Execution Error' related to a timeout in the Slack component.
```

## Capabilities

### Discover and Manage Customers
Fetch all customer records with `list_customers` or create new client accounts using `create_customer`.

### Control Integration Deployment
Provision a new integration instance (`create_instance`) and then push configuration changes live via `deploy_instance`.

### Analyze Execution Logs
Use `fetch_logs` to pull detailed event logs, allowing you to pinpoint errors or check performance within a specific time window.

### Execute Custom Schema Queries
Run arbitrary GraphQL mutations or queries using `run_graphql` to interact with deep platform data not covered by standard tools.

## Use Cases

### Onboarding a New Client
A client signs on. Instead of manually going into the UI, your agent runs: first `create_customer` (gets the ID); then `create_instance` (uses that ID to provision it); finally, `deploy_instance` (pushes live config). The entire process is automated in three calls.

### Investigating a Failure
The client reports an error at 10:15 AM. Your agent runs `fetch_logs`, specifying the time window and customer ID. It finds the specific 'Execution Error' related to component X, telling you exactly where the breakdown happened.

### Checking Platform Health
A product team needs to know if all core components are online. They run `list_customers` for an overview, but then use `run_graphql` with a specific query to confirm the health status of a backend component that isn't covered by standard tools.

### Auditing Data Changes
Before changing anything, you need proof. You run `list_customers` to see who exists, and then use `run_graphql` to fetch the last 5 changes made to a specific user's configuration record.

## Benefits

- **Rapid Debugging:** Don't guess why an integration broke. Use `fetch_logs` to pull detailed execution logs for a precise time window, cutting investigation time from hours to minutes.
- **Zero-Touch Onboarding:** Manage the full client setup flow—from calling `create_customer` to deploying the first working instance with `deploy_instance`—all in one chat prompt.
- **Full Visibility:** Need an inventory count? Run `list_customers` anytime. You get an immediate list of every account, making it easy for PMs to verify active users.
- **Ultimate Flexibility:** When the standard tools aren't enough, use `run_graphql`. This gives you direct, raw access to the entire Prismatic schema, letting your agent query anything from component metadata to user settings.
- **State Control:** You can treat deployments like code. Call `create_instance` and then follow up with `deploy_instance` to ensure configuration changes are applied reliably, every time.

## How It Works

The bottom line is that your AI client executes complex platform operations directly via structured function calls, eliminating manual UI steps.

1. Subscribe to the server and provide your Prismatic API Token.
2. Your AI client uses that token to authenticate against the MCP endpoint.
3. You prompt your agent, telling it exactly what you need (e.g., 'Fetch logs for customer X between 10:00 and 10:15'). The agent calls the appropriate tool.

## Frequently Asked Questions

**How do I list customers using the Prismatic MCP Server?**
You call the `list_customers` tool. This immediately fetches all customer records in Prismatic, letting you see who's on your platform.

**What if my integration is broken? How do I debug it with fetch_logs?**
You use the `fetch_logs` tool. You must specify a start time and end time, plus the customer ID. This gives you granular event details—you can pinpoint exactly which component failed.

**Can I make changes without deploying them?**
You first use `create_instance` to set up the resource. If you don't call `deploy_instance`, those configuration changes won't go live; they stay in a draft state.

**Is there a way to query data not covered by any single tool? (run_graphql)**
Yes, use the `run_graphql` tool. It lets you execute custom GraphQL queries or mutations against the entire Prismatic schema, giving you access to everything.

**How do I get started using the Prismatic server and test tools like list_customers?**
You must provide a valid Prismatic API Token upon connecting your agent. This token controls all operations, including running list_customers. If the connection works, your AI client can access all available tools.

**When I call create_customer, does it require me to provide external IDs for mapping?**
Yes. You must supply a unique external ID when creating a customer record. If you attempt to use an existing ID with create_customer, the operation will fail because of a duplicate key.

**Can I successfully run deploy_instance if the instance hasn't been created first?**
No. You must call create_instance before deploying. The deployment tool only targets integration instances that already exist in your Prismatic account; it can’t make them.

**If a complex query using run_graphql fails, is it due to the server or my API permissions?**
The error response tells you which one. If the failure message references insufficient scope, your token lacks permission for that specific schema component. You need to update your API access rights in Prismatic.

**Can I execute custom GraphQL queries if a specific tool isn't available?**
Yes! Use the `run_graphql` tool to execute any valid Prismatic GraphQL query or mutation. This gives you full access to the schema, including actions, components, and user data.

**How do I make sure my integration changes are actually live?**
After creating or updating an instance, you must use the `deploy_instance` tool with the specific Instance ID. This triggers the deployment process required for changes to take effect.

**Is it possible to filter logs by a specific time range?**
Yes, the `fetch_logs` tool requires `timestampGte` and `timestampLte` parameters in DateTime format, allowing you to pinpoint exactly when an event occurred.