Skip to main content

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.

ClientSetupNotes
Claude Codeclaude mcp add --transport http memfault https://app.memfault.com/mcpRun /mcp inside a session to complete OAuth.
Claude DesktopAdd 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.
CursorSettings -> 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 CodeCommand 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 CLIcodex mcp add memfault --url https://app.memfault.com/mcp
GitHub Copilot CLIcopilot mcp add memfault https://app.memfault.com/mcp
WindsurfAdd 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.

  1. Pick a project you want to access, for example my-project-prod.
  2. Register the server in your client. Claude Code example: claude mcp add --transport http my-project-prod https://app.memfault.com/mcp.
  3. Launch the client.
  4. In Claude Code, run /mcp, select my-project-prod, and choose Authenticate.
  5. Your browser opens an Authorization page. Select the project and press Authorize.
  6. 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.

TierTool calls / hourTool calls / dayNotes
Growth / Scale100500Enough for manual agent use and light automation.
Enterprise3005,000Supports 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

ToolDescription
device_getFetch metadata for one device by serial (nickname, Cohort, Hardware Version, Software Version, first seen, last seen).
device_getAttributesMost recent value of each attribute custom metric for a device.
device_getTimeseriesTimeseries readings for one or more metric keys on a single device. Maximum time range: 7 days. Returns CSV.
device_getVitalsA 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_searchSearch 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

ToolDescription
issues_listList 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_getGet a single issue's details: title, reason, first seen, last seen, first and last Software Version, trace count, and device count.
issue_getTracesList traces belonging to an issue, newest first. Maximum 25 per call, with offset pagination.
trace_getDeep 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

ToolDescription
metrics_listList 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

ToolDescription
softwareVersions_listList non-archived Software Versions in the project, newest first. Optional time range. Maximum 50 per page.
softwareVersion_getVitalsDistribution 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-fleet whose battery_soc attribute is below 20."
  • "Chart heap_free_bytes over 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_getAttributes returns 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.