Skip to main content

POST /api/mcp/:serverName/prompts/:promptName

Execute a prompt on an MCP server.

POST /api/servers/:serverName/prompts/:promptName/toggle

Enable or disable a prompt.

PUT /api/servers/:serverName/prompts/:promptName/description

Update the description of a prompt.

Get a Prompt

Execute a prompt on an MCP server and get the result.
  • Endpoint: /api/mcp/:serverName/prompts/:promptName
  • Method: POST
  • Authentication: Required
  • Parameters:
    • :serverName (string, required): The name of the MCP server.
    • :promptName (string, required): The name of the prompt.
  • Body:
    {
      "arguments": {
        "arg1": "value1",
        "arg2": "value2"
      }
    }
    
    • arguments (object, optional): Arguments to pass to the prompt.
  • Response:
    {
      "success": true,
      "data": {
        "messages": [
          {
            "role": "user",
            "content": {
              "type": "text",
              "text": "Prompt content"
            }
          }
        ]
      }
    }
    
Example Request:
curl -X POST "http://localhost:3000/api/mcp/myserver/prompts/code-review" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{
    "arguments": {
      "language": "typescript",
      "code": "const x = 1;"
    }
  }'

Toggle a Prompt

Enable or disable a specific prompt on a server.
  • Endpoint: /api/servers/:serverName/prompts/:promptName/toggle
  • Method: POST
  • Authentication: Required
  • Parameters:
    • :serverName (string, required): The name of the server.
    • :promptName (string, required): The name of the prompt.
  • Body:
    {
      "enabled": true
    }
    
    • enabled (boolean, required): true to enable the prompt, false to disable it.
Example Request:
curl -X POST "http://localhost:3000/api/servers/myserver/prompts/code-review/toggle" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"enabled": false}'

Update Prompt Description

Update the description of a specific prompt.
  • Endpoint: /api/servers/:serverName/prompts/:promptName/description
  • Method: PUT
  • Authentication: Required
  • Parameters:
    • :serverName (string, required): The name of the server.
    • :promptName (string, required): The name of the prompt.
  • Body:
    {
      "description": "New prompt description"
    }
    
    • description (string, required): The new description for the prompt.
Example Request:
curl -X PUT "http://localhost:3000/api/servers/myserver/prompts/code-review/description" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -d '{"description": "Review code for best practices and potential issues"}'
Note: Prompts are templates that can be used to generate standardized requests to MCP servers. They are defined by the MCP server and can have arguments that are filled in when the prompt is executed.