
A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

fw-context indexes a firmware build from its compilation database and libclang AST, then serves compact semantic queries such as symbol bodies, callers, callees, references, callbacks, macros and inheritance to coding agents over MCP.
Build-aware code intelligence MCP server for embedded C and C++ firmware is cataloged as an MCP server attributed to turbyho. fw-context indexes a firmware build from its compilation database and libclang AST, then serves compact semantic queries such as symbol bodies, callers, callees, references, callbacks, macros and inheritance to coding agents over MCP. It is categorized under developer tools. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.
Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.
Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.
Capability definitions are not reviewed. Unreviewed imports are not exposed as trusted interfaces.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
No reviewed records to display. This does not establish that upstream lacks this capability.
Email delivery is not connected. This page does not collect email addresses or create subscriptions.
Browse the registry for current listings instead.
Reviews for Build-aware code intelligence MCP server for embedded C and C++ firmware are not available yet
Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.
The author positions it as complementary to clangd: clangd is used for interactive editing, while fw-context provides persistent project-wide data and MCP tools tuned for repeated agent queries, including recursive caller and impact analysis.
The project is described as local-first, with source code and the compiler-derived index remaining local unless optional external services are explicitly configured.
It supports Zephyr, PlatformIO, Mbed OS, Arduino, ESP-IDF, generic CMake, Makefile-based projects and custom builds that provide a compilation database, with documented setup paths for Keil, IAR, STM32CubeIDE and TI Code Composer Studio.
README.md · 437dacf60993 · Fetched 2026-11-13 11:21:14 UTC
Original upstream text, without AI rewriting. Scripts, forms and unsafe links are filtered for safety.
Showing the last retrieved documentation snapshot; check the source for current changes.
Build-aware code intelligence for AI coding agents working on embedded C and C++ firmware.
fw-context builds a persistent semantic index from compile_commands.json and the libclang AST, then exposes it to coding agents through MCP. Instead of reconstructing your firmware through repeated file reads and text searches, the agent can query the program structure that one build produces.
New: Linux, macOS and Windows. fw-context now runs on macOS and Windows, next to Linux. The CI runs the tests on the three platforms with Python 3.11 and 3.14. Three firmware projects (ESP32 and STM32 with PlatformIO, nRF52 with Mbed OS) gave the same index on each platform. See Platforms for what was tested and what is different.
It helps agents answer questions such as:
The goal is not to give the model more source code. It is to give it the smallest useful, build-aware context needed for the current task.
In the included firmware review case study, fw-context was used on an nRF52/Mbed OS project containing approximately 67,000 lines of C and C++:
grep and file-reading workflowThe case study includes the review output, methodology and per-tool token analysis so the claims can be inspected rather than treated as a black-box benchmark.
uv (or pipx)git, and clang for the macro values and the assembly units. The installation of fw-context installs libclang.compile_commands.jsonOllama is optional for the core index: symbols, full-text search, call graph and source come from libclang and SQLite only. With the default configuration, Ollama also computes the vector embeddings (semantic_search, the re-rank step of smart_search) and the symbol analysis (explain_symbol, symbol descriptions). Without Ollama, these features fall back to full-text search or return raw prompts, and the status tools tell you that the embeddings are not complete. When you use no embedding model and no LLM, set [llm] enabled = false. See Ollama.
Ollama is not the only LLM service. The symbol analysis can also use Ollama Cloud, OpenRouter, DeepSeek, the ChatGPT plan, or another OpenAI-compatible API. The embeddings can also use OpenRouter or another OpenAI-compatible API. A cloud service gets the source code. See LLM setup.
The same commands work on Linux, macOS and Windows (PowerShell):
uv tool install fw-context-mcp
uv tool update-shell # one time: puts ~/.local/bin on PATH, then open a new terminal
fw-context doctor --fix --only clang-resource
pipx install fw-context-mcp works too. For the steps of each platform (Python, git, clang, the
toolchain) and the install from source, see Installation.
Register fw-context with the supported coding agents detected in your project:
cd /path/to/your/firmware
fw-context init
fw-context init also asks which LLM services you use. To change them later, run fw-context llm setup.
Build and index the firmware:
cd /path/to/your/firmware
fw-context index --build
Then restart the coding agent and ask it questions about the project. The index is persistent and incremental; after the initial run, changed translation units are reprocessed instead of rebuilding the entire index.
See the Quick Start, the Installation Guide and Platforms for the setup of each platform and the supported build systems.
Without a semantic project index, an AI coding agent usually starts by opening files, searching for names, following includes and trying to infer relationships that are implicit in the build. In embedded firmware this reconstruction is often the dominant part of the task.
That approach can fail in predictable ways:
fw-context moves much of that reconstruction into a reusable compiler-derived index. The agent can request exact symbol bodies, callers, callees, references, active macros, callback relationships, inheritance edges and other targeted information without reading whole source trees.
In many application-level projects, the source files visible in the repository are reasonably close to the program being executed. Embedded C and C++ projects often have a much larger gap between the source tree and the resulting program.
The active firmware depends on factors such as:
A repository may therefore contain several plausible implementations of the same subsystem while only one is compiled for the selected target. An agent can reason convincingly about the wrong implementation unless it first reconstructs the build context correctly.
fw-context indexes the project through the same compilation database used by build tooling and language servers.
flowchart LR
CCJ[compile_commands.json] & SRC[(source files)] --> LIBCLANG[libclang<br/>AST parser]
LIBCLANG --> SYMBOLS[symbols<br/>name, kind, USR<br/>signature, ifdef-filtered source body<br/>docstring, tokens] & FILES[files<br/>path, language<br/>ifdef-filtered content<br/>project/SDK sources] & REFS[refs & call graph<br/>indirect calls<br/>through slots] & INHERIT[inheritance<br/>& overrides<br/>virtual dispatch] & MACROS[macros<br/>params, value<br/>& expanded value<br/>FTS5 searchable] & ENRICH[optional enrichment<br/>embeddings & summaries<br/>hotspot cache]
SYMBOLS & FILES & REFS & INHERIT & MACROS & ENRICH --> MCP[MCP server<br/>37 tools]
MCP --> LLM[AI coding agent]
The index contains:
The MCP server exposes this information as compact high-level queries optimized for repeated use by an AI agent.
fw-context supports Zephyr, PlatformIO, Mbed OS, Arduino, ESP-IDF, generic CMake, Makefile-based projects and custom builds that can provide a compilation database. Additional setup paths are documented for Keil, IAR, STM32CubeIDE and TI Code Composer Studio.
clangd already uses compilation commands and is excellent at editor-oriented tasks such as diagnostics, completion, go-to-definition and reference lookup. fw-context does not replace it.
fw-context targets a different interface and workload:
Use clangd for interactive editing. Use fw-context when an AI agent needs structured, reusable context for reviewing, understanding or navigating the built firmware.
fw-context is functional and is used on real embedded C and C++ projects, but its interfaces and indexing behaviour are still evolving. Bug reports, incorrect results, unsupported build configurations and reproducible edge cases are particularly valuable.
The project is local-first: source code and the compiler-derived index remain on the developer's machine unless optional external services are explicitly configured.
The project grew from a recurring failure mode in AI-assisted firmware work: coding agents frequently spent more effort reconstructing the active program than reasoning about the engineering question itself.
For the longer explanation, read: Why AI Coding Agents Keep Making the Same Mistakes When Analyzing Embedded Firmware
The compiler has already reconstructed your program. Let your coding agent use it.
Claim this server with your GitHub account to request manual ownership verification.
Link to the catalog listing for Build-aware code intelligence MCP server for embedded C and C++ firmware from your README. This badge does not certify ownership, compatibility or security.
[](https://awesome-mcp.com/servers/fw-context-mcp)Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.
Separate sources, scopes and periods. Never combined or treated as installations, active users or security reviews.
No reviewed package or image identity; download statistics are not listed yet.
Alternative and complementary servers in the same category

A directory listing describing a cancellation-letter and mailing-address service. The configured public GitHub repository returned 404 during source verification.

A hosted MCP service for browsing and searching through Singapore mobile-network proxies.

A directory listing describing a Markdown-to-PDF service. The configured public GitHub repository returned 404 during source verification.