Using the Fabricate MCP server
The Fabricate Model Context Protocol (MCP) server allows AI clients to communicate directly with the Fabricate Data Agent.
AI clients can use the MCP connection to create databases, run workflows, and download data generation results. Account owners can also use the MCP connection to list users and groups, list API keys, track usage and cost, and get audit log information.
To use the MCP server, you must have a Fabricate account. If you do not already have an account, then for information on how to sign up for an account under the free license plan, go to Starting a Fabricate account.
To authenticate to the MCP server, you can use either:
OAuth — Recommended for interactive clients such as Claude and Cursor.
API key — Recommended for scripts or continuous integration (CI) that is not tied to a specific user.
Fabricate is both the OAuth 2.1 authorization server and the resource server for the MCP. Every request to the MCP carries either an API key or an OAuth access token in the Authorization header.
MCP server endpoint
The MCP server uses the MCP Streamable HTTP transport (JSON‑RPC 2.0).
The MCP server endpoint is:
POST https://<your-fabricate-host>/api/v1/mcpWhere <your-fabricate-host> is the location where the Fabricate instance is deployed.
On Fabricate Cloud, the host is fabricate.tonic.ai, so:
POST https://fabricate.tonic.ai/api/v1/mcpOn a self-hosted instance, the host is the value of FABRICATE_HOST.
Setting up the connection to your AI client
The following information explains how to use OAuth to connect common AI clients to Fabricate. OAuth is the recommended authentication method for interactive clients.
The examples use the Fabricate Cloud endpoint - https://fabricate.tonic.ai/api/v1/mcp. On a self-hosted instance, replace fabricate.tonic.ai with the value of FABRICATE_HOST.
When you first connect, Fabricate prompts you in your browser to sign in and approve access. For information on how to complete this step:
If you use OAuth, go to Completing the OAuth authentication.
To instead use an API key, go to API key authentication.
Claude Code
To add the Fabricate MCP server to Claude Code:
Run:
claude mcp add --transport http fabricate https://fabricate.tonic.ai/api/v1/mcpIn Claude Code, run
/mcp.Follow the browser prompts to sign in to Fabricate and approve access.
Claude
On a Team or Enterprise plan, an owner must first add the connector under Organization settings > Connectors. Other users can then connect to it from Customize > Connectors.
To add Fabricate as a custom connector in Claude:
Go to Customize > Connectors.
Click + Add, then click Add custom connector.
Enter the name
Fabricate.Paste the server URL
https://fabricate.tonic.ai/api/v1/mcp, then click Continue.Review the authentication settings that Claude detects.
Click Continue, then click Add.
When prompted, sign in to Fabricate and approve access.
To use the connector in a chat:
Click + at the lower left of the chat.
Click Connectors.
Turn on the Fabricate connector.
Cursor
Connecting the Fabricate MCP server to Cursor
To add the Fabricate MCP server to Cursor for all projects, add it to ~/.cursor/mcp.json.
To instead add the Fabricate MCP server to a specific project, in that project, use .cursor/mcp.json.
In the file, under mcpServers, add the fabricate server:
Connecting to the fabricate server
After you save the file:
From Cursor's MCP settings, connect to the
fabricateserver.In your browser, sign in to Fabricate.
Using mcp-remote instead of OAuth
If your version of Cursor does not support OAuth for remote servers, use mcp-remote instead. In that case, the fabricate entry looks like this:
For more information, go to Configuring remote authentication from your AI client.
VS Code
To connect to the Fabricate MCP server from VS Code, use one of the following options.
Run MCP: Add Server
To add the Fabricate MCP server:
From the Command Palette, run
MCP: Add Server.Select HTTP.
Enter
https://fabricate.tonic.ai/api/v1/mcp.Follow the prompts.
Add the server to your workspace
To add the Fabricate MCP server to your workspace, edit .vscode/mcp.json to add the fabricate server.
When VS Code connects to the server, in your browser, Fabricate prompts you to sign in and approve access.
Add the server to your user profile
To add the Fabricate MCP server to your user profile:
Run
MCP: Open User Configuration.Edit
mcp.jsonto add thefabricateserver:
When VS Code connects to the server, in your browser, Fabricate prompts you to sign in and approve access.
OAuth authentication
Configuring remote authentication from your AI client
If your AI client does not support remote authorized servers, then in your AI client settings file, add an mcp-remote entry for Fabricate.
For example:
Completing the OAuth authentication
When you first connect to the MCP server:
In your browser, Fabricate prompts you to authorize access.
If needed, sign in to Fabricate.
Confirm the account.
Review the permissions to grant.
Approve the access.
Your AI client stores the resulting token and uses it to connect to Fabricate.
For each subsequent request, Fabricate verifies that the token is still valid for the account.
OAuth token scopes
OAuth tokens carry scopes that limit the available actions that can be performed. They cannot expand the existing permissions for your Fabricate account, but they can add limits.
Default scopes
The following scopes are requested by default, if the request does not specify any scopes.
fabricate:mcp:read
Read:
Data generation runs
Status values
Chat transcripts
Generated artifacts
Workflows
Lists
fabricate:mcp:project:edit
Perform any change within a project, including:
Start and continue generation
Revert changes
Run workflows
Cancel generation
Upload files
fabricate:mcp:project:create
Create projects, including the implicit project that is created automatically when you start a conversation.
Elevated scopes
Because these scopes enable destructive actions, you must specifically enable them during authentication. They are included in the list of permissions to review.
fabricate:mcp:project:delete
Delete a project and its data.
fabricate:mcp:workspace:create
Create workspaces.
fabricate:mcp:workspace:delete
Delete a workspace and everything in it.
API key authentication
When you use a Fabricate API key for authentication, the permissions are based on the API key. For example, if an API key is limited to specific workspaces, then you can only use the MCP server to perform actions within those workspaces.
To use API key authentication:
Pass in the API as a bearer token:
Workflow for the MCP connection
After you complete the authentication, a typical workflow is as follows:
start_conversation- Starts a new Agent chat. You provide a plain‑English instruction for the Agent. Returns aconversation_idimmediately. By default, requests to the MCP server use Autonomous mode. You can optionally provide amode(autonomous,agent,plan) to set the mode for the Agent to use.get_conversation_status- If the status isrunning, polls until a terminalstatus(completed,failed,cancelled) is reached.get_conversation_result- Reads the agent's summary, generated databases, and generated files.download_conversation_file- Gets a download URL for an exported file.
If you do not provide a project_id/workspace_name, start_conversation runs in the first workspace you can edit and creates a project automatically.
Here is an example of a call to start a new conversation:
Last updated
Was this helpful?