Give brains to your small models. MCP server enforcing step-by-step Chain-of-Thought.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent — or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag — we're steadily working through the catalog.
💡 Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
"Give brains to your small models."
CotForce enforces step-by-step Chain-of-Thought, turning 4B parameter models into methodical reasoners.
A 4-billion-parameter Gemma cannot solve SEND + MORE = MONEY. It's a classic cryptarithmetic puzzle — 8 unique digits, 5 columns, 4 carry values. A bare 4B model guesses randomly. It hallucinates digits. It loses track of carries after column 2.
The same model, with CotForce:
11 structured reasoning steps. Zero hallucinations. Correct answer.
CotForce doesn't make small models smarter. It forces them to think before they speak — which is often all they need.
CotForce uses the MCP sampling protocol (sampling/createMessage) to call LLMs. If your client supports it (Claude Desktop, Cursor), nothing extra is needed.
If not — or if you're using a local model like Gemma via LMStudio — switch to direct HTTP mode:
That's it. The same 4B Gemma that couldn't solve SEND+MORE=MONEY above — now with CotForce, working locally through LMStudio.
{reasoning, result} via strict system prompts and few‑shot examples.CotParser interface. Select parsers via COT_PARSERS env var.
<reasoning>, Reasoning:)cl100k_base encoding, with fallback to character heuristic. Tweak via REASONING_OVERHEAD.MODEL environment variable to hint a specific model; leave unset for host default.MODEL.API_KEY to use direct mode.LOG_LEVEL).TRUNCATION_THRESHOLD).resultSchema parameter validates the result field type‑map; mismatches trigger retry.Requires Node.js ≥ 18.
Add to claude_desktop_config.json:
No clone, no build. npx -y pulls and runs directly from npm.
The server is configured via environment variables (all optional):
| Variable | Default | Description |
|---|---|---|
MODEL | (not set) | Model name hint (e.g. claude-3-5-sonnet, gpt-4o). If empty, no hint sent – MCP host decides. |
MAX_RETRIES | 2 | Number of retry attempts before returning raw output. |
BASE_TEMP | 0.1 | Initial sampling temperature. |
TEMP_INCREMENT | 0.2 | Temperature added per retry attempt. |
TIMEOUT | 60000 / 120000 | Sampling timeout in ms (60s). Direct HTTP mode uses longer default (120s) since local models are slower. |
CACHE_TTL | 3600000 | Result cache TTL in ms (default 1 hour). Set to 0 to disable. |
CACHE_MAX_ENTRIES | 100 | Maximum cached results before evicting oldest. |
COT_PARSERS | (all) | Comma-separated parser names to use (e.g., direct-json,fenced-block). Skips others. |
TRUNCATION_THRESHOLD | 0.95 | Ratio of output/budget that triggers truncation detection. Attempts truncated JSON recovery first, then retries with 1.5x budget. |
REASONING_OVERHEAD | 800 | Fixed token overhead added to the budget formula. Increase for verbose models. |
FALLBACK_MODELS | (not set) | Comma-separated list of fallback models (e.g. gpt-4o,claude-3-5-sonnet). Cycled on failure. |
MODE | auto | auto, sampling, or direct. auto uses direct HTTP when API_KEY is set and client lacks sampling support. |
API_KEY | (not set) | LLM API key for direct HTTP mode. Optional for local endpoints (LMStudio, Ollama). Required for remote providers (OpenAI, Anthropic, etc.). |
API_BASE_URL | https://api.openai.com | Base URL for direct HTTP mode. Change for LMStudio (http://localhost:1234/v1) or other providers. |
LOG_LEVEL | INFO | One of DEBUG, INFO, WARN, ERROR. |
Add to your MCP client configuration. A .mcp.json file is included in the package for auto-discovery by clients like Cursor, VS Code, and Windsurf. Copy the relevant config below to your client's settings:
With MCP sampling (Claude Desktop):
With direct LLM HTTP (LMStudio, OpenAI, Ollama):
Note:
API_KEYis optional for local endpoints like LMStudio or Ollama. It is required for remote providers like OpenAI or Anthropic.
The root
index.jsis a launcher that delegates todist/index.js. It guards against missing builds with a helpful error message.
What you see: finish_reason: "length" in the LLM response. The reasoning cuts off before the result field.
Why: The token budget is too tight. Complex reasoning (like SEND+MORE=MONEY) can need 3000+ output tokens, but the default minimum is 4096 — while the default model-level cap can vary.
Fix: Increase the budget overhead:
Or skip token-heavy parser layers to save budget for reasoning:
What you see: MCP error -32001: Request timed out before the solution appears.
Why: Complex CoT reasoning takes time — 60-90 seconds for local models like Gemma. This error can come from two places:
TIMEOUT env var.Fix — check both sides:
Increase CotForce's timeout:
Check your MCP client's timeout setting:
LM Studio — add "timeout" to mcp.json (milliseconds):
Claude Desktop — the tool call timeout is not directly configurable. A workaround is to increase CotForce's TIMEOUT to complete within the client's window, or use a faster model.
Cursor / VS Code — check the MCP extension or .vscode/mcp.json for a timeout or requestTimeout setting.
No reviews yet — be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/cotforce-mcp)<a href="https://allmcps.com/mcp/cotforce-mcp"><img src="https://allmcps.com/api/badge/cotforce-mcp?style=directory" alt="Cotforce MCP on AllMCPs" /></a>