mcp4hal
Getting started
本项目实现了基于mqtt broker进行mcp协议转换,可以将mqtt client变成一个可以被llm agent调用的mcp server/tools。
架构图
如何使用
sdk&源码
example运行
-
搭建一个mqtt broker,可以选择使用mosquitto
-
选择一个mcu,比如esp32S3,也可以软件模拟(可以参考
mcp4hal/tests/mqtt/mock_mqtt_mcu.py)。 -
启动参考项目
# server > cd $source_code_dir > mv .env.example .evn # 编辑.env文件,正确配置相关参数 > ./startup.sh # 启动服务 # client > # 连接好esp32设备 > cd $source_code_dir/hardware/base/micropython/mcp4hal_mqtt > # 修改main.py文件头部的相关配置,包括wifi和mqtt配置 > cd $source_code_dir/hardware/esp32/script > # 编辑flash.sh文件,配置好相关变量 > ./flash.sh # 将client代码刷到esp32上 > # 重新启动esp32板子,可以看到日志输出,wifi连接以及mqtt连接 -
调用测试:使用mcp inspector进行mcp调用测试
Metadata
Release files for mcp4hal 0.0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mcp4hal-0.0.10.tar.gz | 11.9 kB | Without provenance | Details for mcp4hal-0.0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mcp4hal-0.0.10-py3-none-any.whl | Python 3 | none | any | Details for mcp4hal-0.0.10-py3-none-any.whl |
Total release size: 25.5 kB
Release files / mcp4hal-0.0.10.tar.gz
| Download URL | mcp4hal-0.0.10.tar.gz |
|---|---|
| Size | 11.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e9752eedf56abec15c9fe67109e7e845e9fa456221ed1773ce2f89a0fd404de
|
|
BLAKE2b-256 checksum How to use checksums |
9107c3eb73108c4fe89de1f8c105b09e965e681741ec6f7395c83c1a7967fb7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Release files / mcp4hal-0.0.10-py3-none-any.whl
| Download URL | mcp4hal-0.0.10-py3-none-any.whl |
|---|---|
| Size | 13.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e4abaeca3af7a09971dbf584091a4162c52098de54632d7db147e262ac5da30c
|
|
BLAKE2b-256 checksum How to use checksums |
7654b44c58a3b0c854bbd06801e44fb1ab259016dedd4bc8d2078669ecd32857
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.7.8
|
Security for mcp4hal 0.0.10
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.