Skip to main content

Connecting AI to Data

Every Fused Canvas can be turned into an MCP server in one click — giving AI coding tools like Claude Code direct access to your UDFs as callable tools. You can also embed an AI chat interface directly on the canvas using the ai-chat widget.

Connecting a Fused Canvas to Claude Code via MCP

Connect your canvas to Claude Code via MCP

Step 1: Copy the MCP command from your canvas

Open your canvas in Workbench, click Share, then Copy MCP. This copies a ready-to-run terminal command:

claude mcp add --transport http fused-your-canvas-name \
"https://udf.ai/fc_YOUR_CANVAS_TOKEN.mcp"

The command uses --transport http so Claude can authenticate with your canvas immediately.

Try a live example

The connecting_ai_agents_mcp canvas is already set up as a public example — run the command below to connect it and follow the steps:

claude mcp add --transport http fused-connecting_ai_agents_mcp \
"https://udf.ai/fc_5jBXLhLiXluY9yCtcHbOTV.mcp"

Step 2: Run the command in your terminal

Paste and run the command. Claude Code adds the MCP server to its config and responds with:

Added MCP server fused-your-canvas-name

Step 3: Ask Claude about your data

Claude can now discover and call all visible UDFs on your canvas as tools. Try:

"What UDFs do you have available?" "Run [your-udf-name] with [param]=value"

Only UDFs that are visible on the canvas are exposed through the MCP endpoint. Hide internal or helper UDFs in Workbench to keep the tool list focused on what agents should call directly.

Managing which UDFs are exposed

Use the visibility toggle on each UDF node in Workbench to control what Claude sees. Hidden UDFs still run when called by other UDFs — they just won't appear as MCP tools.

Works with any MCP-compatible client

The same MCP URL works with Cursor, VS Code (with MCP extensions), and any other tool that supports the Model Context Protocol — not just Claude Code.


Add an AI chat widget to your canvas

The ai-chat widget embeds a persistent chat interface directly on your canvas. It has access to all UDFs connected to the widget node and can answer questions, stream responses, and return structured data — no separate AI tool required.

Try a live example

Open the connecting_ai_agents_mcp canvas to see the ai-chat widget connected to a live UDF.

AI chat widget on a Fused Canvas
Login required

The ai-chat widget requires you to be logged in to fused.io. Unauthenticated viewers will see a login prompt.

How to add it

  1. Click the Widget icon in the canvas toolbar to add a new widget node
  2. In the widget JSON editor, click Presets and select ai-chat
  3. Connect the UDF nodes you want the chat to query by drawing edges from them to the widget node

The preset inserts this widget JSON:

{
"type": "ai-chat",
"props": {
"title": "Ask About UDFs",
"description": "Ask questions about the UDFs connected to this workspace",
"style": "height: 400px; border-radius: 8px;"
}
}

All props are optional. You can add a systemPromptExtra string to give the AI extra instructions specific to your data:

{
"type": "ai-chat",
"props": {
"title": "Ask About UDFs",
"description": "Ask questions about the UDFs connected to this workspace",
"style": "height: 400px; border-radius: 8px;",
"systemPromptExtra": "Always respond with row-level breakdowns. Format numbers with commas."
}
}

For full widget documentation including all available props and how to compose widgets, see Widgets.


See also