langflow-mcp
Health Gecti
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 10 GitHub stars
Code Basarisiz
- process.env — Environment variable access in healthcheck.js
- network request — Outbound network request in healthcheck.js
- network request — Outbound network request in package.json
- Hardcoded secret — Potential hardcoded credential in src/__tests__/fixtures/api-keys.ts
Permissions Gecti
- Permissions — No dangerous permissions requested
Bu listing icin henuz AI raporu yok.
MCP server for Langflow — gives AI assistants full access to Langflow workflow automation (93 tools, consolidated mode)
langflow-mcp-server
A Model Context Protocol (MCP) server that provides AI assistants with comprehensive access to Langflow workflow automation platform.
Overview
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.9.5.
Consolidated Tools Mode
Consolidated Tools Mode is an architecture that groups the 163 individual tools into 24 action-based meta-tools. This significantly reduces token usage and improves AI assistant context management.
| Mode | Tools | Best For |
|---|---|---|
| Standard | 163 tools | Full granular control |
| Consolidated | 24 tools | Reduced token usage, better context |
To enable consolidated mode:
LANGFLOW_CONSOLIDATED_TOOLS=true
Consolidated tools:
flow- All flow operations (list, get, create, update, delete, download, upload, replace, expand, batch, public)flow_execution- Run flows (run, run_advanced, run_session, webhook, process, predict)flow_version- Flow versions and lifecycle events (list, create, get, delete, activate, get_events, create_event)build- Build operations (start, status, cancel, vertices)workflow- Run and manage v2 workflows (run, get_result, stop)agentic- Agentic assistant (assist, check_config, execute)folder- Folder management (list, get, create, update, delete, download, upload)project- Project management (list, get, create, update, delete, download, upload)variable- Variable operations (list, create, update, delete, detect)knowledge_base- Knowledge base management (list, get, delete, bulk_delete, upload, create, preview/list chunks, ingest, cancel_ingest)file- Flow-scoped file operations (list, upload, download, delete, get_image)file_v2- User-scoped v2 files (list, upload, get, rename, delete, delete_all, batch_download, batch_delete)monitor- Monitoring (builds, messages, sessions, transactions)trace- Execution traces (list, get, delete, delete_by_flow)model- Models and providers (list, providers, enabled, default get/set/delete, mapping, validate, options)user- User management (list, get_current, update, reset_password, create)auth- Authentication (login, auto_login, logout, refresh, api keys, save_store_key)store- Component store (list, get, tags, likes, save_api_key, create, like, update_custom)registration- User registration (get, register)validation- Code/prompt validation (code, prompt)mcp_server- MCP server management (list, get, create, update, delete)mcp_project- MCP project config/install (get/update config, get_installed, install, composer_url)response- OpenAI-compatible responses (create)system- System info (health, version, logs, pictures, voices, session, webhook_events, health_check)
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
Quick Start
Prerequisites
- Node.js installed on your system
- A running Langflow instance
- Langflow API key
Installation
# 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 key
Configuration
Edit .env file:
LANGFLOW_BASE_URL=http://localhost:7860
LANGFLOW_API_KEY=your-api-key-here
MCP_MODE=stdio
LOG_LEVEL=info
Claude Desktop Setup
Add 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",
"LANGFLOW_CONSOLIDATED_TOOLS": "true",
"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.
Docker Deployment
The MCP server can be run in a Docker container for easier deployment and isolation.
Quick Start with Docker
# 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
Building Docker Image
# 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:latest
Docker Compose Configuration
The 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-token
Available MCP Tools
Once connected, Claude can use:
- Standard mode: 163 individual tools
- Consolidated mode: 24 action-based tools (recommended for reduced token usage)
Note: Raw MCP transport endpoints (SSE/streamable,
/api/mcp/*) and doc-rendering
endpoints (/docs,/redoc,/openapi.json) are intentionally not exposed as
tools — they are protocol/transport surfaces, not data operations.
Standard Mode Tools (163 tools)
Flow Management (13 tools)
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 oncereplace_flow- Replace a flow's full definitionexpand_flows- Expand flows with embedded component dataupload_flow- Upload a flow from JSON datadownload_flows- Download multiple flows as JSON exportget_basic_examples- Get pre-built example flowsbatch_create_flows- Create multiple flows in one operationget_public_flow- Get a public flow without authentication
Flow Execution (7 tools)
run_flow- Execute a flow with input configuration (supports streaming)run_flow_advanced- Advanced flow execution with full controlrun_flow_session- Execute a flow within a session contexttrigger_webhook- Trigger a flow via webhook endpointget_webhook_events- Get webhook trigger events for a flowprocess_flow- Legacy process endpoint for flowspredict_flow- Legacy predict endpoint for flows
Flow Versions & Events (7 tools)
list_flow_versions- List versions of a flowcreate_flow_version- Create a new flow versionget_flow_version- Get a specific flow versiondelete_flow_version- Delete a flow versionactivate_flow_version- Activate a specific flow versionget_flow_events- Get lifecycle events for a flowcreate_flow_event- Create a lifecycle event for a flow
Build Operations (6 tools)
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 jobget_task_status- Get status of an async taskbuild_vertices- Get vertex build order for a flowstream_vertex_build- Stream real-time build events for a vertex
Workflows (v2) (3 tools)
run_workflow- Run a v2 workflowget_workflow_result- Get the result of a workflow runstop_workflow- Stop a running workflow
Agentic (3 tools)
agentic_assist- Get agentic assistance for a flow componentagentic_check_config- Check whether agentic features are configuredagentic_execute- Execute an agentic flow by name
Responses (2 tools)
create_response- Create an OpenAI-compatible responseget_session- Get a response/conversation session
Folder Management (7 tools)
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 folderdownload_folder- Download entire folder as archiveupload_folder- Upload folder from archive
Project Management (7 tools)
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
Variable Management (5 tools)
list_variables- List all global variablescreate_variable- Create a new variableupdate_variable- Update variable propertiesdelete_variable- Delete a variabledetect_variables- Detect variables referenced in a value/template
Knowledge Base Management (11 tools)
list_knowledge_bases- List all available knowledge baseslist_knowledge_bases_detailed- List knowledge bases with detailed metadataget_knowledge_base- Get detailed information about a specific knowledge basecreate_knowledge_base- Create a new knowledge basedelete_knowledge_base- Delete a specific knowledge basebulk_delete_knowledge_bases- Delete multiple knowledge bases at onceupload_knowledge_base- Upload a file to create/update a knowledge basepreview_knowledge_base_chunks- Preview how a document will be chunkedlist_knowledge_base_chunks- List stored chunks for a knowledge baseingest_knowledge_base- Ingest documents into a knowledge basecancel_knowledge_base_ingest- Cancel an in-progress ingest job
File Management (5 tools)
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
Files (v2) (8 tools)
list_files_v2- List all user-scoped v2 filesupload_file_v2- Upload a v2 fileget_file_v2- Get v2 file metadata or contentrename_file_v2- Rename a v2 filedelete_file_v2- Delete a v2 filedelete_all_files_v2- Delete all v2 filesbatch_download_files_v2- Download multiple v2 filesbatch_delete_files_v2- Delete multiple v2 files
Component Discovery & Custom Components (3 tools)
list_components- List all available Langflow componentscreate_custom_component- Create a new custom componentupdate_custom_component- Update an existing custom component
Monitoring & Analytics (12 tools)
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 messageupdate_monitor_message- Update a stored 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 IDdelete_monitor_session_messages- Delete all messages for a sessiondelete_monitor_sessions- Delete chat sessions
Traces (4 tools)
list_traces- List execution traces with filtersget_trace- Get a specific execution tracedelete_trace- Delete a specific tracedelete_traces- Delete all traces for a flow
Shared Messages (5 tools)
get_shared_messages- Get shared messagesget_shared_sessions- Get shared sessionsupdate_shared_message- Update a shared messagemigrate_shared_session- Migrate a shared sessiondelete_shared_session- Delete a shared session
Models & Providers (12 tools)
list_models- List available modelslist_model_providers- List all model providerslist_enabled_providers- List enabled providerslist_enabled_models- List enabled modelsset_enabled_models- Enable/disable modelsget_default_model- Get the default model for a typeset_default_model- Set the default model for a typedelete_default_model- Remove the default model for a typeget_provider_variable_mapping- Get provider-to-variable mappingvalidate_model_provider- Validate provider credentialsget_language_model_options- Get language model optionsget_embedding_model_options- Get embedding model options
User Management (5 tools)
list_users- List all users (admin only)get_current_user- Get current authenticated user infoupdate_user- Update user profile informationreset_user_password- Reset password for a user (admin only)create_user- Create a new user (admin only)
API Key Management (3 tools)
list_api_keys- List all API keys for the usercreate_api_key- Create a new API keydelete_api_key- Delete an API key
Authentication (4 tools)
login- Authenticate with username and passwordauto_login- Auto-login with stored credentialsrefresh_token- Refresh authentication tokenlogout- Logout and invalidate session
Registration (2 tools)
get_registration- Check whether registration is enabledregister_user- Register a new user account
Store & Marketplace (9 tools)
check_store- Check if component store is enabledcheck_store_api_key- Validate a store API keysave_store_api_key- Save a store API keylist_store_components- Browse available components in the storeget_store_component- Get details of a store componentcreate_store_component- Publish a component to the storelike_store_component- Like a store componentlist_store_tags- List all component tags in the storeget_user_likes- Get components liked by user
Validation (2 tools)
validate_code- Validate Python code for custom componentsvalidate_prompt- Validate prompt template syntax
MCP Servers (v2) (5 tools)
list_mcp_servers- List MCP servers registered with Langflowget_mcp_server- Get an MCP server by namecreate_mcp_server- Create an MCP serverupdate_mcp_server- Update an MCP serverdelete_mcp_server- Delete an MCP server
MCP Project Management (5 tools)
get_mcp_project_config- Get MCP config for a projectupdate_mcp_project_config- Update MCP config for a projectget_mcp_project_installed- Get installed MCP clients for a projectinstall_mcp_project- Install MCP for a project into a clientget_mcp_project_composer_url- Get the MCP composer URL for a project
Starter & Templates (1 tool)
list_starter_projects- List available starter templates
Profile & Media (2 tools)
list_profile_pictures- List available profile picturesget_profile_picture- Get a specific profile picture
Integration Tools (1 tool)
list_elevenlabs_voices- List ElevenLabs text-to-speech voices
System & Health (4 tools)
get_version- Get Langflow API version informationhealth_check- Check Langflow instance health statusget_health_check- Get a detailed health-check reportget_logs- Retrieve system logs (supports streaming)
Example Usage
// 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()
Development
# Build
npm run build
# Run in development mode
npm run dev
# Run tests
npm test
# Type checking
npm run typecheck
Project Structure
langflow-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
Attribution
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.
License
MIT License - see LICENSE for details.
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch
- Run tests (
npm test) - Submit a pull request
Acknowledgments
- 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
Yorumlar (0)
Yorum birakmak icin giris yap.
Yorum birakSonuc bulunamadi