MCP.so
登录
F

Fw Context MCP Server

@turbyho

基本信息

许可证

MIT

传输方式

stdio

作者

turbyho

提交者

Turbyho

关于 Fw Context MCP Server

fw-context builds a compiler-accurate semantic index of your C/C++ firmware from

#c#embedded#firmware#libclang#call-graph#code-intelligence#mbed-os#zephyr#platformio

Fw Context MCP Server 配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "fw-context": {
      "command": "python3",
      "args": [
        "-m",
        "fw_context_mcp.mcp.server"
      ]
    }
  }
}

Fw Context MCP Server 工具

工具列表暂未提供

当前收录暂时没有可展示的工具列表,不代表服务没有工具。请查阅项目文档了解支持的能力。

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

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

常见问题

1

Why not just use an LSP like clangd?

Language servers are designed for interactive editing (completion, diagnostics, go-to-definition). Fw Context Mcp is built for LLM-assisted reasoning over firmware projects—it exposes high-level semantic queries through MCP, stores a persistent index, and optimizes for repeated questions from an LLM, not for editor latency.

2

What dependencies or runtime requirements does Fw Context Mcp have?

It requires a `compile_commands.json` file from your build system and uses libclang to index the AST. The server is local‑first and works with any LLM client that supports the MCP protocol.

3

How does Fw Context Mcp handle data and where is it stored?

The index is built locally from your project’s compilation database and stored persistently on your machine. No project data is sent to external servers; the only communication is between the MCP server and the LLM client over the local machine.

4

Can I use Fw Context Mcp for projects that don’t use a standard build system?

Fw Context Mcp explicitly requires `compile_commands.json`. It supports Zephyr, PlatformIO, Mbed OS, Arduino, FreeRTOS‑based projects, and custom embedded builds that can produce this file. Without a compilation database, it cannot index the project.

5

What are the known limits of Fw Context Mcp?

The server does not replace an LLM; it provides better input. It cannot analyze files that are not part of the build index, and its accuracy depends on the quality of the compilation database. It is not designed for interactive editing tasks.

评论

更多 MCP 服务器