Xircuits MCP 组件库

Xircuits MCP 组件库

用于定义 MCP 服务器的 Xircuits 组件库。

快速入门

前置条件

  • Python 3.8 或更高版本
  • 安装 Xircuits 和 MCP Python SDK

安装方法

运行以下命令安装:

xircuits install https://github.com/xpressai/xai-mcp

或者手动克隆仓库并安装依赖:

pip install -r requirements.txt

使用步骤

  1. 创建 Xircuits 工作流
  2. 添加 MCPCreateServer 组件创建服务器实例
  3. 使用 MCPDefineToolMCPDefineResource 等组件定义服务器功能
  4. 使用 MCPSetToolResult 等组件设置执行结果
  5. 添加 MCPRunServer 启动服务器

更多示例和文档,参考 README。