A Model Context Protocol (MCP) server that provides AI assistants with comprehensive access to Langflow workflow automation platform.
langflow-mcp-server serves as a bridge between Langflow's workflow automation platform and AI models, enabling them to understand and work with Langflow flows effectively.
API Compatibility: This server is built on the Langflow API documentation and supports Langflow API version 1.6.4.
It provides structured access to:
- Flow Management - Create, read, update, delete, and execute Langflow flows
- Flow Execution - Run flows with inputs and trigger webhooks
- Build Operations - Compile, validate, and monitor flow builds
- Import/Export - Upload and download flows and projects
- Organization - Manage folders and projects
- Configuration - Manage global variables
- Knowledge Bases - Manage RAG document collections
- Component Discovery - List all available Langflow components
- Node.js installed on your system
- A running Langflow instance
- Langflow API key
# Install from npm
npm install -g langflow-mcp-server
# OR clone the repository
git clone https://github.com/nobrainer-tech/langflow-mcp.git
cd langflow-mcp
# Install dependencies
npm install
# Build the project
npm run build
# Configure environment
cp .env.example .env
# Edit .env with your Langflow instance URL and API keyEdit .env file:
LANGFLOW_BASE_URL=http://localhost:7860
LANGFLOW_API_KEY=your-api-key-here
MCP_MODE=stdio
LOG_LEVEL=infoAdd to your Claude Desktop config file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"langflow": {
"command": "npx",
"args": ["-y", "langflow-mcp-server"],
"env": {
"LANGFLOW_BASE_URL": "http://localhost:7860",
"LANGFLOW_API_KEY": "your-api-key-here",
"MCP_MODE": "stdio",
"LOG_LEVEL": "error"
}
}
}
}Alternative (local installation):
{
"mcpServers": {
"langflow": {
"command": "node",
"args": ["/absolute/path/to/langflow-mcp/dist/mcp/index.js"],
"env": {
"LANGFLOW_BASE_URL": "http://localhost:7860",
"LANGFLOW_API_KEY": "your-api-key-here",
"MCP_MODE": "stdio",
"LOG_LEVEL": "error"
}
}
}
}Restart Claude Desktop after updating configuration.
The MCP server can be run in a Docker container for easier deployment and isolation.
# Clone the repository
git clone https://github.com/nobrainer-tech/langflow-mcp.git
cd langflow-mcp
# Create .env file with your configuration
cp .env.example .env
# Edit .env with your Langflow instance URL and API key
# Build and run with docker-compose
docker-compose up -d
# View logs
docker-compose logs -f
# Stop the server
docker-compose down# Build the image
docker build -t langflow-mcp-server:latest .
# Run in stdio mode (for Claude Desktop)
docker run -it --rm \
-e LANGFLOW_BASE_URL=http://localhost:7860 \
-e LANGFLOW_API_KEY=your-api-key \
langflow-mcp-server:latest
# Run in HTTP mode (for remote access)
docker run -d \
-p 3000:3000 \
-e MCP_MODE=http \
-e PORT=3000 \
-e AUTH_TOKEN=your-secure-token \
-e LANGFLOW_BASE_URL=http://langflow:7860 \
-e LANGFLOW_API_KEY=your-api-key \
langflow-mcp-server:latestThe included docker-compose.yml supports both stdio and HTTP modes:
# STDIO mode (default)
environment:
- MCP_MODE=stdio
- LANGFLOW_BASE_URL=http://localhost:7860
- LANGFLOW_API_KEY=your-key
# HTTP mode
environment:
- MCP_MODE=http
- PORT=3000
- AUTH_TOKEN=your-secure-tokenbuild_vertices- Usebuild_flowinsteadget_vertex- Usebuild_floworget_flowinsteadstream_vertex_build- Useget_build_statuswith streaming insteadget_task_status- Useget_build_statusinstead
These tools are enabled by default but marked with
ENABLE_DEPRECATED_TOOLS=falseOnce connected, Claude can use 90 tools (94 with deprecated tools enabled):
create_flow- Create a new Langflow flowlist_flows- List all flows with pagination and filteringget_flow- Get details of a specific flow by IDupdate_flow- Update an existing flowdelete_flow- Delete a single flowdelete_flows- Delete multiple flows at once
run_flow- Execute a flow with input configuration (supports streaming)trigger_webhook- Trigger a flow via webhook endpoint
upload_flow- Upload a flow from JSON datadownload_flows- Download multiple flows as JSON exportget_basic_examples- Get pre-built example flows
list_folders- List all folders with paginationcreate_folder- Create a new folderget_folder- Get folder details by IDupdate_folder- Update folder name, description, or parentdelete_folder- Delete a folder
list_projects- List all projects with paginationcreate_project- Create a new projectget_project- Get project details by IDupdate_project- Update project name or descriptiondelete_project- Delete a projectupload_project- Upload a project from JSON datadownload_project- Download a project as JSON export
list_variables- List all global variablescreate_variable- Create a new variableupdate_variable- Update variable propertiesdelete_variable- Delete a variable
build_flow- Build/compile a flow and return job_id for async executionget_build_status- Poll build status and events for a specific jobcancel_build- Cancel a running build job
list_knowledge_bases- List all available knowledge basesget_knowledge_base- Get detailed information about a specific knowledge basedelete_knowledge_base- Delete a specific knowledge basebulk_delete_knowledge_bases- Delete multiple knowledge bases at once
list_components- List all available Langflow components
upload_file- Upload a file to a specific flowdownload_file- Download a file from a flowlist_files- List all files in a flowdelete_file- Delete a file from a flowget_file_image- Get an image file from a flow
get_monitor_builds- Get build execution history for a flowget_monitor_messages- Query chat/message history with filteringget_monitor_message- Get details of a specific messageget_monitor_sessions- List all chat session IDsget_monitor_session_messages- Get all messages for a sessionmigrate_monitor_session- Migrate messages between sessionsget_monitor_transactions- List transaction logs for a flowdelete_monitor_builds- Delete build history for a flowdelete_monitor_messages- Delete multiple messages by ID
build_vertices⚠️ DEPRECATED - Get vertex build order for a flow (usebuild_flowinstead)get_vertex⚠️ DEPRECATED - Get details of a specific vertex/component (usebuild_floworget_flowinstead)stream_vertex_build⚠️ DEPRECATED - Stream real-time build events for a vertex (useget_build_statuswith streaming instead)
list_users- List all users (admin only)get_current_user- Get current authenticated user infoget_user- Get details of a specific userupdate_user- Update user profile informationreset_user_password- Reset password for a user (admin only)
list_api_keys- List all API keys for the usercreate_api_key- Create a new API keydelete_api_key- Delete an API key
list_custom_components- List all custom componentscreate_custom_component- Create a new custom component
login- Authenticate with username and passwordauto_login- Auto-login with stored credentialsrefresh_token- Refresh authentication tokenlogout- Logout and invalidate session
check_store- Check if component store is enabledcheck_store_api_key- Validate a store API keylist_store_components- Browse available components in the storeget_store_component- Get details of a store componentlist_store_tags- List all component tags in the storeget_user_likes- Get components liked by user
validate_code- Validate Python code for custom componentsvalidate_prompt- Validate prompt template syntax
run_flow_advanced- Advanced flow execution with full controlprocess_flow- Legacy process endpoint for flowspredict_flow- Legacy predict endpoint for flows
get_public_flow- Get a public flow without authenticationbatch_create_flows- Create multiple flows in one operationget_task_status⚠️ DEPRECATED - Get status of an async task (useget_build_statusinstead)
download_folder- Download entire folder as archiveupload_folder- Upload folder from archive
list_starter_projects- List available starter templatesupload_knowledge_base- Upload file to create/update knowledge base
list_profile_pictures- List available profile picturesget_profile_picture- Get a specific profile picture
list_elevenlabs_voices- List ElevenLabs text-to-speech voices
get_version- Get Langflow API version informationhealth_check- Check Langflow instance health statusget_logs- Retrieve system logs (supports streaming)
// Create a new flow
create_flow({
name: "My Automation Flow",
description: "A flow that processes data"
})
// List all flows
list_flows({
page: 1,
size: 50
})
// Get flow details
get_flow({
flow_id: "flow-uuid-here"
})
// Update a flow
update_flow({
flow_id: "flow-uuid-here",
name: "Updated Flow Name"
})
// Execute a flow
run_flow({
flow_id_or_name: "my-flow-name",
input_request: {
input_value: "Hello World",
output_type: "chat",
input_type: "chat"
},
stream: false
})
// Trigger via webhook
trigger_webhook({
flow_id_or_name: "my-flow",
input_request: {
input_value: "Process this data"
}
})
// Build a flow (compile/validate)
build_flow({
flow_id: "flow-uuid-here",
log_builds: true,
event_delivery: "polling"
})
// Check build status
get_build_status({
job_id: "job-uuid-from-build",
event_delivery: "polling"
})
// List knowledge bases (RAG)
list_knowledge_bases()
// Get knowledge base details
get_knowledge_base({
kb_name: "my-documents"
})
// Create a folder
create_folder({
name: "My Flows",
description: "Organized flows"
})
// Create a project
create_project({
name: "My Project",
description: "Project description"
})
// Manage variables
create_variable({
name: "API_KEY",
value: "secret-key",
type: "string"
})
// Get basic examples
get_basic_examples()
// List all components
list_components()# Build
npm run build
# Run in development mode
npm run dev
# Run tests
npm test
# Type checking
npm run typechecklangflow-mcp/
├── src/
│ ├── mcp/
│ │ ├── index.ts # MCP server entry point
│ │ ├── server.ts # MCP server implementation
│ │ └── tools.ts # Tool definitions
│ ├── services/
│ │ └── langflow-client.ts # Langflow API client
│ ├── types/
│ │ └── index.ts # TypeScript types
│ └── utils/
│ └── logger.ts # Logging utility
├── .env.example # Example configuration
├── package.json
├── tsconfig.json
└── README.md
This project is inspired by and follows the structure of n8n-mcp by Romuald Czlonkowski. Special thanks to the n8n-mcp project for the excellent MCP server architecture and implementation patterns.
MIT License - see LICENSE for details.
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Run tests (
npm test) - Submit a pull request
- Langflow team for the workflow automation platform
- Anthropic for the Model Context Protocol
- czlonkowski/n8n-mcp for the inspiration and architecture
Built with ❤️ for the Langflow community