ต้นแบบ · รุ่นทดลอง: มีทุก server ในทะเบียนทางการ อัปเดตทุก 30 นาที รีวิวและบัญชีผู้ใช้จะมาในขั้นถัดไป
PopNx MCPที่รวม MCP สำหรับคนใช้ AI · อธิบายเป็นภาษาคน

Fw Context MCP

โดย turbyhoรุ่น 0.23.0i★ –iรันบนเครื่อง
ชื่อใน registryio.github.turbyho/fw-context-mcp

ติดตั้ง

ภาพรวม

คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)

Build-aware code intelligence for embedded C/C++ firmware — libclang, FTS5, call graphs, 33 tools

สามเสาของ PopNx MCP

สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน

ใช้ทำอะไรได้

ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry

  • การเชื่อมต่อ: รันบนเครื่อง
  • ช่องทาง (transport): stdio
  • หมวด: เครื่องมือนักพัฒนา

ติดตั้ง

เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง

ก่อนติดตั้ง

ต้องเตรียมก่อน

  • PyPIติดตั้ง uv ของ Python (มีคำสั่ง uvx) ในเครื่อง

คุณใช้แอปไหน

เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”

เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json

{
  "mcpServers": {
    "fw-context": {
      "command": "uvx",
      "args": [
        "fw-context-mcp"
      ]
    }
  }
}

พิมพ์คำสั่งนี้ใน Terminal

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

เปิดใน Cursor

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json

{
  "mcpServers": {
    "fw-context": {
      "command": "uvx",
      "args": [
        "fw-context-mcp"
      ]
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

เปิดใน VS Code

หรือคัดลอกค่าตั้งเอง

วางในไฟล์ .vscode/mcp.json ของโปรเจกต์

{
  "servers": {
    "fw-context": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "fw-context-mcp"
      ]
    }
  }
}

เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง

ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น

ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี

ค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README

ทำอะไรได้บ้าง

รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง

ผลตรวจเบื้องต้นi

เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 8 พ.ย. 2569

  • ✓ ผ่าน

    ตัวตนผู้ทำตรงกับ repo

    ชื่อใน registry ยืนยันด้วยบัญชี GitHub turbyho ซึ่งเป็นเจ้าของ repo

  • … ยังไม่ตรวจ

    ยังมีคนดูแล

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • … ยังไม่ตรวจ

    มีสัญญาอนุญาต (license)

    ยังไม่ได้อ่านข้อมูล repo จาก GitHub

  • – ไม่เกี่ยว

    endpoint ตอบ

    ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต

  • – ไม่เกี่ยว

    ล็อกอินแบบ OAuth

    ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน

  • … ยังไม่ตรวจ

    คำอธิบายเครื่องมือไม่มีคำสั่งแอบแฝง

    รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต

เทียบกับตัวอื่นในหมวด เครื่องมือนักพัฒนาi

  • ดาวมากกว่า 0% ของอีก 4917 ตัวในหมวดนี้
  • ส่งรุ่นใหม่เข้า registry ล่าสุดกว่า 26% ของอีก 4917 ตัวในหมวดนี้
  • ผลตรวจเบื้องต้นดีกว่าหรือเท่ากับ 100% ของอีก 4917 ตัวในหมวดนี้

เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo

คำถามที่พบบ่อย

Fw Context MCP ปลอดภัยไหม?

จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น

ต้องใช้กุญแจหรือรหัสอะไรบ้าง?

registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก

ตัวนี้รันบนเครื่องหรือบนคลาวด์?

รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)

ยังมีคนดูแลอยู่ไหม?

repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (0.23.0) เข้า registry 4 เดือนที่ผ่านมา

ใช้กับโปรแกรมไหนได้บ้าง?

โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Python (uv) ในเครื่องด้วย

มีตัวไหนใช้แทนได้บ้าง?

ในหมวดเดียวกันมี GitHub, Desktop Commander, Cloudflare MCP

ตัวที่ใช้แทนได้

server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว

อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi

GitHub

โดย github

server ทางการของ GitHub ให้ AI อ่านและจัดการโค้ด issue และ pull request ในบัญชีของคุณได้ ใช้ผ่านคลาวด์ของ GitHub หรือรันในเครื่องด้วย Docker ก็ได้

บนเครื่องหรือคลาวด์★ 34,245MITอัปเดต 4 วันที่ผ่านมา
ติดตั้ง

Desktop Commander

โดย wonderwhy-er

MCP server for terminal commands, file operations, and process management

รันบนเครื่อง★ 10,225MITอัปเดต 17 วันที่ผ่านมา
ติดตั้ง

