MCP Server
The Memfault MCP (Model Context Protocol) server lets MCP-compatible AI assistants - such as Claude Desktop, Cursor, Claude Code, and any other MCP client - connect to your Memfault project and query fleet data on your behalf. You authenticate with your Memfault account via OAuth, pick an organization and project, and the assistant can then pull issues, traces, device info, metrics, and software-version stats into its reasoning.
It is a read-only interface to your project. See What it can't do below for the full list of intentional limitations.
Endpoint
The MCP endpoint is hosted by Memfault, not run as a local server:
https://app.memfault.com/mcp
Authentication
The server uses OAuth 2.0 with PKCE. Most modern MCP clients handle the entire flow for you - you paste in the URL, log in, and the client stores the resulting tokens.
- Tokens are scoped to a single organization + project that you choose during the authorization flow.
- Default granted permissions are read-only:
alert:read,chart:read,deployment:read,device:read,issue:read,me:read,org:read,project:read. - Refresh tokens are supported, and most clients refresh automatically.
- Access tokens expire after 1 hour. Most clients refresh transparently; if yours does not, re-authorize from the client.
Validated MCP Clients
The following MCP clients have been validated against the Memfault MCP server. Other MCP-compatible clients should work, but have not been tested.
| Client | Setup | Notes |
|---|---|---|
| Claude Code | claude mcp add --transport http memfault https://app.memfault.com/mcp | Run /mcp inside a session to complete OAuth. |
| Claude Desktop | Add an entry to claude_desktop_config.json (Settings -> Developer -> Edit Config). See JSON snippet below. | Restart Claude Desktop; a browser window opens for OAuth on first use. |
| Cursor | Settings -> MCP -> Add new MCP server. Name memfault, type http, URL https://app.memfault.com/mcp. | Cursor prompts for authorization the first time a tool is called. |
| VS Code | Command Palette -> MCP: Add Server -> HTTP. URL https://app.memfault.com/mcp, name memfault. | Requires VS Code 1.99+ and Agent mode in Copilot Chat. |
| OpenAI Codex CLI | codex mcp add memfault --url https://app.memfault.com/mcp | |
| GitHub Copilot CLI | copilot mcp add memfault https://app.memfault.com/mcp | |
| Windsurf | Add to mcp_config.json. See Windsurf snippet below. | Requires the mcp-remote wrapper via npx. |
Claude Desktop config:
{
"mcpServers": {
"memfault": {
"url": "https://app.memfault.com/mcp"
}
}
}
Windsurf config (mcp_config.json):
{
"mcpServers": {
"memfault": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://app.memfault.com/mcp"]
}
}
}
Getting Started
Tokens are scoped per project, so configure the MCP server with a different name for each project you want to give your assistant access to.
- Pick a project you want to access, for example
my-project-prod. - Register the server in your client. Claude Code example:
claude mcp add --transport http my-project-prod https://app.memfault.com/mcp. - Launch the client.
- In Claude Code, run
/mcp, selectmy-project-prod, and choose Authenticate. - Your browser opens an Authorization page. Select the project and press Authorize.
- Ask your assistant a question that references the project, for example: "What are the top 5 open issues in my-project-prod by trace count?"
Rate Limits
MCP tool calls are rate-limited per organization - all users in an organization share the same bucket. Limits are tracked across every MCP client (Claude Code, Cursor, Claude Desktop, etc.) that authenticates against the same organization.
When the limit is reached, the server returns HTTP 429 with a Retry-After
header. Most MCP clients back off automatically and retry once the window
clears.
| Tier | Tool calls / hour | Tool calls / day | Notes |
|---|---|---|---|
| Growth / Scale | 100 | 500 | Enough for manual agent use and light automation. |
| Enterprise | 300 | 5,000 | Supports continuous agentic workflows. |
| Additional | - | - | For additional usage, contact us for more information. |
Available Tools
The server currently exposes 12 read-only tools, organized into four groups. All tools operate within the single organization and project that your token is scoped to.
Device tools
| Tool | Description |
|---|---|
device_get | Fetch metadata for one device by serial (nickname, Cohort, Hardware Version, Software Version, first seen, last seen). |
device_getAttributes | Most recent value of each attribute custom metric for a device. |
device_getTimeseries | Timeseries readings for one or more metric keys on a single device. Maximum time range: 7 days. Returns CSV. |
device_getVitals | A single aggregated device vital over a time range. Valid vitals: crashfree_hours, stable_sessions, expected_battery_life, sync_success_percent, memfault_sync_success_percent, connection_uptime_percent. |
device_search | Search devices with a SQL-style WHERE clause. Supports fields including cohort, device_serial, first_seen, last_seen, hardware_version, software_version, nickname, staged, plus attribute.'<key>' for custom attributes. Operators: =, !=, <, <=, >, >=, AND, OR, LIKE, NOT LIKE. Paginated, 50 results per page. |
Issue & Trace tools
| Tool | Description |
|---|---|
issues_list | List open issues in the project. Sort by trace_count, device_count, first_seen, or last_seen (prefix with - for descending). Paginated, 10 results per page. |
issue_get | Get a single issue's details: title, reason, first seen, last seen, first and last Software Version, trace count, and device count. |
issue_getTraces | List traces belonging to an issue, newest first. Maximum 25 per call, with offset pagination. |
trace_get | Deep trace detail: faulting-thread stacktrace (up to 50 frames), fault analysis (registers, notes), captured date, and device, hardware, and software context. Optional flags: include_logs (up to 100 log lines) and include_all_threads (stacks for every thread). |
Metric tools
| Tool | Description |
|---|---|
metrics_list | List all heartbeat-report metrics defined in the project. For each metric: key, display name, description, data type, and whether it is an attribute (latest-value-only, usable in device_search) or timeseries (history queryable via device_getTimeseries). Paginated, 50 per page. |
Software Version tools
| Tool | Description |
|---|---|
softwareVersions_list | List non-archived Software Versions in the project, newest first. Optional time range. Maximum 50 per page. |
softwareVersion_getVitals | Distribution of a device vital across the whole fleet running a given Software Version. Returns p01, p05, p50, p95, p99, device_count, sample_count, and unit. |
Example prompts
Once connected, you can ask your assistant things like:
- "What are the top 5 open issues in my project by trace count? For each, show the fault reason and most recent Software Version."
- "Pull the most recent trace on issue 12345. Walk me through the stack."
- "Of the devices on Software Version 2.4.1, what's the p50 crashfree-hours? How does that compare to 2.3.0?"
- "Find all devices in Cohort
pilot-fleetwhosebattery_socattribute is below 20." - "Chart
heap_free_bytesover the last 7 days for device ABC123."
What it can't do
The MCP server is a targeted query interface, not a data warehouse or analytics engine. It intentionally does not support:
- Data export or bulk dump. There is no endpoint to download all traces, issues, or metrics to file.
- Cross-issue or fleet-wide log or stack search. You cannot grep across every trace for a string, file name, or symbol; you must enumerate issues and inspect traces one at a time.
- Correlation analysis. It will not tell you which issues share a common source file or auto-cluster crash patterns. The LLM can reason about that from data you fetch, but no tool computes it directly.
- Historical attribute timelines.
device_getAttributesreturns only the most recent value per attribute. - Mutations. You cannot close issues, reassign devices, reprocess data, or change any state via MCP. The server is strictly read-only.
- Timeseries spans longer than 7 days. Your LLM can usually handle this automatically by chunking longer windows into multiple calls.
For any of the above, use the Memfault web app, the REST API, or export integrations.