MCP Server for AI Agents
MemBrowse exposes a Model Context Protocol (MCP) server, so an AI coding agent can answer memory questions about your firmware directly:
- "Did flash usage grow on
mainthis month? Which commit did it?" - "What did this pull request add to RAM?"
- "Which symbols got bigger between
v1.2.0andHEAD?"
The server is read-only. An agent can look at projects, targets, history and reports, but cannot upload, change budgets or modify anything.
Public projects: no key needed
Projects with public access enabled can be read without an API key, just like their public pages. Connect to the URL below without the Authorization header and name the project by its GitHub path:
claude mcp add --transport http membrowse https://api.membrowse.com/mcp
"Using membrowse, which commit grew flash the most in micropython/micropython?"
Without a key the agent starts from the project's owner/repo and calls list_targets directly; list_projects needs a key. For private projects, or to list your own, create a key.
1. Create an API key
- Open Account Settings in the portal.
- Under API Keys, click Add API key, enter a name (for example Claude Code on my laptop) and click Create.
- Copy the key. It starts with
mbu_and is shown only once.
An account API key gives read access to every project you can see — the ones you own and the ones you are a member of — in addition to public projects. It is separate from a project's upload API key and cannot be used to upload reports.
You can hold up to 10 keys. Revoke one from the same page at any time; it stops working immediately.
2. Connect your agent
| URL (hosted) | https://api.membrowse.com/mcp |
| URL (on-premises) | https://<your-host>/api/mcp |
| Transport | Streamable HTTP |
| Header | Authorization: Bearer <your key> (omit for public projects only) |
Claude Code
claude mcp add --transport http membrowse https://api.membrowse.com/mcp \
--header "Authorization: Bearer mbu_your_key"
Cursor
Add to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"membrowse": {
"url": "https://api.membrowse.com/mcp",
"headers": { "Authorization": "Bearer mbu_your_key" }
}
}
}
VS Code
Add to .vscode/mcp.json:
{
"servers": {
"membrowse": {
"type": "http",
"url": "https://api.membrowse.com/mcp",
"headers": { "Authorization": "Bearer mbu_your_key" }
}
}
}
Any other MCP client that supports remote HTTP servers with a custom header works the same way.
Clients that only connect through OAuth (such as custom connectors in the Claude web app) cannot use an API key and are not supported yet.
Tools
| Tool | What it answers |
|---|---|
list_projects | Which projects does this key's account own or belong to? Needs an API key; public projects of others are not listed. |
list_targets | Which targets does a project have, and how full is each memory region right now? The starting point for a public project. |
get_commit_summary | For one commit, every target's change against its base build: per region, the largest section and source-file changes, budget alerts and, for targets with benchmark metrics, how each metric moved. For a pull request's head commit the base is the tip of the PR's base branch, so this is the whole PR's change — the same numbers as the MemBrowse PR comment. |
get_memory_history | A target's commits, newest first, with each region's size and the change each commit made. |
get_metric_history | A target's benchmarked commits, newest first, with each benchmark metric's value and its change from the previous commit that had it. |
compare_builds | What differs between two builds — by region, section, source file or symbol. With base_target, the base is another target's build: which symbols does this target link that the other does without? |
list_symbols | The largest symbols in one build, filtered by region, section, file, object or name — or, with group_by, the total per section, library, object, file or directory. |
export_symbols | One build's whole symbol table as a file, for analysis the other tools don't offer. Returns a one-time download link, not the symbols; the agent saves the file with curl and works on it with code, so the table never fills its context. |
Things to know when prompting:
- Projects can be named by ID, by GitHub
owner/repo, or by project name. - Commits can be named by full SHA, a SHA prefix (7+ characters), or a branch or tag name. Leaving the commit out means the head of the default branch. A pull request is named by its head commit SHA.
- MemBrowse only knows commits whose build was uploaded. History follows the first-parent chain of tracked commits.
- All sizes are in bytes. A target's region hide, rename and merge rules apply, so numbers match the portal.
compare_buildswithout a base compares a commit with the build it was compared with when it was uploaded: for a pull request's head commit, the tip of the PR's base branch (the whole PR's change); for a pushed commit, the previous build (what that one commit did).- Results are capped (50 rows by default, 200 at most) and sorted by size of change, so the biggest contributors come first.
list_symbolspages past the cap withoffset. - Symbol names that share one address (
powf/_powf) are one symbol inlist_symbols, with the other names underaliases, so no byte is counted twice. export_symbolsneeds an agent that can run shell commands and reach the MemBrowse server (Claude Code, Cursor and VS Code agents can). The file is gzipped JSON Lines, one symbol per line, with the same alias merging aslist_symbols. Its download link works once, expires after 10 minutes, and is redeemed with aPOSTthat carries the token in the body. A link issued under an API key stops working when that key is revoked or loses access to the project, and one for a public project stops working if the project is made private.
Benchmark metrics
Targets whose CI attaches benchmark metrics (cycle counts, timings, scores) give the agent two more questions to answer:
get_commit_summaryadds ametricsblock to each target that has metrics at the commit: every metric's base and head value, the change, and the change in percent, largest first. For a pull request, the base is the tip of its base branch, or, when that commit was not benchmarked, the nearest earlier one that was;metrics.basesays which commit was used.get_metric_historylists the commits that carry metrics, newest first, each with the change from the previous benchmarked commit, so the agent can find the commit that slowed something down and then check its memory change withget_commit_summaryorcompare_builds.
Whether a higher value is better depends on the metric, so name metrics so their direction is clear (boot_ms, coremark_score) and give them a unit.
Example
You: Flash on the
stm32f4target of acme/firmware looks bigger than last week. What happened?
A typical agent run:
get_memory_historyonacme/firmware/stm32f4, regionFLASH→ commit3f9c2abadded 4,160 bytes; every other commit is under 100 bytes.compare_buildswithhead: 3f9c2ab,level: symbols→bloat_table(+4,096 bytes,src/bloat.c) is new.- The agent opens
src/bloat.cin your checkout and explains or fixes it.
Finding where memory can be saved starts from totals rather than symbols: list_symbols with group_by: library (or section, which also shows string literals no symbol names), then compare_builds with base_target set to a leaner configuration of the same firmware to see what it already does without. For duplicates, template instances or anything else the tools don't answer, export_symbols hands the agent the whole symbol table as a file to analyse with code.
Reviewing a pull request takes one call for the overview: get_commit_summary with the PR's head commit SHA lists every target's change against the PR's base branch, with the sections and source files that grew. For a target that grew, compare_builds with level: symbols, the head SHA, and the target's base from the summary shows the symbols behind it.
Troubleshooting
401 Unauthorized — the key is mistyped or revoked. Check that the header is exactly Authorization: Bearer mbu_…. Project upload keys and browser session tokens are not accepted here. (A request with no Authorization header at all is not an error: it gets public projects only.)
"Project not found" — the project is private and the key's account is not its owner or a member, or no key was sent. With a key, ask the agent to call list_projects; without one, check that the project's public access is enabled and that the agent uses its GitHub owner/repo.
"No commit, branch or tag …" — that commit has no uploaded report for the target. Ask for get_memory_history to see which commits do.