This server provides a tool to retrieve detailed information about work items (requirements) by their ID via the MCP protocol.
- Retrieve Work Item Details: Fetch structured JSON data containing the plain text description, image URLs, and raw HTML content of a work item by providing its ID (e.g., YEPPPP-154).
- Error Handling: Returns standardized error messages if the external API request fails.
- Security: Supports secure handling of sensitive information (organization ID and API token) through environment variables or
.env
files. - Deployment Options: Compatible with Docker deployment for production use.
- Development Tools: Provides utilities for local development and testing with features like hot reload.
- Agent Integration: Exposes the
get_workitem_description
tool that agents can discover and use without needing to handle authentication details.
Supports containerized deployment with various methods for environment variable injection, allowing secure configuration of credentials for production environments.
MCP Workitem Server
依赖安装
本项目推荐使用 uv 进行依赖管理和运行。
安装 uv
安装依赖
环境变量与配置
- 推荐使用
.env
文件或环境变量注入敏感信息。 - 必需:
organizationId
:阿里云组织IDx-yunxiao-token
:阿里云API Token
.env 自动加载说明
- fastmcp 和 uv 支持自动加载项目根目录下的
.env
文件,无需额外代码。 - 启动服务时(如
uv run mcp run mcp_server.py
),会自动读取.env
文件中的变量。 - 你也可以用 python-dotenv 手动加载(如有特殊需求)。
.env 示例文件
在项目根目录下新建 .env
文件,内容如下:
.env
文件用于本地开发和测试,请勿提交敏感信息到代码仓库。- 建议在
.gitignore
文件中加入.env
,防止泄漏:
Docker 部署与环境变量注入
构建镜像
运行容器(推荐方式)
- 通过 --env-file 挂载 .env 文件
- 在项目根目录准备好
.env
文件(内容同上) - 启动容器:
- 在项目根目录准备好
- 通过 -e 传递环境变量
- 直接在命令行传递敏感信息:
- 直接在命令行传递敏感信息:
- 通过 volume 挂载 .env 文件
- 将本地 .env 文件挂载到容器内:
- 将本地 .env 文件挂载到容器内:
安全提示: 不要将
.env
文件 COPY 进镜像,避免敏感信息泄漏。推荐用--env-file
或-e
方式传递。
启动服务
工具说明
本服务通过 MCP 协议暴露 get_workitem_description
工具,参数为需求ID(如 YEPPPP-154),返回结构化 JSON,包含:
text
:纯文本描述images
:图片 URL 列表html
:原始 HTML 内容
返回示例
错误处理
- 若外部 API 请求失败,返回
{ "error": "错误信息" }
,agent 可据此判断。
agent 调用建议
- 通过 MCP 协议自动发现和调用
get_workitem_description
工具。 - 仅需传入
id
参数,无需关心 org_id/token。
开发与调试
- 推荐用
uv run fastmcp dev mcp_server.py
进行本地开发,支持热重载和交互测试。 - 支持标准 MCP agent 生态。
参考
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
A server that provides access to Alibaba Cloud workitem descriptions through MCP protocol, allowing agents to retrieve structured workitem data including text, images, and HTML content by ID.
Related MCP Servers
- AsecurityFlicenseAqualityA Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with your AWS environment. This allows for natural language querying and management of your AWS resources during conversations. Think of better Amazon Q alternative.Last updated -3264TypeScript
- AsecurityAlicenseAqualityA Model Context Protocol (MCP) server that provides tools for reading Excel (xlsx) files, enabling extraction of data from entire workbooks or specific sheets with results returned in structured JSON format.Last updated -35PythonApache 2.0
- AsecurityFlicenseAqualityAn MCP server implementation that enables interaction with the Unstructured API, providing tools to list, create, update, and manage sources, destinations, and workflows.Last updated -3928
- -securityFlicense-qualityA management tool for Alibaba Cloud Message Service (MNS) implemented through the MCP framework, allowing users to create, delete, send messages to, and receive messages from MNS queues through MCP Host configuration.Last updated -Python