AYX-MCP-Wrapper 是一个模型上下文协议(MCP)服务器,它为 Alteryx 服务器提供了全面的接口。借助这个包装器,AI 助手和其他 MCP 客户端能够与 Alteryx 服务器进行交互,实现对工作流、集合、用户、调度、凭证等的管理。
这并非官方实现。
本项目是个人发起的,与任何公司均无关联,也未得到任何公司的认可或支持。即便维护者是相关公司的员工,本项目也是独立开发的,没有任何官方支持。
# 若尚未安装 uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# 安装 MCP 服务器
uv pip install mcp-server-alteryx
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 设置中添加以下配置:
{
"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 设置中添加以下内容:
{
"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 .
我们欢迎贡献!请按照以下步骤进行:
git checkout -b feature/amazing-feature)。git commit -m 'Add amazing feature')。git push origin feature/amazing-feature)。本项目采用 MIT 许可证 - 有关详细信息,请参阅 LICENSE 文件。
为社区用心打造 ❤️