CFFBRWCFFBRWDocumentation
⚠Auto-generated documentation — This content was generated with AI assistance and is currently under review. Information may be incomplete or inaccurate. When in doubt, contact our support team.

MCP Integration Guide

Connect any API to your CFFBRW workflows using the Model Context Protocol (MCP).

What is MCP?

The Model Context Protocol (MCP) is an open protocol that lets AI applications connect to external tools and data sources. Instead of writing custom integration code for every API, you register an MCP server and CFFBRW discovers its tools automatically.

Think of MCP servers as universal adapters. One server, any workflow.

Why MCP + CFFBRW?

Traditional IntegrationMCP + CFFBRW
Write custom code per APIRegister an MCP server once
Update code when API changesUpdate the MCP server only
Tied to one platformWorks with any MCP-compatible tool
Integration code in your workflowClean markdown step references

Quick Start: Connect Your First MCP Server

1. Find or deploy an MCP server

You can:

  • Use an existing community MCP server (browse the MCP ecosystem)
  • Deploy your own using the MCP SDK (Python, TypeScript, or any language)

Popular community servers:

  • Slack — send messages, read channels
  • GitHub — manage repos, PRs, issues
  • Google Drive — read/write files
  • PostgreSQL — run queries

2. Register the MCP server

From your dashboard:

  1. Go to Settings → MCP Servers
  2. Click Add Server
  3. Enter:
    • Name: A friendly name (e.g., "My Slack Server")
    • URL: The server's HTTP endpoint
    • Headers: Any auth headers (e.g., Authorization: Bearer xoxb-...)
  4. Click Save

CFFBRW will immediately discover all tools exposed by the server.

3. Use MCP tools in your workflow

Reference MCP tools directly in your markdown steps:

### 5. Post to Slack
Use the "send_message" tool from the Slack MCP server to post the summary
from step 4 to the #daily-standup channel.

The AI compiler automatically:

  1. Discovers the MCP server's tool catalog
  2. Maps your prose description to the correct tool
  3. Generates the tool call with the right parameters
  4. Pipes the output to subsequent steps

4. Compile and run

Compile your workflow. The execution plan will include mcp_call step types with resolved tool references.

Building Your Own MCP Server

TypeScript Example

import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { StreamableHTTPServerTransport } from "@modelcontextprotocol/sdk/server/streamableHttp.js";
import express from "express";

const server = new McpServer({
  name: "my-custom-server",
  version: "1.0.0",
});

// Define a tool
server.tool(
  "search_database",
  "Search the database for records matching the query",
  {
    query: z.string().describe("The search query"),
    limit: z.number().optional().describe("Max results (default: 10)"),
  },
  async ({ query, limit = 10 }) => {
    const results = await db.search(query, limit);
    return {
      content: [{ type: "text", text: JSON.stringify(results) }],
    };
  },
);

// Start the HTTP server
const app = express();
app.post("/mcp", async (req, res) => {
  const transport = new StreamableHTTPServerTransport({
    sessionIdGenerator: undefined,
  });
  await server.connect(transport);
});

app.listen(3000);

Python Example

from mcp.server.fastmcp import FastMCP
import httpx

mcp = FastMCP("weather-server")

@mcp.tool()
async def get_weather(city: str) -> str:
    """Get current weather for a city."""
    async with httpx.AsyncClient() as client:
        resp = await client.get(
            f"https://api.weather.com/{city}"
        )
        return resp.json()["description"]

if __name__ == "__main__":
    mcp.run(transport="streamable-http")

Where to Deploy

Your MCP server must be publicly reachable. Some options:

  • Cloudflare Workers — deploy as a serverless Worker
  • Fly.io / Railway / Render — any container host
  • Your own server — as long as it's publicly accessible

How Tool Discovery Works

When you register an MCP server, CFFBRW:

  1. Connects to the server's endpoint
  2. Calls tools/list to discover all available tools
  3. Caches the tool catalog (name, description, parameters)
  4. Makes tools available to the AI compiler

The compiler matches your markdown descriptions to tool names using semantic similarity.

Security

Authentication

Always pass auth headers when registering MCP servers. CFFBRW stores headers securely and sends them with every tool call.

SSRF Protection

CFFBRW blocks MCP calls to:

  • Private IP ranges (10.x, 172.16.x, 192.168.x)
  • Cloud metadata endpoints
  • Localhost addresses

Tool Permissions

By default, all discovered tools are available to all workflows. To restrict:

  1. Go to Settings → MCP Servers → [your server] → Permissions
  2. Select which workflows can use this server
  3. Optionally restrict specific tools

Troubleshooting

SymptomCauseFix
"No MCP tools found"Server URL unreachableCheck the URL and server status
"Tool not found"Tool name mismatchBe more specific in your step description
"Authentication failed"Wrong/missing auth headersRe-register the server with correct credentials
"SSRF blocked"Private IP accessMCP servers must be publicly accessible

Resources