Initial Checks
Release line
2.x (current stable)
Description
Description
The 2026-07-28 specification defines the optional _meta field on the Prompt schema. While other decorators like @mcp.tool support meta and pass it down as _meta on serialization (e.g., in MCPServer.list_tools). The @mcp.prompt decorator and the high-level Prompt classes are missing support for meta.
Expected Behavior
Including meta on @mcp.prompt does not incur a type error and returns _meta for the prompt on list_prompts.
Example Code
from mcp.server.mcpserver import MCPServer
# ATTEMPTING TO USE METADATA ON PROMPTS
mcp = MCPServer("MetaTestServer")
# This currently raises a TypeError because meta is not a parameter in @mcp.prompt
@mcp.prompt(name="code_review",title="Code Review",
description="Review code with specific metadata rules",
meta={"strictness": "high"})
def review_code(code: str) -> str:
return f"Review this: {code}"
# 2. EXPECTED BEHAVIOR
# If the decorator parameter was supported, list_prompts should return prompt with _meta:
# listed_prompts = await mcp.list_prompts()
# assert listed_prompts[0].meta == {"audience": "strictness": "high"}
Python & MCP Python SDK
- Python: 3.12+
- MCP Python SDK: 2.2.0
Initial Checks
Release line
2.x (current stable)
Description
Description
The 2026-07-28 specification defines the optional
_metafield on the Prompt schema. While other decorators like@mcp.toolsupportmetaand pass it down as_metaon serialization (e.g., in MCPServer.list_tools). The @mcp.prompt decorator and the high-level Prompt classes are missing support for meta.Expected Behavior
Including
metaon@mcp.promptdoes not incur a type error and returns _meta for the prompt on list_prompts.Example Code
Python & MCP Python SDK