Pulse工作流MCP服务器
MCP(模型上下文协议)服务器,使Claude Code能够直接与Pulse工作流交互和修改Pulse工作流。
概述
此MCP服务器将Pulse工作流操作作为工具公开,允许您:
- 浏览并选择 从可用的Pulse应用程序
- 发现 运行时可用的节点类型、模型、工具和数据集
- 创建 从头开始开发新的工作流应用程序
- 查看和导航工作流结构
- 添加、编辑和删除节点
- 创建和删除节点之间的连接
- 发布工作流
- 运行单个节点进行测试
- 管理工作流功能和变量
安装
快速入门(推荐)
无需安装-使用 uvx 直接运行:
# Install Claude Code skills (one-time setup)
uvx pulse-workflow-mcp install-skills来自PyPI
pip install pulse-workflow-mcp
# Or with uv
uv pip install pulse-workflow-mcp为了发展
git clone https://github.com/Pulse-Intelligence/pulse-workflow-mcp.git
cd pulse-workflow-mcp
uv pip install -e ".[dev]"技能
此软件包包括用于指导工作流开发的Claude Code技能:
| 技能 | 描述 |
|---|---|
/pulse | 概述和可用命令 |
/pulse-create | 根据描述创建新工作流 |
/pulse-edit | 编辑现有工作流 |
/pulse-publish | 验证并发布工作流 |
安装技能 ~/.claude/skills/:
# Using uvx (no installation required)
uvx pulse-workflow-mcp install-skills
uvx pulse-workflow-mcp install-skills --force # Overwrite existing
uvx pulse-workflow-mcp uninstall-skills # Remove skills
# Or if installed via pip
pulse-workflow-mcp install-skills配置
设置以下环境变量:
export PULSE_API_URL="http://localhost:5001" # Pulse instance URL
export PULSE_API_KEY="your-api-key" # Console API key
export PULSE_APP_ID="your-app-id" # Optional: default app ID获取API密钥
最简单的方法是通过Pulse工作流编辑器:
- 在Pulse中打开任何工作流
- 点击“连接克劳德代码”按钮
- 模式将为您生成一个令牌
应用程序ID(可选)
PULSE_APP_ID 现在是 可选的。您可以:
- 将其设置为始终与特定应用程序一起工作
- 将其留空并使用
list_apps+select_app运行时可选择的工具
查看工作流时,应用程序ID位于URL中:
https://your-pulse.com/app/abc123def456/workflow
^^^^^^^^^^^^
This is your app ID使用Claude代码
推荐配置(uvx)
添加 ~/.claude.json -无需安装:
{
"mcpServers": {
"pulse-workflow": {
"command": "uvx",
"args": [
"pulse-workflow-mcp"
],
"env": {
"PULSE_API_URL": "http://localhost:5001",
"PULSE_API_KEY": "your-api-key"
}
}
}
}替代方案:直接命令
如果通过pip安装:
{
"mcpServers": {
"pulse-workflow": {
"command": "pulse-workflow-mcp",
"env": {
"PULSE_API_URL": "http://localhost:5001",
"PULSE_API_KEY": "your-api-key"
}
}
}
}使用默认应用程序ID
如果你总是使用一个应用程序,请添加 PULSE_APP_ID:
{
"mcpServers": {
"pulse-workflow": {
"command": "uvx",
"args": [
"pulse-workflow-mcp"
],
"env": {
"PULSE_API_URL": "http://localhost:5001",
"PULSE_API_KEY": "your-api-key",
"PULSE_APP_ID": "your-app-id"
}
}
}
}用法
配置后,在克劳德代码中:
> List my workflow apps
Claude will use: list_apps with mode="workflow"
> Select app abc123def456
Claude will use: select_app可用工具
应用程序操作
| 工具 | 说明 |
|---|---|
list_apps | 列出可用的Pulse应用程序(按模式、名称筛选) |
select_app | 选择一个应用程序进行后续操作 |
create_app | 创建新的工作流或聊天应用程序 |
发现操作
| 工具 | 说明 |
|---|---|
list_node_types | 列出所有具有默认配置的可用节点类型 |
get_node_schema | 获取特定节点类型的详细架构 |
list_tool_providers | 列出可用的工具/插件提供商 |
list_tools | 列出提供者提供的具有输入/输出模式的工具 |
list_models | 列出可用的AI模型(LLM、嵌入等) |
list_datasets | 列出可用的知识库数据集 |
节点操作
| 工具 | 说明 |
|---|---|
add_node | 向工作流添加新节点 |
edit_node | 修改现有节点 |
delete_node | 删除节点及其连接 |
get_node | 获取特定节点的详细信息 |
list_nodes | 列出所有节点(可选按类型筛选) |
边缘操作
| 工具 | 说明 |
|---|---|
connect_nodes | 在两个节点之间创建连接 |
disconnect_nodes | 删除节点之间的连接 |
list_edges | 列出工作流中的所有边 |
工作流操作
| 工具 | 说明 |
|---|---|
view_workflow | 查看完整的工作流结构 |
publish_workflow | 将草稿发布为新版本 |
validate_workflow | 检查工作流程是否有错误/警告 |
run_node | 执行单个节点进行测试 |
特征操作
| 工具 | 说明 |
|---|---|
get_features | 获取工作流功能配置 |
update_features | 更新工作流功能 |
get_variables | 获取环境和对话变量 |
例子
列出并选择应用程序
> Show me my workflow apps
Claude will use: list_apps with mode="workflow"
Returns: List of apps with IDs, names, and modes
> Select the "Customer Support" app
Claude will use: select_app with the app ID查看当前工作流
> Show me the current workflow
Claude will use: view_workflow添加LLM节点
> Add an LLM node called "Summarizer" that summarizes user input.
Connect it after the Start node.
Claude will:
1. Use list_nodes to find the Start node ID
2. Use add_node with after_node_id to create and connect the LLM node构建RAG管道
> Create a RAG pipeline that:
1. Retrieves from my knowledge base (dataset ID: abc123)
2. Uses GPT-4 to answer based on the context
3. Returns the response to the user
Claude will:
1. add_node (knowledge-retrieval)
2. add_node (llm with context)
3. connect_nodes appropriately发布版本
> Publish this workflow as version 1.0
Claude will use: publish_workflow with name="v1.0"从头开始创建工作流(发现流)
> Create a new customer support workflow with an LLM that responds to questions
Claude will:
1. create_app to create a new workflow app
2. list_node_types to discover available nodes
3. get_node_schema("llm") to understand LLM node config
4. list_models to discover available AI models
5. add_node to add the LLM node with proper config
6. connect_nodes to wire up the flow
7. validate_workflow to check for errors配置知识检索节点
> Add knowledge retrieval from my product docs
Claude will:
1. list_datasets to find available knowledge bases
2. get_node_schema("knowledge-retrieval") to get config schema
3. add_node with the discovered dataset ID支持的节点类型
| 类别 | 节点类型 |
|---|---|
| 控制 | 开始、结束、回答、if-else、迭代、循环 |
| 人工智能 | llm、知识检索、问题分类器、参数提取器 |
| 变换 | 代码、模板转换、变量分配器、变量聚合器、文档提取器、列表过滤器、分配器 |
| 外部的 | http请求,工具 |
资源
服务器提供以下MCP资源:
pulse://workflow/current-当前工作流程为JSONpulse://workflow/node-types-可用节点类型架构pulse://workflow/summary-人类可读的工作流程摘要
提示
可用的MCP提示:
workflow_context-当前工作流的完整上下文discovery_workflow-从头开始构建的强制性发现工作流程add_rag_pipeline-用于添加RAG管道的模板add_llm_chain-用于添加LLM处理链的模板
发展
# Clone and install
git clone https://github.com/Pulse-Intelligence/pulse-workflow-mcp.git
cd pulse-workflow-mcp
uv pip install -e ".[dev]"
# Run tests
pytest tests/
# Run linter
ruff check .
# Run server locally
export PULSE_API_URL="http://localhost:5001"
export PULSE_API_KEY="your-api-key"
pulse-workflow-mcp建筑
┌─────────────────────────────────────────────────────────────┐
│ Claude Code CLI │
│ > "Add an LLM node that summarizes user input" │
└─────────────────────────────────────────────────────────────┘
│
│ MCP Protocol (stdio)
▼
┌─────────────────────────────────────────────────────────────┐
│ Pulse MCP Server │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────────────┐ │
│ │ Tools │ │ Resources │ │ Prompts │ │
│ │ - list_apps │ │ - workflow │ │ - workflow_context │ │
│ │ - add_node │ │ - node_types│ │ - add_rag_pipeline │ │
│ │ - edit_node │ │ - summary │ │ - add_llm_chain │ │
│ │ - connect │ │ │ │ │ │
│ └─────────────┘ └─────────────┘ └─────────────────────┘ │
└─────────────────────────────────────────────────────────────┘
│
│ REST API
▼
┌─────────────────────────────────────────────────────────────┐
│ Pulse Backend │
│ /apps (GET) │
│ /apps/{id}/workflows/draft (GET/POST) │
│ /apps/{id}/workflows/publish (POST) │
└─────────────────────────────────────────────────────────────┘错误处理
服务器处理常见错误:
- 工作流不同步错误:检测到并发编辑-刷新并重试
- PulseClient错误:API错误,状态代码和消息
- 未选择应用程序:使用
list_apps和select_app选择应用程序
许可证
麻省理工学院
