Alteryx服务器MCP封装器

一个为Alteryx服务器提供全面接口的Model Context Protocol (MCP)服务器封装器,支持工作流管理、集合管理、用户管理、计划任务管理和凭证管理等功能。

  • by jupiterbak
  • Python
  • 本地部署
  • 13 星标
  • 更新于
在 GitHub 查看 jupiterbak/AYX-MCP-Wrapper

使用说明

AYX MCP包装机

⚠️ 免责声明

这不是正式的实施。

本项目是个人倡议,不隶属于任何公司,也不得到任何公司的认可或支持。即使维护者是相关公司的员工,该项目也是独立开发的,没有任何官方支持或支持。


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

特性

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

先决条件

  • Python 3.10+ -支持类型提示的现代Python
  • Alteryx服务器 -启用API访问
  • OAuth2凭据 -用于身份验证的客户端ID和密码

安装

紫外线快速入门(推荐)

# Install uv if you haven't already
curl -LsSf https://astral.sh/uv/install.sh | sh

# Install the MCP server
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 .

配置

环境变量

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

# Required: Server API URL
export ALTERYX_API_HOST="https://your-server.com/webapi/"

# Required: OAuth2 Client Credentials
export ALTERYX_CLIENT_ID="your-client-id"
export ALTERYX_CLIENT_SECRET="your-client-secret"

# Optional: SSL Verification (default: true)
export ALTERYX_VERIFY_SSL="1"

# Optional: temporary folder
export ALTERYX_TEMP_DIRECTORY="your-temp-directory"

# Optional: Logging level
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桌面集成

要将此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"
      }
    }
  }
}

However, we recommend to use it in combination with the "Sequential Thinking" tool:

```json
{   "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服务器可以使用不同的传输选项运行:

# Using stdio transport (default)
uvx run src.main --transport stdio

# Using Server-Sent Events (SSE)
uvx run src.main --transport sse

# Using HTTP streaming
uvx run src.main --transport streamable-http

# Set log level
uvx run src.main --log-level DEBUG

# Run with custom configuration
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

发展

设置开发环境

# Clone the repository
git clone https://github.com/jupiterbak/AYX-MCP-Wrapper.git
cd AYX-MCP-Wrapper

# Install dependencies
uv sync

# Install in development mode
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许可证获得许可-请参阅 许可证 文件以获取详细信息。

相关项目


由以下材料制成❤️ 为了社区