MCP.so
登录
服务器

MCP Arduino Server (mcp-arduino-server)

@Volt23

概览

What is MCP Arduino Server?

A FastMCP-powered bridge that exposes arduino-cli functionality via the Model Context Protocol (MCP). It lets users manage sketches, boards, libraries, files, and generate WireViz schematics from YAML or natural language through MCP clients.

How to use MCP Arduino Server?

Install from PyPI with pip install mcp-arduino-server, then run mcp-arduino-server. Requirements: Python ≥3.10, arduino-cli in PATH, and optionally WireViz and an OpenAI API key for AI‑powered diagram generation. Configure via environment variables; integrate with MCP clients by adding a JSON config entry.

Key features of MCP Arduino Server

  • Exposes arduino-cli functionality through MCP (JSON-RPC over STDIO)
  • Sketch management: create, list, read, write with auto‑compile
  • Build and deploy: verify code and upload to boards
  • Library management: search, install, and list examples
  • Serial monitor with configurable buffering, logging and rotation
  • WireViz diagram generation from natural language descriptions (AI‑powered)

Use cases of MCP Arduino Server

  • Programmatically create and upload Arduino sketches from an AI assistant
  • Automate library installation and board discovery in CI/CD pipelines
  • Remotely monitor serial output and log to rotating files
  • Generate circuit diagrams from verbal descriptions using WireViz

FAQ from MCP Arduino Server

What dependencies and runtime requirements exist?

Python ≥3.10 and arduino-cli must be in PATH. Optional: WireViz for diagram generation, an OPENAI_API_KEY for AI‑powered WireViz, and thefuzz[speedup] for fuzzy library search.

How is the MCP Arduino Server configured?

Environment variables override defaults: ARDUINO_CLI_PATH, WIREVIZ_PATH, MCP_SKETCH_DIR, LOG_LEVEL, OPENAI_API_KEY or OPENROUTER_API_KEY, ARDUINO_SERIAL_LOG_MAX_BYTES, and ARDUINO_SERIAL_LOG_ROTATE_COUNT.

What transport and authentication are used?

The server listens on STDIO for JSON‑RPC MCP calls. Authentication is not required for the server itself; AI‑powered WireViz requires an OPENAI_API_KEY or OPENROUTER_API_KEY.

Where does data (sketches, logs) live?

Sketch files are stored in ~/Documents/Arduino_MCP_Sketches/ by default. Serial logs are written to files in a configurable location; the server sandboxes file operations to home and sketch directories.

Are there known limits?

The remove_file operation is destructive but sandboxed. Serial log file size and rotation count are configurable. The AI‑powered WireViz feature depends on an external API key and may incur costs.

来自「其他」的更多内容