Class McpPromptRegistry

java.lang.Object
org.mockserver.netty.mcp.McpPromptRegistry

public class McpPromptRegistry extends Object
Registry of MCP prompts exposed by MockServer's own MCP server.

Mirrors McpResourceRegistry and McpToolRegistry: each prompt is statically configured here with a name, description, an ordered list of McpPromptRegistry.PromptArguments and a message template. prompts/list returns the prompt metadata; prompts/get returns a prompt's messages with the supplied arguments substituted into {{argument}} placeholders.

  • Constructor Details

    • McpPromptRegistry

      public McpPromptRegistry()
  • Method Details

    • getPrompts

    • getMessages

      public com.fasterxml.jackson.databind.node.ArrayNode getMessages(String name, com.fasterxml.jackson.databind.JsonNode arguments)
      Build the messages for a named prompt, substituting {{argument}} placeholders with the supplied argument values. Returns null when the prompt is unknown.