Skip to content

Connect FlowMate to Claude: Orchestrate Templates and User Access

Learn how to connect FlowMate to Claude using a managed MCP server. This technical guide covers orchestration workflows, template management, and API access control.

Riya Sethi Riya Sethi · · 9 min read
Connect FlowMate to Claude: Orchestrate Templates and User Access

If you need to connect FlowMate to Claude to automate template orchestration, manage tenant access, or monitor execution logs, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's tool calls and FlowMate's REST APIs. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL. If your team uses ChatGPT, check out our guide on connecting FlowMate to ChatGPT or explore our broader architectural overview on connecting FlowMate to AI Agents.

Giving a Large Language Model (LLM) read and write access to an automation platform like FlowMate is a complex engineering challenge. You have to handle multi-tenant isolation, map massive JSON schemas for workflow templates to MCP tool definitions, and deal with strict pagination formats. Every time the upstream API updates an endpoint or deprecates a field, you have to update your server code, redeploy, and test the integration.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for FlowMate, connect it natively to Claude Desktop, and execute complex orchestration workflows using natural language.

The Engineering Reality of the FlowMate API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against an orchestration API like FlowMate is painful.

If you decide to build a custom MCP server for FlowMate, you own the entire API lifecycle. Here are the specific challenges you will face:

The Multi-Tenant State Machine FlowMate relies heavily on tenant-scoped architecture. Querying execution reporting (list_all_flow_mate_reporting) or fetching error logs (list_all_flow_mate_log) requires strict tenant context mapping. If you expose these raw parameters to Claude without normalized schemas, the model will frequently hallucinate tenant IDs or misunderstand how to correlate a failed execution with a specific user. Your custom MCP server has to explicitly map these relationships so the LLM can navigate the tenant hierarchy predictably.

Complex DAG Payloads and Graph Structures FlowMate uses a graph property to define the logic inside a flow or flow template. This property is not a simple string; it is a complex JSON object representing a Directed Acyclic Graph (DAG) of automation nodes. LLMs struggle to generate perfectly structured DAGs from scratch. If the schema is missing required keys or malformed, the API rejects the request. A robust MCP server must automatically extract and inject the correct JSON schema for this graph property directly into the tool definition so Claude knows exactly how to format its payload.

Rate Limits and Polling Behavior FlowMate workflows are asynchronous state machines. Starting a flow is instantaneous, but determining its success requires polling execution endpoints. Note: When FlowMate rate limits an endpoint (HTTP 429), Truto does not retry, throttle, or apply backoff. Instead, Truto passes that 429 error directly to the caller, while normalizing the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) following the IETF spec. Your AI agent or custom MCP client is strictly responsible for interpreting these headers and executing its own exponential backoff strategy.

Instead of building this infrastructure from scratch, you can use Truto to handle the boilerplate. Truto derives tool definitions dynamically from FlowMate's API documentation, exposing endpoints as ready-to-use MCP tools.

How to Generate the FlowMate MCP Server

Truto dynamically generates MCP tools based on the existing documentation and schemas of the FlowMate integration. Each MCP server is scoped to a single integrated account (a connected instance of FlowMate for a specific tenant) and authenticated via a secure token URL.

There are two ways to generate a FlowMate MCP server using Truto: via the UI or programmatically via the API.

Method 1: Via the Truto UI

If you prefer a visual interface, you can generate the server directly from the Truto dashboard.

  1. Navigate to the Integrated Accounts page in your Truto environment and select your connected FlowMate account.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Configure your server: Provide a descriptive name, select allowed methods (e.g., read, write), and optionally add tool tags to restrict access to specific resources.
  5. Click Create and immediately copy the generated MCP server URL (e.g., https://api.truto.one/mcp/abc123def456...).

Method 2: Via the Truto API

For teams embedding this functionality into their own products, you can generate MCP servers programmatically. This endpoint validates that the FlowMate integration is "AI-ready" (has documented tools), creates a secure token, and returns a ready-to-use URL.

curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "FlowMate Orchestrator MCP",
    "config": {
      "methods": ["read", "write"],
      "tags": ["flows", "users", "templates"]
    },
    "expires_at": "2026-12-31T23:59:59Z"
  }'

The response will contain the url property, which acts as the self-contained endpoint for Claude.

How to Connect the MCP Server to Claude

Once you have the Truto MCP server URL, you must register it with Claude so the model can discover and execute the FlowMate tools.

Method A: Via the Claude UI (Custom Connectors)

