You can host a small Model Context Protocol (MCP) agent stack on a Raspberry Pi 4 8GB that runs the router and long-running background tasks, and offload the actual model calls to Gemini via API. For anything requiring a local LLM inside the loop, add a used RTX 3060 12GB box. Total build under $500, and the agent survives your laptop closing.
Why this piece exists
Google's Gemini API added first-class MCP support and background-execution primitives in mid-2026 — announced at the Google Cloud AI keynote and rolled into the public SDK the same week. The combination is a bigger deal than the press release let on. MCP lets your agent talk to arbitrary tools with a common protocol; background execution lets your agent keep running when you close the client. Together they mean you can run agent workflows that survive across sessions, share tool servers across teammates, and route to a mix of Gemini + local models cleanly.
The bit the press release didn't cover: to actually use this well you need a host — a small always-on box that runs your tool servers, holds your MCP registry, and orchestrates the background jobs. Cloud hosts work, but a Pi 4 in your closet costs $80 and never gets rate-limited. This piece walks you through the hardware, the wiring, and the reasonable ceiling of what a Pi can host before you have to reach for a bigger box.
Who this is for
You already know what MCP is. You have used at least one agent framework — Aider, Claude Code, LangGraph, or a custom harness — and you have opinions about tool interfaces. You want an always-on host so your agent tasks don't die when you close your laptop. You are not trying to run frontier reasoning locally; you are trying to run the plumbing locally so cloud calls are the only thing metered.
Key takeaways
- Gemini API now supports MCP tool servers and background job execution — details in the official Gemini docs.
- A Raspberry Pi 4 8GB is enough to host 5-15 MCP tool servers and run the background execution loop for a solo builder — CPU-bound work only.
- Anything that needs an in-loop LLM step (embedding, small classification, code retrieval) belongs on a proper GPU box, not the Pi.
- Storage matters: a Samsung 970 EVO Plus 250GB NVMe via a USB-C enclosure moves the Pi's disk IO out of SD-card jail.
- The Pi survives a Gemini rate-limit event much better than a cloud host with a per-second concurrency cap — that alone is worth the setup.
What MCP background execution actually adds
MCP by itself is a protocol for exposing tools to an LLM. Background execution changes the lifecycle: your agent submits a job (say, "monitor this repo and open a PR when tests pass"), the runtime returns a handle, and the job continues without the client attached. When the job finishes it can push results back through a webhook, a queue, or a follow-up MCP call.
The concrete shape per the Gemini API reference is roughly: runs.create with a background flag, runs.get to poll status, runs.stream to attach a stream when you want to watch. Tool calls inside the job route through MCP servers you registered on your host.
The value is straightforward: you can start a task on your phone, close the app, and pick up the result later. For a team it is bigger: shared MCP servers on a shared host mean everyone's agent uses the same tool registry, the same auth, the same rate-limit budget.
The Pi 4 host build
The reference build:
- Raspberry Pi 4 Model B 8GB — $80. 8GB is the min; 4GB is tight once you have five MCP servers plus a monitoring stack.
- Samsung 970 EVO Plus 250GB NVMe + a USB 3.0 NVMe enclosure — $35 SSD + $12 enclosure. Boots faster and lasts longer than any SD card.
- A quiet case with a heatsink — $15. The Pi throttles hard under sustained load without one.
- A short list of software: Docker, Caddy or Nginx reverse proxy, one MCP server per tool, systemd units for each.
Total landed cost: about $150. This is not a beefy machine — it is a plumbing host. It runs your tool servers and job queues; the actual heavy lifting happens on Gemini or a bigger local box.
When you'll want a GPU host too
The Pi handles orchestration. When the workflow calls for anything that runs an LLM locally — embedding generation, a small classifier, a code-retrieval reranker, an on-device speech-to-text — the Pi will not cut it. Add a modest GPU box:
- MSI RTX 3060 Ventus 3X 12G — $220 used. Runs Qwen 3 7B at q5 comfortably, hosts a bge-large embedding model, and handles the code-retrieval reranker with room to spare.
- AMD Ryzen 7 5700X — $180. Enough CPU cores to hold the orchestration overhead of concurrent MCP requests.
The Pi handles the small-latency plumbing (queues, tool routing, webhook fan-out) and the GPU handles the model work. This split is stable — the Pi almost never gets touched once configured, and the GPU box only needs updates when you swap models.
Sample tool inventory on the Pi
The MCP servers a solo builder tends to run:
| Server | RAM footprint | Notes |
|---|---|---|
| filesystem (read/write scoped) | ~50MB | Standard MCP filesystem server |
| github-tools | ~100MB | Auth cache + rate-limit shaping |
| shell-runner | ~60MB | Runs make, pytest, etc. |
| web-fetch (allow-listed) | ~80MB | Guards outbound HTTP |
| sqlite / postgres tools | ~150MB | Database read/write |
| ollama-proxy (routes to GPU box) | ~40MB | Forwards LLM calls to the RTX box |
| cron/scheduler | ~30MB | Fires background jobs on a clock |
Total: comfortably under 1GB. The Pi's remaining 7GB is available for job state, log buffers, and the reverse proxy.
Prefer NVMe over SD
The Pi 4 boots from USB 3.0. Boot from a small NVMe SSD in a USB-C enclosure and skip the SD card entirely — community measurements from Tom's Hardware and other sources put NVMe-over-USB at 4-6x SD-card throughput, and the endurance on a decent NVMe drive is measured in years of always-on service instead of the months you get out of a heavily-written SD card.
Common pitfalls
- Using a 5V/2A phone charger. The Pi 4 needs 5V/3A. Undervolt logs and random reboots at load are the number-one home-lab failure.
- Running the model on the Pi. A quantized 3B model technically runs — it does about 4-6 tokens/sec, which is unusable for interactive work. Route model calls to a GPU box or the cloud.
- Skipping the reverse proxy. Direct-exposing MCP ports on the Pi is a bad idea; Caddy with automatic TLS is a five-minute install and eliminates a whole class of misconfiguration.
- Forgetting to isolate the shell-runner MCP server. Give it a scoped user with
nosuidmount options. An unrestricted shell tool is the exact wrong thing to expose to any LLM. - Underestimating log volume. Background jobs generate a lot of logs. Rotate aggressively with
logrotateor you'll be surprised how quickly the NVMe fills.
When the Pi is no longer enough
Move up when:
- More than ~20 concurrent MCP requests per second. The Pi's networking stack starts to feel it around then.
- You want to co-locate a real LLM on the same box. The Pi has no PCIe worth using; add a mini-PC or the RTX box next to it.
- You need HA. Two Pis in a failover pair works but a $250 mini-PC gives you the memory headroom to skip the failover complexity.
For solo builders and small teams the Pi 4 8GB is the right first host — cheap, silent, and adequate.
Bottom line
Gemini's MCP + background-execution combo is worth adopting; the pattern gets meaningfully better once you have a small always-on host to run your tool servers and background jobs. A Pi 4 8GB does the job for well under $200, and pairing it with a used RTX 3060 12GB box gives you a local-model tier when the workflow needs one. Start with the Pi, add the GPU when you feel the limits.
Related guides
- Grok 4.5 Ranks #4 on GDPval: Cloud-vs-Local Math for 2026 — the cost model for when to run local at all.
- Fable 5 as Manager: The Delegate-to-Sonnet-5 Cost Pattern — the routing pattern that pairs with an MCP host.
- Mistral Robostral Navigate: An 8B Model Steers Robots From One Camera — another edge-hosting use case.
Citations and sources
- Google — Gemini API documentation
- Model Context Protocol — official spec repository
- Tom's Hardware — Best GPUs roundup for the 3060 GPU box
This piece is editorial synthesis based on publicly available information. No independent first-party benchmarking is reported.
