Documentation

Integrate promptman with your AI applications using the Model Context Protocol (MCP) server or REST API. Manage, version, and deploy your prompts programmatically.

Quick Start

To use the promptman API, you'll need an API key. Sign up for a free account to get started.

Create Free Account
Model Context Protocol

MCP Server Integration

Promptman exposes a standard MCP server that allows AI agents (like Claude Desktop or Claude Code) to discover, fetch, and manage your prompts dynamically as tools.

Server URL

https://api.promptman.dev/mcp
Configuration
{
  "mcpServers": {
    "promptman": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://api.promptman.dev/mcp",
        "--header",
        "X-API-Key:YOUR_API_KEY"
      ]
    }
  }
}

Add this to claude_desktop_config.json (Claude Desktop) or ~/.claude/settings.json (Claude Code). Replace YOUR_API_KEY with your API key from the dashboard.

MCP Tools Reference

list_prompts

Tool

Returns a list of all prompts in your workspace. Can optionally filter by a specific app.

Input Schema
ArgumentTypeDescriptionRequired
appSlugstringFilter prompts by app slugNo

get_prompt

Tool

Retrieves a specific prompt by its slug. Optionally specify a stage to get the version pinned to that deployment stage. Without a stage, returns the latest draft.

Input Schema
ArgumentTypeDescriptionRequired
promptSlugstringThe slug of the prompt to retrieveYes
stagestringStage name (e.g., 'dev', 'prod') to get the pinned versionNo

list_apps

Tool

Returns a list of all applications in your workspace.

Input Schema

No arguments required.

get_prompt_versions

Tool

Returns the version history of a specific prompt, ordered by most recent first.

Input Schema
ArgumentTypeDescriptionRequired
promptSlugstringThe slug of the promptYes
limitnumberMaximum number of versions to return (default: 20)No

create_prompt

Tool

Creates a new prompt in the specified application.

Input Schema
ArgumentTypeDescriptionRequired
appSlugstringThe slug of the app to create the prompt inYes
contentstringThe content/text of the promptYes
titlestringThe title of the prompt (max 200 characters)No
variableDescriptionsobjectDescriptions for template variables (see Variables Schema below)No

update_prompt

Tool

Updates an existing prompt's title and/or content. Does not create a new version by default.

Input Schema
ArgumentTypeDescriptionRequired
promptSlugstringThe slug of the prompt to updateYes
titlestringThe new title of the promptYes
contentstringThe new content/text of the promptYes
variableDescriptionsobjectDescriptions for template variables (see Variables Schema below)No
createVersionbooleanWhether to create a new version (default: false)No

delete_prompt

Tool

Permanently deletes a prompt and all its versions. This action cannot be undone.

Input Schema
ArgumentTypeDescriptionRequired
promptSlugstringThe slug of the prompt to deleteYes
REST API

REST API

Use the REST API to fetch prompts directly in your applications. Perfect for server-side integrations and custom workflows.

Base URL

https://api.promptman.dev
Authentication

All API requests require an API key passed in the X-API-Key header.

curl -H "X-API-Key: YOUR_API_KEY" \
     https://api.promptman.dev/prompt/welcome-email

Endpoints

GET

/prompt/:slug

Retrieve a prompt by its slug. Returns the latest draft version by default.

Parameters
ParameterLocationDescriptionRequired
slugpathThe slug of the promptYes
stagequeryStage name to get the pinned version (e.g., 'dev', 'prod')No
Response
{
  "title": "Welcome Email",
  "content": "Hello {{username}}, welcome to {{company}}!",
  "variables": {
    "username": { "required": true, "type": "string", "description": "..." },
    "company": { "required": true, "type": "string", "description": "..." }
  },
  "version": 3
}

Variables Schema

Prompts can contain template variables using the {{variableName}} syntax. When creating or updating prompts, you can provide descriptions for these variables.

Input Format (when creating/updating)

The variableDescriptions parameter accepts a simple object mapping variable names to their descriptions:

variableDescriptions
{
  "username": "The user's display name",
  "email": "User's email address",
  "company": "The company or organization name"
}

Output Format (in responses)

When retrieving prompts, the API returns a structured variables object with additional metadata for each variable:

variables
{
  "username": {
    "required": true,
    "type": "string",
    "description": "The user's display name"
  },
  "email": {
    "required": true,
    "type": "string",
    "description": "User's email address"
  }
}

Variable extraction

Variables are automatically extracted from the prompt content by scanning for {{variableName}} patterns. Variable names are normalized to lowercase. Only variables that appear in the content will be included in the response.