MCP server that delegates cheap subtasks to a free local LLM router (freellmapi) for Claude Code
Two tools with clear, detailed descriptions and well-structured schemas. delegate_task has excellent documentation (250+ chars) with explicit guidance on when to use it and error handling expectations. list_models is concise but adequate. Both tools have complete input schemas with type definitions and parameter descriptions. However, output schemas are not formally documented, responses are described in prose but lack structured schema definitions. Parameter naming is clear (prompt, task, model, system, temperature, max_tokens) and follows conventions. No critical security issues detected; API key is injected via environment variable, not exposed as a parameter. Error handling is thoughtful (fallbackError pattern) but could be more granular.
Hand a self-contained subtask to a free local model (via the freellmapi router) instead of spending Claude's own budget. Best for cheap, high-volume work: summarizing, drafting boilerplate, quick classification, field extraction, translation, rephrasing, routine code stubs. The delegate has NO access to this conversation — put everything it needs in `prompt`. Defaults to model 'auto' so the router picks a healthy free model with fallback and retries. Returns the completion plus which upstream model served it. If this tool errors, do the task yourself — delegation is an optimization, never a hard dependency.
List the model ids the freellmapi router can serve (GET /v1/models): the virtual 'auto' first, then enabled catalog models. Also confirms the backend is reachable. On error, treat the router as unavailable and proceed without it.
Output schemas not formally documented. delegate_task returns {ok, status, text, routedVia, modelNotFound, totalTokens} but this structure is only visible in code comments, not in a schema declaration. LLMs cannot reliably parse unstructured prose responses.
list_models has empty input schema (no parameters). While correct, the description should clarify what the response structure is (list of model objects with id, name, etc.) so LLMs know what to expect.
delegate_task error handling returns a generic fallbackError with HTTP status but no guidance on which errors are retryable vs. fatal. A 500 from the router is retryable; a 400 model_not_found is not. LLM cannot distinguish.
TASK_MODEL mapping (auto, cheap, coding, reasoning) is hardcoded in the server. If the router's catalog changes, the server must be redeployed. Consider fetching available models from list_models and validating task hints dynamically.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | C | 60 | <=2025-11-25 | v2 |