Skip to main content
Glama

Flowise chatflows are exposed as LLM tools through mcp-flowise

mcp-flowise

mcp-flowise is a Python package implementing a Model Context Protocol (MCP) server that integrates with the Flowise API. It lists permitted chatflows, creates predictions, and can register one tool per permitted chatflow. Assistant tool execution is not implemented.

It supports two operation modes:

  • LowLevel Mode (FLOWISE_SIMPLE_MODE=false): Registers one tool for each permitted chatflow returned by the Flowise API.

  • FastMCP Mode (default): Exposes static list_chatflows and create_prediction tools.

Both modes refuse to start until you grant at least one chatflow ID.


Features

  • Dynamic tool exposure: LowLevel mode creates a tool for each permitted discovered chatflow.

  • Simpler configuration: FastMCP mode exposes two static tools.

  • Fail-closed authorization: An ID allowlist or one pinned chatflow ID grants access. Name filters only narrow that grant. Denylists always win.

  • MCP integration: Speaks MCP over stdio.


Related MCP server: n8n-MCP

Installation

Prerequisites

  • Linux

  • Python 3.13 or newer

  • uv

Recorded acceptance for 0.1.3 is Linux with Python 3.13. Windows, other interpreters, and container images are not part of that acceptance.

Running from a local checkout

uv sync --frozen
uv run --frozen mcp-flowise

Copy .env.example to an untracked .env and set a permitted chatflow ID before starting the server. uv sync --frozen installs the locked dependency set. The default mode is FastMCP. Set FLOWISE_SIMPLE_MODE=false for LowLevel mode.

You can also run a checkout of this repository without installing it into the environment:

uvx --from git+https://github.com/matthewhand/mcp-flowise mcp-flowise

Smithery

Smithery-hosted install links and the Smithery CLI changed on 31 October 2026. Use the uvx command above, or a local uv sync --frozen checkout, instead of a hosted Smithery install.

smithery.yaml still describes the stdio command and the required flowiseApiKey and flowiseWhitelistId settings for clients that read it directly.

MCP client configuration

{
    "mcpServers": {
        "mcp-flowise": {
            "command": "uvx",
            "args": [
                "--from",
                "git+https://github.com/matthewhand/mcp-flowise",
                "mcp-flowise"
            ],
            "env": {
                "FLOWISE_API_KEY": "your-api-key-goes-here",
                "FLOWISE_API_ENDPOINT": "http://localhost:3000",
                "FLOWISE_WHITELIST_ID": "authorized-flow-id"
            }
        }
    }
}

Replace the placeholders with your own endpoint and an ID you have chosen to permit. Keep the API key in the MCP client's secret store. Do not commit it.

A second example that pins one allowlisted flow:

{
    "mcpServers": {
        "mcp-flowise": {
            "command": "uvx",
            "args": [
                "--from",
                "git+https://github.com/matthewhand/mcp-flowise",
                "mcp-flowise"
            ],
            "env": {
                "FLOWISE_API_ENDPOINT": "http://localhost:3000",
                "FLOWISE_WHITELIST_ID": "authorized-flow-id",
                "FLOWISE_CHATFLOW_ID": "authorized-flow-id",
                "FLOWISE_SIMPLE_MODE": "false"
            }
        }
    }
}

Modes of operation

1. FastMCP mode

FLOWISE_SIMPLE_MODE=true is the default. This mode exposes list_chatflows and create_prediction. FLOWISE_CHATFLOW_ID pins one permitted target. FLOWISE_ASSISTANT_ID is rejected at startup.

2. LowLevel mode

Set FLOWISE_SIMPLE_MODE=false, 0, or no.

Permitted discovered chatflows become separate tools. Tool names are normalized from chatflow names. FLOWISE_CHATFLOW_DESCRIPTIONS can replace a name with chatflow_id:description. A pinned FLOWISE_CHATFLOW_ID still applies and cannot be overridden by a caller.


Windows

Native Windows execution is not part of the recorded 0.1.3 acceptance. If you try uvx there, prefer a local checkout and full paths to uvx.exe. Treat that arrangement as unverified.


Environment variables

The process environment wins over .env. python-dotenv does not override variables that are already set.

General

  • FLOWISE_API_KEY: Bearer token. Required when Flowise authentication is enabled. Leave it empty for an unauthenticated local Flowise.

  • FLOWISE_API_ENDPOINT: Origin of the Flowise API. Default: http://localhost:3000. No userinfo, path, query, or fragment.

  • FLOWISE_SIMPLE_MODE: true (default) for FastMCP. false, 0, or no for LowLevel.

  • FLOWISE_WHITELIST_ID: Comma-separated chatflow IDs that are allowed to run.

  • FLOWISE_CHATFLOW_ID: Pins one chatflow ID in both modes. It must belong to the allowlist when an allowlist is also set. An empty value is unset.

  • FLOWISE_TRUSTED_ORIGINS: Comma-separated non-loopback HTTPS origins. Loopback does not need an entry.

  • FLOWISE_TOTAL_DEADLINE: Seconds allowed for one Flowise HTTP operation. Default: 60.

  • FLOWISE_HTTP_TIMEOUT: Per-request HTTP timeout in seconds. Default: 30.

  • FLOWISE_LOGFILE_PATH: Optional rotating log file. Diagnostics otherwise go to stderr. Standard output is reserved for MCP.

  • MCP_SERVER_NAME: Advertised server name. Default: mcp-flowise.

  • TOOL_NAME_PREFIX: Optional prefix for generated tool names. Letters, digits, _, and - only.

  • TOOL_NAME_MAX_LENGTH: Generated name limit from 16 to 64. Default: 64.

  • DEBUG: true, 1, or yes for debug logging.

  • FLOWISE_ASSISTANT_ID: Unsupported. Any nonempty value prevents startup.

