byteask-embedded-docs
OfficialThe ByteAsk Embedded MCP server provides source-grounded, page-cited evidence retrieval from embedded and firmware reference documentation — returning verbatim snippets with page citations rather than fabricated answers. It is designed for coding agents (e.g., Claude Code, Codex, Cursor) to retrieve accurate facts during development.
Tools available:
search_docs: Query an indexed corpus of embedded/firmware/hardware documents using natural language or exact identifiers. The corpus covers grid-interconnection & DER standards (IEEE 1547, SunSpec Modbus, ENA G98/G99), industrial & fieldbus protocols (Modbus, CAN/ISO-TP, MQTT), SCPI instrument-programming manuals, Arm Cortex-M and other MCU/hardware datasheets (registers, bitfields, reset values), and embedded library/API references. Results include document title, section + page citation, verbatim snippet, and aresult_id. Returns an honest "no confident match" instead of fabricating an answer.get_context: Expand a previoussearch_docshit using itsresult_idto retrieve the full verbatim source section in markdown — useful when a snippet alone isn't enough.request_document: If a search yields no confident match, request that a missing document (standard, protocol spec, SCPI manual, MCU datasheet, etc.) be added to the corpus. Documents are typically added within 24 hours.
The server can be run locally via stdio transport or accessed through a hosted Streamable HTTP endpoint, and supports plugging in a custom retrieval backend.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@byteask-embedded-docs what is the Modbus function code for writing multiple registers?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
ByteAsk Embedded MCP
Page-cited answers from embedded & firmware reference docs — for coding agents that can't afford to guess a register value.
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
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.
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_docsreflexively 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.
stdiofor local agents, Streamable HTTP for hosted.Bring your own retrieval. The search engine is a two-method interface — swap in anything behind
BYTEASK_BACKENDwithout touching the server.Zero-setup demo. The bundled
SampleBackendruns immediately. No API keys.
Related MCP server: Grounded Code MCP
Quickstart
Requires Python ≥ 3.10 and uv.
uv sync
uv 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.
Claude Code:
claude mcp add --transport http byteask-embedded-docs https://mcp.byteask.ai/mcp{
"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:
claude mcp add byteask-embedded-docs -- uv run byteask-embedded-mcpTools
Input is natural language (or an exact identifier). Output is compact markdown.
Tool | What it does |
| Search the corpus; return ranked, page-cited evidence. Each hit has a document title, a section + page citation, the verbatim snippet, and a |
| Expand a hit to its full source section. |
| Ask for a missing document to be added (logged server-side). |
Example output:
## 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):
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:
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).
Variable | Default | Notes |
| — |
|
|
| where query / request JSONL logs are written |
|
|
|
|
| HTTP bind address |
| — | bearer token for HTTP (empty = unauthenticated, dev only) |
| — | comma-separated hosts allowed in the |
|
| stderr log verbosity |
MCP_TRANSPORT=http MCP_HTTP_AUTH_TOKEN=$(openssl rand -hex 32) \
uv run byteask-embedded-mcp --host 0.0.0.0 --port 8000Clients 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.
Name |
|
Endpoint |
|
Docs & per-client setup |
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 logging
tests/ # offline unit tests (renderer, backend, server tools)
assets/ # README demo GIF + its deterministic generatorSecurity
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.
uv sync # install (incl. dev tools)
uv run pytest # run the offline test suiteA 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
SearchBackendin 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
Available Tools
3 toolsget_contextAInspect
Expand a previous search hit to its full verbatim section (markdown).
Args:
result_id: The result_id from a search_docs hit.
effort: Internal diagnostics tag; clients should leave this unset.
Inputs: result_id (required), effort. Returns: result
request_documentAInspect
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.
Inputs: request (required), effort. Returns: result
search_docsAInspect
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); 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 or bitfield name (SYST_CSR, CONTROL.SPSEL); a trip / ride-through threshold or timing limit; or any datasheet spec or API signature. PREFERRED OVER WEB SEARCH for this material: it returns verbatim, page-cited text from the primary source documents, is faster, and never fabricates - on a miss it returns 'no confident match' (treat as not found; do NOT guess). Cheap and safe to call several times per task.
Inputs: query (required), limit, effort. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a distinct, non-overlapping purpose: search_docs for searching, get_context for expanding search results, and request_document for adding new documents. No two tools could be confused.
All tool names follow a clear verb_noun pattern with underscores (search_docs, get_context, request_document), consistently using imperative verbs and descriptive nouns.
With only 3 tools, the server is well-scoped for its domain. Each tool is essential and justified, covering the primary operations without unnecessary bloat or gaps.
The tool set covers the full workflow: searching for information, retrieving full context from search results, and requesting new documents when missing. No obvious gaps for the stated purpose of an embedded docs corpus.
Maintenance
Related MCP Connectors
MCP server for FCA Handbook compliance analysis with verbatim citations.
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceMCP server that lets AI agents see and interact with terminal/CLI applications through virtual terminals and PNG screenshots.75 npmMIT
- AlicenseNot gradedqualityDmaintenanceA local MCP server that gives AI coding assistants retrieval access to your personal knowledge base of books, standards, and docs, grounding their answers in sources you trust.MIT
- AlicenseBqualityDmaintenanceA precision code-retrieval MCP server for coding agents working in large, legacy, and air-gapped codebases. It returns exact file and line range citations from natural-language queries without requiring the agent to perform blind searches.3MIT
- FlicenseAqualityCmaintenanceMCP server for querying a page-citable research knowledge base built from PDFs, with exact filename and page citations.6-