
rust-mcp-preflight
io.github.Wolfe-Jam/rust-mcp-preflight
Check an MCP Registry listing before you publish: README line, server.json, name, namespace login.
Documentation
Rust MCP Preflight
Check an MCP Registry listing before you publish it.
mcp-publisher validate checks the shape of server.json. It doesn't check that the registry will accept your package: that only happens at mcp-publisher publish, after the crate version is already on crates.io and can't be changed. Rust MCP Preflight runs those checks first.
- The README line. Fetches the README crates.io serves for the exact crate version and looks for
mcp-name: <your server name>, matched the way the registry matches it (ported from the registry's own validator,internal/validators/registries/cargo.go; a weekly job compares every registry file Preflight ports with the registry's latest and flags any change). Catches the line hidden in an HTML comment (crates.io strips comments), the line glued to the next word, and a near miss such as the wrong case. - server.json. The rules
mcp-publisher publishapplies:$schema, the server name, and for every package exact versions (nolatest, no ranges), the transport, no spaces in the identifier and no.or..as identifier or version, at most 16 distinct packages, and the registry's size limits (128 KiB for the file, 4 KiB for any one string and for the publisher_meta). For cargo packages also the crate version, nofileSha256andregistryBaseUrl. Plus warnings forruntimeHint, mismatched versions, and placeholders left over frommcp-publisher init. - The server name. The rules publish applies, whether it's already listed, and which login its namespace needs (including GitHub organizations, which
login githubcan't publish to yet, and the two ways that work: GitHub Actions OIDC or a token). - The namespace login (new in 0.2.0). For a domain namespace (
com.example/...), whether a public key is published wheremcp-publisher login dnsorlogin httpwill look, and whether the registry would accept it: thev=MCPv1; k=...; p=...record as a TXT record at the apex of the domain (or a parent domain: DNS covers subdomains) or athttps://<domain>/.well-known/mcp-registry-auth(that exact domain, public addresses only, no redirects, at most 4096 bytes). Ed25519 and ECDSA P-384 keys are checked the way the registry checks them, and a record left under_mcp-auth.or_mcp-registry.is named. Ported from the registry'sinternal/api/handlers/v0/auth(common.go,dns.go,http.go). It checks the published key, not your private key, so it prints each key's fingerprint to compare when a signature doesn't verify. Several records at once, as while changing keys, count as the registry counts them: any valid key will do. A temporary failure fetching the HTTP key is tried once more, as the registry does.
Not checked: remotes (the registry checks a remote's URL and resolves its host at publish; Preflight says so for each remote and checks none of it) and the registry's OSV malware lookup.
It only reads: crates.io, the official registry, the GitHub users API and, for a domain namespace, the DNS TXT records of that domain and its parent domains (through your system's resolver) and https://<domain>/.well-known/mcp-registry-auth. It publishes nothing and needs no keys.
Install
Prebuilt, in seconds (needs cargo-binstall):
cargo binstall rust-mcp-preflight
From source (compiles, a few minutes the first time):
cargo install rust-mcp-preflight
Or download the binary for your platform from the release assets: Linux (x86_64, aarch64), macOS (Intel, Apple silicon) and Windows (x86_64), each with a .sha256 file. Prebuilt binaries start with 0.1.2; for an earlier version, cargo binstall falls back to QuickInstall or compiling from source.
From 0.2.1, each archive also holds THIRD-PARTY-LICENSES.md (the licence notices of every crate built in) and comes with a signed build provenance attestation. To check that a download was built by this repository's release workflow from its tag:
gh attestation verify <file> --repo Wolfe-Jam/rust-mcp-preflight --source-ref refs/tags/v0.2.5 --signer-workflow Wolfe-Jam/rust-mcp-preflight/.github/workflows/release.yml
Use it from a terminal or CI
rust-mcp-preflight server.json
It prints one line per check. It exits 0 when ready, 1 if anything fails, and 2 if the file can't be read:
Preflight: server.json
PASS name "io.github.VoidNullable/lific" is a valid server name
PASS packages[0]: cargo crate "lific"
WARN VoidNullable is a GitHub organization. `mcp-publisher login github` can't publish to org namespaces yet (registry #1468). As an Owner of the organization, publish from GitHub Actions (`mcp-publisher login github-oidc`), or with a token: ...
INFO already listed: latest 2.11.1 (active). Your next publish needs a new version number
PASS README of lific 2.11.1 on crates.io contains `mcp-name: io.github.VoidNullable/lific`
Ready: no failures, 1 warning(s).
In GitHub Actions
The README check reads the crate version from crates.io, so run Preflight in your release workflow after cargo publish and before mcp-publisher publish: a FAIL stops the job before the listing goes out.
- uses: taiki-e/install-action@v2
with:
tool: rust-mcp-preflight@0.2.5
- run: rust-mcp-preflight server.json
mcp-better runs it this way on every pull request, and skips the check while a new version isn't on crates.io yet (scripts/preflight.sh).
Use it from an MCP client
Run with no arguments, it serves MCP over stdio. Each client below starts it with the command rust-mcp-preflight, so the binary must be on your PATH (cargo binstall and cargo install put it in ~/.cargo/bin).
Claude Code
claude mcp add preflight -- rust-mcp-preflight
goose (extensions): for one session,
goose session --with-extension "rust-mcp-preflight"
or for every session, in ~/.config/goose/config.yaml:
extensions:
preflight:
name: preflight
cmd: rust-mcp-preflight
args: []
enabled: true
type: stdio
timeout: 300
VS Code (MCP configuration): adds it to your user profile,
code --add-mcp '{"name":"preflight","type":"stdio","command":"rust-mcp-preflight"}'
or for one workspace, in .vscode/mcp.json:
{ "servers": { "preflight": { "type": "stdio", "command": "rust-mcp-preflight" } } }
Cursor (MCP): in ~/.cursor/mcp.json, or .cursor/mcp.json in a project:
{ "mcpServers": { "preflight": { "type": "stdio", "command": "rust-mcp-preflight" } } }
Any other client that runs a local MCP server: the same command, rust-mcp-preflight, over stdio.
| Tool | What it checks |
|---|---|
preflight | Everything below, from the text of server.json |
check_server_json | The publish rules (offline) |
check_readme | The mcp-name: line in one crate version's README on crates.io |
check_name | The name's publish rules, listing and namespace login (GitHub, or the DNS/HTTP key for a domain namespace) |
A result with a FAIL has isError set, like the CLI's exit 1: the check ran, and the listing isn't ready.
Where it fits
The order is: cargo publish (with the line in the README), then rust-mcp-preflight server.json, then mcp-publisher login (github, or dns / http for a domain namespace) and mcp-publisher publish.
The full walk-through: Listing a Rust MCP server in the official MCP Registry.
The README check and the crates.io rules are for cargo packages. Other package types (npm, PyPI, mcpb and so on) get the shared rules, and their registry's own checks are listed as not run.
If crates.io or the README can't be reached, the README counts as not checked and the result is a failure, so a CI run never passes on a README it didn't see. The namespace login works the same way: if DNS can't be read, the login counts as not checked and fails, with the reasons and a note to run again.
Links
- Repository: https://github.com/Wolfe-Jam/rust-mcp-preflight
mcp-name: io.github.Wolfe-Jam/rust-mcp-preflight
License
MIT
More about me and my work: wolfejam.dev/info
rust-mcp-preflightcargo install rust-mcp-preflight