Filters

  • FLOWISE_BLACKLIST_ID: IDs that are always denied.

  • FLOWISE_WHITELIST_NAME_REGEX: Name pattern that further restricts permitted IDs. It never grants access by itself.

  • FLOWISE_BLACKLIST_NAME_REGEX: Drops permitted chatflows whose names match.

  • FLOWISE_CHATFLOW_DESCRIPTIONS: id:description pairs separated by commas, used in LowLevel mode.

  • FLOWISE_CHATFLOW_WHITELIST and FLOWISE_CHATFLOW_BLACKLIST: Legacy aliases. The whitelist alias must not conflict with FLOWISE_WHITELIST_ID.


Security architecture and operational boundaries

The configured origin is checked independently of each request URL. Loopback HTTP is accepted. Every other origin must be listed in FLOWISE_TRUSTED_ORIGINS and use HTTPS.

That allowlist does not stop DNS rebinding. Restrict DNS resolution and egress at the network boundary.

Chatflow permission is checked again at prediction time. A caller cannot select an ID outside the grant, and cannot replace a pinned ID.

Flowise HTTP runs in a one-shot subprocess with a minimal environment. The worker allows only:

  • GET /api/v1/chatflows

  • POST /api/v1/prediction/<chatflow-id>

Traversal, encoding tricks, queries, fragments, other methods, and other paths are rejected in both the parent and the worker.

FLOWISE_TOTAL_DEADLINE bounds normal IPC and worker execution. It does not cover uninterruptible kernel waits. Cleanup kills the worker process group on a best-effort basis. Questions are limited to 16 KiB and response bodies to 1 MiB. Each process runs at most four Flowise operations at once.

Security reporting

See SECURITY.md. Report vulnerabilities through GitHub Security Advisories on matthewhand/mcp-flowise. Do not include credentials or chat contents in a public issue.


Troubleshooting

  • Startup fails closed when no chatflow ID is granted.

  • Any nonempty FLOWISE_ASSISTANT_ID is refused.

  • A non-loopback endpoint without HTTPS, or without FLOWISE_TRUSTED_ORIGINS, is refused.

  • Connection errors mean FLOWISE_API_ENDPOINT is unreachable or the route is outside the allowlist.


Release notes (0.1.3)

  • Requires Python 3.13 or newer.

  • Authorization fails closed unless a chatflow ID is granted explicitly.

  • Flowise HTTP uses an isolated worker and a route allowlist.

  • Dependency floors include patched requests, python-dotenv, idna, pygments, and pytest.

  • Recorded verification is Linux with Python 3.13. This release does not claim Windows, container, or hosted-registry acceptance.

License

MIT. See LICENSE.

Available Tools

2 tools
create_predictionA
Create a prediction by sending a question to a specific chatflow or assistant.

Args:
    chatflow_id (str, optional): The ID of the chatflow to use. Defaults to FLOWISE_CHATFLOW_ID.
    question (str): The question or prompt to send to the chatflow.

Returns:
    str: The raw JSON response from Flowise API or an error message if something goes wrong.

Inputs: question (required), chatflow_id.

list_chatflowsA
List all available chatflows from the Flowise API.

This function respects optional whitelisting or blacklisting if configured
via FLOWISE_CHATFLOW_WHITELIST or FLOWISE_CHATFLOW_BLACKLIST.

Returns:
    str: A JSON-encoded string of filtered chatflows.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have completely distinct purposes: one lists available chatflows, and the other creates predictions using a specific chatflow. There is no overlap in functionality or ambiguity between them.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun pattern (list_chatflows, create_prediction) with clear, descriptive names that align with their functions. No deviations or mixed conventions are present.

    Tool Count2/5

    With only 2 tools, the server feels thin for its apparent domain of interacting with Flowise chatflows. While the tools cover basic operations, the lack of tools for updating, deleting, or managing chatflows suggests an incomplete surface that may limit agent workflows.

    Completeness2/5

    The toolset is severely incomplete for a chatflow management domain. It provides listing and prediction creation but lacks essential CRUD operations like creating, updating, or deleting chatflows, as well as tools for managing predictions (e.g., retrieving or canceling them), which will likely cause agent failures in complex tasks.

    Maintenance

    ActivityNo data
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers