Skip to main content

Umeko Serial MCP

Python 3.10+ License: MIT Version 0.1.4 Platform

基于 MCP 协议的本地串口通信服务,内置实时 Web 监控面板。
通过自然语言让 AI 助手与你的单片机、嵌入式设备直接对话。

Dashboard

✨ 功能特性

  • 🖥️ MCP 支持 — 通过 Model Context Protocol 与 AI 客户端无缝集成
  • 🔌 串口控制 — 自动扫描、连接、读写串口设备
  • 🌐 Web 监控面板 — 内置 HTTP + WebSocket 双端口服务,浏览器实时旁路监控
  • 兼容 Windows, MacOS, Linux

🛠️ 可用工具

工具 说明
list_ports 扫描本机所有可用串口
connect_port 连接指定串口(支持自定义波特率,默认 115200)
close_port 显式断开当前串口连接
write_data 向串口写入数据(自动补全换行符)
read_data 读取串口缓冲区数据(含用户干预历史)
start_monitor_ui 启动 Web 监控面板(默认 HTTP 8080 / WebSocket 8081)

📦 直接配置到AI助手中(推荐)

本项目已经打包上传到了uv与pypi仓库,各大AI助手中可以直接通过以下命令行添加,会自动拉取并配置。

通过命令行添加

# claude code
claude mcp add serial-mcp -- uvx --from umeko-serial-mcp start-serial-mcp
# codex
codex mcp add serial-mcp -- uvx --from umeko-serial-mcp start-serial-mcp

使用 mcp.json 添加 (Kimi Code)

Kimi Code 通过 mcp.json 配置 MCP 服务器。编辑用户级配置 ~/.kimi-code/mcp.json(或项目级 .kimi-code/mcp.json),添加以下内容:

{
  "mcpServers": {
    "serial-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "umeko-serial-mcp",
        "start-serial-mcp"
      ]
    }
  }
}

也可以在 Kimi Code 的 TUI 中运行 /mcp-config 交互式添加;配置后运行 /mcp 可查看连接状态。

使用 toml 添加 (Codex)

这是 Codex CLI 默认和推荐的配置格式 。打开你的配置文件(如 ~/.codex/config.toml),添加以下内容:

[mcp_servers.serial-mcp]
command = "uvx"
args = ["--from", "umeko-serial-mcp", "start-serial-mcp"]

通过JSON添加

🦞OpenClaw, Cursor, Cline, TRAE, Cherry Studio, Qwen Chat等其它客户端,在mcp服务器设置中,选择使用json添加并且粘贴以下字段。

{
  "mcpServers": {
    "serial-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "umeko-serial-mcp",
        "start-serial-mcp"
      ]
    }
  }
}

📦 手动下载安装运行

如果你想要自定义修改本工具使用。

方式一:通过 Python 安装

# 使用 uvx 直接运行(无需安装)
uvx --from umeko-serial-mcp start-serial-mcp

或使用 pip:

pip install umeko-serial-mcp
start-serial-mcp

方式二:本地开发安装

1. 克隆仓库

git clone https://github.com/umeiko/umeko_serial_mcp.git
cd umeko_serial_mcp

2. 安装依赖

确保已安装 uv:

uv sync

3. 本地运行

# 直接运行源码
uv run start-serial-mcp

# 或者先构建 wheel 再通过 uvx 运行(推荐,避免源码缓存问题)
uv build --wheel
uvx --from . start-serial-mcp

⚠️ 开发注意:uvx --from . 会缓存 wheel 包,修改源码后需先升级 pyproject.toml 版本号,再执行 uv build --wheel,最后重启 MCP 客户端才能生效。


⚙️ 客户端配置示例

如果要让客户端使用你本地部署的本服务,在支持 MCP 的客户端(如 Claude-code、Cursor、Cline 等)的 mcp.json 中添加:

{
  "mcpServers": {
    "serial-mcp": {
      "command": "uvx",
      "args": [
        "--from",
        "/path/to/umeko_serial_mcp",
        "start-serial-mcp",
        "--reinstall"
      ]
    }
  }
}

将 /path/to/umeko_serial_mcp 替换为本地路径(如 /home/user/umeko_serial_mcp),并加上 --reinstall 参数强制刷新缓存。

配置保存并重启客户端后,即可通过自然语言调用串口功能。


🚀 快速开始

使用类似提示词:

请使用串口工具,连接到我的esp32开发板并且测试通信

启动后,AI 会自动执行以下初始化检查:

1. start_monitor_ui    → 启动 Web 面板 http://localhost:8080
2. list_ports          → 发现 /dev/cu.usbmodem101
3. connect_port        → 连接 ESP32(115200)
4. write_data("hello")     → 测试通信
5. read_data()          → 读取串口输入

在浏览器中打开 http://localhost:8080,你可以:

  • 🔘 手动控制串口连接/断开
  • 💬 实时查看 LLM 与单片机的全部对话
  • ✏️ 手动下发命令(旁路干预)

Serial Panel

Metadata

Release files for umeko-serial-mcp 0.1.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for umeko-serial-mcp 0.1.4
File Size Uploaded Provenance Actions
umeko_serial_mcp-0.1.4.tar.gz 10.5 kB Without provenance Details for umeko_serial_mcp-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for umeko-serial-mcp 0.1.4
File Interpreter ABI Platform Actions
umeko_serial_mcp-0.1.4-py3-none-any.whl Python 3 none any Details for umeko_serial_mcp-0.1.4-py3-none-any.whl

Total release size: 22.9 kB

Release files / umeko_serial_mcp-0.1.4.tar.gz

Download URL umeko_serial_mcp-0.1.4.tar.gz
Size 10.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c886e201e672c98978956b5605776d0b5d2ca61026d5eada6e72ac601fd8c677
BLAKE2b-256 checksum
How to use checksums
839c9e83406705552babc1f106f20b7490d6f81fccf5a41cb8736659e241f506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / umeko_serial_mcp-0.1.4-py3-none-any.whl

Download URL umeko_serial_mcp-0.1.4-py3-none-any.whl
Size 12.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d2c405e487c7c5ee9d50e9ad4d6a062fe536f8268ff4d9142368b1b99c409e0e
BLAKE2b-256 checksum
How to use checksums
2581847706bf6d3c76fee50071347578f0a7de58f2ef74e50c18fc6ba9b55420
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.27 {"installer":{"name":"uv","version":"0.9.27","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for umeko-serial-mcp 0.1.4

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.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page