Embedded Docs

ai.byteask由 byteask.ai 发布官方发布者v1.0.1更新于 Oct 24, 2026

Page-cited retrieval for embedded docs, datasheets, MISRA, CMSIS, and RTOS references.

已验证Streamable HTTP可网页运行知识与记忆开发者工具

概览

AI 生成的概览

远程 MCP 服务器,让助手检索嵌入式、固件与硬件参考文档,返回逐字原文并标注页码的片段,而不是猜测的数值。

可以做什么
  • 检索嵌入式、固件与硬件参考语料(电网与 DER 标准、现场总线协议、数据手册、MISRA、CMSIS、RTOS、SCPI),返回带章节与页码引用的排序结果
  • 将某条检索结果展开为完整的逐字原文小节(markdown)
  • 当检索没有可靠匹配时,请求把缺失的文档加入语料库
  • 在相关内容不足时明确返回“无匹配”,而不是给出自行编写的答案
适用场景
适合编写固件、驱动或协议代码、需要精确寄存器偏移、Modbus 功能码、SunSpec 点位、跳闸阈值、SCPI 命令或 API 符号的编码助手,希望得到有出处的原文而非凭记忆的数值。
运行要求
托管端点无需安装,使用 Streamable HTTP;部分客户端通过 mcp-remote 桥接连接。本地运行开源服务器需要 Python 3.10 及以上和 uv;可选环境变量用于选择后端、传输方式、HTTP 绑定地址、bearer 令牌、允许的主机以及日志位置。
安装前请注意
托管端点背后是授权语料库,查询会在服务端记录;本地服务器会把查询与请求以 JSONL 日志写入可配置目录。自带的 HTTP bearer 校验被说明为占位实现,未设置令牌时服务器处于未认证状态,公开暴露前应先加固。文档请求也会被服务端记录。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Embedded Docs,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/ai.byteask%2Fembedded-docs/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。

{
  "mcpServers": {
    "embedded-docs": {
      "type": "http",
      "url": "https://mcp.byteask.ai/mcp"
    }
  }
}

README

ByteAsk Embedded MCP

Page-cited answers from embedded & firmware reference docs — for coding agents that can't afford to guess a register value.

[smithery badge] [License: MIT] [Python 3.10+] [Model Context Protocol] [Status: beta] [PRs welcome] [Hosted]

Official MCP Registry Namespace: ai.byteask/embedded-docs · Remote MCP Endpoint: https://mcp.byteask.ai/mcp

Quickstart · Tools · Connect a client · Configuration · Hosted server · Contributing

[A coding agent reaches for ETH_DMATDLAR from memory; byteask reads the corpus and the line snaps to the cited ETH_DMACTXDLAR with a page citation.]

ByteAsk Embedded MCP is the open-source server behind ByteAsk Embedded Docs: a source-grounded, page-cited evidence-retrieval MCP server for coding agents (Claude Code, Codex, Cursor) that write firmware / driver / protocol code and need exact facts — SunSpec points, register offsets, Modbus function codes, trip thresholds, SCPI commands, API symbols.

It returns verbatim snippets with page citations — never an authored answer — and when nothing is relevant enough it says no match rather than fabricate. Every document is treated equally: no authority layer, no filters.

[!NOTE] What's in this repo: the MCP server — tools, transports (stdio + Streamable HTTP), bearer auth, DNS-rebinding protection, result rendering — plus a small, pluggable retrieval interface.

What's not in this repo: the retrieval engine and the document corpus. How documents are parsed, chunked, embedded, and ranked, and the licensed source material itself, sit behind the SearchBackend seam and power the hosted endpoint at https://mcp.byteask.ai/mcp. This repo ships an in-memory SampleBackend (a few illustrative, public-knowledge records) so the server runs out of the box.

Why

  • Cited, or nothing. Every hit is verbatim source text with a section + page citation. On a miss it returns an honest "no confident match" — it never invents a register value.
  • Built for coding agents. The tool descriptions and triggers are tuned so agents call search_docs reflexively the moment they see a hex literal, a Modbus code, an IEEE clause, a SCPI verb, or an MCU part number — before answering from memory.
  • Two transports, one server. stdio for local agents, Streamable HTTP for hosted.
  • Bring your own retrieval. The search engine is a two-method interface — swap in anything behind BYTEASK_BACKEND without touching the server.
  • Zero-setup demo. The bundled SampleBackend runs immediately. No API keys.

