Share
AI assistants are showing up in more parts of the embedded development lifecycle, from writing firmware to triaging support tickets. The teams getting the most out of them are the ones figuring out how to plug them into the systems they already have: their code, their infrastructure, and now, their fleet data.
The Memfault MCP Server is the piece that closes the loop on field data. Once it’s connected, the same AI assistant that’s already pair-programming with you in your editor can pull a crash from production, walk the stack trace, find the offending code in your repo, and paired with another MCP like GitHub or GitLab, open a PR to fix it. Not in some imagined future. Today, in your IDE or your terminal, with the tools you’ve already got installed.
What is the Memfault MCP Server?
Model Context Protocol (MCP) is an open standard for letting AI assistants talk to external data sources and tools in a structured way. Think of it as a USB port for AI: a single, consistent way to plug a language model into the systems you already use.
The Memfault MCP Server gives MCP-compatible clients structured access to your Memfault data through twelve tools across four areas:
-
Devices — look up individual devices by serial, fetch their current attributes and Device Vitals (crashfree_hours, expected_battery_life, connection_uptime_percent, and the rest), query timeseries metrics over a window (e.g., heap_free_bytes for the last 7 days), and search the fleet with SQL-style filters on cohort, software version, hardware version, last seen, and more.
-
Issues & Traces — list open issues sorted by trace count or recency, fetch full issue details, paginate through the traces that contributed to an issue, and walk individual traces with stack frames across all threads plus up to 100 lines of pre-crash log context.
-
Metrics — discover the set of metrics available for a project.
-
Software Versions — list versions in a time range and compare vitals distributions across them (p01, p05, p50, p95, p99, sample counts).
You ask questions in natural language, the assistant picks the right tool, and you get answers grounded in your actual fleet.
Memfault AI lives in the product, helping you make sense of release reports and individual issues without leaving the dashboard. The Memfault MCP Server is the inverse: it brings Memfault data out to wherever you’re already working with an AI assistant.
Security and trust
A few things worth knowing before you hand an AI assistant a connection to your fleet data:
-
OAuth 2.0 with PKCE. Authentication runs through your browser as a normal OAuth flow — no shared API keys, no tokens to paste into config files, no secrets sitting in plaintext. A standard pattern your security team will recognise.
-
You pick the scope. When you authorize a connection, you choose which project (or projects) it can reach. The agent only ever sees what your own account can already see.
-
Read-only, full stop. All twelve tools are read paths. There’s no tool to close issues, change cohorts, trigger OTA, or modify any state at all. Anything that mutates happens in the Memfault UI or REST API, where it belongs, with the audit trail you already rely on. (When the agent does open a PR, that’s the GitHub MCP doing it — Memfault supplies the why, not the what.)
-
Short-lived access tokens. Tokens expire after an hour and most MCP clients refresh them silently in the background. If yours doesn’t, you just re-authorize from the client.
-
Available on every plan. Including the free Developer plan.
Connecting Your AI to Memfault MCP
The MCP endpoint is https://app.memfault.com/mcp. We’ll walk through Claude here; the Memfault MCP documentation [TKTK] covers Cursor, Copilot, Codex, Windsurf, and anything else MCP-compatible.
Claude Code
claude mcp add --transport http memfault https://app.memfault.com/mcpThen run /mcp inside a session, select memfault, and choose Authenticate. Your browser opens a Memfault authorization page; pick the project you want to grant access to and press Authorize.
Claude Desktop
Edit claude_desktop_config.json (Settings → Developer → Edit Config) and add:
{
"mcpServers": {
"memfault": {
"url": "https://app.memfault.com/mcp"
}
}
}Restart Claude Desktop; a browser window opens for OAuth on first use.
That’s it. No SDK to install, no schema to learn — the server publishes its own tool definitions, and the assistant figures out which one to call based on what you ask.
Some workflows to try
Some example scenarios where Memfault MCP can accelerate your workflows:
1. From a field crash to a merged PR, in one conversation
You’re in Claude Code, working in the firmware repo. An alert lands: there’s a new crash spiking on the latest release. With Memfault MCP and your code-host MCP (GitHub, GitLab) both connected, you don’t have to leave the editor:
“Look at the top open issues in my-project-prod from the last 24 hours. Pull the most recent trace on the worst one, walk the stack against this codebase, and tell me what’s going wrong. If you’re confident in the fix, open a PR.”
The agent fetches the issue and trace from Memfault, cross-references the stack frames against the actual files in your checked-out repo, drafts a fix, and uses the GitHub MCP to open a PR with a description that links back to the originating Memfault issue. For straightforward bugs like null derefs, off-by-ones, regressions introduced by a recent change, this works well out of the box. For trickier ones, you still get a working theory and a draft fix in seconds, usually enough to unblock you and narrow in on a hairy fix.
2. Support resolves a device issue without escalating to engineering
A support ticket comes in: device serial ABC123 keeps rebooting. Today, that ticket might bounce to a firmware engineer who has to drop what they’re doing, pull up the Device Timeline, and translate it back into something the customer will understand.
“Pull up device ABC123 in my-project-prod. What’s its current software version, when did it last check in, and chart heap_free_bytes over the last 7 days. Explain what’s going on in plain language.”
The agent surfaces the relevant attributes and timeseries data, summarises them, and flags whether the device’s behavior matches a pattern worth escalating. The ticket gets a potential resolution without engineering ever being pulled in.
3. Catch a regression before it reaches production
You’re about to sign off on v2.4.1 for a wider rollout. The Release Insights Report tells you the headline numbers, but you want a second pass before you push the button.
“Of the devices on software version 2.4.1, what’s the p50 crashfree_hours? How does that compare to 2.3.0? Give me the same analysis for expected_battery_life and connection_uptime_percent.”
The agent pulls the vitals distributions for both versions and lays them side by side, with access to p01, p05, p50, p95, p99, sample counts, etc. If something’s regressed in the long tail rather than the median, this is where it will surface. You catch it before it ships.
Tips for getting the best results
Connect Memfault MCP next to your other MCPs, not instead of them. The end-to-end loop works best when the agent has Memfault, your codebase, and your code host all in the same context. If you’re going to set up one MCP server, set up the second and third at the same time. The compounding value is real.
Be specific about scope. “What’s broken?” is a worse prompt than “What new Issues appeared in my-project-prod since version 2.3.0 by trace count?” Frontload the project, time range, version, or cohort.
Use the names that exist in Memfault. If the metric is heap_free_bytes, write it that way — same for cohort names, software versions, device serials, and the Device Vital keys (crashfree_hours, stable_sessions, expected_battery_life, sync_success_percent, memfault_sync_success_percent, connection_uptime_percent). The agent is good at matching, but you’ll get faster, more reliable results when you hand it the literal string.
Pair traces with code, not just metrics with prose. The MCP Server can fetch full stack traces including all threads and up to 100 log lines, but the agent won’t always reach for them unless you nudge it. “Pull the latest trace on this and walk it through the codebase” is the prompt that unlocks the loop.