Deploy an MCP server on Raspberry Pi 5 with the OpenAI SDK
Introduction
Explore MCP and Python uv for local AI agents
Set up an MCP server on Raspberry Pi 5
Build and run an AI agent on your development machine
Next Steps
Deploy an MCP server on Raspberry Pi 5 with the OpenAI SDK
Review frequently asked questions
These FAQs were drafted with an approved AI-assisted workflow and reviewed by Arm contributors before publication. Human technical review remains part of the process so the final page reflects engineering rigor, accuracy, and Arm editorial standards.
Run the MCP server on Raspberry Pi 5. Run the AI agent on your development machine and connect it to the Pi over your network or through the
ngrok tunnel.Yes. Install
uv on Raspberry Pi to set up the MCP server, and install it on your development machine to initialize and run the agent project.uv init creates a .venv virtual environment and a pyproject.toml file in the project directory. Both files indicate that the project environment is ready.Add the MCP server address to the agent configuration, using either the
ngrok HTTPS forwarding URL or the Pi’s reachable network address. A correct endpoint lets the agent start without connection errors.Prompt the agent to report Raspberry Pi’s CPU temperature or look up weather data. The response includes the requested values. If it doesn’t, verify that the server is running and the connection details match.