Quickstart

Requires Python ≥ 3.10 and uv.

bash
uv syncuv run byteask-embedded-mcp        # run as an MCP server (stdio)

That's it — the bundled SampleBackend serves a couple of illustrative records, so search_docs works immediately. Run the offline tests with uv run pytest.

Connect a client

Hosted (no install)

The hosted server speaks Streamable HTTP at https://mcp.byteask.ai/mcp and is backed by the full licensed corpus.

[Add to Cursor]

Claude Code:

bash
claude mcp add --transport http byteask-embedded-docs https://mcp.byteask.ai/mcp
Codex, Cursor, and other clients (mcp-remote)
json
{  "mcpServers": {    "byteask-embedded-docs": {      "command": "npx",      "args": ["-y", "mcp-remote", "https://mcp.byteask.ai/mcp"]    }  }}

Local (this repo)

The project-scoped .mcp.json registers the stdio server for clients that read it. Manually, for Claude Code:

bash
claude mcp add byteask-embedded-docs -- uv run byteask-embedded-mcp

Tools

Input is natural language (or an exact identifier). Output is compact markdown.

ToolWhat it does
search_docs(query, limit=8)Search the corpus; return ranked, page-cited evidence. Each hit has a document title, a section + page citation, the verbatim snippet, and a result_id. A "no confident match" response means not found — do not fabricate.
get_context(result_id)Expand a hit to its full source section.
request_document(request)Ask for a missing document to be added (logged server-side).

Example output:

markdown
## Results for "what Modbus function code writes multiple registers"
### Sample — Modbus Application Protocol (illustrative) — §6.12, p.30> Function code 16 (0x10), Write Multiple Registers, writes a block of contiguous> holding registers (1 to 123 registers) in a remote device. ..._ref: sample:modbus-fc16_

Plug in your own retrieval

The server depends only on a two-method interface (backend.py):

python
class SearchBackend(Protocol):    def search(self, query, limit=8, effort=None) -> dict: ...    def get_context(self, result_id, effort=None) -> dict: ...

Implement it, expose a factory make_backend(config) -> SearchBackend, and point the server at it:

bash
BYTEASK_BACKEND="my_pkg.my_module:make_backend"

The exact return-value contracts are documented at the top of backend.py.

Configuration

All settings are environment variables (loaded from .env; see .env.example).

VariableDefaultNotes
BYTEASK_BACKEND—module:callable returning a SearchBackend; empty → SampleBackend
BYTEASK_LOGSlogswhere query / request JSONL logs are written
MCP_TRANSPORTstdiostdio (local agents) or http
MCP_HTTP_HOST / MCP_HTTP_PORT127.0.0.1 / 8000HTTP bind address
MCP_HTTP_AUTH_TOKEN—bearer token for HTTP (empty = unauthenticated, dev only)
MCP_ALLOWED_HOSTS—comma-separated hosts allowed in the Host header (* disables)
LOG_LEVELINFOstderr log verbosity
Running over HTTP
bash
MCP_TRANSPORT=http MCP_HTTP_AUTH_TOKEN=$(openssl rand -hex 32) \  uv run byteask-embedded-mcp --host 0.0.0.0 --port 8000

Clients then send Authorization: Bearer <token>. The bundled bearer check is a shared-secret stub — replace it with real auth (OAuth 2.1 resource server, mTLS, or a trusted reverse proxy) before exposing publicly. DNS-rebinding protection stays on independently via MCP_ALLOWED_HOSTS.

Hosted server

You don't need to run anything to use ByteAsk Embedded Docs. The hosted server gives Claude Code, Codex, Cursor, and any MCP client exact, page-cited facts from embedded and firmware reference docs — register maps, protocol function codes, SCPI commands, standard thresholds, datasheet specs. The guarantee: verbatim source, or "no match" — never an invented value.

Namebyteask-embedded-docs
Endpointhttps://mcp.byteask.ai/mcp (Streamable HTTP)
Docs & per-client setuphttps://docs.byteask.ai/embedded

This repository is the open-source server that powers that endpoint.

Project layout

src/byteask_embedded_mcp/  server.py     # FastMCP app + 3 tools (search_docs, get_context, request_document)  backend.py    # SearchBackend protocol + in-memory SampleBackend (swap for real retrieval)  render.py     # structured result -> compact markdown  http_auth.py  # Streamable HTTP entrypoint + stub bearer-token guard  config.py     # server config (transport, logging, backend selection)  schemas.py    # Hit / Section result types  obs.py        # per-call JSONL loggingtests/          # offline unit tests (renderer, backend, server tools)assets/         # README demo GIF + its deterministic generator

