Skip to main content

Alibaba Cloud MCP Service

这是一个可以发布到 PyPI,并通过 uvx 在阿里云百炼自定义 MCP 中部署的 Python 服务。

特点

  • 默认使用 stdio 运行,适合阿里云的脚本部署方式
  • 同时保留 streamable-http 模式,方便本地调试或后续扩展
  • 提供了一个工具、一个资源和一个提示词,便于快速验证部署是否成功

打包发布

先构建包:

uv build

然后发布到 PyPI:

uv publish

如果你还没有配置 PyPI 凭据,可以先按 uv 的发布流程登录或设置 token,再执行发布。

本地运行

先安装依赖:

uv sync

然后启动服务:

uv run -m hexagram_mcp_service

如果想用 HTTP 方式调试:

set MCP_TRANSPORT=streamable-http
set MCP_PORT=8000
uv run -m hexagram_mcp_service

服务会监听 http://127.0.0.1:8000。

在阿里云百炼里部署

在「MCP 管理」里选择「创建 MCP 服务」->「使用脚本部署」,然后把安装方式配置为 Python 的 uvx。

推荐填写:

  • 命令:uvx
  • 参数:hexagram-mcp-service

这样阿里云会从 PyPI 拉取你的包,并直接启动导出的 console script。

如果你想显式指定版本,也可以使用:

  • 命令:uvx
  • 参数:hexagram-mcp-service==0.1.2

默认情况下,这个服务使用 stdio 作为脚本部署模式;如果你要本地调试 HTTP 模式,可以设置环境变量 MCP_TRANSPORT=streamable-http。

可选的环境变量:

  • MCP_HOST:HTTP 绑定地址,默认 0.0.0.0
  • MCP_PORT:HTTP 端口,默认 8000
  • MCP_STREAMABLE_HTTP_PATH:HTTP 路径,默认 /mcp
  • MCP_JSON_RESPONSE:是否返回 JSON,默认 true
  • MCP_STATELESS_HTTP:是否启用无状态 HTTP,默认 true

可用能力

  • hexagram():按当前时间返回卦象名称
  • health():返回健康状态和运行时间
  • service://info:服务元数据资源
  • deployment_checklist(region):部署检查清单提示词

阿里云控制台填写建议

如果控制台要求填写服务描述,可以写成:

一个可通过 PyPI 发布并使用 uvx 部署的 MCP 服务,提供基础工具、资源和部署检查提示词。

Metadata

Release files for hexagram-mcp-service 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hexagram-mcp-service 0.1.3
File Size Uploaded Provenance
hexagram_mcp_service-0.1.3.tar.gz 4.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for hexagram-mcp-service 0.1.3
File Interpreter ABI Platform
hexagram_mcp_service-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 10.5 kB

Release files / hexagram_mcp_service-0.1.3.tar.gz

Download URL hexagram_mcp_service-0.1.3.tar.gz
Size 4.9 kB
Tags Source
SHA-256 checksum
How to use checksums
a25514e9a390626c870d699f186f19c130f025989f72eafa7e34619c34d06b2a
BLAKE2b-256 checksum
How to use checksums
0e4608fff5e88b1af2b4907dc2de33acfaeb2f3e017bf7c39102c6f470833325
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / hexagram_mcp_service-0.1.3-py3-none-any.whl

Download URL hexagram_mcp_service-0.1.3-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2fa227b44331a8b82600aa4b8dc6f25f749dd4b640cb7663d6f009fa0d81318
BLAKE2b-256 checksum
How to use checksums
4b52c126e63db015b90165701cd9c42f3e782d8a4f53ccfee1640957a7a4040f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for hexagram-mcp-service 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page