Skip to content

docs: add Espressif Documentation MCP Server guidance to AGENTS.md#369

Draft
Copilot wants to merge 1 commit into
mdevfrom
copilot/integrate-espressif-mcp-server
Draft

docs: add Espressif Documentation MCP Server guidance to AGENTS.md#369
Copilot wants to merge 1 commit into
mdevfrom
copilot/integrate-espressif-mcp-server

Conversation

Copilot AI commented Jun 10, 2026

Copy link
Copy Markdown

Agents querying the official mcp.espressif.com server for ESP-IDF APIs will silently receive v5.x/v6.x answers — incompatible with WLED-MM's arduino-esp32 2.0.17 (= ESP-IDF 4.4.8). This was confirmed by live probing: the official tool search_espressif_sources(query, language) has no version parameter.

Changes

  • New section ## Optional External Resources for AI Agents at the end of AGENTS.md
  • Documents both MCP server options with a comparison table; steers agents away from the official server for firmware API lookups
  • Recommends the community package esp-idf-docs-mcp (PyPI), which supports ESP_IDF_VERSION=v4.4 by fetching from versioned Espressif docs URLs (confirmed live for v4.4.8)
  • Includes a ready-to-use MCP config snippet and a prominent blockquote on the version-pinning requirement
  • Explicitly notes that idf.py mcp-server (IDF 6.0, CMake-only) is incompatible with WLED-MM's PlatformIO/Arduino build
{
  "mcpServers": {
    "esp-idf-docs": {
      "command": "uvx",
      "args": ["esp-idf-docs-mcp"],
      "env": { "ESP_IDF_VERSION": "v4.4", "ESP_IDF_CHIP_TARGET": "esp32" }
    }
  }
}

Summary by CodeRabbit

  • Documentation
    • Added guidance on optional external resources for accessing ESP-IDF API documentation using MCP servers
    • Includes information on available MCP server options and version compatibility requirements for reference lookups

- Documents the two available MCP server options (official vs community)
- Official mcp.espressif.com is latest-only; warns agents not to use it
  for WLED-MM firmware API lookups
- Community esp-idf-docs-mcp (PyPI) supports ESP_IDF_VERSION=v4.4, which
  matches arduino-esp32 2.0.17 = ESP-IDF 4.4.8
- Clarifies that idf.py mcp-server build/flash tools are incompatible
  (requires IDF 6.0 + CMake project; WLED-MM uses PlatformIO/Arduino)
- Adds version-pinning requirement and usage guidance
@softhack007

Copy link
Copy Markdown
Collaborator

@coderabbitai are other changes needed to make esp-idf-docs-mcp operational?

@softhack007

Copy link
Copy Markdown
Collaborator

@coderabbitai full review

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
✅ Action performed

Full review finished.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Tip

For best results, initiate chat on the files or code changes.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
cat AGENTS.md

Length of output: 17681


🌐 Web query:

esp-idf-docs-mcp PyPI package requirements installation uvx uv

Length of output: 9895



@softhack007 One prerequisite is missing from the current text: uv must be installed before uvx esp-idf-docs-mcp can be invoked. uvx is just an alias for uv tool run, so the tool won't be found until uv itself is on the system.

The install is a one-liner:

# Linux / macOS
curl -LsSf https://astral.sh/uv/install.sh | sh

# Windows (PowerShell)
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

