Connect your coding agent to verified vision APIs#
This tooling step is optional. If you are not going to use an AI coding agent, continue directly to Assignment 1: LED blink with ESP-Vision.
The Model Context Protocol (MCP) gives an AI coding assistant access to tools and documentation outside its built-in knowledge. See the official ESP-Vision MCP page for service details. In this section, you will connect a compatible client to the endpoint https://mcp.vision.espressif.com.
The connection helps the assistant verify APIs, chip capabilities, examples, and concepts before generating code.
This workshop uses Cursor. You can follow the same workflow with another agent that supports remote MCP servers, such as:
- Visual Studio Code with GitHub Copilot agent mode
- Claude Code
- Claude Desktop
- Another MCP-compatible IDE or coding agent
If you choose Visual Studio Code as the MCP-capable agent, use it for agent interaction and documentation lookup. Continue to use the ESP-Vision Web IDE for the local board and script workflow.
ESP-Vision MCP server#
The server can:
- Report modules available on
esp32s31,esp32p4, andesp32s3 - Check whether a symbol is available for a selected target
- Return authoritative signatures for ESP-Vision and MicroPython APIs
- Find and return runnable examples
- Explain camera, image, inference, and model workflows
This prevents a common failure mode: generating desktop Python code or a board API that is not present in the ESP-Vision firmware.
The MCP server supplies documentation and examples to the assistant. It does not grant the remote server access to your board. Uploading and running a script still happens through your local ESP-Vision development workflow.
Configure your agent#
Choose the tab for the agent or application you are using.
This is the agent used in this workshop.
Create .cursor/mcp.json in your project:
{
"mcpServers": {
"esp-vision-mcp": {
"url": "https://mcp.vision.espressif.com"
}
}
}Open Cursor settings, navigate to Tools & MCP, and confirm that esp-vision-mcp is enabled. Reload the window if it does not appear immediately.
For a user-wide configuration, place the same server entry in Cursor’s user MCP configuration instead of the project file.
Create .vscode/mcp.json:
{
"servers": {
"esp-vision-mcp": {
"type": "http",
"url": "https://mcp.vision.espressif.com"
}
}
}Start the server from Visual Studio Code’s MCP server list, then open GitHub Copilot Chat in agent mode. If your MCP-capable extension defines a different configuration schema, use its HTTP MCP instructions with the same endpoint.
From the workshop project directory, run:
claude mcp add --transport http esp-vision-mcp \
https://mcp.vision.espressif.comVerify the registration:
claude mcp listUse the user scope if you want the server in every project. Consult claude mcp add --help because scope flags can vary by Claude Code version.
Open Settings in Claude Desktop.
Open Connectors.
Select Add custom connector.
Set the name to
esp-vision-mcp.Set the remote MCP URL to
https://mcp.vision.espressif.com.Enable the connector for the conversation.
The exact labels can vary between Claude Desktop releases. Select the remote HTTP or custom connector option, not a local stdio command.
For any client that supports remote MCP servers, use:
| Setting | Value |
|---|---|
| Name | esp-vision-mcp |
| Transport | HTTP or Streamable HTTP |
| URL | https://mcp.vision.espressif.com |
| Authentication | None, unless the service documentation states otherwise |
Configuration key names are client-specific. Do not select the stdio transport: that transport expects a local executable, not a remote URL.
Test the integration#
Ask your assistant:
Use the ESP-Vision MCP server to list the modules supported by esp32s31.
Do not answer from memory.The answer should include the importable modules sensor, image, display, espdl, and tflite. ImageIO belongs to the image API and is accessed as image.ImageIO; it is not a separate imageio module.
Then ask:
Check the ESP-Vision APIs available on esp32s31 and write a bounded camera
test. Print VISION_TEST:OK only after a frame has been captured.Review the result:
- It should import
sensor, not a desktop camera package. - It should call
sensor.reset()before capture. - It should use a supported frame size and pixel format.
- It should call
sensor.shutdown()during cleanup. - It should not use
pip,requirements.txt,subprocess, or a PC filesystem path.
If the response contains unsupported code, explicitly ask the assistant to check each symbol with the MCP server and regenerate the script.
Complete working configuration#
Show the complete MCP configurations
Cursor — .cursor/mcp.json:
{
"mcpServers": {
"esp-vision-mcp": {
"url": "https://mcp.vision.espressif.com"
}
}
}Visual Studio Code — .vscode/mcp.json:
{
"servers": {
"esp-vision-mcp": {
"type": "http",
"url": "https://mcp.vision.espressif.com"
}
}
}Claude Code:
claude mcp add --transport http esp-vision-mcp \
https://mcp.vision.espressif.comWhat you learned#
In this section, you:
- Connected Cursor, Visual Studio Code, Claude Code, or another client to the ESP-Vision MCP server
- Learned what information the MCP server provides
- Verified ESP32-S31 modules and APIs through tools rather than model memory
- Recognized desktop Python patterns that do not work in device-side MicroPython
