coserial
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@coserialOpen COM3 at 115200 baud and wait for ready"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
coserial
简体中文 | English
Collaborative Serial Debug Bridge. Humans and AI Agents co-control serial ports via MCP tools or Web UI, sharing all IO data in real time. Humans, Agents, and hardware — all on the same page.
Architecture
Agent A ── MCP stdio ── coserial-client ──┐
Agent B ── MCP stdio ── coserial-client ──┤
Agent C ── MCP stdio ── coserial-client ──┤
... │ HTTP (localhost)
Human A ── Web UI ────────────────────────┤
Human B ── Web UI ────────────────────────┤
... ▼
coserial-server
├── HTTP API (/mcp/…) ← MCP tool calls
├── WebSocket /ws ← Web UI real-time data
├── GET / ← Web UI (HTML/CSS/JS)
├── SessionManager
│ ├── COM1
│ ├── COM2
│ └── ...
└── Web UI MonitorRelated MCP server: embedded-serial-mcp
Features
🤝 Human-Agent Collaboration — Humans and AI Agents share the same serial session, debugging in real time
🔌 MCP Tool Control — Agents read/write serial ports, wait for pattern matches, send commands, etc. via standard MCP protocol
🖥️ Web UI Monitor — Dark theme, real-time RX/TX data stream, HEX display, search highlighting, log export
🔄 Three-Party Data Sync — Agent I/O and Web UI I/O write to the same buffer — nobody misses anything
📡 Multi-Session Management — Connect to multiple serial ports simultaneously, switch via Web UI dropdown
🔧 Signal Line Control — DTR/RTS hardware reset support
📝 Log Persistence — Serial I/O automatically recorded to file
🎯 Zero-Build Frontend — Vanilla HTML/CSS/JS, no frontend toolchain required
Quick Start
Install
# Clone the repo
git clone https://github.com/FlipFlopszzz/coserial.git
cd coserial
# Install dependencies (requires uv)
uv syncOr with pip:
pip install -e .Register with Claude Code
After installation, register coserial as an MCP server so Claude Code can use it:
# Global (recommended) — available in all projects
uv run coserial init --global
# Project-level — creates .mcp.json + .claude/launch.json in target directory
uv run coserial init /path/to/your-projectinit --global writes to ~/.claude.json via claude mcp add --scope user.
init (project-level) writes to .mcp.json + .claude/launch.json in the target directory, enabling both MCP tools and Claude Desktop Preview.
Launch
# Start server + open Web UI (manual debug mode)
uv run coserial
# Start and auto-connect to COM20
uv run coserial COM20
# List all active sessions
uv run coserial list
# Start server only (headless)
uv run coserial-serverUse in Claude Code
Once registered, call MCP tools directly in any Claude Code session:
server() → Start/discover server process
open_session(port="COM20") → Open serial port
preview(port=37210) → Get Preview URL
preview_start("coserial-web-ui") → Open Web UI in Claude Desktop
command(session_id, "AT+GMR", expect="OK", newline=True) → Send & waitMCP Tools
Tool | Description |
| Discover/start server process, returns port |
| Create a serial session, returns session_id |
| Close a specific session |
| Send data to serial port |
| Read buffer data |
| Wait for output matching a regex |
| Send command and wait for response |
| Dynamically adjust serial parameters |
| Get full session parameters |
| Control DTR/RTS signal lines |
| List available serial ports |
| List all active sessions |
| Open Web UI in system browser |
| Return URL for Agent's embedded browser |
| Shut down server process |
Web UI
Open http://127.0.0.1:37210/ directly in your system browser, or via any Agent tool's embedded browser.
Project Structure
coserial/
├── pyproject.toml
├── src/coserial/
│ ├── __main__.py # Entry: uv run coserial
│ ├── client.py # MCP stdio client → HTTP proxy to server
│ ├── server.py # Server: HTTP API + WebSocket + Web UI
│ ├── session.py # SessionBuffer + SerialSession + SessionManager
│ └── web_ui/
│ └── index.html # Single-page HTML, inline CSS/JSDependencies
Python >= 3.11
pyserial — Serial communication
mcp — MCP SDK (FastMCP)
websockets — WebSocket server
aiohttp — HTTP server
pywin32 — Windows process management
Icons from IconPark
License
This server cannot be deployed
Maintenance
Related MCP Connectors
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Real-time collaborative whiteboard — AI agents and humans edit the same board live over MCP.
Agent-native collaboration network: orchestrate a team of long-running agents from any MCP client.
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Related MCP Servers
- AlicenseAqualityAmaintenanceMCP server that lets LLMs talk to serial devices: microcontrollers, routers, modems, embedded Linux, anything with a UART.2366 PyPI5MIT
- AlicenseNot gradedqualityCmaintenanceA professional MCP server for serial port communication, enabling AI assistants to list, connect, send/receive data, and manage serial connections with embedded systems, IoT devices, and hardware debugging hardware.1MIT
- AlicenseAqualityDmaintenanceEnables AI agents to control serial port devices (modems, instruments, embedded boards) via MCP tools for listing ports, connecting, and sending/receiving commands.31MIT

sbl-probeofficial
AlicenseNot gradedqualityDmaintenanceSerial communication and protocol analysis MCP server that gives AI coding assistants direct access to serial ports for reading, writing, decoding, and capturing embedded device output.MIT