Extensions

MCP Integration

Model Context Protocol (MCP) lets you connect external tool servers and expose their capabilities to your workflows and agents.

What is MCP?

MCP is an open protocol that standardizes how applications provide context to LLMs. In this platform, MCP servers are managed through Settings. Each server can use stdio or streamable-http transport. Once connected, MCP tools are listed automatically and can be invoked from the MCP workflow step or the MCP API.

Dynamic Tool Discovery

Tools exposed by an MCP server are auto-discovered and available in the tool registry.

Two Transports

stdio for local child-process servers, streamable-http for remote MCP services.

Per-User Isolation

MCP servers and tools are scoped per user. Only the owning user can invoke tools.

Configuration

MCP is configured in Settings under Developer Integrations. You can add multiple servers, enable or disable them individually, and choose between stdio and streamable-http transports. The backend also supports environment-based configuration via .env.

.env
# Enable MCP globally
MCP_ENABLED=true

# Optional: path to a JSON config file
MCP_CONFIG_PATH=/path/to/mcp-config.json

# Optional: inline JSON config
MCP_CONFIG_JSON={"servers":[...]}

# Optional: default server URL for streamable-http
MCP_SERVER_URL=http://localhost:3001/mcp

Server Configuration

Each MCP server requires a unique ID, a name, a transport, and transport-specific fields. The autoDiscover flag controls whether the platform automatically lists the server's tools.

MCP Server Object
{
  "id": "my-mcp-server",
  "name": "My MCP Server",
  "transport": "stdio",
  "command": "node",
  "args": ["/path/to/server.js"],
  "url": "",
  "headers": {},
  "env": {},
  "enabled": true,
  "autoDiscover": true,
  "timeoutMs": 30000
}

MCP Workflow Step

Use the mcp step type in a workflow to call a tool exposed by an MCP server. The step requires the server ID, tool name, and arguments.

mcp-step.json
{
  "type": "mcp",
  "serverId": "my-mcp-server",
  "toolName": "search_docs",
  "arguments": { "query": "{{last}}" },
  "timeoutMs": 30000,
  "maxRetries": 2,
  "backoffMultiplier": 2
}

MCP API Reference

GET/api/mcp/servers

List configured MCP servers and their health status.

GET/api/mcp/tools

List all tools exposed by the user's MCP servers.

GET/api/mcp/health

Check the health of each MCP server connection.

POST/api/mcp/tools/:serverId/:toolName/invoke

Invoke an MCP tool directly. The request body accepts tool arguments.

Security Notes

  • MCP servers are per-user. Users cannot access servers belonging to other users.
  • stdio servers run as child processes. Use TOOL_SANDBOX_UID and TOOL_SANDBOX_GID to restrict process permissions.
  • Tool execution is bounded by timeoutMs and the global TOOL_EXECUTION_TIMEOUT_MS.