flow-forge-mcp
v1.0.0
Published
MCP Server for Flow-Forge intelligent flowchart generation
Maintainers
Readme
Flow-Forge MCP Server
MCP (Model Context Protocol) server that enables AI assistants like Claude, ChatGPT, and Gemini to generate flowcharts using Flow-Forge's multi-agent system.
Features
- Intelligent Flowchart Generation: Natural language to diagram conversion
- Multi-round Q&A: Interactive clarification for better results
- Multiple Formats: Mermaid, PlantUML, and BPMN 2.0 support
- Real-time Progress: SSE-based progress reporting
- Task Management: Status checking and cancellation
Installation
# Install dependencies
npm install
# Build the project
npm run buildConfiguration
Set the Flow-Forge API URL via environment variable:
export FLOWFORGE_API_URL=http://localhost:8000Optionally, configure an API key for authentication:
export FLOWFORGE_API_KEY=your-api-key-hereOr create a .env file:
FLOWFORGE_API_URL=http://localhost:8000
FLOWFORGE_API_KEY=your-api-key-here # OptionalUsage
Claude Desktop Configuration
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"flow-forge": {
"command": "node",
"args": ["/path/to/flow-forge-mcp/dist/index.js"],
"env": {
"FLOWFORGE_API_URL": "http://localhost:8000",
"FLOWFORGE_API_KEY": "your-api-key-here"
}
}
}
}Or using npx (after publishing):
{
"mcpServers": {
"flow-forge": {
"command": "npx",
"args": ["flow-forge-mcp"],
"env": {
"FLOWFORGE_API_URL": "http://localhost:8000",
"FLOWFORGE_API_KEY": "your-api-key-here"
}
}
}
}Development
# Run in development mode
npm run dev
# Type checking
npm run typecheckTools
generate_flowchart
Generate or modify a flowchart based on natural language requirements.
Parameters:
requirements(string, required): Natural language descriptionanswers(object, optional): Answers to clarification questionscontext(object, optional): Execution context from previous callcurrent_code(string, optional): Existing diagram code for modificationcollection_id(string, optional): RAG collection IDdiagram_format(string, optional): "mermaid" | "plantuml" | "bpmn"
Returns:
status: "completed" | "questions_required" | "failed"diagram_format: Output format (when completed)diagram_code: Generated diagram code (when completed)questions: Clarification questions (when questions_required)context: Context for continuation
get_task_status
Get the current status of a flowchart generation task.
Parameters:
task_id(string, required): Task ID from generate_flowchart
Returns:
task_id: Task identifierstatus: Current statusprogress: Execution progress (0-1)current_agent: Currently executing agentresult: Task result (when completed)error: Error message (when failed)
cancel_task
Cancel a running flowchart generation task.
Parameters:
task_id(string, required): Task ID to cancel
Returns:
status: "cancelled" | "already_finished" | "not_found"message: Status message
list_diagram_types
List all supported diagram types and their characteristics.
Returns:
types: Array of diagram type informationtype: Type identifiername: Display namedescription: Descriptionformats: Supported output formatsexamples: Example requirements
Example Conversation
User: Help me create a user login flowchart
Claude: [calls generate_flowchart]
The system needs some clarification:
- What authentication methods? (Username/Password, Phone verification, Social login)
- Need "Remember me" feature?
What are your preferences?
User: Username/password, yes for remember me
Claude: [calls generate_flowchart with answers and context]
Here's your login flowchart:
flowchart TD
A[Start] --> B[Enter username/password]
B --> C{Validate}
C -->|Success| D{Remember me?}
D -->|Yes| E[Save token]
D -->|No| F[Skip]
E --> G[Go to home]
F --> G
C -->|Fail| H[Show error]
H --> BSupported Diagram Types
| Type | Description | Formats | |------|-------------|---------| | flowchart | Process visualization, decision trees | Mermaid, PlantUML, BPMN | | sequence | Interaction over time | Mermaid, PlantUML | | gantt | Project timeline | Mermaid | | mindmap | Concept organization | Mermaid | | class | UML class diagrams | Mermaid, PlantUML | | er | Entity-Relationship | Mermaid | | state | State machines | Mermaid, PlantUML | | component | System architecture | PlantUML | | usecase | Use case diagrams | PlantUML | | activity | Activity diagrams | PlantUML | | bpmn | Business processes | BPMN |
Requirements
- Node.js >= 18.0.0
- Flow-Forge API server running
License
MIT
