MCP Server & Connectors
FactoryThread ships a first-party MCP server — a single HTTP endpoint that lets AI agent hosts (claude.ai, Claude Code, ChatGPT, Claude Desktop, Cursor, and any other MCP-capable client) work inside your Workspace. Once connected, an agent can discover your Flows and run the published ones on your behalf, all through the same permissions you already have in the app.
You manage it from Settings → MCP server.
What is MCP?
The Model Context Protocol (MCP) is an open standard for connecting AI assistants to external tools and data. FactoryThread exposes its capabilities as an MCP server, so any host that speaks MCP can:
- List and search the Flows in a Workspace (
list_flows) - Read a Flow's execution contract — its inputs, outputs, and whether it writes back to a
source system (
get_flow) - Run a published Flow and page through the results (
run_flow,get_run) - Draft or edit a Flow through the Assistant, which a person then reviews before publishing
(
draft_flow,publish_flow)
Flows are executable resources, not raw data. An agent runs a published Flow and receives its bounded output — there is no raw row read. Data only ever leaves FactoryThread as the result of a Flow you published.
The server URL
Every instance has one MCP endpoint, shown at the top of the MCP server settings page with a copy button:
https://app.factorythread.com/api/mcp
The endpoint speaks Streamable HTTP and authenticates with OAuth. On a self-hosted
instance the address is <PUBLIC_URL>/api/mcp — your own public URL followed by /api/mcp.
If the settings page says the MCP server is not enabled, an administrator needs to set the
PUBLIC_URL environment variable on the backend to the instance's public address and restart it.
The server mounts at <PUBLIC_URL>/api/mcp only when PUBLIC_URL is set.
How connecting works
When you connect a host to the server URL, the host opens a browser sign-in through your identity provider. After you approve it, the agent works as you: the same Workspaces, Flows, and permissions you have in the app — nothing more.
- Agents discover Flows at runtime — there are no per-Flow tools to configure.
- Agents run only published Flows (the same Play-button path a person uses).
- Authoring goes through the Assistant. An agent can draft a Flow, but a person reviews the draft in the editor and publishing is always an explicit, human step.
Connect a host
The settings page groups the setup instructions into tabs so you can pick your host. All of them point at the same server URL.
claude.ai (web & desktop)
- In Claude, go to Settings → Connectors.
- Click Add custom connector.
- Paste the server URL:
https://app.factorythread.com/api/mcp - Complete the browser sign-in when prompted.
Claude Code (CLI)
- Run this command in your terminal to register the server:
claude mcp add --transport http factorythread https://app.factorythread.com/api/mcp - Run
/mcpinside Claude Code. - Complete the OAuth sign-in when prompted.
ChatGPT
- In ChatGPT, enable Settings → Plugins → Advanced → Developer mode.
- Back in Settings → Plugins, choose Add plugin.
- Paste the server URL:
https://app.factorythread.com/api/mcp - Sign in through your browser when prompted.
ChatGPT plugins require a paid plan with Developer mode enabled.
Other hosts (Claude Desktop, project config, stdio-only clients)
Hosts that read an .mcp.json config (Claude Desktop, Claude Code project scope, and many
others):
- Open the host's MCP config file (for example
.mcp.json). - Add the entry below, then restart the host:
{
"mcpServers": {
"factorythread": {
"type": "http",
"url": "https://app.factorythread.com/api/mcp"
}
}
} - Complete the browser sign-in when prompted.
Hosts that can only speak stdio — run a local bridge that forwards to the server over HTTP and handles the sign-in:
npx -y mcp-remote https://app.factorythread.com/api/mcp
Unattended automation with an API key
The OAuth flow is for interactive use, where the agent acts as a signed-in person. For scripts and automation that run without a person, use a Workspace API key instead.
- Create a new key under Settings → API Keys with Allow MCP access enabled. Existing keys have no MCP access — you must mint a new one.
- Authenticate with a bearer header on every request:
Authorization: Bearer ft_…
An API-key principal is Flow execution only and sees a reduced tool set —
list_flows, get_flow, run_flow, and get_run. It cannot draft or publish Flows.
A read-only API key hides and refuses Flows that write back to source systems. Give a key write access only when the automation genuinely needs to run write-back Flows.
For Flows that write to a source system, pass an idempotency key when retrying so a retried run doesn't apply the same write twice.
What an agent can and can't do
| Capability | OAuth (signed-in user) | API key |
|---|---|---|
| List & search Flows | ✅ | ✅ |
| Read a Flow's contract | ✅ | ✅ |
| Run a published Flow | ✅ | ✅ |
| Run a draft Flow | ❌ (never — only published) | ❌ |
| Draft / edit a Flow via the Assistant | ✅ | ❌ |
| Publish a Flow | ✅ (explicit, human-reviewed) | ❌ |
| Read raw source rows | ❌ (Flow output only) | ❌ |
Whatever the principal, the agent is bounded by the same Workspace and permission model you have in the app.
Security notes
- Least privilege. An OAuth session inherits exactly your permissions — no elevation. Prefer a scoped, read-only API key for automation that only needs to run non-writing Flows.
- Published-only execution. Drafts are never executed over MCP, so in-progress authoring can't be triggered by an agent.
- Human in the loop for authoring.
draft_flowproduces a draft; a person reviews it in the editor andpublish_flowis a separate, deliberate step. - No raw data egress. Data leaves only as the bounded output of a published Flow.
Troubleshooting
The MCP server isn't listed / the page says it's disabled
PUBLIC_URL is not set on the backend. Ask an administrator to set it to the instance's public
address and restart the backend. The endpoint mounts at <PUBLIC_URL>/api/mcp.
Sign-in fails or the host can't connect
- Confirm you pasted the full URL including
/api/mcp. - Make sure the host supports Streamable HTTP. If it only speaks stdio, use the
npx -y mcp-remote …bridge instead. - Check that your account can sign in to the app normally — MCP uses the same identity provider.
An API-key agent can't see or run a Flow
- The key needs Allow MCP access — older keys don't have it, so create a new one.
- A read-only key deliberately hides Flows that write back to source systems. Use a key with the right access, or run the Flow interactively.
- Only published Flows are runnable. Publish the Flow first.
Next Steps
- API Keys — mint a key with MCP access for unattended automation
- Settings Overview — other Workspace settings
- Assistant — how Flow authoring works when an agent drafts a Flow