MQTT Specification

io.github.cartertinney由 GitHub 帳號 cartertinney 發布v0.1.0更新於 Oct 29, 2026

Offline MCP server for navigating the OASIS MQTT 3.1.1 and 5.0 specifications

已驗證STDIO僅桌面知識與記憶開發者工具

概覽

AI 產生的概覽

離線 MCP 伺服器,讓助理檢索、閱讀並引用 OASIS MQTT 3.1.1 與 5.0 規格。

可以做什麼
  • 依關鍵詞、章節編號或要求標籤,在 MQTT 3.1.1 或 5.0 規格中檢索相關摘錄
  • 以分頁 Markdown 讀取某一章節,並用 Next 游標繼續翻頁
  • 瀏覽章節編號與標題,不含正文
  • 精確查詢某個封包、屬性、原因碼、返回碼、要求標籤或詞彙
  • 每次呼叫只針對一個版本,比較時須分別查詢兩個版本
適用情境
適合回答 MQTT 協定行為、封包欄位、各種代碼或規範性要求的問題,希望答案根據官方規格原文並附章節引用,同時不必把整份規格載入上下文。
執行需求
以 stdio 在本機執行,用戶端以 uvx mqtt-spec-mcp 啟動,因此需先安裝 uv(可自動取得 Python 3.10 以上)。也可用 pipx 或 pip 安裝後執行 mqtt-spec-mcp。不需環境變數、設定檔或命令列參數。透過 uvx 啟動時需要連上 PyPI,除非 uv 近期已檢查過。
安裝前請注意
工具皆為唯讀檢索,不要求任何憑證或金鑰。索引是轉換後的檢索輔助資料,並非官方出版物,摘錄可能省略例外條款,答案仍應對照 OASIS 原文。不支援 MQTT 3.1,也不是 broker 或一致性驗證器。使用 uvx 時會從 PyPI 下載套件,並在每次啟動時檢查更新。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MQTT Specification,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

mqtt-spec-mcp

An offline Model Context Protocol server for searching and citing the OASIS MQTT 3.1.1 and MQTT 5.0 specifications. Agents get focused source excerpts instead of loading a whole specification.

  • Four read-only tools for search, section retrieval, outlines, and exact lookups.
  • Bundled indexes: no network, database, embeddings, or LLM at query time.
  • Explicit version selection on every call; no default or cross-version results.
  • Bounded section pages and compact search evidence packs with source links.

The server retrieves evidence; the agent does the reasoning. OASIS publications remain authoritative, and retrieved excerpts are not a guarantee of a correct answer.

Setup

Your MCP client starts the server on your machine and talks to it over stdio. There is no separate install step: configure the client to run uvx mqtt-spec-mcp, and uv downloads the package from PyPI the first time, caches it, and starts it. uv also fetches a compatible Python (3.10 or newer) if you don't have one. Each time the client starts the server, uv checks PyPI for a newer release, so updates arrive automatically.

  1. Install uv.
  2. Add the server to your client, as shown below. The server needs no environment variables, configuration files, or flags.

The server is also listed in the MCP Registry as io.github.cartertinney/mqtt-spec-mcp, for clients that install from it.

Claude Code, Codex, GitHub Copilot CLI, and Gemini CLI

Each of these adds the server for all your projects with one command:

bash
claude mcp add --scope user mqtt-spec -- uvx mqtt-spec-mcp   # Claude Codecodex mcp add mqtt-spec -- uvx mqtt-spec-mcp                 # OpenAI Codex CLI and IDE extensioncopilot mcp add mqtt-spec -- uvx mqtt-spec-mcp               # GitHub Copilot CLIgemini mcp add --scope user mqtt-spec uvx mqtt-spec-mcp      # Gemini CLI

VS Code (GitHub Copilot)

Add the server to your user profile from a terminal:

bash
code --add-mcp '{"name":"mqtt-spec","type":"stdio","command":"uvx","args":["mqtt-spec-mcp"]}'

Or run MCP: Add Server from the Command Palette, or add it to one project's .vscode/mcp.json:

json
{  "servers": {    "mqtt-spec": {      "type": "stdio",      "command": "uvx",      "args": ["mqtt-spec-mcp"]    }  }}

Claude Desktop, Cursor, and other clients

Most other clients read the same mcpServers entry:

json
{  "mcpServers": {    "mqtt-spec": {      "command": "uvx",      "args": ["mqtt-spec-mcp"]    }  }}
  • Claude Desktop: Settings → Developer → Edit Config opens claude_desktop_config.json. Quit and reopen Claude after saving.
  • Cursor: use ~/.cursor/mcp.json for all projects, or .cursor/mcp.json in one project.
  • Zed: put the same entry under context_servers in its settings file.

