by mcp2everything
Connect real-world devices like Raspberry Pi using asynchronous serial interface and comms port for advanced IoT and rob
Enables AI models to control physical hardware devices through serial communication, bridging the gap between natural language and IoT/robotics hardware.
Serial is a community-built MCP server published by mcp2everything that provides AI assistants with tools and capabilities via the Model Context Protocol. Connect real-world devices like Raspberry Pi using asynchronous serial interface and comms port for advanced IoT and rob It is categorized under ai ml, developer tools.
You can install Serial in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
MIT
Serial is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Share your MCP server with the developer community
I recommend Serial for teams standardizing on MCP; the explainx.ai page compares cleanly with sibling servers.
We evaluated Serial against two servers with overlapping tools; this profile had the clearer scope statement.
Serial has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
We wired Serial into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
We wired Serial into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
Strong directory entry: Serial surfaces stars and publisher context so we could sanity-check maintenance before adopting.
According to our notes, Serial benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
Useful MCP listing: Serial is the kind of server we cite when onboarding engineers to host + tool permissions.
Serial is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
Serial is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
showing 1-10 of 35
English | 简体中文
<div align="center"> <img src="docs/images/logo.png" alt="MCP2Serial Logo" width="200"/> <p>通过自然语言控制硬件,开启物联网新纪元</p> </div>MCP2Serial 将串口设备接入AI大模型的项目,它通过 Model Context Protocol (MCP) 将物理世界与 AI 大模型无缝连接。最终实现:
智能串口通信
MCP 协议集成
MCP2Serial 支持所有实现了 MCP 协议的客户端,包括:
| 客户端 | 特性支持 | 说明 |
|---|---|---|
| Claude Desktop | 完整支持 | 推荐使用,支持所有 MCP 功能 |
| Continue | 完整支持 | 优秀的开发工具集成 |
| Cline | 资源+工具 | 支持多种 AI 提供商 |
| Zed | 基础支持 | 支持提示词命令 |
| Sourcegraph Cody | 资源支持 | 通过 OpenCTX 集成 |
| Firebase Genkit | 部分支持 | 支持资源列表和工具 |
得益于灵活的客户端支持,MCP2Serial 可以与多种 AI 模型协同工作:
Python3.11 或更高版本 Claude Desktop 或 Cline
下载 install.py
python install.py
# 下载安装脚本
curl -O https://raw.githubusercontent.com/mcp2everything/mcp2serial/main/install_macos.py
# 运行安装脚本
python3 install_macos.py
# 下载安装脚本
curl -O https://raw.githubusercontent.com/mcp2everything/mcp2serial/main/install_ubuntu.py
# 运行安装脚本
python3 install_ubuntu.py
安装脚本会自动完成以下操作:
windows
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
MacOS
curl -LsSf https://astral.sh/uv/install.sh | sh
主要依赖uv工具,所以当python和uv以及Claude或Cline安装好后就可以了。
在你的 MCP 客户端(如 Claude Desktop 或 Cline)配置文件中添加以下内容: 注意:如果使用的自动安装那么会自动配置Calude Desktop无需此步。 使用默认配置文件:
{
"mcpServers": {
"mcp2serial": {
"command": "uvx",
"args": [
"mcp2serial"
]
}
}
}
注意:修改配置后需要重启Cline或者Claude客户端软件
配置串口和命令: 注意下面的配置默认为COM11 需要根据实际进行修改
# config.yaml
serial:
port: COM11 # 或自动检测
baud_rate: 115200 # 可选,默认 115200
timeout: 1.0 # 可选,默认 1.0
read_timeout: 1.0 # 读取超时时间,1秒内不应答则报错
response_start_string: OK # 可选,串口应答的开始字符串,默认为OK
commands:
set_pwm:
command: "PWM {frequency}
"
need_parse: false
prompts:
- "把PWM调到{value}"
配置文件(config.yaml)可以放在不同位置,程序会按以下顺序查找:
./config.yamlC:\Projects 运行程序,它会查找 C:\Projects\config.yaml# Windows系统
C:\Users\用户名\.mcp2serial\config.yaml
# macOS系统
/Users/用户名/.mcp2serial/config.yaml
# Linux系统
/home/用户名/.mcp2serial/config.yaml
.mcp2serial 目录:
# Windows系统(在命令提示符中)
mkdir "%USERPROFILE%\.mcp2serial"
# macOS/Linux系统
mkdir -p ~/.mcp2serial
# Windows系统(需要管理员权限)
C:\ProgramData\mcp2serial\config.yaml
# macOS/Linux系统(需要root权限)
/etc/mcp2serial/config.yaml
# Windows系统(以管理员身份运行)
mkdir "C:\ProgramData\mcp2serial"
# macOS/Linux系统(以root身份运行)
sudo mkdir -p /etc/mcp2serial
sudo chown root:root /etc/mcp2serial
sudo chmod 755 /etc/mcp2serial
程序会按照上述顺序查找配置文件,使用找到的第一个有效配置文件。根据你的需求选择合适的位置:
在 config.yaml 中添加自定义命令:
默认不使用真实串口 用模拟串口来演示则无需修改
serial:
# 串口配置
port: LOOP_BACK # 可选,如果不指定则自动查找。设置为LOOP_BACK时启用回环模式,发送什么就接收什么
baud_rate: 115200 # 可选,默认 115200
timeout: 1.0 # 可选,默认 1.0
read_timeout: 1.0 # 读取超时时间,1秒内不应答则报错
response_start_string: CMD # 可选,串口应答的开始字符串,默认为OK
commands:
# PWM控制命令
set_pwm:
command: "CMD_PWM {frequency}" # 实际发送的命令格式,server会自动添加
need_parse: false # 不需要解析响应内容
prompts:
- "把PWM调到最大"
- "把PWM调到最小"
- "请将PWM设置为{value}"
- "关闭PWM"
- "把PWM调到一半"
使用真实串口
# config.yaml
serial:
port: COM11 # 或自动检测
baud_rate: 115200 # 可选,默认 115200
timeout: 1.0 # 可选,默认 1.0
read_timeout: 1.0 # 读取超时时间,1秒内不应答则报错
response_start_string: OK # 可选,串口应答的开始字符串,默认为OK
commands:
set_pwm:
command: "PWM {frequency}
"
need_parse: false
prompts:
- "把PWM调到{value}"
指定配置文件: 比如指定加载Pico配置文件:Pico_config.yaml
{
"mcpServers": {
"mcp2serial": {
"command": "uvx",
"args": [
"mcp2serial",
"--config",
"Pico" //指定配置文件名,不需要添加_config.yaml后缀
]
}
}
}
为了能使用多个串口,我们可以新增多个mcp2serial的服务 指定不同的配置文件名即可。 如果要接入多个设备,如有要连接第二个设备: 指定加载Pico2配置文件:Pico2_config.yaml
{
"mcpServers": {
"mcp2serial2": {
"command": "uvx",
"args": [
"mcp2serial",
"--config",
"Pico2" //指定配置文件名,不需要添加_config.yaml后缀
]
}
}
}
简单响应(need_parse: false):
需要解析的响应(need_parse: true):
result.raw 字段中返回config.yaml中配置正确的端口号和波特率firmware可以在项目仓库中下载,目前演示的是Pico的micropython代码案例。另存到Pico开发板运行即可。
# 通过源码安装:
git clone https://github.com/mcp2everything/mcp2serial.git
cd mcp2serial
# 创建虚拟环境
uv venv .venv
# 激活虚拟环境
# Windows:
.venv\Scripts\activate
# Linux/macOS:
source .venv/bin/activate
# 安装开发依赖
uv pip install --editable .
serial:
# 串口配置
port: LOOP_BACK # 可选,如果不指定则自动查找。设置为LOOP_BACK时启用回环模式,发送什么就接收什么
baud_rate: 115200 # 可选,默认 115200
timeout: 1.0 # 可选,默认 1.0
read_timeout: 1.0 # 读取超时时间,1秒内不应答则报错
response_start_string: CMD # 可选,串口应答的开始字符串,默认为OK
commands:
# PWM控制命令
set_pwm:
command: "CMD_PWM {frequency}" # 实际发送的命令格式,server会自动添加
need_parse: false # 不需要解析响应内容
prompts:
- "把PWM调到最大"
- "把PWM调到最小"
- "请将PWM设置为{value}"
- "关闭PWM"
- "把PWM调到一半"
如果使用真实串口
# config.yaml
serial:
port: COM11 # 或自动检测
baud_rate: 115200 # 可选,默认 115200
timeout: 1.0 # 可选,默认 1.0
read_timeout: 1.0 # 读取超时时间,1秒内不应答则报错
response_start_string: OK # 可选,串口应答的开始字符串,默认为OK
commands:
set_pwm:
command: "PWM {frequency}
"
need_parse: false
prompts:
- "把PWM调到{value}"
在使用支持MCP协议的客户端(如Claude Desktop或Cline)时,需要在客户端的配置文件中添加以下内容: 直接自动安装的配置方式 源码开发的配置方式
{
"mcpServers": {
"mcp2serial": {
"command": "uv",
"args": [
"--directory",
"你的实际路径/mcp2serial", // 例如: "C:/Users/Administrator/Documents/develop/my-mcp-server/mcp2serial"
"run",
"mcp2serial"
]
}
}
}
{
"mcpServers": {
"mcp2serial": {
"command": "uv",
"args": [
"--directory",
"你的实际路径/mcp2serial", // 例如: "C:/Users/Administrator/Documents/develop/my-mcp-server/mcp2serial"
"run",
"mcp2serial",
"--config", // 可选参数,指定配置文件名
"Pico" // 可选参数,指定配置文件名,不需要添加_config.yaml后缀
]
}
}
}
# 确保已激活虚拟环境
.venv\Scripts\activate
# 运行服务器(使用默认配置config.yaml 案例中用的LOOP_BACK 模拟串口,无需真实串口和串口设备)
uv run src/mcp2serial/server.py
或
uv run mcp2serial
# 运行服务器(使用指定配置Pico_config.yaml)
uv run src/mcp2serial/server.py --config Pico
或
uv run mcp2serial --config Pico
智能家居自动化
工业自动化
教育和研究
原型开发
工业协议支持
硬件接口扩展
统一集成平台
智能功能
插件市场
云服务集成
垂直领域适配
定制化服务
MCP2Serial 正在开启物联网的新篇章:
MCP2Serial 正在开启物联网的新篇章:
我们欢迎各种形式的贡献,无论是新功能、文档改进还是问题报告。查看 贡献指南 了解更多信息。
Prerequisites
Time Estimate
15-60 minutes depending on server complexity
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
Compatibility
✓ Use when
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid when
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.