Skip to main content

HarmonyOS MCP 通用组件库 - 提供 MCP 服务器基础架构、工具注册、容器管理和通用工具类

Project description

harmonyos-mcp-common

HarmonyOS MCP 通用组件库,提供 MCP 服务器基础架构。

功能特性

  • MCP 服务器基础 - 统一的服务器创建和运行框架
  • 工具注册系统 - 装饰器驱动的工具注册和管理
  • 容器管理 - 依赖注入和服务容器
  • 配置管理 - 统一的配置加载和验证
  • 通用工具类 - 设备管理、UI 操作、构建工具的基础类

安装

pip install harmonyos-mcp-common

使用示例

from common.server.base import create_server, run_server
from common.tools.registry import mcp_tool

# 创建 MCP 服务器
mcp = create_server("my-server")

# 注册工具
@mcp_tool(category="general")
async def my_tool(param: str) -> dict:
    return {"result": param}

# 运行服务器
run_server(mcp)

相关项目

License

Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

harmonyos_mcp_common-0.7.2.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

harmonyos_mcp_common-0.7.2-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file harmonyos_mcp_common-0.7.2.tar.gz.

File metadata

  • Download URL: harmonyos_mcp_common-0.7.2.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","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}

File hashes

Hashes for harmonyos_mcp_common-0.7.2.tar.gz
Algorithm Hash digest
SHA256 735e711d2119d131f4352728f2dcbd7a02f1df6fb8bb7d28f2d3f02e1a0901ee
MD5 5ca5c668bdb86505394bd2d965609409
BLAKE2b-256 150dcddec61dfd3fd36a3fdbb22da6e8c16e3edf02bb3d2fb4f11ef81ee6f559

See more details on using hashes here.

File details

Details for the file harmonyos_mcp_common-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: harmonyos_mcp_common-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.28 {"installer":{"name":"uv","version":"0.9.28","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}

File hashes

Hashes for harmonyos_mcp_common-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1c6bcb6a27ccdab8a34da9dd198a948f787e72f36206eb1f3a09ae337b94ad2
MD5 01e88603d5234505f80025f8e57faa33
BLAKE2b-256 1b368f299333ef14712483988325c30bd96d8463b008e062e80df901d4bf1335

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page