Cloudflare MCP

โดย cloudflare

Cloudflare MCP servers

รันบนคลาวด์★ 4,446Apache-2.0อัปเดต 14 เดือนที่ผ่านมา
ติดตั้ง

README จากผู้ทำ

เปิดอ่าน README

ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ

fw-context

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.

It helps agents answer questions such as:

  • Which implementation is active in this build?
  • Who calls this function, directly or indirectly?
  • Where is this callback registered?
  • Which function-pointer assignments can reach this call site?
  • Which code is excluded by preprocessing?
  • What will be affected if this API changes?
  • How does execution flow from an ISR to application code?

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.

Results from a real firmware review

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++:

  • 115 changed files reviewed by 8 parallel subagents
  • 19 findings across memory safety, concurrency, API use and dead code
  • 9 findings that depended on semantic relationships not available from ordinary text search alone
  • approximately 54,000 context tokens used by fw-context queries
  • an estimated 5.8 million tokens for the equivalent broad grep and file-reading workflow

The 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.

Quick start

Prerequisites
  • Python 3.11 or newer
  • libclang
  • a project that can produce compile_commands.json
  • an MCP-capable coding agent such as Claude Code or OpenCode

Ollama 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.

Install via pip (recommended)
pip install fw-context-mcp
Install the current source version
git clone https://github.com/turbyho/fw-context-mcp.git ~/.fw-context/src

cd ~/.fw-context/src make install

Register fw-context with the supported coding agents detected in your project:

cd /path/to/your/firmware

fw-context init

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 and Installation Guide for platform-specific setup and supported build systems.

What fw-context changes

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:

  • reviewing source files that are not part of the build that you query
  • following the wrong preprocessor branch
  • missing callback registrations and indirect calls
  • selecting an inactive driver or platform implementation
  • treating declarations found by text search as reachable code
  • consuming large amounts of context on vendor code and unrelated files

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.

Why embedded firmware is different

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:

  • compiler flags and preprocessor definitions
  • target, board and product configuration
  • include paths and generated headers
  • Kconfig and Devicetree selections
  • selected driver and HAL implementations
  • templates, inheritance and virtual dispatch
  • callbacks, interrupt handlers and function pointers
  • vendor SDK and RTOS configuration

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.

How it works

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 AST parser] LIBCLANG --> SYMBOLS[symbols name, kind, USR signature, ifdef-filtered source body docstring, tokens] & FILES[files path, language ifdef-filtered content project/SDK sources] & REFS[refs & call graph fp_assignments indirect_call_sites] & INHERIT[inheritance & overrides virtual dispatch] & MACROS[macros params, value & expanded value FTS5 searchable] & ENRICH[optional enrichment embeddings & summaries hotspot cache] SYMBOLS & FILES & REFS & INHERIT & MACROS & ENRICH --> MCP[MCP server 37 tools] MCP --> LLM[AI coding agent]

The index contains:

  • symbol definitions, signatures, source extents and documentation
  • references, direct call edges and recursive caller paths
  • function-pointer assignments and indirect call sites
  • callback registrations and invocation relationships
  • active, preprocessor-filtered file content
  • macro parameter lists, replacement text and expanded values
  • inheritance, overrides and virtual-dispatch relationships
  • translation-unit and project/vendor metadata
  • optional embeddings and LLM-generated summaries

The MCP server exposes this information as compact high-level queries optimized for repeated use by an AI agent.

Typical use cases

  • build-aware review of firmware commits
  • tracing execution across ISRs, work queues, tasks and callbacks
  • locating all callers and references of an API
  • identifying the implementation selected by the current build
  • impact analysis before changing a function signature or data type
  • navigating unfamiliar firmware without reading complete files
  • finding dead-code candidates and unreferenced symbols
  • separating project code from SDK and vendor code
  • reducing irrelevant source text sent to the model

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.

Why not just use clangd or another LSP?

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:

  • persistent project-wide data prepared for repeated agent queries
  • MCP tools that return compact, structured semantic context
  • recursive caller and impact-analysis queries
  • callback and function-pointer relationship modelling
  • active source content suitable for targeted retrieval
  • project/vendor classification and firmware-specific workflows
  • optional cached enrichment shared across repeated analyses

Use clangd for interactive editing. Use fw-context when an AI agent needs structured, reusable context for reviewing, understanding or navigating the built firmware.

Documentation

  • Quick Start
  • Installation
  • Configuration
  • MCP tool reference
  • MCP server notes
  • Firmware review case study

Project maturity

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.

Background

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.

ถาม PopNx