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.

コメント

「その他」の他のコンテンツ