MCP Hand Detection
一个基于 MediaPipe 的 Model Context Protocol (MCP) 服务器,提供手掌检测功能。
功能特性
- ✅ 基于 MediaPipe 的高精度手掌检测
- ✅ 符合 MCP 标准协议(JSON-RPC 2.0)
- ✅ 支持 stdio 和 HTTP 两种接口
- ✅ 易于集成到支持 MCP 的客户端(如 Cursor、Claude Desktop)
- ✅ 包含预训练模型,开箱即用
安装
pip install mcp-hand-detection
如果需要 HTTP API 功能:
pip install mcp-hand-detection[http]
快速开始
作为 MCP 服务器使用
在 MCP 客户端配置中添加:
{
"mcpServers": {
"hand-detection": {
"command": "mcp-hand-detection"
}
}
}
作为命令行工具使用
# 启动 MCP 服务器(通过 stdio)
mcp-hand-detection
# 启动 HTTP 服务器
mcp-hand-detection-http --port 8080
作为 Python 库使用
from mcp_hand_detection import MCPServer
# 创建服务器实例
server = MCPServer()
# 检测手掌
result = server._detect_hand("/path/to/image.jpg")
print(result)
HTTP API 使用示例
from mcp_hand_detection import create_app
app = create_app()
app.run(host='0.0.0.0', port=8080)
或者使用命令行:
mcp-hand-detection-http --host 0.0.0.0 --port 8080
然后通过 HTTP 调用:
# 文件上传
curl -X POST http://localhost:8080/api/detect -F "image=@hand.jpg"
# Base64 编码
curl -X POST http://localhost:8080/api/detect \
-H "Content-Type: application/json" \
-d '{"image_base64": "...", "image_format": "jpg"}'
API 文档
MCP 工具
- 工具名称:
detect_hand - 描述: 检测图片中是否存在手掌
- 参数:
image_path(string, 必需): 图片文件路径
- 返回: JSON 格式的检测结果
HTTP API
GET /health- 健康检查GET /api/tools- 获取工具列表POST /api/detect- 检测手掌- 支持文件上传 (
multipart/form-data) - 支持 Base64 编码 (
application/json)
- 支持文件上传 (
系统要求
- Python 3.9+
- OpenCV
- MediaPipe 0.10+
- NumPy
许可证
MIT License
贡献
欢迎提交 Issue 和 Pull Request!
链接
Metadata
Release files for mcp-hand-detection 1.0.1
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 | |
|---|---|---|---|---|
| mcp_hand_detection-1.0.1.tar.gz | 5.8 MB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mcp_hand_detection-1.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.7 MB
Release files / mcp_hand_detection-1.0.1.tar.gz
| Download URL | mcp_hand_detection-1.0.1.tar.gz |
|---|---|
| Size | 5.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7457ae18f36874213437fe52854ee9c5688577c04634f3f7a2b29fa50113f73
|
|
BLAKE2b-256 checksum How to use checksums |
59a333bc945e3615b7ae39ea1044e839ba19b7fb2b56cb1c6f9285a0c9663bfe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / mcp_hand_detection-1.0.1-py3-none-any.whl
| Download URL | mcp_hand_detection-1.0.1-py3-none-any.whl |
|---|---|
| Size | 5.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fb464e00e100e4240a01684079e071ff13dacac02fbf47b7a3bfd6ca834788e4
|
|
BLAKE2b-256 checksum How to use checksums |
cf93f35fcb4c3d17e139ee41c28a346f18fe478dd42e90f77a9f8f9da64271b4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for mcp-hand-detection 1.0.1
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.