Connect AI Agents to Prismatic
The Prismatic MCP server allows you to connect AI agents like OpenAI, Claude, or Cursor to your agent flows. Let's explore how to connect an AI agent to your agent flows.
Connecting to all agent flows
If you would like to connect your AI agent to all of your agent flows, use the global MCP endpoint for your region.
Connecting to a specific integration's agent flows
Suppose you have a Salesforce integration among dozens of other integrations, but you want to connect only to the agent flows associated with that Salesforce integration.
In that case, open the MCP tab of your Salesforce integration and take note of the custom MCP endpoint.
It will look like https://mcp.prismatic.io/SW5...../mcp
(depending on your regions).

If your customers have instances of this integration deployed to them, they can also connect to the agent flows associated with their customer by using the same MCP endpoint.
Authentication with Prismatic's flow MCP server
Prismatic's MCP server uses OAuth (similar to how you log in with the prism CLI tool).
When connecting an AI client to Prismatic's MCP server, your client will likely direct you to Prismatic's OAuth 2.0 consent screen in order to connect.
Alternatively, you can run prism me:token
to generate a temporary access token that you can use to authenticate your AI client.
Provide the token as a bearer token to Prismatic's MCP server.
Authentication for embedded customer users
If your AI client is embedded in your application (for example, you've built a chat bot with the AI SDK), you will need to create an embedded JWT for your customer user and provide that JWT as a bearer token to Prismatic's MCP server.
Connecting AI Agents to Prismatic's MCP server
General notes
Prismatic's MCP server is designed to be used with any client that supports the current draft of the Model Context Protocol (MCP) specification. Specifically, your client must support the following:
- MCP OAuth as the means to manage authorization between your application and Prismatic, so your client implementation must provide this support.
- Streamable HTTP transport, not stdio, nor the legacy HTTP SSE.
Stand-alone clients can leverage the mcp-remote package to connect to Prismatic's MCP servers.
mcp-remote
handles OAuth connection and stores your Prismatic token for you in $HOME/.mcp-auth/
.
Claude Desktop
Here's a sample claude_desktop_config.json
config file that will connect to Prismatic's MCP server.
You may need to adjust the URL to match your region.
{
"mcpServers": {
"prismatic": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.prismatic.io/mcp"]
}
}
}
This will instruct Claude to use the mcp-remote
shim to connect to Prismatic's MCP server.
If successful, after editing your configuration file and restarting Claude, you should automatically be directed to an OAuth 2.0 consent screen to grant Claude access to your Prismatic environment.
After authenticating, ask Claude "Who am I?".
Claude will use Prismatic's get-me
tool (which is a default tool you'll have access to from Prismatic's MCP server).

Claude Code
Similar to Claude Desktop, claude code will use the mcp-remote
package to connect to Prismatic's MCP server.
Running this command will add Prismatic's MCP server to Claude Code:
claude mcp add-json prismatic '{"type":"stdio","command":"npx","args":["-y","mcp-remote","https://mcp.prismatic.io/mcp"]}'
You may need to run claude mcp list
once in order for authentication to be successful.

Cursor
To add Prismatic's flow MCP server to Cursor, add this JSON to your mcp.json
configuration file:
{
"mcpServers": {
"prismatic": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-remote", "https://mcp.prismatic.io/mcp"],
"env": {}
}
}
}
Alternatively, add Prismatic MCP to Cursor directly.

Node AI SDK
If you're building your own AI client using the AI SDK, you can use the createMCPClient
function to register Prismatic's MCP server with the SDK.
You'll need to provide a StreamableHTTPClientTransport
that points to Prismatic's MCP server, and also provide an embedded JWT for the customer user (it can be the same JWT you use for embedding Prismatic).
When invoking your LLM with streamText
, provide the tools fetched from Prismatic's MCP server to the tools
option.
import { openai } from "@ai-sdk/openai";
import { StreamableHTTPClientTransport } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
import {
streamText,
experimental_createMCPClient as createMCPClient,
} from "ai";
// Allow streaming responses up to 30 seconds
export const maxDuration = 30;
// Fetch all tools available from Prismatic's MCP server given an embedded customer user's access token
const getTools = async (prismaticAccessToken: string) => {
const transport = new StreamableHTTPClientTransport(
new URL("https://mcp.prismatic.io/mcp"),
{
requestInit: {
headers: {
Authorization: `Bearer ${prismaticAccessToken}`,
},
},
},
);
const mcpClient = await createMCPClient({
transport: transport,
onUncaughtError(error) {
console.error("Error in MCP client:", error);
throw error;
},
});
// Remove the "get-me" tool if it exists
const { "get-me": getMe, ...tools } = await mcpClient.tools();
return tools;
};
// Handle chat completion requests from a chat bot
export async function POST(req: Request) {
const { messages } = await req.json();
const mcpTools = await getTools(
(req.headers.get("Authorization") ?? "").replace("Bearer ", ""),
);
const result = streamText({
model: openai("gpt-4o"),
messages,
tools: { ...mcpTools }, // TODO add built-in tools
maxSteps: 20,
onError: (error) => {
console.error("Error in AI response:", error);
throw error;
},
});
return result.toDataStreamResponse();
}
A full example Next.js app is available on GitHub.
- util/tools.ts is a helper to fetch tools from Prismatic's MCP server.
- app/api/chat/route.ts is the API route that handles chat completions.
- app/ai-chat/page.tsx is the front-end chat UI.