Ayx Mcp Wrapper

Ayx Mcp Wrapper

🚀 AYX-MCP-Wrapper

AYX-MCP-Wrapper 是一个模型上下文协议(MCP)服务器,它为 Alteryx 服务器提供了全面的接口。借助这个包装器,AI 助手和其他 MCP 客户端能够与 Alteryx 服务器进行交互,实现对工作流、集合、用户、调度、凭证等的管理。

Python 3.10+ License: MIT MCP Protocol

⚠️ 免责声明

这并非官方实现。

本项目是个人发起的,与任何公司均无关联,也未得到任何公司的认可或支持。即便维护者是相关公司的员工,本项目也是独立开发的,没有任何官方支持。

✨ 主要特性

  • 高级搜索:通过灵活的搜索选项查找用户、工作流和资产。
  • 工作流操作:全面控制工作流的执行、转移和管理。
  • 工作流资产:下载工作流包并提取 XML 进行分析。
  • 作业监控:实时跟踪和管理工作流执行作业。
  • 集合管理:创建、更新、删除和组织集合。
  • 用户管理:高效管理用户、其资产和权限。
  • 调度管理:创建和管理工作流调度及自动化。
  • 凭证管理:处理服务器凭证并确保安全连接。

📦 安装指南

先决条件

  • Python 3.10+:支持类型提示的现代 Python 版本。
  • Alteryx 服务器:已启用 API 访问。
  • OAuth2 凭证:用于身份验证的客户端 ID 和密钥。

快速开始(推荐使用 uv)

# 若尚未安装 uv
curl -LsSf https://astral.sh/uv/install.sh | sh

# 安装 MCP 服务器
uv pip install mcp-server-alteryx

使用 pip

pip install mcp-server-alteryx

从源代码安装

git clone https://github.com/jupiterbak/AYX-MCP-Wrapper.git
cd AYX-MCP-Wrapper
uv sync
uv run pip install -e .

🔧 配置

环境变量

使用环境变量设置服务器凭证:

# 必需:服务器 API URL
export ALTERYX_API_HOST="https://your-server.com/webapi/"

# 必需:OAuth2 客户端凭证
export ALTERYX_CLIENT_ID="your-client-id"
export ALTERYX_CLIENT_SECRET="your-client-secret"

# 可选:SSL 验证(默认:true)
export ALTERYX_VERIFY_SSL="1"

# 可选:临时文件夹
export ALTERYX_TEMP_DIRECTORY="your-temp-directory"

# 可选:日志级别
export LOG_LEVEL="INFO"

配置文件

也可以在项目根目录下创建一个 .env 文件:

ALTERYX_API_HOST=https://your-server.com/webapi/
ALTERYX_CLIENT_ID=your-client-id
ALTERYX_CLIENT_SECRET=your-client-secret
ALTERYX_VERIFY_SSL=1
ALTERYX_TEMP_DIRECTORY=your-temp-directory
LOG_LEVEL=INFO

💻 使用示例

Claude Desktop 集成

要在 Claude Desktop 中使用此 MCP 服务器,请在 Claude Desktop 设置中添加以下配置:

{
"mcpServers": {
"alteryx": {
"command": "uvx",
"args": ["mcp-server-alteryx", "--transport", "stdio"],
"env": {
"ALTERYX_API_HOST": "https://your-server.com/webapi/",
"ALTERYX_CLIENT_ID": "your-client-id",
"ALTERYX_CLIENT_SECRET": "your-client-secret",
"ALTERYX_VERIFY_SSL": "1",
"ALTERYX_TEMP_DIRECTORY": "your-temp-directory"
}
}
}
}

不过,建议结合“顺序思维”工具使用:

{
"mcpServers": {
"sequential-thinking": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sequential-thinking"
]
},
"alteryx": {
"command": "uvx",
"args": ["mcp-server-alteryx", "--transport", "stdio"],
"env": {
"ALTERYX_API_HOST": "http://localhost/webapi/",
"ALTERYX_CLIENT_ID": "your-client-id",
"ALTERYX_CLIENT_SECRET": "your-client-secret",
"ALTERYX_VERIFY_SSL": "1",
"ALTERYX_TEMP_DIRECTORY": "your-temp-directory"
}
}
}
}

配置选项

  • command:要使用的 uvx 可执行文件。
  • args:MCP 服务器的命令行参数。
  • env:用于服务器身份验证的环境变量。

传输选项

  • stdio:标准输入/输出(推荐用于 Claude Desktop)。
  • sse:服务器发送事件。
  • streamable-http:HTTP 流式传输。

Cursor 集成

要在 Cursor IDE 中集成,请在 Cursor 设置中添加以下内容:

{
"mcpServers": {
"alteryx": {
"command": "uvx",
"args": ["mcp-server-alteryx", "--transport", "stdio"],
"env": {
"ALTERYX_API_HOST": "https://your-alteryx-server.com/webapi/",
"ALTERYX_CLIENT_ID": "your-client-id",
"ALTERYX_CLIENT_SECRET": "your-client-secret",
"ALTERYX_TEMP_DIRECTORY": "your-temp-directory"
}
}
}
}

命令行界面

可以使用不同的传输选项运行 MCP 服务器:

# 使用 stdio 传输(默认)
uvx run src.main --transport stdio

# 使用服务器发送事件(SSE)
uvx run src.main --transport sse

