chore: tighten official submission boundary
本项目面向 OpenHarmony 风格系统实现一个用户态原生 MCP 协议栈原型。核心目标是把 MCP 的 JSON-RPC 路由、安全校验、上下文缓存/压缩和审计能力收束到系统服务边界内,减少 SDK/proxy 对照路径中的额外开销,并给出可复现的构建、测试、基准和展示材料。
作者团队:武汉大学计算机学院。
native-mcpd --config config/native_mcpd.toml
initialize
ping
tools/list
tools/call
resources/list
resources/read
prompts/list
prompts/get
metrics/read
id
notifications/initialized
notifications/cancelled
--check-config
BUILD.gn
bundle.json
git clone https://gitlink.org.cn/Lijiabin1234/ohos-native-mcp-stack.git cd ohos-native-mcp-stack cmake -S . -B build -DCMAKE_BUILD_TYPE=Release cmake --build build -j2 ctest --test-dir build --output-on-failure pytest -q python3 examples/edge_agent_demo.py python3 scripts/run_benchmarks.py --all --iterations 300 python3 scripts/capture_demo_evidence.py python3 scripts/package_submission.py python3 scripts/validate_submission.py --min-iterations 300
完整验证也可以统一执行:
python3 scripts/run_all_checks.py --benchmark-iterations 300
如果 WSL2 中缺少 pytest:
pytest
uv tool install pytest
./build/native-mcpd --version ./build/native-mcpd --config config/native_mcpd.toml --check-config python3 tools/mcpctl.py initialize python3 tools/mcpctl.py tools list python3 tools/mcpctl.py tools call math.add '{"a":4,"b":6}' python3 tools/mcpctl.py resources read ohos://mcp/design
python3 tools/mcpbench.py run --profile profiles/native.yaml --iterations 300
基准测试对比两条路径:
native-mcpd
最终报告位于:
reports/benchmark_results.json
reports/benchmark_summary.md
平台上传文件为 dist/ohos-native-mcp-stack-submission.zip,按赛题“文件 + 链接”模式准备,包含以下成果:
dist/ohos-native-mcp-stack-submission.zip
submission_note.md
submission_manifest.json
LICENSE
preliminary_report.pdf
presentation.pptx
demo_video.mp4
source_snapshot.zip
reproduction_guide.md
evidence/coverage_evidence.txt
evidence/mutation_evidence.txt
evidence/protocol_trace.txt
evidence/random_seed.txt
evidence/environment.txt
evidence/preflight_log.txt
作品链接使用 GitLink 仓库:https://gitlink.org.cn/Lijiabin1234/ohos-native-mcp-stack。
https://gitlink.org.cn/Lijiabin1234/ohos-native-mcp-stack
scripts/validate_submission.py 默认使用 300 次基准迭代作为提交验证条件,并检查 ZIP 文件清单、大小限制、源码快照和可复现实验记录。
scripts/validate_submission.py
src/
include/
tools/
mcpctl
mcpbench
tests/
config/
profiles/
docs/
openharmony/
OpenHarmony 用户态原生 MCP 协议栈原型,包含协议路由、上下文压缩缓存、安全认证、基准测试、OpenHarmony 集成材料和中文展示资产。
版权所有:中国计算机学会技术支持:开源发展技术委员会 京ICP备13000930号-9 京公网安备 11010802047560号
OpenHarmony 原生 MCP 协议栈
本项目面向 OpenHarmony 风格系统实现一个用户态原生 MCP 协议栈原型。核心目标是把 MCP 的 JSON-RPC 路由、安全校验、上下文缓存/压缩和审计能力收束到系统服务边界内,减少 SDK/proxy 对照路径中的额外开销,并给出可复现的构建、测试、基准和展示材料。
作者团队:武汉大学计算机学院。
核心能力
native-mcpd --config config/native_mcpd.tomlinitialize、ping、tools/list、tools/call、resources/list、resources/read、prompts/list、prompts/get、metrics/readid的 notificationnotifications/initialized与notifications/cancelled--check-config显示 token 来源,同时不输出 token 值tools/list暴露的 schema 校验tools/call参数BUILD.gn、bundle.json、服务适配草案和移植说明WSL2 构建与验证
完整验证也可以统一执行:
如果 WSL2 中缺少
pytest:常用命令
基准测试
基准测试对比两条路径:
native-mcpd核心。最终报告位于:
reports/benchmark_results.jsonreports/benchmark_summary.md官方提交包内容
平台上传文件为
dist/ohos-native-mcp-stack-submission.zip,按赛题“文件 + 链接”模式准备,包含以下成果:submission_note.mdsubmission_manifest.jsonLICENSEpreliminary_report.pdfpresentation.pptxdemo_video.mp4source_snapshot.zipreproduction_guide.mdevidence/coverage_evidence.txt、evidence/mutation_evidence.txt、evidence/protocol_trace.txt、evidence/random_seed.txt、evidence/environment.txt、evidence/preflight_log.txt作品链接使用 GitLink 仓库:
https://gitlink.org.cn/Lijiabin1234/ohos-native-mcp-stack。scripts/validate_submission.py默认使用 300 次基准迭代作为提交验证条件,并检查 ZIP 文件清单、大小限制、源码快照和可复现实验记录。仓库结构
src/、include/:C++17 原生 MCP 服务实现tools/:mcpctl和mcpbenchtests/:C++ 与 Python 测试config/、profiles/:运行配置与基准 profiledocs/:设计、测试、部署和 OpenHarmony 移植文档openharmony/:OpenHarmony 服务适配草案与集成片段