Skip to content

feat: add optional postInstallInstructions to package schema#1364

Open
anneheartrecord wants to merge 1 commit into
modelcontextprotocol:mainfrom
anneheartrecord:feat/1340-post-install-lifecycle-hints
Open

feat: add optional postInstallInstructions to package schema#1364
anneheartrecord wants to merge 1 commit into
modelcontextprotocol:mainfrom
anneheartrecord:feat/1340-post-install-lifecycle-hints

Conversation

@anneheartrecord

Copy link
Copy Markdown

Fixes #1340

What

Adds an optional postInstallInstructions array to the Package schema. It lets a server declare structured post-install steps that clients can render as a checklist after downloading a package.

Why

Some servers need manual setup beyond installation. The motivating case (#1340) is mind-map, which is both a stdio MCP server and a persistent HTTP daemon — the MCP side works immediately, but the companion web UI requires registering a system service. Today nothing in server.json communicates this; websiteUrl can only point to docs with no structured surface for post-install steps.

Schema

Each PostInstallInstruction has:

  • description (required) — human-readable step text
  • command (optional) — shell command to display for the user to copy
  • documentation (optional, URI) — link to setup docs
  • optional (optional, bool) — true means the server works without this step

Instructions are informational only: clients display text and never execute commands automatically, so there is no supply chain risk.

Changes

  • docs/reference/api/openapi.yaml — schema source of truth
  • docs/reference/server-json/draft/server.schema.json — regenerated via make generate-schema
  • pkg/model/types.go — Go model
  • docs/reference/server-json/CHANGELOG.md — Draft (Unreleased) entry
  • Tests for draft-schema validation and Go struct round-trip

Open question for maintainers

The issue also asked whether this belongs in the core Package schema or as an extension via _meta. This PR implements it in core Package since the steps are per-package/per-transport. Happy to move it to an extension if preferred.

Add an optional postInstallInstructions array to the Package schema so
servers can declare structured post-install steps that clients display as
a checklist after downloading a package. This covers servers that require
manual setup beyond installation, such as a stdio MCP server that also runs
a companion system service (e.g. mind-map).

Each instruction has a required description and optional command,
documentation (URI), and optional fields. Instructions are informational
only: clients display the text and never execute commands automatically,
so there is no supply chain risk.

Changes span the OpenAPI source of truth, the regenerated draft
server.schema.json, the Go model used by the API, and the schema changelog.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support post-install lifecycle hints for servers that double as system services

1 participant