Skip to main content

MCP Tools

LARouter exposes tools via the Model Context Protocol (MCP), enabling AI agents and editors to delegate tasks to expert models.

Available Tools​

delegate_to_expert​

Route a prompt to the optimal model based on task complexity.

Parameters:

ParameterTypeRequiredDescription
promptstring✅The prompt to send to the expert model
tierenum❌Force a tier: HEARTBEAT, SIMPLE, MODERATE, COMPLEX, FRONTIER
modelstring❌Force a specific model ID
maxTokensnumber❌Maximum response tokens (default: 4096)

Example (MCP JSON-RPC):

{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "delegate_to_expert",
"arguments": {
"prompt": "Write a Python function to parse CSV files",
"tier": "COMPLEX"
}
},
"id": 1
}

list_available_models​

List all models registered in LARouter with their status.

Parameters: None.

Response:

{
"models": [
{
"id": "gemma-4-e4b",
"name": "Gemma 4 E4B",
"status": "running",
"port": 8001,
"tier": "SIMPLE"
},
{
"id": "gpt-4o",
"name": "GPT-4o",
"status": "available",
"tier": "COMPLEX"
}
]
}

Transports​

stdio (Default)​

For AI editors (Cursor, VS Code, Windsurf) that communicate via stdin/stdout:

larouter mcp

MCP Client Config (mcp.json):

{
"mcpServers": {
"larouter": {
"command": "larouter",
"args": ["mcp"],
"transportType": "stdio"
}
}
}

SSE (Server-Sent Events)​

For web clients that connect over HTTP:

larouter mcp --sse --port 18791

Connect to http://localhost:18791/sse for the event stream.

Integration Example​

With Claude Desktop​

Add to your claude_desktop_config.json:

{
"mcpServers": {
"larouter": {
"command": "/path/to/larouter",
"args": ["mcp"]
}
}
}

With LADesigner​

LARouter's MCP tools integrate natively with the LibreApps Designer AI assistant, enabling it to delegate expensive tasks to frontier models while keeping simple tasks local.