If you are using Claude Desktop (or ChatGPT's web interface with MCP support enabled):

  1. Open Claude Desktop.
  2. Navigate to Settings -> Integrations (or Connectors depending on the application version).
  3. Click Add MCP Server or Add Custom Connector.
  4. Paste the Truto MCP URL generated in the previous step.
  5. Click Save. Claude will automatically initialize the connection, fetch the tools/list, and load the FlowMate operations.

Method B: Via the Manual Configuration File

If you manage Claude Desktop deployments via configuration files, you can add the server to your claude_desktop_config.json. Since Truto's MCP servers communicate over standard Server-Sent Events (SSE) or HTTP POST depending on the transport layer, you invoke it via the @modelcontextprotocol/server-sse runner or point directly to the URL.

{
  "mcpServers": {
    "flowmate": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/abc123def456..."
      ]
    }
  }
}

Restart Claude Desktop. The model now has real-time access to FlowMate.

Security and Access Control

Exposing an automation orchestration layer to an LLM introduces severe security implications. If an agent hallucinates a delete_a_flow_mate_user_by_id command against a production environment, the damage is immediate. Truto enforces strict access controls at the MCP token level:

  • Method Filtering (config.methods): You can restrict an MCP server to specific CRUD operations. Passing ["read"] limits the server to get and list methods, physically preventing the LLM from executing destructive actions.
  • Tag Filtering (config.tags): You can scope tools by functional area. By passing ["reporting"], the server will only expose tools related to logs and execution metrics, hiding user administration tools entirely.
  • Secondary Authentication (require_api_token_auth): By default, possessing the MCP URL grants access. By setting this flag to true, the MCP client must also pass a valid Truto API token in the Authorization header. This ensures that even if the URL leaks in a log file, unauthorized users cannot execute tools.
  • Automatic Expiry (expires_at): You can issue ephemeral MCP servers for contractor access or temporary AI agent sessions. Once the ISO datetime is reached, the token is permanently purged from the database and edge KV storage.

FlowMate Hero Tools for Claude

When the MCP server initializes, Truto flattens the query and body schemas into a single argument namespace for the LLM. Here are the highest-leverage tools available for FlowMate.

List All FlowMate Flows

Tool Name: list_all_flow_mate_flow

This tool retrieves the master inventory of workflows within the connected tenant, returning ID, name, status, and timestamps. It is the primary discovery mechanism for the LLM before executing state changes.

"Claude, list all active flows in FlowMate. Filter the list to only show flows that have 'production' in the name and return their exact IDs."

Start a FlowMate Flow

Tool Name: flow_mate_flow_start

Triggers the execution of a specific workflow. The LLM must pass the flow_id. The API responds with the new status (e.g., 'running') and metadata.

"Start the 'Nightly Data Sync' flow using the ID you just retrieved. Confirm when the status changes to running."

List All FlowMate Logs

Tool Name: list_all_flow_mate_log

Essential for debugging, this tool fetches system and execution logs for a specific tenant. It supports filtering by flow, step, or an error-only mode, allowing Claude to diagnose pipeline failures autonomously.

"Pull the error logs for tenant ID 't-8849' over the last 2 hours. Summarize any HTTP 500 errors or timeout exceptions you find in the log output."

Create a FlowMate Flow Template

Tool Name: create_a_flow_mate_flow_template

Allows the agent to programmatically generate reusable automation logic. The LLM must provide the name, type, and the complex graph object representing the DAG.

"Create a new FlowMate template called 'Standard Employee Onboarding'. Generate the graph JSON to include a trigger for 'User Created' followed by an email notification step."

Create a FlowMate User

Tool Name: create_a_flow_mate_user

Provisions a new user in the FlowMate environment. Returns the created user record including roles, tenant mappings, and confirmation status. Requires username, firstname, and lastname.

"Provision a new FlowMate user for 'Jane Doe' with the username 'jdoe@company.com'. Ensure they are mapped to the primary tenant ID."

List All FlowMate Reporting

Tool Name: list_all_flow_mate_reporting

Retrieves execution metrics and analytics grouped by timeframe, user, or tenant. Useful for building capacity reports or tracking workflow usage over time.

"Fetch the FlowMate execution reporting for the current month grouped by tenant. Tell me which tenant has the highest number of flow executions."

Trigger a FlowMate Webhook

Tool Name: create_a_flow_mate_webhook

Sends a JSON payload directly into a FlowMate incoming webhook (routed via webhook_id). This allows the agent to inject external context into a running workflow.

"Send a webhook payload to flow ID 'webhook-992' containing the alert data we just received from Datadog."

For a complete list of all available FlowMate operations, schemas, and return types, view the full inventory on the FlowMate integration page.

Workflows in Action

When connected via MCP, Claude stops functioning as a simple text generator and becomes an autonomous orchestration engineer. Here are real-world examples of how DevOps admins and AI agents execute multi-step workflows using FlowMate.

Scenario 1: Autonomous Workflow Remediation

