Skip to main content

MCP Server Mode

MutagenT provides an MCP (Model Context Protocol) server that allows AI assistants like Claude to interact directly with your prompts, datasets, and evaluations.

What is MCP?

MCP (Model Context Protocol) is a standard for AI assistants to interact with external tools and services. When you run MutagenT as an MCP server, AI assistants can:
  • List and retrieve prompts
  • Create and update prompt versions
  • Run evaluations
  • Start optimization jobs
  • View traces and analytics

Installation

The MCP server is a separate package:
bun add -g @mutagent/mcp-server

Claude Desktop Configuration

Add to your Claude Desktop config (~/.claude/claude_desktop_config.json):
{
  "mcpServers": {
    "mutagent": {
      "command": "npx",
      "args": ["@mutagent/mcp-server"],
      "env": {
        "MUTAGENT_API_KEY": "sk_live_xxxx"
      }
    }
  }
}

Claude Code Configuration

Add to your project’s .claude/settings.json:
{
  "mcpServers": {
    "mutagent": {
      "command": "bunx",
      "args": ["@mutagent/mcp-server"]
    }
  }
}
Or globally in ~/.claude/settings.json.

Available MCP Tools

Once connected, AI assistants have access to these tools:
ToolDescription
mutagent_list_promptsList all prompts in workspace
mutagent_get_promptGet prompt content and metadata
mutagent_create_promptCreate a new prompt
mutagent_update_promptUpdate prompt content
mutagent_list_datasetsList datasets for a prompt
mutagent_run_evaluationExecute an evaluation
mutagent_start_optimizationStart optimization job
mutagent_get_optimization_statusCheck job progress
mutagent_list_tracesView execution traces

Environment Variables

VariableDescriptionRequired
MUTAGENT_API_KEYYour MutagenT API keyYes
MUTAGENT_ENDPOINTAPI endpointNo (defaults to production)

Why MCP Mode?

Context Efficient

Prompt content stays out of AI context window - fetched on demand

Secure

API keys stay local, never exposed in conversation

Real-time

Direct API access, always up-to-date data

Native Experience

AI assistants can naturally work with MutagenT

Example Conversation

With MCP configured, you can have conversations like:
You: List my prompts Claude: Uses mutagent_list_prompts You have 5 prompts:
  1. Customer Support Bot (v2.1)
  2. Code Review Assistant (v1.0) …
You: Run an evaluation on the Customer Support Bot using the golden dataset Claude: Uses mutagent_run_evaluation Started evaluation run_abc123. Current progress: 45%…

Troubleshooting

Server not starting

Check the MCP server is installed:
bunx @mutagent/mcp-server --version

Authentication errors

Verify your API key:
mutagent auth status

Connection issues

Check Claude’s MCP logs:
# Claude Desktop logs
tail -f ~/Library/Logs/Claude/mcp.log

# Claude Code logs
tail -f ~/.claude/logs/mcp.log