Once uv is present, uvx automatically downloads and caches esp-idf-docs-mcp (including a Python 3.12 interpreter if one isn't available) — no separate pip install or python management needed.

A suggested addition to the esp-idf-docs-mcp section, just before the JSON snippet:

#### Prerequisites

`uvx` is provided by [uv](https://docs.astral.sh/uv/). Install it once:

```bash
# Linux / macOS
curl -LsSf https://astral.sh/uv/install.sh | sh

uv will download Python 3.12 automatically if needed (required by esp-idf-docs-mcp ≥ 0.1.0).
Network access is required at query time — the server fetches pages from the versioned Espressif docs site.


Everything else in AGENTS.md (ESP_IDF_VERSION=v4.4, chip target, available tools, the version-pinning rationale) is already covered correctly. No other operational changes appear to be needed.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Adds documentation to AGENTS.md describing optional MCP server access to ESP-IDF API reference for AI agents, including server selection guidance, version pinning requirements, tool names, and usage boundaries.

Changes

External Documentation Resources for AI Agents

Layer / File(s) Summary
ESP-IDF documentation MCP server guidance
AGENTS.md
Documentation section for AI agents on optional MCP server approach to retrieve ESP-IDF API documentation, contrasting official and community servers, specifying required version pinning and ESP-IDF version alignment, listing available tool names, and clarifying limitations versus reading source code or project configuration.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically summarizes the main change: adding Espressif Documentation MCP Server guidance to AGENTS.md documentation.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Around line 266-269: Update the AGENTS.md wording around "idf.py mcp-server":
clarify that ESP-IDF v6.0 does provide the idf.py mcp-server command but that
the MCP server tooling expects an ESP-IDF CMake-style project (mcp-server) and
therefore cannot be used directly with PlatformIO/Arduino project flows; add or
link to an authoritative source (ESP-IDF docs or release notes) that states the
MCP server requires an ESP-IDF CMake project, and adjust the sentence to remove
the blanket "incompatible" claim by specifying the exact limitation (requires
CMake-style ESP-IDF project) and how that affects PlatformIO/Arduino users.
- Around line 310-312: The AGENTS.md statement incorrectly maps arduino-esp32
versions to ESP-IDF; inspect platformio.ini and update or remove the claim that
"WLED-MM uses arduino-esp32 2.0.17 ... ESP-IDF 4.4.8": replace that mapping with
the actual pinned core/version from platformio.ini (or delete the ESP-IDF
version justification), and correct the arduino-esp32 → ESP-IDF mapping (e.g.
note that framework-arduinoespressif32 in this repo selects arduino-esp32 v2.0.9
/ references v2.0.14 and that arduino-esp32 2.0.17 corresponds to ESP-IDF 4.4.7
if you must mention it); also remove or correct the reference to
platform-espressif32 core 2.0.18 if used only for Tasmota.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 3929f0f0-d89d-4b51-acb8-d16f4e3939ba

📥 Commits

Reviewing files that changed from the base of the PR and between afd4108 and 3c6c111.

📒 Files selected for processing (1)
  • AGENTS.md

Comment thread AGENTS.md
Comment on lines +266 to +269
**Use it only for documentation lookups — not for build or flash operations.**
The `idf.py mcp-server` build/flash tooling introduced in ESP-IDF 6.0 is
**incompatible** with WLED-MM: the project is built with PlatformIO and the
Arduino framework, not a native ESP-IDF CMake project.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🌐 Web query:

Does ESP-IDF 6.0 introduce an idf.py mcp-server command for MCP server functionality?

💡 Result:

Yes. ESP-IDF v6.0 introduces an MCP server command in idf.py: the documentation explicitly states you can start the server with idf.py mcp-server (optionally idf.py -C <project> mcp-server) to enable ESP-IDF MCP server functionality.[1][2]

Citations:


Fix the idf.py mcp-server wording in AGENTS.md (it exists in IDF v6.0)

  • AGENTS.md’s statement that ESP-IDF v6.0 provides idf.py mcp-server is accurate (docs show starting the MCP server via idf.py mcp-server / idf.py -C <project> mcp-server).
  • The “incompatible with PlatformIO/Arduino” claim needs a source explicitly stating the MCP server/tooling requires an ESP-IDF CMake-style project setup (or otherwise can’t be used in PlatformIO/Arduino flows).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 266 - 269, Update the AGENTS.md wording around
"idf.py mcp-server": clarify that ESP-IDF v6.0 does provide the idf.py
mcp-server command but that the MCP server tooling expects an ESP-IDF
CMake-style project (mcp-server) and therefore cannot be used directly with
PlatformIO/Arduino project flows; add or link to an authoritative source
(ESP-IDF docs or release notes) that states the MCP server requires an ESP-IDF
CMake project, and adjust the sentence to remove the blanket "incompatible"
claim by specifying the exact limitation (requires CMake-style ESP-IDF project)
and how that affects PlatformIO/Arduino users.

Comment thread AGENTS.md
Comment on lines +310 to +312
> **Always use `ESP_IDF_VERSION=v4.4`.** WLED-MM uses arduino-esp32 2.0.17,
> which is based on ESP-IDF **4.4.8**. ESP-IDF 5.x / 6.x introduced breaking
> changes to `esp_netif`, the timer API, `esp_wifi`, and other subsystems.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: Check arduino-esp32 version in platformio.ini and verify ESP-IDF version mapping

# Find arduino-esp32 version specification in platformio.ini
echo "=== Checking arduino-esp32 version in platformio.ini ==="
rg -n "platform.*espressif32" platformio.ini

# Also check for any ESP-IDF version specifications
echo -e "\n=== Checking for ESP-IDF version references ==="
rg -n "ESP_IDF|esp-idf|ESP-IDF" platformio.ini

Repository: MoonModules/WLED-MM

Length of output: 3754


🌐 Web query:

What version of ESP-IDF does arduino-esp32 version 2.0.17 use?

💡 Result:

Arduino-esp32 version 2.0.17 is based on ESP-IDF v4.4.7 [1][2]. This is documented in the official release notes for the 2.0.17 version on the Espressif GitHub repository [1].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "=== Search for arduino-esp32 2.0.17 references in platformio.ini ==="
rg -n "arduino-esp32\s*2\.0\.17|2\.0\.17" platformio.ini || true

echo -e "\n=== Search for 4.4.8 references in platformio.ini ==="
rg -n "4\.4\.8" platformio.ini || true

echo -e "\n=== Search for framework-arduinoespressif32 pins around any 2.0.x ==="
rg -n "framework-arduinoespressif32\s*@|arduino-esp32 v2\.[0-9]+" platformio.ini | head -n 80

Repository: MoonModules/WLED-MM

Length of output: 1584


Fix incorrect arduino-esp32/ESP-IDF mapping in AGENTS.md (lines 310-312).

  • platformio.ini contains no arduino-esp32 2.0.17 pin; it instead selects arduino-esp32 v2.0.9 (and references v2.0.14) via framework-arduinoespressif32.
  • The only “IDF 4.4.8” reference found in platformio.ini is for Tasmota platform-espressif32 (core 2.0.18), not for arduino-esp32 2.0.17.
  • External references indicate arduino-esp32 2.0.17 is based on ESP-IDF 4.4.7, not 4.4.8.

Update the documentation to match the actual pinned core/version in platformio.ini (or remove/adjust the ESP-IDF mapping justification).

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@AGENTS.md` around lines 310 - 312, The AGENTS.md statement incorrectly maps
arduino-esp32 versions to ESP-IDF; inspect platformio.ini and update or remove
the claim that "WLED-MM uses arduino-esp32 2.0.17 ... ESP-IDF 4.4.8": replace
that mapping with the actual pinned core/version from platformio.ini (or delete
the ESP-IDF version justification), and correct the arduino-esp32 → ESP-IDF
mapping (e.g. note that framework-arduinoespressif32 in this repo selects
arduino-esp32 v2.0.9 / references v2.0.14 and that arduino-esp32 2.0.17
corresponds to ESP-IDF 4.4.7 if you must mention it); also remove or correct the
reference to platform-espressif32 core 2.0.18 if used only for Tasmota.

@softhack007 softhack007 added the AI Partly generated by an AI. Make sure that the contributor fully understands the code! label Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Partly generated by an AI. Make sure that the contributor fully understands the code!

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants