Overview
The AutoMFlows MCP (Model Context Protocol) server enables AI agents like Claude, Cursor, and other MCP-compatible tools to interact with AutoMFlows. AI agents can generate workflows from natural language, execute them, analyze errors, and automatically fix issues.AI-Powered Creation
Generate workflows from natural language descriptions
Automatic Execution
Execute workflows directly from AI agents
Error Analysis
Analyze execution errors and get suggestions
Auto-Fix
Automatically fix workflows based on error analysis
Features
Tools
The MCP server provides these executable tools:| Tool | Description |
|---|---|
create_workflow | Generate workflows from natural language descriptions |
execute_workflow | Execute a workflow on the AutoMFlows backend |
get_execution_status | Get execution status and results |
analyze_workflow_errors | Analyze errors and provide suggestions |
fix_workflow | Automatically fix workflows based on error analysis |
validate_workflow | Validate workflow structure before execution |
Resources
The MCP server exposes these read-only resources:| Resource | URI | Description |
|---|---|---|
| Workflow Examples | automflows://workflow-examples | List of example workflows |
| Node Documentation | automflows://node-documentation | Node type documentation |
| Project Context | automflows://project-context | Project structure and conventions |
Prerequisites
Before setting up the MCP server, ensure you have:
- Node.js 18+ and npm 9+
- AutoMFlows backend running (for workflow execution)
- MCP-compatible client (Cursor, Claude Desktop, etc.)
Installation
Configuration
The MCP server can be configured using environment variables or a configuration file.Environment Variables
- Core Settings
- LLM Provider
- OpenAI
- Local LLM
| Variable | Default | Description |
|---|---|---|
AUTOMFLOWS_BACKEND_URL | http://localhost:3000 | Backend server URL |
AUTOMFLOWS_WORKFLOWS_PATH | ./tests/workflows/demo | Path to workflow examples |
AUTOMFLOWS_VERBOSE | false | Enable verbose logging |
Configuration File
Createmcp-server/config.json for persistent configuration:
Cursor IDE Setup
The most common use case is integrating with Cursor IDE for AI-powered workflow development.Method 1: Using Cursor Settings UI (Recommended)
Configure server
Fill in the following fields:
- Name:
automflows(or any name you prefer) - Command:
node - Args:
["/absolute/path/to/autoMflows/mcp-server/dist/server.js"] - Environment Variables (optional):
AUTOMFLOWS_BACKEND_URL:http://localhost:3000LLM_PROVIDER:none(oropenai/local)OPENAI_API_KEY: Your API key (if using OpenAI)
Method 2: Manual Configuration File
Edit the MCP configuration file directly:- macOS/Linux
- Windows
Project-specific (Recommended):Global:
Getting Your Absolute Path
- macOS/Linux
- Windows (PowerShell)
Verifying the Connection
Check MCP status
Open Command Palette (
Cmd+Shift+P / Ctrl+Shift+P) and type “MCP”Look for “MCP: List Servers” or similar commandsUsage Examples
Creating a Workflow
Ask the AI agent in Cursor Composer:Executing and Monitoring
Error Handling and Auto-Fix
Using Resources
In Cursor Composer, ask:Development
Running in Development Mode
Testing the Server
The server communicates via stdio, so it’s typically run by an MCP client. For manual testing:Architecture
The MCP server is built with:-
Resources: Read-only data provided to AI agents
- Workflow examples from
tests/workflows/demo - Node type documentation
- Project context and conventions
- Workflow examples from
-
Tools: Executable functions for AI agents
- Workflow creation (with optional LLM enhancement)
- Workflow execution via HTTP/WebSocket
- Error analysis and automatic fixing
-
LLM Integration: Optional enhancement
- OpenAI for intelligent workflow generation
- Local LLM (Ollama) for privacy-focused setups
- Rule-based fallback when no LLM configured
-
Backend Integration
- HTTP client for REST API calls
- WebSocket client for real-time execution updates
Troubleshooting
Server Not Found
Checklist:
- Ensure the path is absolute (starts with
/on Unix,C:\on Windows) - Verify you’ve run
npm run buildin themcp-serverdirectory - Check the file exists:
ls dist/server.js(Unix) ordir dist\server.js(Windows)
Node Not Found
- Unix:
"/usr/local/bin/node" - Windows:
"C:\\Program Files\\nodejs\\node.exe"
Connection Issues
Check Cursor logs:- macOS:
~/Library/Logs/Cursor/ - Windows:
%APPDATA%\Cursor\logs\ - Linux:
~/.config/Cursor/logs/
MCP Server Not Appearing
- Restart Cursor completely after configuration changes
- Validate JSON syntax (no trailing commas)
- Check file is in correct location (
.cursor/mcp.jsonor global config) - Review Cursor logs for error messages
Build Errors
Advanced Configuration
Custom Workflow Path
Point to your own workflow examples:Verbose Logging
Enable detailed logging for debugging:Multiple Backend Instances
Configure different backends for different projects:.cursor/mcp.json
Next Steps
Building Plugins
Create custom nodes with plugins
Docker Deployment
Deploy AutoMFlows with Docker
API Reference
Explore the REST API
Creating Workflows
Learn how to create workflows