An IT administrator notices that automated reporting didn't arrive this morning. Instead of logging into the FlowMate dashboard, navigating to the logs, finding the flow, and clicking restart, they delegate the entire diagnostic process to Claude.

"The daily financial sync flow failed last night. Find the flow, check the error logs to see what happened, and if it was just a timeout, restart the flow immediately."

Execution Steps:

  1. Claude calls list_all_flow_mate_flow to search for a flow matching "financial sync" and retrieves flow_id: "f-1049"" and tenant_id: "t-01"`.
  2. Claude calls list_all_flow_mate_log passing tenant: "t-01", flow: "f-1049", and filtering for errors. It parses the JSON array and identifies an "Upstream API Timeout" at 03:00 AM.
  3. Claude determines the failure is transient based on the timeout message.
  4. Claude calls flow_mate_flow_start using flow_id: "f-1049" to execute the workflow again.
  5. Claude responds to the user: "The financial sync failed due to an upstream API timeout at 3:00 AM. I have restarted the flow successfully (Status: running)."
sequenceDiagram
    participant Admin as IT Admin
    participant Claude as Claude Desktop
    participant Truto as Truto MCP
    participant FlowMate as FlowMate API
    Admin->>Claude: "Fix the financial sync flow"
    Claude->>Truto: call_tool("list_all_flow_mate_flow")
    Truto->>FlowMate: GET /flows
    FlowMate-->>Truto: [{ id: "f-1049", name: "Financial Sync" }]
    Truto-->>Claude: JSON Output
    Claude->>Truto: call_tool("list_all_flow_mate_log", { tenant: "t-01", flow: "f-1049" })
    Truto->>FlowMate: GET /logs?tenant=t-01&flow=f-1049&errorOnly=true
    FlowMate-->>Truto: [{ error: "Timeout" }]
    Truto-->>Claude: JSON Output
    Claude->>Truto: call_tool("flow_mate_flow_start", { flow_id: "f-1049" })
    Truto->>FlowMate: POST /flows/f-1049/start
    FlowMate-->>Truto: { status: "running" }
    Truto-->>Claude: Success
    Claude-->>Admin: "Flow restarted successfully."

Scenario 2: Tenant Provisioning and Template Deployment

A SaaS platform using FlowMate as an embedded orchestration engine needs to onboard a new enterprise customer. The DevOps team uses Claude to provision the user environment and deploy standard templates.

"We just signed Acme Corp. Provision a new user for 'Alice Smith' (asmith@acme.com) in FlowMate. Then, list our available flow templates and create a new flow for her tenant based on the 'Standard Enterprise Data Pipeline' template."

Execution Steps:

  1. Claude calls create_a_flow_mate_user with firstname: "Alice", lastname: "Smith", and username: "asmith@acme.com". It captures the returned user ID and tenant mapping.
  2. Claude calls list_all_flow_mate_flow_template to scan the organization's template library.
  3. It finds the 'Standard Enterprise Data Pipeline' and extracts its template_id and the underlying graph schema.
  4. Claude calls create_a_flow_mate_flow_template (or the underlying creation endpoint for the specific tenant) injecting the newly created user's context.
  5. Claude reports back: "Alice Smith has been provisioned. The Standard Enterprise Data Pipeline has been deployed to her tenant environment."

The Strategic Value of Managed MCP Servers

By connecting FlowMate to Claude via a managed MCP server, you eliminate the friction of navigating graphical interfaces for complex orchestration tasks. You are replacing point-and-click operations with deterministic, API-driven conversations.

Building this integration layer yourself requires writing custom pagination logic, managing complex graph JSON injection, mapping API rate limits, and securing tenant scopes. Using a unified platform like Truto means your agents interact natively with FlowMate's exact schema while offloading the infrastructure burden.

FAQ

How does Truto handle FlowMate API rate limits for AI agents?
When FlowMate returns an HTTP 429 rate limit error, Truto passes that error directly to the caller and normalizes the rate limit headers (limit, remaining, reset). Truto does not absorb or retry requests automatically; your AI agent must handle exponential backoff.
Can I prevent Claude from deleting users in FlowMate?
Yes. When creating the Truto MCP server, you can use method filtering (e.g., config.methods: ['read']) to restrict the LLM exclusively to GET and LIST operations, blocking destructive actions.
How do I secure the MCP server URL from unauthorized use?
By setting the 'require_api_token_auth' flag to true during MCP server creation, Truto forces any client connecting to the URL to also supply a valid Truto API token in the Authorization header.
Do I need to write custom code to map FlowMate's graph property for templates?
No. Truto dynamically extracts the expected query and body schemas from FlowMate's documentation and provides them to Claude, giving the LLM the exact JSON structure required for the graph payload.

More from our Blog