ChatGPT and the OpenAI Agents SDK

ChatGPT connects only to remote MCP servers over HTTPS, so it can't start this local server; use the Codex CLI or IDE extension instead (above). In an agent built with the OpenAI Agents SDK, connect with MCPServerStdio(params={"command": "uvx", "args": ["mqtt-spec-mcp"]}).

Without uv

Install the package with pipx install mqtt-spec-mcp, or with pip install mqtt-spec-mcp in a Python 3.10+ environment. Then configure your client to run the command mqtt-spec-mcp, with no arguments, instead of uvx mqtt-spec-mcp.

Troubleshooting and upgrades

  • The client can't find uvx. Desktop apps often don't see your shell's PATH. Use the absolute path printed by which uvx (macOS and Linux) or where uvx (Windows).
  • The first start times out. The first launch downloads the package, which can take a few seconds. Download it ahead of time with uvx --from mqtt-spec-mcp python -c pass.
  • Updates. A new release is used from the next time your client starts the server. uv reuses PyPI's answer for up to 10 minutes, so a release can take that long to appear. After an update, start a new conversation so the client drops cached tool schemas. To stay on one version, use [email protected] in place of mqtt-spec-mcp in the client's arguments.
  • No network access. The server works offline, but starting it with uvx needs to reach PyPI unless uv checked within the last 10 minutes. To run without network access, install it once with uv tool install mqtt-spec-mcp and configure the client to run mqtt-spec-mcp. uvx mqtt-spec-mcp then runs the installed copy as well, and updates come only from uv tool upgrade mqtt-spec-mcp.

Tools

Every call requires version: exactly "3.1.1" or "5.0".

ToolUse
mqtt_spec_searchFind excerpts by key terms, section id, or requirement label.
mqtt_spec_getRead a section, with bounded pages and continuation cursors.
mqtt_spec_outlineBrowse section ids and titles without body text.
mqtt_spec_lookupLook up packets, properties, codes, requirements, or glossary terms.

Example tool arguments:

json
{"version": "5.0", "query": "Receive Maximum default; QoS 0 Receive Maximum"}

Use that with mqtt_spec_search. For an exact lookup with mqtt_spec_lookup:

json
{"version": "3.1.1", "kind": "return_code", "query": "0x80", "packet": "SUBACK"}

The latter returns Failure. The same value in MQTT 5.0 is Unspecified error: version-specific labels and codes must not be carried between versions.

Guidance for agents

  1. Ask which MQTT version the user means if they have not specified one.
  2. Look up an exact entity, or search with the question's key terms. Separate parts of a question with ;.
  3. Answer from the evidence, preserving MUST/SHOULD/MAY and their conditions. Cite the version and section beside each claim.
  4. Search excerpts can omit exceptions. Before claiming silence, optionality, or no exception, fetch the deciding section if it is excerpted or absent. The server recommends at most one fetch and one repeat search per version.
  5. For comparisons, query each version separately. A miss in one says nothing about the other.

See the tool reference for all parameters, pagination, result formats, and errors.

Sources and limitations

VersionIndexed publication
3.1.1MQTT Version 3.1.1 Plus Errata 01, 10 December 2015
5.0MQTT Version 5.0, 7 March 2019

Indexes are generated from pinned source documents and validated at startup. They are transformed retrieval aids, not official publications. MQTT 3.1 (pre-OASIS) is not supported, and this is not a broker or a conformance validator.

Limitations and roadmap describe known retrieval gaps. Benchmarks covers the offline regression checks and reports from historical agent evaluations. Those evaluations used a private harness, corpus, and raw runs, so they cannot be reproduced from this repository.

Development

See development and release checks for running from a checkout, testing, rebuilding indexes, and releasing. Benchmark checks are checkout-only and are not shipped with the server.

License

The code is MIT licensed. Specification text in the indexes and returned excerpts is copyright OASIS Open, not MIT licensed. NOTICE contains the source attribution, transformation details, and OASIS notices.

來源:README.md,提交 47965f8

工具

4

mqtt_spec_outline

MQTT spec outline

Section ids and titles of one MQTT version, for browsing.

輸入參數parentversion必填

mqtt_spec_get

MQTT spec get section

One section of one MQTT version as Markdown pages; continue a page with its Next cursor.

輸入參數cursorsection必填version必填

mqtt_spec_lookup

MQTT spec lookup

Exact entry for one packet, property or reason_code (5.0), return_code (3.1.1), requirement label or glossary term.

輸入參數kind必填query必填packetversion必填

版本歷史

1
  1. v0.1.0最新Oct 21, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分