MCP Server

The Refrase MCP (Model Context Protocol) server integrates prompt optimization directly into AI-powered editors like Claude Desktop and Cursor.

Installation

npm install -g @refrase/mcp-server

Claude Desktop Configuration

Add the following to your claude_desktop_config.json:

{
  "mcpServers": {
    "refrase": {
      "command": "refrase-mcp",
      "args": [],
      "env": {
        "REFRASE_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor Configuration

Add to your Cursor MCP settings:

{
  "mcpServers": {
    "refrase": {
      "command": "refrase-mcp",
      "env": {
        "REFRASE_API_KEY": "your-api-key"
      }
    }
  }
}

Available Tools

Once configured, the MCP server exposes three tools to your AI assistant.

adapt_prompt

Optimize a system prompt for a target model.

ParameterTypeRequiredDescription
promptstringYesThe system prompt to optimize
modelstringYesTarget model identifier
taskstringNoTask type for context-aware optimization

list_models

Retrieve all supported models with their capabilities.

No parameters required.

explain_adaptation

Get a detailed explanation of why specific changes were made to a prompt.

ParameterTypeRequiredDescription
originalstringYesThe original prompt
adaptedstringYesThe adapted prompt
modelstringYesThe model the prompt was adapted for