返回市场
AYX-MCP-封装器

AYX-MCP-封装器

作者:jupiterbak9 星标更新:2025-09-29

项目介绍

AYX-MCP-Wrapper

Python 3.10+ License: MIT MCP Protocol

⚠️ 免责声明

这不是官方实现。

本项目是一个个人发起的项目,并未得到任何公司的支持或认可。即使维护者是相关公司的员工,该项目也是独立开发的,没有官方的支持或背书。


一个提供与Alteryx服务器全面接口的模型上下文协议(MCP)服务器。此封装器使AI助手和其他MCP客户端能够与Alteryx服务器交互,以管理工作流、集合、用户、计划、凭据等。

功能

  • 高级搜索:使用灵活的搜索选项查找用户、工作流和资产
  • 工作流操作:执行、传输和管理工作流,具有完全控制权
  • 工作流资产:下载工作流包并提取XML进行分析
  • 作业监控:实时跟踪和管理工作流执行作业
  • 集合管理:创建、更新、删除和组织集合
  • 用户管理:高效地管理用户及其资产和权限
  • 计划管理:创建和管理工作流计划和自动化
  • 凭据管理:处理服务器凭据和安全连接

预备条件

  • Python 3.10+ - 支持类型提示的现代Python
  • Alteryx Server - 开启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集成

要将此MCP服务器与Claude Desktop结合使用,请在您的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 IDE集成

对于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)启动工作流执行并返回作业IDworkflow_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)提取工作流XMLworkflow_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文件。

相关项目

  • <a href="https://modelcontextprotocol.io/" target="_blank" rel="noopener noreferrer">模型上下文协议</a> - MCP规范
  • <a href="https://claude.ai/download" target="_blank" rel="noopener noreferrer">Claude Desktop</a> - Claude Desktop应用程序

由社区制作 ❤️