Associating a Prompt to an MCP Server
Note: Visual UI management for Provider Prompts is currently under active development. Utilizing Prompts currently requires the HasMCP REST API. APrompt acts as a pre-constructed system instruction or conversational template for the Model Context Protocol. While they are created and stored inside Providers, they must be explicitly associated with a Server before an LLM agent can invoke them.
Using REST API
To map an existing prompt instruction set to your running agent container, use the routedPOST Server endpoints.
The API Endpoint
POST /servers/{serverId}/prompts
Preparing the Payload
The mapping architecture requires establishing exactly which server is receiving the mapping, and exactly which prompt logic is being exposed. Unlike tools, which require establishing the provider relationship explicitly, theprompt schema infers the provider configuration automatically based on the promptID.
promptID mapping exists and the auth token has execution authorization on the targeted serverID, the orchestrator immediately saves the binding and responds with a 201 Created.