AI agent access (MCP)
The TypeScript SDK itself has no MCP code, and no MCP server package exists in this repository. The
SDK README points at an @flowcatalyst/mcp-server package run with npx; there is no such package
in the source tree and the SDK is not published to npm, so do not rely on that instruction. The MCP
server that exists is built into fcdev.
What the server offers
Section titled “What the server offers”The server gives an AI coding agent read-only access to the platform’s metadata: event types and
their JSON schemas, subscriptions, applications, roles and OpenAPI documents. It speaks the Model
Context Protocol over stdio, or over streamable HTTP. It is useful for a TypeScript developer
because an agent can read your event catalogue and generate typed code against it, for example a
CreateEventDto call whose data matches an event type’s schema.
Every tool issues GET requests to the platform API as the credentials it was started with, so it can
read only what those credentials may read. The tools, their arguments and the platform requests they
make are listed in MCP tools; the platform view is MCP server.
Run it
Section titled “Run it”Create a service account with read access to the metadata you want the agent to see, then register the server with your agent. For Claude Code:
claude mcp add flowcatalyst \ --env FLOWCATALYST_URL=https://platform.example.com \ --env FLOWCATALYST_CLIENT_ID=svc_abc123 \ --env FLOWCATALYST_CLIENT_SECRET=your_secret \ -- fcdev mcpFor editors that take a JSON config (Cursor, Windsurf, Claude Desktop):
{ "mcpServers": { "flowcatalyst": { "command": "fcdev", "args": ["mcp"], "env": { "FLOWCATALYST_URL": "https://platform.example.com", "FLOWCATALYST_CLIENT_ID": "svc_abc123", "FLOWCATALYST_CLIENT_SECRET": "your_secret" } } }}fcdev mcp uses stdio by default. --http 127.0.0.1:8090 listens for streamable HTTP at /mcp
instead (with /health), and fcdev start --mcp runs the HTTP server alongside a local platform.
The flags --platform-url, --client-id and --client-secret override the environment.
Configuration
Section titled “Configuration”| Source | Meaning |
|---|---|
FLOWCATALYST_URL |
Platform base URL (without /api). Defaults to http://localhost:8080. |
FLOWCATALYST_CLIENT_ID, FLOWCATALYST_CLIENT_SECRET |
OAuth client credentials. When both are set the server mints and caches tokens. With only a secret, it is sent as a static bearer token. With neither, calls are unauthenticated, which is only suitable for a local platform. |
mcp-credentials.json |
Fallback for any value the environment leaves unset: <user cache dir>/flowcatalyst-dev/mcp-credentials.json, or the path in FC_MCP_CREDENTIALS_PATH. fcdev writes this file for local development. |
See fcdev CLI for the full command and Install fcdev.
Using it with the SDK
Section titled “Using it with the SDK”The MCP server and the SDK are independent: the agent reads metadata through MCP, and your code uses the SDK. A typical loop is to ask the agent for an event type’s schema, then write the event with the SDK:
import { CreateEventDto } from '@flowcatalyst/sdk';
await outbox.createEvent( CreateEventDto.create('orders:fulfillment:order:created', { orderId: 'ord_1', total: 4200 }), tx,);The code must be fully qualified, as the agent’s list_event_types result shows. See
Client.
Testing
Section titled “Testing”There is nothing in the SDK to test. To check that an agent can reach the server, run fcdev mcp
with the environment above and call the whoami tool first: it reports the identity, scope, roles
and accessible clients and applications the credentials resolve to.