[{"data":1,"prerenderedAt":524},["ShallowReactive",2],{"post-esp32-mcp-server-claude-code-en":3,"related-posts-esp32-mcp-server-claude-code-en":466,"related-categories-esp32-mcp-server-claude-code-en":501,"blog-project-detail-card-gizmo-camera-en":515},{"id":4,"title":5,"author":6,"authorImageUrl":7,"authorUrl":8,"body":9,"categorySlug":428,"categoryText":429,"dateModified":430,"datePublished":430,"description":431,"extension":432,"faqs":433,"image":449,"imageAlt":450,"language":451,"meta":452,"navigation":453,"path":454,"seo":455,"sitemap":456,"stem":457,"summary":458,"tags":459,"__hash__":465},"blog\u002Fblog\u002Fesp32-mcp-server-claude-code.md","ESP32 MCP Server: Let Claude Code Take Photos","Mauro Brambilla","\u002Fimages\u002Fauthors\u002Fbruma.jpg","\u002Fabout",{"type":10,"value":11,"toc":412},"minimark",[12,25,34,38,56,61,74,81,89,93,96,101,110,116,120,149,176,181,184,188,191,194,198,211,216,247,259,270,274,285,289,292,296,319,346,350,353,359,366,369,374,377,381,393],[13,14,15,16,20,21,24],"p",{},"An ESP32 MCP server is a small web endpoint on the microcontroller that speaks the Model Context Protocol, so an AI agent can call the device's functions as tools. On an ESP32-CAM, the tool is ",[17,18,19],"code",{},"take_snapshot",". Add the camera to Claude Code with ",[17,22,23],{},"claude mcp add --transport http gizmo-camera http:\u002F\u002Fgizmo-camera.local\u002Fmcp"," and the agent can look at the room.",[13,26,27,28,33],{},"Do you want your coding agent to check the 3D printer, the plant or the door without you describing it? This post shows how the MCP server of ",[29,30,32],"a",{"href":31},"\u002Fprojects\u002Fgizmo-camera","Gizmo Camera"," works, how to connect it, and where its limits are. Everything comes from the project's source and README and from the Claude Code and MCP documentation linked inline. It covers Claude Code only, because that is the client whose command I could check against its documentation.",[35,36],"project-detail-card",{"project-slug":37},"gizmo-camera",[13,39,40,41,44,45,51,52,55],{},"One thing first, because it affects what you can flash today. As of November 14, 2026, the MCP server is on the ",[17,42,43],{},"feature"," branch of the ",[29,46,50],{"href":47,"rel":48},"https:\u002F\u002Fgithub.com\u002Fopen-gizmo\u002Fgizmo-camera",[49],"nofollow","gizmo-camera repository",", and the released ",[17,53,54],{},"v1.0.0"," firmware (the one the website flashes) was tagged before it was added. To use it now, build the firmware from source or try the no-hardware option described below.",[57,58,60],"h2",{"id":59},"what-does-it-mean-to-give-an-ai-agent-a-camera","What does it mean to give an AI agent a camera?",[13,62,63,68,69,73],{},[29,64,67],{"href":65,"rel":66},"https:\u002F\u002Fmodelcontextprotocol.io\u002Fdocs\u002Fgetting-started\u002Fintro",[49],"MCP (Model Context Protocol)"," is, in its own words, an open-source standard for connecting AI applications to external systems. A server lists ",[70,71,72],"strong",{},"tools"," with a name and an input schema, and the agent decides when to call them. The camera is one such system: the agent asks, the ESP32 takes a new JPEG, and the image comes back inside the tool result for the model to look at.",[13,75,76],{},[77,78],"img",{"alt":79,"src":80},"A maker types on a laptop while an ESP32-CAM on a stand looks at a plant, and a speech bubble labeled MCP brings the photo back","\u002Fimages\u002Fblog\u002Fesp32-mcp-server-claude-code-illustration.webp",[13,82,83,84,88],{},"Nothing is streamed. Each call is one photo, taken when it is asked for, a few hundred milliseconds later according to the tool's own description. That fits the ESP32-CAM well, and it uses the same capture as the plain ",[29,85,87],{"href":86},"\u002Fblog\u002Fesp32-cam-snapshot-http-capture-jpeg","snapshot URL",", which defaults to the largest size instead of SVGA.",[57,90,92],{"id":91},"where-should-the-mcp-server-run","Where should the MCP server run?",[13,94,95],{},"There are three places to put it. Gizmo Camera uses the first, so the comparison is about design, not benchmarks.",[97,98],"blog-table",{":headers":99,":rows":100},"[\"Architecture\",\"Where the MCP server runs\",\"What you need besides the ESP32\"]","[[\"On the device (Gizmo Camera)\",\"On the ESP32, over HTTP at \u002Fmcp\",\"Nothing: the agent connects straight to the camera\"],[\"Host-side bridge (a common design, not used here)\",\"On a computer that talks to the ESP32 over serial or HTTP\",\"A computer that stays on and runs the bridge\"],[\"MCP over MQTT\",\"On the ESP32, with MQTT as the transport\",\"An MQTT broker and a cloud-side client\"]]",[13,102,103,104,109],{},"The third row is how EMQX describes it in its ",[29,105,108],{"href":106,"rel":107},"https:\u002F\u002Fwww.emqx.com\u002Fen\u002Fblog\u002Fesp32-and-mcp-over-mqtt-3",[49],"ESP32 and MCP over MQTT article",": a cloud-side MCP client and an LLM talk to the ESP32 through the EMQX broker. That is useful when the device sits behind a firewall and must be reachable from anywhere. For a camera on your desk, the device-side HTTP server is simpler, and the trade is that only machines on the same network can reach it.",[13,111,112],{},[77,113],{"alt":114,"src":115},"The agent sends a POST to \u002Fmcp with take_snapshot and the ESP32-CAM answers with a JPEG as base64, with no broker or cloud in between","\u002Fimages\u002Fblog\u002Fesp32-mcp-server-claude-code-flow.webp",[57,117,119],{"id":118},"how-does-the-mcp-server-on-gizmo-camera-work","How does the MCP server on Gizmo Camera work?",[13,121,122,123,126,127,132,133,136,137,140,141,144,145,148],{},"The endpoint is ",[17,124,125],{},"POST \u002Fmcp",", using the Streamable HTTP transport. The ",[29,128,131],{"href":129,"rel":130},"https:\u002F\u002Fmodelcontextprotocol.io\u002Fspecification\u002F2025-11-25\u002Fbasic\u002Ftransports",[49],"MCP transport specification"," lets a server answer either with an event stream or with one JSON object. The camera always picks the JSON object, so it never keeps a stream open. A ",[17,134,135],{},"GET"," or ",[17,138,139],{},"DELETE"," on ",[17,142,143],{},"\u002Fmcp"," gets ",[17,146,147],{},"405",", which the specification allows for servers that offer no stream, as the README describes.",[13,150,151,152,155,156,159,160,163,164,167,168,171,172,175],{},"The firmware is in ",[17,153,154],{},"microcontroller\u002Fsrc\u002Fmcp\u002F"," of the repository (",[17,157,158],{},"mcp_protocol.cpp"," for the protocol, ",[17,161,162],{},"agent_guide.cpp"," for the guide), and the libraries come from the pins in ",[17,165,166],{},"platformio.ini",": ESPAsyncWebServer 3.12.1, AsyncTCP 3.5.0 and ArduinoJson 7.2.2. The README says the server speaks the 2026-07-28 revision of MCP and the earlier ones that open with ",[17,169,170],{},"initialize"," (2025-11-25, 2025-06-18, 2025-03-26), which most clients still use. The protocol code is hardware-free, so it has native tests you can run with ",[17,173,174],{},"pio test -e native",".",[177,178,180],"h3",{"id":179},"what-tools-does-the-camera-offer","What tools does the camera offer?",[13,182,183],{},"Two tools, both marked read-only in their annotations:",[97,185],{":headers":186,":rows":187},"[\"Tool\",\"Arguments\",\"Returns\"]","[[\"take_snapshot\",\"resolution (QQVGA to UXGA, default SVGA 800x600), quality (4 to 63, default 10), flash (true or false)\",\"A text line with size and capture time, then the JPEG as an image\"],[\"get_camera_info\",\"None\",\"Sensor, resolutions, quality range, flash, firmware version, as structured content and as JSON text\"]]",[13,189,190],{},"The resolution list is cut at what the sensor can do: the OV2640 tops out at UXGA (1600 x 1200). Wrong values do not crash anything: an unknown resolution or a quality outside 4 to 63 comes back as a tool error with a readable message, so the agent can fix its call. The camera takes one snapshot at a time; a call that arrives during another gets an error telling the agent to wait and try again.",[13,192,193],{},"The default for agents is SVGA, and the server's own instructions say why: SVGA is enough to understand a scene, while UXGA is slower and costs more tokens. The README adds that the base64 encoding makes the photo about a third bigger on the wire, which costs Wi-Fi time rather than tokens, and that the bigger lever is the resolution. I have not measured token costs myself.",[57,195,197],{"id":196},"how-do-you-add-it-to-claude-code-in-one-command","How do you add it to Claude Code in one command?",[13,199,200,201,206,207,210],{},"You need the camera running a firmware that includes the MCP server, on the same network as the computer where Claude Code runs. Then, according to the ",[29,202,205],{"href":203,"rel":204},"https:\u002F\u002Fcode.claude.com\u002Fdocs\u002Fen\u002Fmcp",[49],"Claude Code MCP documentation"," (read November 2026), the syntax for an HTTP server is ",[17,208,209],{},"claude mcp add --transport http \u003Cname> \u003Curl>",":",[212,213],"terminal",{":commands":214,"title":215},"[\"claude mcp add --transport http gizmo-camera http:\u002F\u002Fgizmo-camera.local\u002Fmcp\",\"claude mcp list\"]","Add the camera to Claude Code",[13,217,218,219,222,223,225,226,229,230,233,234,237,238,241,242,136,244,246],{},"The ",[17,220,221],{},"claude mcp list"," check lists every configured server, and inside a Claude Code session the ",[17,224,143],{}," command shows each server's status. By default the server is added in the ",[17,227,228],{},"local"," scope, meaning this project only, and the documentation lists ",[17,231,232],{},"--scope user"," for all your projects and ",[17,235,236],{},"--scope project"," for a shared ",[17,239,240],{},".mcp.json",". The command only saves the configuration, so a typo in the URL shows up as a failed connection in ",[17,243,221],{},[17,245,143],{},", not when you press Enter.",[13,248,249,250,253,254,258],{},"If ",[17,251,252],{},"gizmo-camera.local"," does not resolve on your computer, use the camera's IP address in the URL instead. The reasons are in ",[29,255,257],{"href":256},"\u002Fblog\u002Fesp32-mdns-local-hostname-not-working","the .local hostname guide",". The camera page of the web app also shows the exact address and command, built from the address your browser used.",[13,260,261,262,264,265,269],{},"Okay, now ask something that needs eyes: \"Take a snapshot and tell me what's on the desk.\" Claude Code should call ",[17,263,19],{}," and describe the image. If it replies that the sensor did not start, that is the camera's tool error, and the usual cause is the ribbon cable, as the ",[29,266,268],{"href":267},"\u002Fblog\u002Fesp32-cam-mb-usb-programmer-guide","ESP32-CAM-MB guide"," explains.",[177,271,273],{"id":272},"no-board-yet-use-the-dev-server","No board yet? Use the dev server",[13,275,276,277,280,281,284],{},"The web app has a mock device that answers like the firmware, with a PNG test card in place of the photo. From ",[17,278,279],{},"webapp\u002F"," run ",[17,282,283],{},"npm run dev",", then add it:",[212,286],{":commands":287,"title":288},"[\"claude mcp add --transport http gizmo-camera-dev http:\u002F\u002Flocalhost:3000\u002Fmcp\"]","Try the MCP server without hardware",[13,290,291],{},"That is the command from the README. It tests your agent's workflow, not the camera.",[57,293,295],{"id":294},"what-does-llmstxt-do-for-an-agent","What does \u002Fllms.txt do for an agent?",[13,297,298,303,304,307,308,311,312,314,315,318],{},[29,299,302],{"href":300,"rel":301},"https:\u002F\u002Fllmstxt.org",[49],"The llms.txt proposal"," suggests that websites add a ",[17,305,306],{},"\u002Fllms.txt"," Markdown file with LLM-friendly content. The camera does it for a device: ",[17,309,310],{},"GET \u002Fllms.txt"," returns a short guide with the MCP address, the tools and their arguments, the plain HTTP API and a few tips. The text of the guide is in ",[17,313,162],{},", and the firmware replaces a ",[17,316,317],{},"{host}"," marker with the address the agent used to reach the camera, so the commands in it work as printed.",[13,320,321,322,325,326,329,330,333,334,337,338,341,342,345],{},"The same guide is returned at ",[17,323,324],{},"\u002F"," to clients whose ",[17,327,328],{},"Accept"," header lists ",[17,331,332],{},"text\u002Fmarkdown"," before ",[17,335,336],{},"text\u002Fhtml",", and the web app's pages link to it with a ",[17,339,340],{},"rel=\"alternate\""," Markdown link. Browsers still get the web app. This is useful for an agent that only has a URL: it can read the guide first, then decide between MCP and the plain ",[17,343,344],{},"\u002Fapi\u002Fcapture"," request.",[57,347,349],{"id":348},"is-it-safe-no-login-lan-only","Is it safe? No login, LAN only",[13,351,352],{},"No, not in the sense of authentication. The camera has none: the web app, the API and the MCP server answer anyone who can reach them. The README says so plainly, and so does the agent guide.",[13,354,355],{},[77,356],{"alt":357,"src":358},"Left: same network, Claude Code on your computer using gizmo-camera.local or the IP. Right: never port forwarding to the internet or cloud agents on claude.ai","\u002Fimages\u002Fblog\u002Fesp32-mcp-server-claude-code-lan.webp",[13,360,361,362,365],{},"The firmware adds some protection. The MCP endpoint only answers on the camera's own name or address and refuses other websites by ",[17,363,364],{},"Origin",", which blocks DNS rebinding. The MCP specification asks servers to do this, in its security warning, and also says servers should implement proper authentication. The camera does the first and not the second. A browser tab on another site cannot use it, but a script on your network can.",[13,367,368],{},"What that means in practice:",[370,371],"blog-list",{":items":372,"variant":373},"[\"Do not forward the camera's port on your router\",\"Do not put the camera on a guest network shared with people you don't trust\",\"Do not point it at anything you would not want a visitor on your Wi-Fi to see\"]","cross",[13,375,376],{},"There is a second consequence. The README notes that agents in the cloud, such as connectors added on claude.ai, cannot reach a camera on your home network. That is the price of the LAN-only design, and for this project I consider it the right one.",[57,378,380],{"id":379},"what-to-remember","What to remember",[13,382,383,384,386,387,389,390,392],{},"Gizmo Camera is an MCP server running on an ESP32-CAM: ",[17,385,125],{},", JSON replies, two read-only tools, and a Markdown guide at ",[17,388,306],{},". In Claude Code it takes one command, ",[17,391,23],{},", confirmed against the current documentation. Agents get SVGA by default, and a wrong argument comes back as an error they can read.",[13,394,395,396,398,399,403,404,407,408],{},"The limits: the camera has no authentication, so it belongs on a trusted LAN. The MCP server is not in the released ",[17,397,54],{}," firmware as of November 14, 2026, and only Claude Code is covered here. If the board resets while you test, the ",[29,400,402],{"href":401},"\u002Fblog\u002Fesp32-brownout-detector-was-triggered","brownout guide"," covers the usual power causes. For the plain-HTTP route, see the ",[29,405,406],{"href":86},"snapshot URL guide",", and for the whole family, ",[29,409,411],{"href":410},"\u002Fblog\u002Fwhat-is-opengizmo","What is OpenGizmo?",{"title":413,"searchDepth":414,"depth":414,"links":415},"",2,[416,417,418,422,425,426,427],{"id":59,"depth":414,"text":60},{"id":91,"depth":414,"text":92},{"id":118,"depth":414,"text":119,"children":419},[420],{"id":179,"depth":421,"text":180},3,{"id":196,"depth":414,"text":197,"children":423},[424],{"id":272,"depth":421,"text":273},{"id":294,"depth":414,"text":295},{"id":348,"depth":414,"text":349},{"id":379,"depth":414,"text":380},"builds","Builds","2026-11-14T00:00:00Z","Run an MCP server on an ESP32-CAM and add it to Claude Code with one command. See the take_snapshot tool, the \u002Fllms.txt guide and why it must stay on your LAN.","md",[434,437,440,443,446],{"question":435,"answer":436},"Can an ESP32 run an MCP server?","Yes. The ESP32-CAM in Gizmo Camera answers MCP requests itself at \u002Fmcp over Streamable HTTP, using ESPAsyncWebServer and ArduinoJson. Every reply is plain JSON, with no event streams and no sessions, so a small chip can handle it without a broker or a bridge computer.",{"question":438,"answer":439},"What is the command to add an MCP server to Claude Code?","For a server that speaks HTTP, run claude mcp add --transport http followed by a name and the URL. For the camera that is claude mcp add --transport http gizmo-camera http:\u002F\u002Fgizmo-camera.local\u002Fmcp. Use the camera's IP address if your computer cannot resolve the .local name.",{"question":441,"answer":442},"Is the ESP32 MCP server safe to expose to the internet?","No. The Gizmo Camera MCP endpoint has no authentication, so anyone who can reach it can take a photo. It refuses requests from other websites and other host names, but that is not a login. Keep the camera on a network you trust and never forward its port.",{"question":444,"answer":445},"Can Claude on claude.ai use my ESP32 camera?","Not directly. Cloud agents, such as connectors added on claude.ai, cannot reach a device on your home network. Use an agent that runs on a computer in the same network as the camera, like Claude Code in a terminal, and add the camera's local address.",{"question":447,"answer":448},"What is \u002Fllms.txt on the camera for?","It is a Markdown guide that tells an AI agent how to use the camera before it connects: the MCP address, the tools, the plain HTTP API and tips. The camera fills in the address the agent used, and the same text is returned at the root URL to clients that ask for Markdown.","\u002Fimages\u002Fblog\u002Fesp32-mcp-server-claude-code.jpg","A bearded man in a teal shirt types on a laptop showing a camera chat bubble, while a small camera on a stand watches a potted plant, next to an MCP label.","en",{},true,"\u002Fblog\u002Fesp32-mcp-server-claude-code",{"title":5,"description":431},{"loc":454},"blog\u002Fesp32-mcp-server-claude-code","Gizmo Camera runs an MCP server on the ESP32-CAM at \u002Fmcp. One claude mcp add --transport http command gives Claude Code a take_snapshot tool. It has no login: keep it on your LAN.",[460,461,462,463,464],"ESP32-CAM","AI Agents","IoT","OpenGizmo","Open Source","SwjH1-eiU_p4RGVGu-udhkgvCtI9fnGMnHav-gEYuhc",[467,474,485,494],{"title":468,"description":469,"image":470,"categoryText":429,"categorySlug":428,"tags":471,"path":86},"ESP32-CAM Snapshot URL: One HTTP Request, One JPEG","Get an ESP32-CAM snapshot with one GET request: the \u002Fapi\u002Fcapture URL, resolution and quality options, the busy answer, curl and Home Assistant examples.","\u002Fimages\u002Fblog\u002Fesp32-cam-snapshot-http-capture-jpeg.jpg",[460,462,472,463,473],"Home Automation","Firmware",{"title":475,"description":476,"image":477,"categoryText":478,"categorySlug":479,"tags":480,"path":484},"ESP32-CAM GPIO Pins: Which Are Really Free","Which ESP32-CAM GPIO pins you can use: GPIO13 and GPIO12 in 1-bit SD mode, GPIO4 flash LED, GPIO16 PSRAM, strapping pins, from the AI Thinker schematic.","\u002Fimages\u002Fblog\u002Fesp32-cam-gpio-pins-free-to-use.jpg","Guides","guides",[460,481,482,483,463],"ESP32","Hardware","Electronics","\u002Fblog\u002Fesp32-cam-gpio-pins-free-to-use",{"title":486,"description":487,"image":488,"categoryText":489,"categorySlug":490,"tags":491,"path":493},"ESP32 Wi-Fi Provisioning: Captive Portal, BLE, Improv","Compare ESP32 Wi-Fi provisioning: hard-coded credentials, captive portal, Espressif BLE and SoftAP, Improv and ESP-Touch, on security and phone setup.","\u002Fimages\u002Fblog\u002Fesp32-wifi-provisioning-methods-compared.jpg","Comparisons","comparisons",[481,492,462,473,463],"Wi-Fi","\u002Fblog\u002Fesp32-wifi-provisioning-methods-compared",{"title":495,"description":496,"image":497,"categoryText":478,"categorySlug":479,"tags":498,"path":500},"CoinGecko API on ESP32: Free Limits and Polling Rate","CoinGecko's free Demo plan allows 100 calls a minute and 10,000 a month. The polling math for an ESP32, how to send the key, and what HTTP 429 means.","\u002Fimages\u002Fblog\u002Fcoingecko-api-esp32-rate-limits.jpg",[481,462,473,463,499],"MAX7219","\u002Fblog\u002Fcoingecko-api-esp32-rate-limits",[502,505,509],{"name":478,"slug":479,"path":503,"count":504,"image":497},"\u002Fblog\u002Fcategories\u002Fguides",11,{"name":489,"slug":490,"path":506,"count":507,"image":508},"\u002Fblog\u002Fcategories\u002Fcomparisons",8,"\u002Fimages\u002Fblog\u002Fesp32-ota-update-methods-compared.jpg",{"name":510,"slug":511,"path":512,"count":513,"image":514},"Troubleshooting","troubleshooting","\u002Fblog\u002Fcategories\u002Ftroubleshooting",5,"\u002Fimages\u002Fblog\u002Fesp32-brownout-detector-was-triggered.jpg",{"title":32,"badge":516,"description":517,"path":31,"image":518,"cardIcon":519,"highlights":520},"Open-source ESP32-CAM project","An ESP32-CAM Wi-Fi camera that takes a JPEG snapshot on every request, with a web app to set it up from your phone and an MCP server for AI agents.","\u002Fimages\u002Fprojects\u002Fgizmo-camera\u002Fcover.webp","Camera01Icon",[521,522,523],"JPEG snapshots up to 1600 × 1200","Simple HTTP API","MCP server for AI agents",1795018236652]