Security

  • stdout stays clean in stdio mode (it is the JSON-RPC channel); all logs go to stderr / logs/*.jsonl.
  • The HTTP bearer check is a stub — unauthenticated if no token is set, a shared secret at best. Harden it before exposing widely.
  • DNS-rebinding protection is on by default for the HTTP transport.

Contributing

PRs and issues are welcome.

bash
uv sync            # install (incl. dev tools)uv run pytest      # run the offline test suite

A few conventions to keep the server clean:

  • The backend seam is the extension point. Retrieval internals (parsing, chunking, embeddings, ranking) are intentionally out of scope here — build them behind SearchBackend in your own package, not in this repo.
  • Keep the dependency surface small and the stdio path free of the HTTP stack.
  • Add a test for new behavior; the suite is fully offline (no network, no keys).

License

MIT © ByteAsk

来源:README.md,提交 e7103ad

工具

3

search_docs

Search the indexed embedded / firmware / hardware reference corpus; return verbatim, page-cited evidence. The indexed corpus covers: grid-interconnection & DER standards (IEEE 1547 / 1547.1 / 2030.5, SunSpec Modbus profiles, ENA G98/G99 and other grid codes); industrial & fieldbus protocols (Modbus, CAN / ISO-TP, MQTT); SCPI instrument-programming manuals (power analysers, grid simulators, programmable AC sources); Arm Cortex-M and other MCU / hardware datasheets (registers, bitfields, reset values); FPGA transceivers, silicon & toolchain (AMD/Xilinx UltraScale GTH/GTY/GTM and 7-series GTX, SelectIO/clocking, Vivado & Vitis HLS, device datasheets) plus networking & interface IP product guides (10G/25G and 100G Ethernet, PCIe integrated block, XDMA/QDMA/AXI-DMA, DDR4 memory IP); bus & interconnect specs (AMBA AXI and AXI4-Stream); optical-module management (SFF-8472/8636 SFP+/QSFP DDM); networking protocol RFCs (IPv4, TCP, UDP, ARP, Internet checksum), the PCIe Base Specification and IEEE 1588 PTP; exchange market-data & order-entry protocols (Nasdaq TotalView-ITCH & OUCH, NYSE Pillar, CME MDP/SBE, Cboe PITCH/BOE, FIX); safety-critical C/C++ coding guidelines and language standards (AUTOSAR C++14, C++ Core Guidelines, MISRA C:2012, the ISO C++ working draft, C11); and embedded library / API references. Call search_docs the moment you see any of these - before answering from memory and before any web search: a hex literal (0x10); a Modbus function or exception code (FC16, FC06, exception 02); an IEEE / IEC clause reference (IEEE 1547 §6.4.1); a SCPI command verb (*IDN?, :MEAS:VOLT?); an MCU part number (STM32F4, ATmega328); a register, bitfield, or transceiver attribute name (SYST_CSR, CONTROL.SPSEL, RXBUF_EN, RXCDR_CFG); a Xilinx/AMD document ID (UG576, PG213, DS922); an AMBA AXI / AXI4-Stream signal or response code (TVALID, TKEEP, BRESP/DECERR); a PCIe TLP or DMA descriptor field; an exchange message or field (ITCH Add Order, FIX Tag 35, SBE templateId, PITCH); an

输入参数limitquery必填effort

get_context

Expand a previous search hit to its full verbatim section (markdown). Args: result_id: The id from a search_docs hit's `_ref:` line - the token inside the backticks, e.g. E1_Nasdaq_ITCH-5.0:1.2:1:0. Pass it exactly. effort: Internal diagnostics tag; clients should leave this unset.

输入参数effortresult_id必填

request_document

Request that a document be ADDED to the corpus - use this when search_docs returns 'no confident match' for material it should cover (a standard, protocol spec, SCPI or instrument manual, MCU / hardware datasheet, or library reference). This does NOT search; use search_docs for that. Pass ONE string with as much as you know: the document title or standard number, a URL if you have one, the edition / version, and what you were looking for. Requests are reviewed and the document is typically added within 24 hours.

输入参数effortrequest必填

版本历史

1
  1. v1.0.1最新Sep 16, 2026

评分

已满足适用检查项的 100%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分