Skip to main content
MCP server CX Codex

fw-context-mcp — Claude Code MCP server

Builds a compiler-aware index for embedded C/C++ firmware and lets coding agents query symbols, call paths, callbacks, and active code.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add fw-context-mcp -- uvx fw-context-mcp
Open on GitHub

What fw-context-mcp does

fw-context-mcp creates a persistent project index from compile_commands.json and the libclang AST, then serves that information over MCP. An agent can inspect the implementation selected by a build, trace direct or indirect callers, locate callback registration, follow function-pointer paths, and filter out code removed by preprocessing.

The index stores symbols, source bodies, references, call edges, inheritance data, macros, and build metadata. FTS5 provides full-text search, while changed translation units can be processed incrementally after the first run. Project setup uses fw-context init, followed by fw-context index --build.

The project needs Python 3.11 or newer, libclang, and a build that can produce compile_commands.json. Ollama supplies embeddings and LLM-generated symbol descriptions; without it, those features fall back to full-text search or expose raw prompts.

What it helps with

  • identify the implementation selected by a firmware build
  • trace execution from an ISR into application code
  • list direct and indirect callers of an API
  • locate callback registrations and function-pointer paths

Example prompts for the agent

  • Index this firmware from compile_commands.json and show which driver implementation is active.
  • Trace every direct and indirect caller of this function, including callbacks.
  • Assess which code paths are affected if this API changes, using the active preprocessor configuration.

How to install fw-context-mcp

Platform CLI

claude mcp add fw-context-mcp -- uvx fw-context-mcp

uvx runs the command named after the package; if the README names another one, use uvx --from fw-context-mcp <command>

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about fw-context-mcp

How do I install fw-context-mcp in Claude Code?

Run claude mcp add fw-context-mcp -- uvx fw-context-mcp, then restart Claude Code.

What does fw-context-mcp do?

It builds a build-aware firmware index from the compilation database and libclang, giving an agent targeted queries for symbols, calls, macros, callbacks, and active source.

What does fw-context-mcp require?

It requires Python 3.11 or newer, libclang, and a project that can generate compile_commands.json. Ollama is needed for embeddings and LLM-based symbol descriptions.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor