Submit

MCP Prompts: What They Are and How Servers Expose Them

MCP prompts are reusable message templates an MCP server exposes through prompts/list and prompts/get. Here is how they work, with the 2026-07-28 changes.

Written by AiAgentsListing Team

•4 min read
MCP Prompts: What They Are and How Servers Expose Them

The Model Context Protocol has three server features: prompts, resources and tools. This post covers prompts, which the specification describes as user-controlled.

MCP prompts are reusable message templates that a Model Context Protocol server exposes to its clients. A client lists them with prompts/list, fills one in with prompts/get and a set of arguments, and receives messages ready to send to a language model. The specification expects the user to pick a prompt, usually as a slash command.

How MCP prompts work

Servers that offer prompts declare the prompts capability during initialization. The 2025-06-18 specification adds a listChanged flag, which tells clients whether the server will announce changes to its prompt list. The flow has three steps:

  1. The client sends prompts/list. The call supports pagination with a cursor. Each prompt has a name, an optional title and description, and an optional list of arguments.
  2. The client sends prompts/get with the prompt's name and the argument values. The server returns a description and a list of messages, each with a role of user or assistant.
  3. When the list changes and the server declared listChanged, it sends notifications/prompts/list_changed.

A prompts/get request from the specification looks like this:

{
"jsonrpc": "2.0",
"id": 2,
"method": "prompts/get",
"params": {
"name": "code_review",
"arguments": {
"code": "def hello():\n print('world')"
}
}
}

Message content can be text, image, audio or an embedded resource. The specification says servers should return JSON-RPC error -32602 for an invalid prompt name or a missing required argument, and -32603 for internal errors. It also says implementations must validate prompt inputs and outputs to prevent injection attacks.

Examples in FastMCP

LeanIX Engineering's walkthrough from 26 November 2025 registers prompts on a FastMCP server with a decorator. The shortest form returns a string:

@mcp.prompt(
name="suggestActivity",
description="Returns a prompt to suggest activity",
)
def suggestActivity(type: str) -> str:
return f"Can you please suggest a '{type}' activity?"

The walkthrough's version also sets tags and metadata, which are trimmed here. Its second example, generateCode, returns a PromptMessage instead of a string. FastMCP builds the argument list from the function signature, and the generated schema marks both language and task_description as required.

On the client side, the FastMCP prompts documentation shows client.get_prompt("user_greeting", {...}), which returns a GetPromptResult with the rendered messages. When a server exposes several versions of a prompt, the client takes the highest version by default and accepts a version argument to pick another.

What's new (as of 2026-10-05)

The 2026-07-28 revision is the latest version of the specification. These changes touch prompts:

  • prompts/list results must carry ttlMs and cacheScope. The prompts concepts page shows "ttlMs": 600000 and "cacheScope": "public" in its example. The changelog describes ttlMs as a freshness hint in milliseconds, and cacheScope as public or private.
  • Every result now carries a resultType, which is complete for ordinary results.
  • Prompt definitions gained an icons array, and prompt messages can carry a resource_link content type.
  • prompts/get may return an InputRequiredResult when it needs more input before it can resolve the prompt. The client then retries the request with inputResponses.
  • The initialize handshake is removed. prompts/list results must not vary per connection, though they may vary by the authorization sent on the request.
  • List-change notifications travel over a subscriptions/listen stream that the client opts into.

Prompts are not on the 2026-07-28 deprecated features registry. That registry lists Roots, Sampling, Logging, Dynamic Client Registration, the HTTP+SSE transport and two includeContext values. For Roots, Sampling and Logging, the earliest removal is the first revision released on or after 2027-07-28.

When to use MCP prompts (and when not)

Use a prompt when a user should choose a workflow on purpose and the wording should stay the same each time, such as a code review template or a standard report request. The specification treats prompts as user-selected, so a prompt does not suit a step the model should decide to take on its own.

Client support is uneven. The LeanIX walkthrough says it plainly: "Not all MCP clients support every feature, and some may have limitations when listing certain tools or handling specific functionalities." Test a prompt in the client you target before you build a flow around it.

Key takeaways

  • MCP prompts are user-selected message templates, listed with prompts/list and rendered with prompts/get.
  • The 2025-06-18 specification defines name, title, description and arguments for each prompt.
  • The 2026-07-28 revision adds ttlMs, cacheScope, resultType and icons, and lets prompts/get ask for more input.
  • Prompts are not on the 2026-07-28 deprecated list. Roots, Sampling and Logging are.
  • Client support varies, so test a prompt in the client you target.

FAQ

Do MCP prompts run on their own?

No. The specification describes prompts as user-controlled, meaning the user decides when one is used. Implementers may expose them as slash commands or through any other interface they choose.

What arguments can an MCP prompt take?

Each argument has a name, an optional description and a required flag. Servers should validate arguments before they process them, and a missing required argument should return JSON-RPC error -32602.

Are MCP prompts deprecated?

No. The 2026-07-28 deprecation registry does not list prompts. It lists Roots, Sampling, Logging, Dynamic Client Registration, HTTP+SSE and two includeContext values.

To compare MCP servers before you wire one into a client, browse the MCP servers on aiagentslisting.com.

Share:

Subscribe to our newsletter

One email a week. New agents, MCP servers and skills, and what is actually getting traction.

Read next