# 使用 HTTP 流式传输
uvx run src.main --transport streamable-http

# 设置日志级别
uvx run src.main --log-level DEBUG

# 使用自定义配置运行
uvx run src.main --transport stdio --log-level INFO

📚 详细文档

可用工具

MCP 服务器按功能提供了全面的工具:

集合管理

功能 描述 参数
get_all_collections() 检索所有可访问的集合
get_collection_by_id(collection_id) 获取特定集合的详细信息 collection_id: str
create_collection(name) 创建新集合 name: str
update_collection_name_or_owner(collection_id, name, owner_id) 更新集合属性 collection_id: str, name: str, owner_id: str
add_workflow_to_collection(collection_id, workflow_id) 将工作流添加到集合中 collection_id: str, workflow_id: str
remove_workflow_from_collection(collection_id, workflow_id) 从集合中移除工作流 collection_id: str, workflow_id: str
add_schedule_to_collection(collection_id, schedule_id) 将调度添加到集合中 collection_id: str, schedule_id: str
remove_schedule_from_collection(collection_id, schedule_id) 从集合中移除调度 collection_id: str, schedule_id: str
delete_collection(collection_id) 删除集合 collection_id: str

工作流操作

功能 描述 参数
get_all_workflows() 检索所有可访问的工作流
get_workflow_by_id(workflow_id) 获取特定工作流的详细信息 workflow_id: str
update_workflow_name_or_comment(workflow_id, name, comment) 更新工作流属性 workflow_id: str, name: str, comment: str
transfer_workflow(workflow_id, new_owner_id) 转移工作流所有权 workflow_id: str, new_owner_id: str
get_workflow_jobs(workflow_id) 获取工作流的作业 workflow_id: str
start_workflow_execution(workflow_id, input_data) 启动工作流执行并返回作业 ID workflow_id: str, input_data: List[InputData]
execute_workflow_with_monitoring(workflow_id, input_data) 执行工作流并监控完成情况 workflow_id: str, input_data: List[InputData]
download_workflow_package_file(workflow_id, output_directory) 下载工作流包 workflow_id: str, output_directory: str
get_workflow_xml(workflow_id) 提取工作流 XML workflow_id: str

用户管理

功能 描述 参数
get_all_users() 检索所有可访问的用户
get_user_by_id(user_id) 获取特定用户的详细信息 user_id: str
get_user_by_email(email) 按电子邮件查找用户 email: str
get_user_by_name(name) 按名称查找用户 name: str
get_user_by_first_name(first_name) 按名字查找用户 first_name: str
get_all_user_assets(user_id) 获取用户拥有的所有资产 user_id: str
get_user_assets_by_type(user_id, asset_type) 获取特定类型的资产 user_id: str, asset_type: str
update_user_details(user_id, first_name, last_name, email) 更新用户信息 user_id: str, first_name: str, last_name: str, email: str
transfer_all_assets(user_id, new_owner_id, transfer_workflows, transfer_schedules, transfer_collections) 转移用户资产 user_id: str, new_owner_id: str, transfer_workflows: bool, transfer_schedules: bool, transfer_collections: bool
deactivate_user(user_id) 停用用户 user_id: str
reset_user_password(user_id) 重置用户密码 user_id: str

调度管理

功能 描述 参数
get_all_schedules() 检索所有可访问的调度
get_schedule_by_id(schedule_id) 获取特定调度的详细信息 schedule_id: str
deactivate_schedule(schedule_id) 停用调度 schedule_id: str
activate_schedule(schedule_id) 激活调度 schedule_id: str
update_schedule_name_or_comment(schedule_id, name, comment) 更新调度属性 schedule_id: str, name: str, comment: str
change_schedule_owner(schedule_id, new_owner_id) 更改调度所有权 schedule_id: str, new_owner_id: str

作业监控

功能 描述 参数
get_all_job_messages(job_id) 获取特定作业的消息 job_id: str
get_job_by_id(job_id) 获取作业详细信息 job_id: str
get_job_output_data(job_id) 从已完成的作业中获取输出数据文件 job_id: str

凭证与连接

功能 描述 参数
get_all_credentials() 检索所有可访问的凭证
get_credential_by_id(credential_id) 获取特定凭证的详细信息 credential_id: str
lookup_connection(connection_id) 查找 DCM 连接 connection_id: str
get_connection_by_id(connection_id) 获取连接详细信息 connection_id: str

🛠 开发

设置开发环境

# 克隆仓库
git clone https://github.com/jupiterbak/AYX-MCP-Wrapper.git
cd AYX-MCP-Wrapper

# 安装依赖
uv sync

# 以开发模式安装
uv run pip install -e .

🤝 贡献

我们欢迎贡献!请按照以下步骤进行:

  1. 分叉 仓库。
  2. 创建 一个功能分支 (git checkout -b feature/amazing-feature)。
  3. 提交 你的更改 (git commit -m 'Add amazing feature')。
  4. 推送 到分支 (git push origin feature/amazing-feature)。
  5. 打开 一个拉取请求。

📄 许可证

本项目采用 MIT 许可证 - 有关详细信息,请参阅 LICENSE 文件。

相关项目


为社区用心打造 ❤️

  • 0 关注
  • 0 收藏,20 浏览
  • system 提出于 2025-09-21 10:57

相似服务问题

相关AI产品