Token导航 LogoToken导航TokenDH.com
MCP travrse flow executor logo
运维云端stdio官方级别未说明来源级核验

MCP travrse flow executor

MCP Server

一个轻量级的MCP集成工具,用于发现和执行Travrse AI中的流程,提供简洁的API和高效的HTTP/2支持。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
Python轻量级API集成

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

ideabosque

提供方

ideabosque

最后核验

2026/5/17 20:20

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -e .

详细介绍

MCP Travrse流执行器

Travrse AI的轻量级MCP(模型上下文协议)集成,提供流发现和执行功能。

特性

  • 流量发现:列出并获取可用流的详细信息
  • 流程执行:使用消息执行流(标准和流式)
  • 简单API:具有所有功能的单个类
  • HTTP/2支持:采用HTTP/2的现代httpx客户端,性能更好
  • 连接池:可重复使用的连接可提高效率
  • 最小依赖性:只需要 httpx 图书馆

安装

# Install from local directory
pip install -e .

# Or install with dev dependencies
pip install -e ".[dev]"

快速开始

1.设置环境变量

创建 .env 文件或设置环境变量:

TRAVRSE_API_KEY=tv_test_your_api_key_here
TRAVRSE_API_BASE=https://api.travrse.ai/v1
TRAVRSE_TIMEOUT=60

2.基本用法

from mcp_travrse_flow_executor import MCPTravrseExecutor

# Initialize (reads from environment)
executor = MCPTravrseExecutor()

# List available flows
flows = executor.list_flows(limit=10)
print(f"Found {flows['total']} flows")

# Get specific flow
flow = executor.get_flow("flow_01k9pf...")
print(f"Flow: {flow['name']}")

# Execute flow
result = executor.execute_flow(
    flow_id="flow_01k9pf...",
    messages=[{"role": "user", "content": "Hello!"}],
)
print(result)

3.流媒体执行

# Execute with streaming
for line in executor.execute_flow(
    flow_id="flow_01k9pf...",
    messages=[{"role": "user", "content": "Hello!"}],
    stream=True,
):
    print(line)

API 参考

MCPTravrse执行器

具有所有功能的主执行器类。

方法

流量发现:

  • list_flows(limit=50, offset=0) -列出可用流
  • get_flow(flow_id) -按ID获取流量详细信息

流程执行:

  • execute_flow(flow_id, messages, record_name="execution", stream=False) -使用可选流媒体执行流

例子

examples/ 更多示例的目录:

  • basic_usage.py -基本使用示例

测试

# Run tests
pytest

# Run tests with coverage
pytest --cov=mcp_travrse_flow_executor

# Run specific test
pytest tests/test_executor.py

发展

# Install dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Format code (if using black)
black mcp_travrse_flow_executor tests examples

项目结构

mcp_travrse_flow_executor/
├── mcp_travrse_flow_executor/
│   ├── __init__.py                      # Package exports
│   ├── config.py                        # Configuration
│   ├── client.py                        # HTTP client
│   ├── mcp_travrse_flow_executor.py    # Main executor
│   └── tests/                           # Test suite
│       ├── conftest.py                  # Test fixtures
│       └── test_executor.py             # Tests
├── examples/
│   └── basic_usage.py                   # Usage examples
├── .env.example                         # Environment template
├── pyproject.toml                       # Project config
└── README.md                            # This file

许可证

MIT许可证

目录标签

目录标签

Python轻量级API集成流程发现本地部署流程执行HTTP/2支持

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP