Skip to main content
A prompt is the third MCP server primitive, alongside tools and resources. It’s a named, parameterized message template the user picks from the host’s prompt menu; your handler returns the messages the host drops into the conversation. Use it to ship canned starting points, “Summarize this trip”, “Draft a reply”, so users don’t retype them.
server.ts
registerPrompt returns the server, so it chains next to your other registrations. argsSchema is a Zod shape: it validates the arguments the host passes and types the handler’s input.
Register prompts up front, at startup. Adding or removing them at runtime relies on list_changed notifications, which the stateless JSON transport can’t deliver, so hosts won’t see the change.

Completions

Wrap an argument in completable() to autocomplete it as the user fills in the prompt:
server.ts
The completion callback receives what the user has typed and returns the candidate values.

Go Further

registerPrompt

Full config and handler reference

Register Resources

Expose readable content

Register Tools

The action primitive