Skip to main content

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.

Install and run

Requires Python 3.10 or newer. The simplest way to run the server is with uv:

uvx mqtt-spec-mcp

uvx installs the package from PyPI into a cached, isolated environment and starts it. This starts a stdio MCP server, not an interactive command prompt; MCP clients launch it for you, as shown below.

You can also install it with pipx or pip and run the mqtt-spec-mcp command:

pipx install mqtt-spec-mcp    # or: pip install mqtt-spec-mcp
mqtt-spec-mcp

The server needs no environment variables, configuration files, flags, or network access.

Connect a client

For Claude Desktop, Claude Code, Cursor, and clients using mcpServers:

{
  "mcpServers": {
    "mqtt-spec": {
      "command": "uvx",
      "args": ["mqtt-spec-mcp"]
    }
  }
}

For VS Code, put this in .vscode/mcp.json or your user MCP configuration:

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

If the client can't find uvx, which is common for desktop apps that don't use your shell's PATH, give its absolute path (which uvx prints it).

uvx keeps using the version it has cached. To upgrade, run uvx mqtt-spec-mcp@latest once. To pin a version, put mqtt-spec-mcp@0.1.0 (or another release) in args. After upgrading, restart the server and start a new conversation so the client drops cached tool schemas.

Tools

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

Tool Use
mqtt_spec_search Find excerpts by key terms, section id, or requirement label.
mqtt_spec_get Read a section, with bounded pages and continuation cursors.
mqtt_spec_outline Browse section ids and titles without body text.
mqtt_spec_lookup Look up packets, properties, codes, requirements, or glossary terms.

Example tool arguments:

{"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:

{"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

Version Indexed publication
3.1.1 MQTT Version 3.1.1 Plus Errata 01, 10 December 2015
5.0 MQTT 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.

Metadata

Release files for mqtt-spec-mcp 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mqtt-spec-mcp 0.1.0
File Size Uploaded Provenance
mqtt_spec_mcp-0.1.0.tar.gz 161.4 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for mqtt-spec-mcp 0.1.0
File Interpreter ABI Platform
mqtt_spec_mcp-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 327.1 kB

Release files / mqtt_spec_mcp-0.1.0.tar.gz

Download URL mqtt_spec_mcp-0.1.0.tar.gz
Size 161.4 kB
Tags Source
SHA-256 checksum
How to use checksums
57469d340f37b60eac8ff74622530f80f763eb9cc91b9f40d2dc848f6e79bfa3
BLAKE2b-256 checksum
How to use checksums
bda9f1331554cf886b233e1233053111368d5c78fff0fb9b65056aea7c2d3d7b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Release files / mqtt_spec_mcp-0.1.0-py3-none-any.whl

Download URL mqtt_spec_mcp-0.1.0-py3-none-any.whl
Size 165.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e31642664ff30ac5fbe630f5fc467783c4c083d8ddcd8d4fd3a6df2f6933f6f2
BLAKE2b-256 checksum
How to use checksums
aaf8a877eedb425630e400c09f1874ba68fd58027c472fcc2fc257651748d2f9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

Security for mqtt-spec-mcp 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mqtt_spec_mcp-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page