What is Fw Context Mcp?
Fw Context Mcp is a model context protocol server that builds a compiler-accurate semantic index of embedded C/C++ projects from compile_commands.json and the libclang AST. It exposes tools for LLMs to query symbol definitions, references, call relationships, callback registrations, function pointer assignments, active source content, and other project metadata—giving coding agents the right context instead of raw source files.
How to use Fw Context Mcp?
Run fw-context init followed by fw-context index --build to create the persistent index, then restart your LLM client. After that, ask questions about your firmware project. Detailed installation and configuration guides are available in the documentation (docs/README.md, docs/installation.md).
Key features of Fw Context Mcp
- Compiler-accurate semantic index from
compile_commands.json
- Exposes high-level queries through MCP tools for LLMs
- Persistent, local-first index optimized for repeated questions
- Supports callback registration, function pointer assignments, and inheritance
- Handles preprocessor configuration and active implementation detection
- Reduces irrelevant token usage by returning only needed semantic information
Use cases of Fw Context Mcp
- Reviewing firmware commits with build-aware context and finding all callers of an API
- Tracing callback registration and indirect invocation paths in RTOS projects
- Understanding ISR, work queue, and task relationships without reading entire files
- Identifying dead-code candidates and active implementations selected by the current build
- Navigating large source files through symbol maps instead of reading them whole
コメント