Speakeasy Logo
Skip to Content

Product Updates

MCP

Add prompts to your MCP server

Emre Tezisci

Emre Tezisci

March 28, 2025 - 1 min read

Product Updates

MCP is much more than an “AI-native HTTP wrapper”. In addition to defining available API endpoints and operations, MCP allows you to define prompts for AI clients to use. These prompts serve as templates that AI uses to execute workflows.

Speakeasy’s MCP server generator now allows you to bundle prompts with your server, combining the efficiency of a generated server with the full functionality offered by the protocol.

How it works

When you define prompts, your generated MCP server automatically exposes prompts/list and prompts/get endpoints. These endpoints allow MCP clients to discover (list) and execute (get) prompts. Users of the MCP client can then discover and execute these prompts directly.

The use cases for prompts are extensive. Common examples include:

  • Chaining multiple API interactions
  • Guiding specific workflows
  • Including context from outside the API

Getting started

Adding prompts to your server is straightforward. Define prompts in your MCP server’s /custom/customPrompts.ts file as objects with a name, description, and prompt function. In the description, provide instructions for the MCP client to execute, including the use of tools in your MCP server.

Then register the prompt in the server.extensions.ts file:

Last updated on

Organize your
dev universe,

faster and easier.

Try Speakeasy Now