Skip to main content

Agentlify MCP Integration

Connect Agentlify to MCP-compatible assistants so they can manage routers, manage agents, run agents, and inspect execution history.

Cascade / WindsurfClineAny MCP-Compatible Client
What Your Assistant Can Do

The MCP server exposes Agentlify operations as tools so assistants can perform real actions instead of only generating suggestions.

Router Control
Create routers, test prompts, inspect models, and monitor usage.
Agent Lifecycle
Create, update, duplicate, enable/disable, and delete agents.
Execution
Run agents directly and handle tool-call continuation.
Run Analytics
List runs, inspect run detail, and export run history.

Configuration

Add the MCP server configuration in your assistant settings:

Cascade / Windsurf
Add to your MCP settings file
json
{
  "mcpServers": {
    "agentlify": {
      "command": "npx",
      "args": ["-y", "@agentlify/mcp-server"],
      "env": {
        "AGENTLIFY_API_KEY": "mp_your-api-key-here"
      }
    }
  }
}
Cline
Add to ~/.cline/mcp.json
json
{
  "mcpServers": {
    "agentlify": {
      "command": "npx",
      "args": ["-y", "@agentlify/mcp-server"],
      "env": {
        "AGENTLIFY_API_KEY": "mp_your-api-key-here"
      }
    }
  }
}

Available MCP Tools

Tool names exposed by @agentlify/mcp-server:

Router Tools
  • create_router
  • test_request
  • get_usage_summary
  • list_models
  • list_routers
  • get_balance
Agent Management
  • list_agents
  • get_agent
  • create_agent
  • update_agent
  • delete_agent
  • toggle_agent
  • duplicate_agent
  • get_agent_usage
  • list_agent_templates
  • fork_agent_template
Execution Tools
  • run_agent
  • list_agent_runs
  • get_agent_run_detail
  • export_agent_runs

Built-in Documentation Resources

The MCP server also exposes documentation resources:

  • agentlify://quickstart
  • agentlify://migration/openai
  • agentlify://migration/anthropic
  • agentlify://router-configuration
  • agentlify://sdk/python
  • agentlify://sdk/javascript
  • agentlify://routing-strategies
  • agentlify://cost-optimization
  • agentlify://examples/chatbot
  • agentlify://pricing

Example Workflow

1. "List my agents and show which ones are inactive."

2. "Create an agent named support-triage with a short description."

3. "Run agent:support-triage on this message and return tool calls."

4. "Export the latest 50 runs for support-triage as JSONL."