Shared parts of the Sylphx MCP servers (repomap, lockdocs, anymd), so each server keeps only its own tools.
| Part | What it does |
|---|---|
Rust crate sylphx-mcp-kit |
Runs an MCP server over stdio on rmcp. Picks the directory a call works on (argument, env var, --root, the client's roots, the working directory). Registers the server with MCP clients (setup) and adds a Claude Code hook. With the embed feature: local embeddings from a small static model. |
npm/launcher.js |
The bin script of an npm package. It runs the native binary for this platform from an optional dependency. |
.github/workflows/release.yml |
A reusable release workflow. It builds 5 native binaries, publishes to npm with trusted publishing, smoke-tests with npx, and creates the GitHub release and MCP Registry entry. Optionally it attaches MCP Bundles (.mcpb), pushes a GHCR image and retires old registry names. |
MIT licensed.
[dependencies]
sylphx-mcp-kit = "0.7.3"
# only the embeddings, without the server and setup parts:
# sylphx-mcp-kit = { version = "0.7.3", default-features = false, features = ["embed"] }Features: server and setup (default), embed, search, licence, remote. Cache roots and CLI hints need no feature.
use mcp_kit::server::{run_stdio, App, Call, Info};
use serde_json::{json, Value};
struct Echo;
impl App for Echo {
fn info(&self) -> Info {
Info { name: "echo".into(), title: "Echo".into(), version: "1.0.0".into(),
website: "https://example.com".into(), instructions: "Echoes text.".into() }
}
fn tools(&self) -> Vec<Value> {
vec![json!({"name": "echo", "description": "Echo `text`.",
"inputSchema": {"type": "object", "properties": {"text": {"type": "string"}}}})]
}
fn call(&self, name: &str, args: &Value, call: &Call) -> Result<String, String> {
// call.client_roots: the client's workspace folders that exist here.
Ok(args["text"].as_str().unwrap_or_default().to_string())
}
}
fn main() -> anyhow::Result<()> {
run_stdio(Echo)
}callruns on a blocking thread.Err(text)goes back to the agent as a readable tool error.warm(optional) runs once after the client connects. Use it to fill a cache.roots::pickchooses the working directory from the call's arguments andcall.client_roots.
rmcp is the official Rust SDK, kept in step with the MCP spec, so a server needs no hand-written JSON-RPC loop. It handles:
- protocol version negotiation over every published version
- cancellation, progress and logging
- pagination and result caching fields
- tasks, and structured and error results with the right shape for each protocol version
With the remote feature the same App is served over Streamable HTTP as an OAuth resource server, the way the MCP authorization spec asks:
use mcp_kit::remote::{serve, Remote};
let remote = Remote::new("https://example.com/mcp", "https://auth.example.com")
.scopes(["things:read", "things:write"])
.require(["things:read"]) // every request
.tool_scopes("make_thing", ["things:write"]); // one tool (step-up)
serve(Echo, remote, "0.0.0.0:8080").await?;POST /mcpis stateless (any replica answers), with JSON responses.GET /.well-known/oauth-protected-resource/mcpis the RFC 9728 metadata naming the issuer.- The bearer must be a JWT access token signed by a key in the issuer's JWKS (
jwks_uri, or discovered through RFC 8414, then OpenID Connect; refreshed every 10 minutes and on an unknown key id), issued by that issuer, with the resource URL inaud(RFC 8707) and a liveexp(60 s skew). ES256, RS256, PS256 and EdDSA are accepted;noneand HMAC never are. - No token or a bad one is 401, a missing scope 403
insufficient_scope; both carry an RFC 6750WWW-Authenticatechallenge withresource_metadata, so a client can find the authorization server and ask for the scope. - Override
App::call_asto act for the caller: it receives aremote::Principal(subject, scopes, all claims). Hostmust be the resource URL's host (DNS-rebinding defence);allowed_hostsandallowed_originschange that.
use mcp_kit::setup::{run, Options, Server};
let server = Server { name: "repomap".into(), package: "@sylphx/repomap".into(), args: vec!["mcp".into()] };
run(&server, &Options { dry_run: false, remove: false, clients: None })?;For a CLI also distributed as a native binary or a Python wheel, call setup::run_detected(&server, &options, "repomap", Some("sylphx-repomap")) instead. Pass the executable name separately from the PyPI distribution name. For a native binary without a PyPI distribution, pass None.
- A persistent installation registers an absolute executable path, so the editor does not need the setup shell's
PATHor an active virtual environment. - A tool running from uv's cache registers
uvx, not the cached executable. For different names, it usesuvx --from sylphx-repomap repomap mcp. Makeuvxavailable on the client'sPATH. - npm installations still register
npx -y <package> <args…>(throughcmd /con Windows).Server::launchandsetup::runretain the npm default for existing callers.
Supported clients:
| Client | Where the entry is written |
|---|---|
| Claude Code | User config (~/.claude.json or $CLAUDE_CONFIG_DIR/.claude.json with run_detected) |
| Codex | ~/.codex/config.toml |
| Cursor | ~/.cursor/mcp.json |
| VS Code (and Insiders) | the user mcp.json |
| Claude Desktop | its config |
| Windsurf | its config |
| Gemini CLI | ~/.gemini/settings.json |
| Antigravity (CLI and IDE) | ~/.gemini/config/mcp_config.json |
Every change is safe to repeat and is printed. remove: true undoes it. setup::claude_hook adds, updates or removes a Claude Code hook identified by a marker string.
use mcp_kit::embed::{self, Model, POTION_CODE_16M};
embed::ensure(&POTION_CODE_16M, "tool", "Set TOOL_EMBED=0 to stay keyword-only.")?; // once, 33 MB
let model = Model::load(&POTION_CODE_16M)?;
let v = model.embed("where are failed requests retried").unwrap(); // unit length, 256 numbers- Models:
POTION_CODE_16M(potion-code-16M-v2, code search) andPOTION_RETRIEVAL_32M(English text). Both are MIT licensed model2vec static models: an embedding is the mean of the token vectors, so a CPU embeds a large repository in about a second. ensuredownloads the pinned revision from Hugging Face once, checks its SHA-256, and stores it as int8 in~/.cache/sylphx/models(orSYLPHX_MODEL_DIR), shared by every tool. It prints one line before downloading. After a failed download it waits an hour before trying again.- The tokenizer matches the model's own (BERT normalization and WordPiece). CI checks tokens and vectors against
model2vecitself. Vec8,quantizeandcosinestore and compare vectors as int8.
searchowns identifier splitting,tokenize,path_terms,chunk_termsand UTF-8-safe byte limits (floor_char). Ranking stays in each tool.star_hint::after_success(message, opt_out_env, state_dir, mcp)prints once, after the fifth successful interactive CLI run. It never counts or prints in MCP mode, with non-TTY stderr, in CI, or when opted out. It keeps the existingstar-hintcounter format; callers choose their cache root.cache::root(env, product_dir, fallback, override_policy)preserves the caller's cache rules: OS cache with temp/no fallback, or environment-only platform paths. Overrides are either nonempty OS strings or UTF-8 strings including empty strings. Callers keep their own layout and retention.embed::ensure_atandModel::load_dirsupport existing model caches and full model URL overrides.Tokenization::Identifierskeeps the original identifier-aware, untruncated vectors; the default model2vec behavior is unchanged. Themodel.q8,vocab.txtand serializedVec8formats are unchanged, so existing embedding indexes stay readable.
The licence feature (off by default) lets a server keep its core free and unlock extra tools with an offline-verified token. The kit holds no product logic: a server describes itself in one LicencePolicy.
use mcp_kit::licence::{require, run_cli, LicencePolicy};
const POLICY: LicencePolicy = LicencePolicy {
product: "lockdocs",
require_product: true, // false only for anymd back-compat
accepted_plans: &["pro", "team"],
public_keys: &["<base64url Ed25519 public key>"], // a list, so rotation is additive
env_var: "LOCKDOCS_LICENCE_TOKEN", // read first
file_name: "licence", // then <config dir>/lockdocs/licence
upgrade_url: "https://example.com/pro", // also the renewal link in expiry warnings
tier: "Pro", // what users see: "lockdocs Pro", or "Team"
checkout_base: None, // inert compatibility field; see run_money_cli below
};
// In a Pro tool: the licence, or a polite notice the agent relays.
match require(&POLICY, "Team reports") {
Ok(licence) => { /* licence.plan, .seats, .expires_at, ... */ }
Err(required) => return Ok(required.to_string()),
}- Token:
base64url(payloadJSON).base64url(Ed25519 signature over the payload bytes), payload{"plan", "email"?, "issuedAt" (ms), "product"?, "order"?, "grant"?, "seats"?, "expiresAt"? (ms)}. Unknown fields are ignored. It is byte-compatible with the anymd and GPDT verifiers. policy.verify(token)(orlicence::verify(&policy, token)) checks the signature against any key, then the plan, theproduct(a token naming another product is refused; one naming none is refused whenrequire_productis true), andexpiresAt.requirereads the env var first, even when it holds a bad token (no silent fallback), then the token file.- An unlicensed call is not an error.
required_result_json(&required)returns the MCP result: text " is part of . Learn more and get it: " plusstructuredContent{"pro_required": {"feature", "product", "tier", "url"}}so an agent can act on it. With theserverfeature,required_resultreturns the rmcp type: overrideApp::call_resultin a gated tool to return it. A Pro tool must not declare anoutputSchemawithoutpro_required. run_cli(&POLICY, args)is thelicence status | activate <token>subcommand to mount in the server binary;activateverifies the token and writes the file with 0600 permissions.statusalso prints where the token was read (env var or file) and why it is invalid, and during the last 30 days of a licence it warns "expires in N days" withupgrade_urlas the renewal link.licence.expires_soon(Duration)gives the same check to your own code, e.g. to add a line to a Pro answer; it is false for a licence with noexpiresAt, and true when expiry is within the window (inclusive) or past.run_cliremains source-compatible, butbuynow printsupgrade_urlwithout contacting a checkout service.LicencePolicy.checkout_baseis inert. To enable purchases, userun_money_cli(&POLICY, &checkout, args), withMoneyCheckout::from_docs_toml(include_str!("../docs/storefront/docs.toml"), "pro")?. The existing Keel[money]and named offer supply the API origin, parent, publishable key, product, prices, consent and return/recovery URLs. No Keel dependency or product-specific adapter is needed. Recovery-only offers (checkout_enabled = false) do not start purchases.licence buy [--pack <id>] [--qty <n>] [--email <address>] [--accept-terms] [--no-browser] [--json]creates a public Money checkout, prints its HTTPS payment URL, then polls claim-secret redemption for up to 30 minutes. It saves the first token that passes the same offline verification asactivate.--packselects an offer's price option byid, orkey:quantitywhen no id is set. An unambiguous price key is also accepted. With no pack, the first option is used;--qtyis the number of packs, so the Money line quantity is pack seats × pack count (--pack 5 --qty 2buys 10 seats). A product over 10000 is refused.- Interactive purchases prompt for buyer email and show the exact immediate-supply consent text before requiring
yes. Automation and--jsonrequire both--emailand--accept-terms; they never silently consent.--no-browser,--json, a missing display or noninteractive input suppress browser opening. - Before creating a checkout, the CLI saves a random idempotency key and exact request in
<licence file>.pending-checkout.json(atomic, mode 0600 on Unix), then records the create attempt before any request can reach Money. It saves the returned session and claim secret there, never a raw licence. A saved session resumes redemption without creating another checkout. An unresolved create is not blindly replayed after a transport failure or 5xx: Money currently releases idempotency claims on 5xx, so recovery or upstream confirmation is required. A conflicting request or simultaneousbuyis refused. Do not delete pending state to retry a payment: use the offer's recovery URL first. Pending state is removed only after successful activation or confirmed unpaid expiry. - JSON output starts with
{"event":"checkout","checkout_session":"cs_...","browser_url":"https://..."}and ends with{"event":"result","status":...}. Show the payment URL to the buyer. Buyer email, claim secrets, grant tokens and licence tokens are not printed. Failure events includerecover, the product's configured recovery URL. Exit codes: 0 paid (or unavailable), 1 failed, 2 usage, 3 expired, 4 timed out. Redirects are refused; redemption retries transport errors, 429 and 5xx with bounded backoff andRetry-After.
A runnable example is in crates/mcp-kit/examples/licence_server.rs.
Copy npm/launcher.js to packages/<name>/bin/<name>.js, and declare one optional dependency per platform:
{
"name": "@sylphx/tool",
"bin": { "tool": "bin/tool.js" },
"optionalDependencies": {
"@sylphx/tool-darwin-arm64": "1.0.0", "@sylphx/tool-darwin-x64": "1.0.0",
"@sylphx/tool-linux-x64-gnu": "1.0.0", "@sylphx/tool-linux-arm64-gnu": "1.0.0",
"@sylphx/tool-win32-x64-msvc": "1.0.0"
}
}Each platform package (packages/npm/<platform>/package.json) sets os, cpu and, on Linux, libc, and ships the binary. TOOL_BIN=/path overrides the binary.
# .github/workflows/release.yml in the server's repo
name: release
on:
push: { branches: [main] }
workflow_dispatch:
jobs:
release:
uses: SylphxAI/mcp-kit/.github/workflows/release.yml@v0
permissions: { contents: write, id-token: write, packages: write }
with:
name: tool
npm-package: '@sylphx/tool'
mcp-name: io.github.SylphxAI/toolThe workflow checks every requested delivery channel: all five native npm packages, the launcher and aliases, the GitHub release assets (including requested bundles), the exact MCP Registry version, and the optional GHCR image. A fresh run finishes missing channels without republishing delivered packages or overwriting existing release assets. HTTP 404 alone means absent; authentication, throttling, server and transport errors stop the run rather than authorizing publication.
To generate files that your native binary embeds, add these optional inputs to
the release job's with block:
node-version: '24'
pre-build: |
npm ci
npm run buildEach input defaults to an empty string and can be used on its own. For each
missing native binary, node-version sets up Node.js and pre-build runs a Bash
script from the checked-out source root before compilation. Use a trusted script
that works on each selected runner OS. Neither input changes recovery,
verification, packaging or publishing; omit the optional inputs to keep the existing build.
To read the Node.js version from the source commit, use node-version-file
(for example, .node-version). It defaults to an empty string. If set, it takes
precedence over node-version and must name a tracked file relative to the
source root. A historical commit without the file skips Node.js setup;
pre-build still runs if set and a native binary is missing.
Opt in with one input each; the release then writes Formula/<name>.rb (macOS and Linux, arm64 and x86_64) to the tap and bucket/<name>.json (Windows x64, with checkver and autoupdate) to the bucket, from the digests of the release archives. It runs after the release, and again on a no-op run, so a missed update heals. Unchanged files are not committed. Changed files use a stable release branch and pull request, then the destination’s required checks and merge queue. The action waits up to 15 minutes per destination and verifies the exact merged file bytes; a closed PR, changed head, deadline or readback mismatch fails publication. Reruns resume an open PR without duplicating it.
Run the shared composite action from a job in the source repository's own release workflow, after the reusable release job succeeds. Access verifies the source workflow authority; a job inside a cross-repository reusable workflow has a different authority and cannot use that declaration.
package-managers:
needs: release
runs-on: ubuntu-latest
permissions: { contents: read, id-token: write }
steps:
- uses: actions/checkout@v4
- id: version
run: echo "value=$(node -p 'require("./packages/tool/package.json").version')" >> "$GITHUB_OUTPUT"
- uses: SylphxAI/mcp-kit/.github/actions/package-managers@v0
with:
name: tool
version: ${{ steps.version.outputs.value }}
package-json: packages/tool/package.json
trust-policy: orgs/<org>/trust_policies/<policy>
ci-name: <release-ci-declaration>
homebrew-tap: SylphxAI/homebrew-tap
scoop-bucket: SylphxAI/scoop-bucketThe Access declaration binds the source repository and owner numeric IDs, .github/workflows/release.yml, refs/heads/main, allowed events and the existing Access environment. Its only scope is broker:exchange. The Broker policy admits that workload principal and permits only Contents: read and write and Pull requests: read and write on the configured destinations. Allow at least 40 minutes for the caller job so both destinations can finish their checks and queues. The action exchanges a separate one-repository token per destination; the company App key stays in the Broker. Missing authorization fails visibly. Adopt an immutable kit commit, disable homebrew/scoop on the reusable release call and remove its former TAP_APP_ID/TAP_APP_PRIVATE_KEY secret arguments. The deprecated secret inputs are ignored, and requesting package-manager publication inside the reusable workflow reports the required migration. Winget is not generated.
The composite inputs homebrew-tap and scoop-bucket default to empty (disabled); supply either or both. description, homepage, license and package-json provide the renderer's metadata; version-arg defaults to version.
Users: brew install SylphxAI/tap/<name>, scoop bucket add sylphx https://github.com/SylphxAI/scoop-bucket && scoop install <name>. The rendering lives in scripts/package-managers.mjs.
Run the pypi-wheels composite action
from the caller's own .github/workflows/release.yml after its GitHub release
job succeeds. Pin both calls to the same mcp-kit commit. Configure the PyPI
Trusted Publisher for the caller repository, workflow release.yml, and
environment pypi. The composite builds and verifies; the official PyPA action
publishes using GitHub OIDC. No PyPI API token is needed.
pypi:
needs: release
if: ${{ !cancelled() && github.event.repository.private == false && github.ref == 'refs/heads/main' && needs.release.result == 'success' }}
runs-on: ubuntu-latest
environment: pypi
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- uses: SylphxAI/mcp-kit/.github/actions/pypi-wheels@<mcp-kit-commit>
id: wheels
with:
mode: build
name: example-cli
package-json: packages/example-cli/package.json
summary: A native CLI
homepage: https://example.com
source-url: https://github.com/example/example-cli
license-expression: MIT
- uses: pypa/gh-action-pypi-publish@7245906fb61fa33a13554f9d5fb856fe61758086 # v1.14.3
if: steps.wheels.outputs.built == 'true'
with:
packages-dir: dist
skip-existing: true
- uses: SylphxAI/mcp-kit/.github/actions/pypi-wheels@<mcp-kit-commit>
with:
mode: verify
name: example-cli
package-json: packages/example-cli/package.jsonBuild needs a checkout on Linux x86-64 with Python 3.11+, venv, Git and gh.
It reads the caller's package.json version and takes the README, license and
optional Python payload from the exact v<version> tag. The tagged
package.json must report the same version; the action does not read Cargo
metadata. The exact five-wheel set skips the build, and unexpected wheels fail
verification. To recover a partial delivery, the action rebuilds the full set
and the publisher skips existing files. If an expected filename was yanked,
unyank it or release a new version; PyPI does not let you reuse that filename.
If the PyPI distribution name differs from the executable, pass pypi-name
to both build and verify and configure the Trusted Publisher for that PyPI
project. If omitted, it defaults to name. The release archives and executable
still use name.
Set python-package-dir to include the Python import package (based on name,
not pypi-name), and extras to one extra=requirement per line. A custom
smoke-command runs from the caller checkout with the installed CLI and
Python on PATH and the selected version in WHEEL_VERSION.
The action requires and checks GitHub’s SHA-256 digest for each downloaded
asset and verifies SHA256SUMS whenever present. Set require-sha256sums: true when the upstream
release must provide the manifest. To also verify native attestations against
the tag commit, set attestation-workflow: .github/workflows/release.yml and
grant attestations: read to the build job. When build and publish run in
separate jobs, grant id-token: write only to the publisher and keep the
environment: pypi on that caller job.
The selected Cargo package, npm manifests and server.json must carry the same version and publication identity. Executable native targets must report that exact version. Every native artifact carries its platform, version, source and binary SHA-256; staging checks these before publishing, including cross-compiled targets.
A version has one canonical repository commit, established from original platform identities and published native source revisions; conflicting sources stop the run. Recovery preserves the original platform identity and verifies its binary digest, version and canonical source. GitHub archives require a digest-verified original identity asset; npm fallback requires registry integrity, the embedded manifest and original identity, with a matching registry source revision. Already-complete legacy releases remain verified no-ops: every native, launcher and alias must share an immutable npm source revision, the exact MCP Registry version must be active, and all five archives and requested bundles must exist. No new sidecars or build provenance are manufactured. A requested legacy GHCR image must have both digest-verified Linux architectures and an established GitHub Packages version record binding the exact version tag to its index digest; this verifies existing delivery, not native-source provenance. Any conflicting version label fails. When recovery is needed, missing GitHub sidecars are not proof of a legacy release: the planner first verifies available npm tarball integrity, embedded manifests and original native identities against the shared canonical source. Interrupted modern deliveries resume using those original identities. Legacy partial releases without original identities fail closed when a requested channel needs recovery, rather than relabelling or overwriting old bytes. Missing natives compile from the canonical commit, not a later same-version main commit. GHCR readback verifies digest-addressed child manifests and configs for both architectures, checking version, canonical revision, source and native digests; an existing stale version tag is an error. Authorized GitHub package metadata confirms first-image absence; token denials never mean absent. Old MCP Registry names are retired only after the replacement's exact version is verified available, including otherwise complete no-op runs.
source-sha optionally selects an exact lowercase 40-hex commit in the caller's repository instead of the triggering event commit. The selected checkout must match before manifests or the release plan are read. For a new version it becomes the canonical source; existing npm source revisions, GitHub identity sidecars, an exact release target and the peeled version tag must agree with it. Conflicts fail before publication, including a surviving version tag without a release record. Branch names, short hashes, uppercase hashes and other refs are refused. Omitting the input (or passing an empty string) keeps the existing event-source and canonical recovery behavior, including recovery from an older published source on a later same-version push. Every build and publication checkout uses the resulting canonical commit. Native artifacts are named native-<canonical SHA>-<platform>; npm/GitHub and Docker download only that source's artifacts, then normalize their directories for the shared identity verifier. This allows distinct source cuts in one caller run without artifact-name collisions or cross-version reuse. Caller admission, version selection and sequencing remain the caller's responsibility.
kit-ref supplies the release helpers as well as the bundle builder. When pinning the reusable workflow to a commit, pin kit-ref to that same commit. The release publishes npm packages and then waits per package (natives, main, aliases) with npm view name@V version, backing off from 5 s to 30 s for up to 10 minutes and retrying only ETARGET, 404 and "No matching version" (scripts/npm-settle.sh) before the npx smoke; a caller's smoke can . "$SETTLE_LIB" and run checks through settle. This change bumps the compatible kit version to 0.3.3. Changes on main do not reach @v0 callers until the normal kit publication updates that tag; do not move it while a workflow change is still under review.
The success gates follow GitHub Actions dependency and status-check semantics. Publisher authentication follows npm trusted publishing; authentication does not replace artifact identity or delivery readback.
npm trusted publishing checks the calling workflow file. So every npm package trusts <owner>/<repo> with the file release.yml:
npm trust github @sylphx/tool --file release.yml --repo SylphxAI/tool --allow-publish --otp <code>Inputs: alias-dirs, smoke, docker-image, retired-mcp-names, retired-message, major-tag, mcpb and mcpb-icon. They are documented in the workflow file.
mcpb: true attaches MCP Bundles to the GitHub release, for one-click install in Claude Desktop and other hosts:
<name>-<version>.mcpb: every platform's binary and a small Node launcher (hosts such as Claude Desktop ship Node).<name>-<version>-<platform>.mcpb: one binary each, about a fifth of the size.
The manifest comes from server.json (title, description, website, arguments) and the npm package (license, keywords). The tool list comes from starting the server once. An optional mcpb.json at the repository root is merged into every manifest, for example to ask for a project folder:
{
"server": { "mcp_config": { "env": { "TOOL_ROOT": "${user_config.project}" } } },
"user_config": { "project": { "type": "directory", "title": "Project folder", "description": "…", "required": true } }
}mcpb-icon points at a 512×512 PNG. scripts/mcpb.mjs builds the bundles with the official mcpb CLI; scripts/mcpb.test.mjs checks them.
Bump version in Cargo.toml and merge. publish.yml publishes the crate to crates.io, tags vX.Y.Z and moves v0, which the servers' release workflows use. A change to the release workflow reaches the servers only with a version bump.
The reusable release workflow also accepts plain CLIs. Omit mcp-name to skip the MCP Registry, set platforms to the supported native keys (space separated), and use version-arg: --version when needed. The native package directories and the launcher's optional dependencies must match that platform set exactly. An omitted platform set keeps the existing five-target release.
For an unpublished npm package, pass the existing NPM_TOKEN secret by name for the first publication. Leave it unset for npm trusted publishing. The workflow never falls back to another credential after a failed publication. The same source identity, immutable archive and package recovery checks apply to both paths.
Set linux-glibc when a CLI uses newer glibc functions. It defaults to 2.17; for example, a binary that links close_range needs linux-glibc: 2.34. This selects the linker baseline for both Linux targets. The CLI must also document any kernel minimum required by those calls.