Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Cursor

Cursor supports espctl through an mcpServers map in .cursor/mcp.json.

Configuration

Add to .cursor/mcp.json in your workspace, or ~/.cursor/mcp.json to make espctl available across every Cursor workspace:

{
  "mcpServers": {
    "espctl": {
      "command": "/path/to/espctl",
      "args": ["mcp", "serve"],
      "cwd": "/path/to/your/esp-idf/project",
      "env": {
        "CONTROL_BASE_URL": "https://esphome.cloud",
        "MCP_AUTH_SECRET": "your-access-key"
      }
    }
  }
}

What to put in each field:

  • command — full path to the espctl program.
  • cwd — full path to the ESP-IDF project Cursor should work on.
  • CONTROL_BASE_URL + MCP_AUTH_SECRET — leave both out for plan-only mode; set both for remote builds.

Check it’s working

Restart Cursor. Open the chat panel and ask:

What espctl tools do you have?

You should see the same ~40 tools as any other AI tool. If not, look at Cursor’s MCP log panel (usually under “Output → MCP”) for the actual error that espctl printed.

Cursor-specific notes

  • Cursor’s MCP support is workspace-level, so a per-workspace .cursor/mcp.json is the most common setup.
  • If you’ve pinned Cursor to a specific shell (e.g. fish), make sure that shell knows about any environment variables you depend on, or list them all directly in the env block.

Tip

Once any AI tool is wired up, you can ask it:

Read the install://cursor resource.

…and espctl will hand you a fresh, machine-specific snippet.