ESP-IDF FastMCP Server

ESP-IDF FastMCP Server

Enables ESP-IDF firmware development through MCP by providing tools to manage ESP32 targets, serial ports, and project compilation/building operations.

Category
Visit Server

README

ESP-IDF FastMCP Server

这是一个为ESP-IDF开发定制的FastMCP Server,提供了与ESP-IDF相关的工具和功能。

功能

获取ESP-IDF版本信息

列出支持的ESP目标芯片

列出串口设备

使用pyserial执行串口操作。 只列出有包含有效description的串口设备(非n/a)

选择目标串口

选择ESP-IDF要操作的目标串口,对所有需要选择端口的ESP-IDF操作生效。

编译

编译项目,返回所有标准输出和标准错误。 通常用于验证代码是否正确,优先使用工具进行编译,而不是直接在命令行中执行编译命令。

清理项目

清理项目。 优先使用工具进行编译,而不是直接在命令行中执行清理命令。

设置编译目标设备

设置编译目标设备,优先使用工具进行设置。

安装要求

  • Python 3.8或更高版本
  • FastMCP库
  • ESP-IDF工具链(用于ESP-IDF相关工具)

安装

pip install -r requirements.txt

运行Server

有两种方式运行server:

方法1:直接运行Python文件

python app.py

这将在127.0.0.1:8080上启动HTTP服务器。

方法2:使用fastmcp配置文件(推荐)

fastmcp run fastmcp.json

这种方法使用声明式配置文件来定义服务器参数。

运行测试

要运行单元测试,请使用以下命令:

python -m pytest tests/

或者直接运行测试文件:

python tests/test_server.py

使用

服务器启动后,可以通过HTTP客户端连接到http://127.0.0.1:8080/mcp来使用提供的工具。

调用工具

客户端可以列出并调用已注册的工具函数:

  • get_esp_idf_version
  • list_esp_targets
  • list_serial_ports
  • select_serial_port
  • get_selected_serial_port
  • compile_project
  • clean_project
  • set_target

自定义配置

可以通过以下方式自定义服务器配置:

  1. 修改app.py文件中的mcp.run()参数:

    mcp.run(transport="streamable-http", host="127.0.0.1", port=8080)
    
  2. 编辑fastmcp.json配置文件:

    {
      "mcpServers": {
        "esp-idf-server": {
          "command": "python",
          "args": ["app.py"],
          "transport": "streamable-http",
          "url": "http://127.0.0.1:8080"
        }
      }
    }
    

可以更改host、port或transport类型来满足具体需求。

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured