MCP server
The MCP server gives LLM clients and coding agents read-only access to a platform’s metadata through the Model Context Protocol: its event types and their JSON schemas, subscriptions, applications, roles and OpenAPI documents. An agent can browse the event catalogue and generate typed code from the schemas without being given access to events, payloads or anything it could change.
It is the internal/mcp package, built on the official MCP Go SDK, which handles the handshake,
capability negotiation and both transports. FlowCatalyst supplies the tool and resource catalogue
and the calls to the platform API.
How it works
Section titled “How it works”flowchart LR A["Agent or LLM client"] -->|"MCP: stdio or streamable HTTP"| M["MCP server"] M -->|"client_credentials token"| T["/oauth/token"] M -->|"GET /api/... with bearer"| API["Platform API"]
The MCP server holds no data and no database connection. Every tool is a GET against the
platform’s public API, made with an access token minted from its own OAuth client. What an agent can
see is therefore exactly what that client’s roles allow, enforced by the API’s ordinary permission
checks; the MCP layer adds no authority of its own.
What it exposes
Section titled “What it exposes”Twelve tools, all read-only and returning JSON:
| Tool | What it returns |
|---|---|
whoami |
The calling identity, its scope and the clients and applications it can reach. The server’s instructions tell agents to start here |
list_my_applications |
The applications the caller can act on |
list_event_types, get_event_type |
Event types, filterable by status, application, subdomain and aggregate |
get_schema |
One event type’s JSON schema |
list_subscriptions, get_subscription |
Subscriptions |
list_applications |
Applications |
list_roles, get_role |
Roles |
get_openapi |
The platform’s or an application’s OpenAPI document |
get_application_capabilities |
An application’s API surface and its current event types, in one bundle |
The same data is offered as resources: flowcatalyst://event-types, ://subscriptions,
://roles, ://applications and ://openapi/platform, plus templates such as
flowcatalyst://event-types/{id} and flowcatalyst://openapi/{applicationCode}. Arguments and
results are in the MCP tools reference.
Running it
Section titled “Running it”| Where | How | Transport |
|---|---|---|
In fc-server |
FC_MCP_ENABLED=true |
Streamable HTTP at /mcp on FC_MCP_BIND:FC_MCP_PORT (default 127.0.0.1:8090), with /health |
| Beside fcdev | fcdev start --mcp |
The same, on the local instance |
| As a subprocess of an agent | fcdev mcp |
stdio (stdout carries JSON-RPC; logs go to stderr) |
| As a listener from the CLI | fcdev mcp --http 127.0.0.1:8090 |
Streamable HTTP |
The listener binds to localhost by default. It is an agent-facing surface, not a public API;
set FC_MCP_BIND=0.0.0.0 only when it must be reachable from outside the host (for example in a
container), and then put something that authenticates callers in front of it, because the MCP
endpoint itself does not authenticate its caller: it acts with its own credential for whoever
connects.
Credentials
Section titled “Credentials”The server resolves its platform URL and credentials in this order:
FLOWCATALYST_URL(infc-serveralsoFC_MCP_PLATFORM_URL),FLOWCATALYST_CLIENT_ID,FLOWCATALYST_CLIENT_SECRET;fcdev mcpalso takes--platform-url,--client-idand--client-secret.- The credentials file fcdev writes,
<user cache dir>/flowcatalyst-dev/mcp-credentials.json, orFC_MCP_CREDENTIALS_PATH. - The local default,
http://localhost:8080with no credentials (infc-server, its own API listener).
With a client id and secret it mints and refreshes a client_credentials token; with a secret alone
it sends that as a static bearer; with neither it calls the API anonymously, which a real platform
refuses.
Give a deployed MCP server a dedicated service account with only the roles its agents need. The
built-in role platform:ai-agent-readonly grants reading event types and subscriptions. The
list_applications, list_roles, get_role and OpenAPI tools need the matching read permissions as
well; without them those tools answer with the API’s 403.
Under fcdev the bootstrap creates a local MCP client holding platform:super-admin, so every tool
works against the development instance without setup. That convenience is local only.
Why read-only
Section titled “Why read-only”An agent driving the platform through MCP sees whatever the platform returns, and a prompt can steer
it. Limiting the server to GET requests and to a dedicated, narrowly-scoped credential keeps the
blast radius to “an agent read metadata it was allowed to read”: no event payloads, no dispatch jobs,
no secrets, and nothing it can create, change or delete. Changes go through the API, the console or
code-first sync, where they are authorized per caller and audited.
Agents and the SDK documentation
Section titled “Agents and the SDK documentation”The TypeScript and Laravel SDK READMEs describe connecting a coding agent to the platform’s MCP
server so it can generate types from event schemas. Point the agent at a running server: the
streamable-HTTP endpoint of fc-server or fcdev start --mcp, or fcdev mcp as a stdio subprocess.
Read next
Section titled “Read next”- MCP tools reference.
- Principals and permissions and roles: scoping the MCP server’s service account.
- fcdev and fc-server and subsystems.