Skip to content

MCP Server Setup

The MCP (Model Context Protocol) server provides the deepest integration with Claude Code, exposing AI Mantras as native tools.

ToolDescription
bootstrap_sessionInitialize a session with all needed resources
assess_complexityAutomatically triage requests
get_personaLoad personas by name or domain
get_patternLoad thinking patterns
get_skillLoad skills by name, task, or category
get_workflowGet orchestration workflows
create_handoffGenerate handoff templates
list_availableDiscover all personas, patterns, and skills
ToolDescription
spawn_agentSpawn isolated agents with specific personas
get_agent_resultRetrieve results from spawned agents
list_agentsMonitor all spawned agents
  1. Install the package globally:

    Terminal window
    npm install -g @ai-mantras/mcp-server
  2. Add to your Claude Code MCP configuration (~/.claude/mcp.json or project .mcp.json):

    {
    "mcpServers": {
    "ai-mantras": {
    "command": "npx",
    "args": ["-y", "@ai-mantras/mcp-server"]
    }
    }
    }

By default, AI Mantras runs in single-agent mode where all personas share one AI model. To enable multi-agent mode where each persona spawns as an isolated agent:

{
"mcpServers": {
"ai-mantras": {
"command": "npx",
"args": ["-y", "@ai-mantras/mcp-server"],
"env": {
"MANTRAS_MULTI_AGENT_ENABLED": "true",
"ANTHROPIC_API_KEY": "sk-ant-your-key-here"
}
}
}
}
  • True context isolation between personas
  • Each agent only sees its persona, task, and inputs
  • Support for parallel execution
  • Mix Anthropic and OpenAI models per persona
VariableDescriptionDefault
MANTRAS_MULTI_AGENT_ENABLEDEnable multi-agent toolsfalse
ANTHROPIC_API_KEYAPI key for Claude models-
OPENAI_API_KEYAPI key for GPT models-
MANTRAS_DEFAULT_PROVIDERDefault: anthropic or openaianthropic
MANTRAS_MAX_CONCURRENT_AGENTSMax parallel agents5
MANTRAS_AGENT_TIMEOUT_MSAgent timeout (ms)120000

Once configured, Claude Code automatically has access to AI Mantras tools. You can:

  • Ask questions and let the framework triage automatically
  • Request specific personas: “Use Clara to analyze this investment”
  • Apply patterns: “Use chain-of-thought to work through this problem”