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.
| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | Yes | The system prompt to optimize |
model | string | Yes | Target model identifier |
task | string | No | Task 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.
| Parameter | Type | Required | Description |
|---|---|---|---|
original | string | Yes | The original prompt |
adapted | string | Yes | The adapted prompt |
model | string | Yes | The model the prompt was adapted for |