Name | mcp2mqtt JSON |
Version |
0.3.0
JSON |
| download |
home_page | None |
Summary | MCP MQTT Service for PWM Control and Device Communication |
upload_time | 2025-01-02 00:01:32 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | None |
keywords |
communication
control
device
mcp
mqtt
pwm
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# mcp2mqtt: Bridge between AI Models and Physical World
Connect AI Large Language Models to hardware devices through the Model Context Protocol (MCP).
[GitHub Repository](https://github.com/mcp2everything/mcp2mqtt) | [Documentation](https://github.com/mcp2everything/mcp2mqtt/tree/main/docs)
## Features
- **Intelligent Serial Communication**
- Automatic port detection and configuration
- Multiple baud rate support (default 115200)
- Real-time status monitoring and error handling
- **MCP Protocol Integration**
- Full Model Context Protocol support
- Resource management and tool invocation
- Flexible prompt system
## Supported Clients
mcp2mqtt supports all clients implementing the MCP protocol, including:
- Claude Desktop (Test ok)
- Continue (Should work)
- Cline (Test ok)
## Quick Start
make sure you have installed uv
```
```bash
windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
MacOS
curl -LsSf https://astral.sh/uv/install.sh | sh
```
## Basic Configuration
Add the following to your MCP client configuration:
```json
{
"mcpServers": {
"mcp2mqtt": {
"command": "uvx",
"args": ["mcp2mqtt"]
}
}
}
```
## MQTT and command Configuration
Create or modify `config.yaml` to configure mqtt parameters:
```yaml
mqtt:
# MQTT服务器配置 - 使用EMQX公共测试服务器
broker: "broker.emqx.io" # EMQX公共测试服务器地址
port: 1883 # TCP端口
websocket_port: 8083 # WebSocket端口
ssl_port: 8883 # SSL/TLS端口
ws_ssl_port: 8084 # WebSocket Secure端口
quic_port: 14567 # QUIC端口
client_id: "mcp2mqtt_test_client" # 测试客户端ID
username: "" # 公共测试服务器不需要认证
password: "" # 公共测试服务器不需要认证
keepalive: 60
response_start_string: "CMD" # 应答的开始字符串,用于验证响应
# MCP工具定义
tools:
set_pwm:
name: "set_pwm"
description: "设置PWM频率,范围0-100"
parameters:
- name: "frequency"
type: "integer"
description: "PWM频率值(0-100)"
required: true
mqtt_topic: "mcp2mqtt/pwm"
response_topic: "mcp2mqtt/pwm/response"
response_format: "CMD PWM {frequency} OK"
```
## Configuration File Location
The configuration file (`config.yaml`) can be placed in different locations depending on your needs. The program searches for the configuration file in the following order:
### 1. Current Working Directory (For Development)
- Path: `./config.yaml`
- Example: If you run the program from `C:\Projects`, it will look for `C:\Projects\config.yaml`
- Best for: Development and testing
- No special permissions required
### 2. User's Home Directory (Recommended for Personal Use)
- Windows: `C:\Users\YourName\.mcp2mqtt\config.yaml`
- macOS: `/Users/YourName/.mcp2mqtt/config.yaml`
- Linux: `/home/username/.mcp2mqtt/config.yaml`
- Best for: Personal configuration
- Create the `.mcp2mqtt` directory if it doesn't exist
- No special permissions required
### 3. System-wide Configuration (For Multi-user Setup)
- Windows: `C:\ProgramData\mcp2mqtt\config.yaml` (requires admin rights)
- macOS/Linux: `/etc/mcp2mqtt/config.yaml` (requires sudo/root)
- Best for: Shared configuration in multi-user environments
- Create the directory with appropriate permissions
The program will use the first valid configuration file it finds in this order. Choose the location based on your needs:
- For testing: use current directory
- For personal use: use home directory (recommended)
- For system-wide settings: use ProgramData or /etc
## Documentation
For detailed documentation, please visit our [GitHub repository](https://github.com/mcp2everything/mcp2mqtt).
## Support
If you encounter any issues or have questions:
1. Check our [Issues](https://github.com/mcp2everything/mcp2mqtt/issues) page
2. Read our [Wiki](https://github.com/mcp2everything/mcp2mqtt/wiki)
3. Create a new issue if needed
## License
This project is licensed under the MIT License.
Raw data
{
"_id": null,
"home_page": null,
"name": "mcp2mqtt",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "mcp2everything <mcp2everything@gmail.com>",
"keywords": "communication, control, device, mcp, mqtt, pwm",
"author": null,
"author_email": "mcp2everything <mcp2everything@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/8e/f1/91e9a80b680a922523246bfbeac5f8b969dc5e03edaa376a7010c62dd236/mcp2mqtt-0.3.0.tar.gz",
"platform": null,
"description": "# mcp2mqtt: Bridge between AI Models and Physical World\n\nConnect AI Large Language Models to hardware devices through the Model Context Protocol (MCP).\n\n[GitHub Repository](https://github.com/mcp2everything/mcp2mqtt) | [Documentation](https://github.com/mcp2everything/mcp2mqtt/tree/main/docs)\n\n## Features\n\n- **Intelligent Serial Communication**\n - Automatic port detection and configuration\n - Multiple baud rate support (default 115200)\n - Real-time status monitoring and error handling\n\n- **MCP Protocol Integration**\n - Full Model Context Protocol support\n - Resource management and tool invocation\n - Flexible prompt system\n\n## Supported Clients\n\nmcp2mqtt supports all clients implementing the MCP protocol, including:\n\n- Claude Desktop (Test ok)\n- Continue (Should work)\n- Cline (Test ok)\n\n## Quick Start\nmake sure you have installed uv\n```\n```bash\nwindows\npowershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\nMacOS\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n## Basic Configuration\n\nAdd the following to your MCP client configuration:\n\n```json\n{\n \"mcpServers\": {\n \"mcp2mqtt\": {\n \"command\": \"uvx\",\n \"args\": [\"mcp2mqtt\"]\n }\n }\n}\n```\n\n## MQTT and command Configuration\nCreate or modify `config.yaml` to configure mqtt parameters:\n\n```yaml\nmqtt:\n # MQTT\u670d\u52a1\u5668\u914d\u7f6e - \u4f7f\u7528EMQX\u516c\u5171\u6d4b\u8bd5\u670d\u52a1\u5668\n broker: \"broker.emqx.io\" # EMQX\u516c\u5171\u6d4b\u8bd5\u670d\u52a1\u5668\u5730\u5740\n port: 1883 # TCP\u7aef\u53e3\n websocket_port: 8083 # WebSocket\u7aef\u53e3\n ssl_port: 8883 # SSL/TLS\u7aef\u53e3\n ws_ssl_port: 8084 # WebSocket Secure\u7aef\u53e3\n quic_port: 14567 # QUIC\u7aef\u53e3\n client_id: \"mcp2mqtt_test_client\" # \u6d4b\u8bd5\u5ba2\u6237\u7aefID\n username: \"\" # \u516c\u5171\u6d4b\u8bd5\u670d\u52a1\u5668\u4e0d\u9700\u8981\u8ba4\u8bc1\n password: \"\" # \u516c\u5171\u6d4b\u8bd5\u670d\u52a1\u5668\u4e0d\u9700\u8981\u8ba4\u8bc1\n keepalive: 60\n response_start_string: \"CMD\" # \u5e94\u7b54\u7684\u5f00\u59cb\u5b57\u7b26\u4e32\uff0c\u7528\u4e8e\u9a8c\u8bc1\u54cd\u5e94\n\n# MCP\u5de5\u5177\u5b9a\u4e49\ntools:\n set_pwm:\n name: \"set_pwm\"\n description: \"\u8bbe\u7f6ePWM\u9891\u7387\uff0c\u8303\u56f40-100\"\n parameters:\n - name: \"frequency\"\n type: \"integer\"\n description: \"PWM\u9891\u7387\u503c(0-100)\"\n required: true\n mqtt_topic: \"mcp2mqtt/pwm\"\n response_topic: \"mcp2mqtt/pwm/response\"\n response_format: \"CMD PWM {frequency} OK\"\n```\n## Configuration File Location\n\nThe configuration file (`config.yaml`) can be placed in different locations depending on your needs. The program searches for the configuration file in the following order:\n\n### 1. Current Working Directory (For Development)\n- Path: `./config.yaml`\n- Example: If you run the program from `C:\\Projects`, it will look for `C:\\Projects\\config.yaml`\n- Best for: Development and testing\n- No special permissions required\n\n### 2. User's Home Directory (Recommended for Personal Use)\n- Windows: `C:\\Users\\YourName\\.mcp2mqtt\\config.yaml`\n- macOS: `/Users/YourName/.mcp2mqtt/config.yaml`\n- Linux: `/home/username/.mcp2mqtt/config.yaml`\n- Best for: Personal configuration\n- Create the `.mcp2mqtt` directory if it doesn't exist\n- No special permissions required\n\n### 3. System-wide Configuration (For Multi-user Setup)\n- Windows: `C:\\ProgramData\\mcp2mqtt\\config.yaml` (requires admin rights)\n- macOS/Linux: `/etc/mcp2mqtt/config.yaml` (requires sudo/root)\n- Best for: Shared configuration in multi-user environments\n- Create the directory with appropriate permissions\n\nThe program will use the first valid configuration file it finds in this order. Choose the location based on your needs:\n- For testing: use current directory\n- For personal use: use home directory (recommended)\n- For system-wide settings: use ProgramData or /etc\n\n## Documentation\n\nFor detailed documentation, please visit our [GitHub repository](https://github.com/mcp2everything/mcp2mqtt).\n\n## Support\n\nIf you encounter any issues or have questions:\n1. Check our [Issues](https://github.com/mcp2everything/mcp2mqtt/issues) page\n2. Read our [Wiki](https://github.com/mcp2everything/mcp2mqtt/wiki)\n3. Create a new issue if needed\n\n## License\n\nThis project is licensed under the MIT License.\n",
"bugtrack_url": null,
"license": null,
"summary": "MCP MQTT Service for PWM Control and Device Communication",
"version": "0.3.0",
"project_urls": {
"Changelog": "https://github.com/mcp2everything/mcp2mqtt/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/mcp2everything/mcp2mqtt",
"Issues": "https://github.com/mcp2everything/mcp2mqtt/issues",
"Repository": "https://github.com/mcp2everything/mcp2mqtt.git"
},
"split_keywords": [
"communication",
" control",
" device",
" mcp",
" mqtt",
" pwm"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b2758125a4f9422430bc8038b4fbb6d7645a4f8ad3f624fbc66bb08c964ddf8e",
"md5": "5eba60ab5548081c1e31a0bd83f89c2c",
"sha256": "b7a1772e1598ae591ac797a347c81bbbf1cefa8cf801de450d80a0b989fe3ba3"
},
"downloads": -1,
"filename": "mcp2mqtt-0.3.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5eba60ab5548081c1e31a0bd83f89c2c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 9644,
"upload_time": "2025-01-02T00:01:27",
"upload_time_iso_8601": "2025-01-02T00:01:27.102824Z",
"url": "https://files.pythonhosted.org/packages/b2/75/8125a4f9422430bc8038b4fbb6d7645a4f8ad3f624fbc66bb08c964ddf8e/mcp2mqtt-0.3.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8ef191e9a80b680a922523246bfbeac5f8b969dc5e03edaa376a7010c62dd236",
"md5": "7f6dd9445843d971fa4b5bbc38b1ebc7",
"sha256": "401d8c91d39e0ebc90c56fb54a04a0bbd44e95ac2ec762e7245cb9bfda153acb"
},
"downloads": -1,
"filename": "mcp2mqtt-0.3.0.tar.gz",
"has_sig": false,
"md5_digest": "7f6dd9445843d971fa4b5bbc38b1ebc7",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 5812559,
"upload_time": "2025-01-02T00:01:32",
"upload_time_iso_8601": "2025-01-02T00:01:32.610066Z",
"url": "https://files.pythonhosted.org/packages/8e/f1/91e9a80b680a922523246bfbeac5f8b969dc5e03edaa376a7010c62dd236/mcp2mqtt-0.3.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-02 00:01:32",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mcp2everything",
"github_project": "mcp2mqtt",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "mcp2mqtt"
}