MCP.so
登录

Serial MCP Server

@PaDev1

基本信息

分类

其他

许可证

MIT

传输方式

stdio

作者

PaDev1

关于 Serial MCP Server

MCP server allowing Agents to talk to devices connected to serial port of the computer. Tested only with MAC atm.

Serial MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "serial-mcp": {
      "command": "python",
      "args": [
        "serial_MCP.py"
      ]
    }
  }
}

Serial MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Serial-MCP?

Serial-MCP is a Model Context Protocol (MCP) server that enables AI agents to communicate with devices connected to a serial port on the host computer. Built with the FastMCP framework and pyserial, it provides robust asynchronous serial communication, message buffering, connection management, and detailed error handling. The server is tested only on macOS.

How to use Serial-MCP?

Clone the repository and install dependencies with pip install -r requirements.txt. Configure the server by setting the environment variables SERIAL_PORT, SERIAL_BAUD_RATE, and SERIAL_BUFFER_LENGTH. Add the server to your Claude Desktop configuration using the provided uv run command pointing to serial_MCP.py. Start the server with python serial_MCP.py then use the exposed tools (init_serial, send_message, read_message, etc.) to interact with serial devices.

Key features of Serial-MCP

  • Asynchronous serial communication using asyncio
  • Configurable message buffering with timestamp support
  • Automatic port detection and connection handling
  • Comprehensive error detection and reporting
  • Environment variable and runtime configuration
  • Detailed logging with timestamps and error tracking

Use cases of Serial-MCP

  • Sending commands from an AI agent to an Arduino or embedded device
  • Reading sensor data from a microcontroller over USB serial
  • Controlling hardware peripherals based on natural language instructions
  • Debugging and monitoring serial communication in development workflows

常见问题

1

How do I configure the serial port and baud rate?

The server uses environment variables: `SERIAL_PORT` (default `/dev/tty.usb*`), `SERIAL_BAUD_RATE` (default `9600`), and `SERIAL_BUFFER_LENGTH` (default `100`). These can be set in the MCP client configuration or overridden at runtime via the `init_serial` and `configure_serial` tools.

2

What tools are available?

Serial-MCP offers nine tools: `delay`, `init_serial`, `send_message`, `read_message`, `list_serial_ports`, `get_serial_status`, `configure_serial`, `close_serial`, and `help`. Each has documented parameters and return values.

3

How do I send a message and wait for a response?

Use `send_message` with `wait_for_response: true` and an optional `response_timeout`. The response is returned as a list of timestamped messages in the `response_messages` field.

4

What runtime dependencies are required?

Python 3.7+ and the packages pyserial>=3.5, fastmcp>=0.1.0, pydantic>=2.0.0, and asyncio>=3.4.3.

5

Where are logs stored?

Logs are written to `logs/serial_MCP.log` with timestamp, level, and message.

评论

其他 分类下的更多 MCP 服务器