原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

Cotforce MCP

作者:islobodan版本 1.1.3i★ –i在你的电脑上运行
注册名称io.github.islobodan/cotforce-mcp

安装

概览

作者提供的说明(英文原文)

Give brains to your small models. MCP server enforcing step-by-step Chain-of-Thought.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 其他

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: MODE, API_BASE_URL, MODEL

你需要

  • npm已安装 Node.js(用于 npx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "cotforce": {
      "command": "npx",
      "args": [
        "-y",
        "@slbdn/cotforce-mcp"
      ],
      "env": {
        "MODE": "your-value",
        "API_BASE_URL": "your-value",
        "MODEL": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add cotforce --env MODE=your-value --env API_BASE_URL=your-value --env MODEL=your-value -- npx -y @slbdn/cotforce-mcp

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "cotforce": {
      "command": "npx",
      "args": [
        "-y",
        "@slbdn/cotforce-mcp"
      ],
      "env": {
        "MODE": "your-value",
        "API_BASE_URL": "your-value",
        "MODEL": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "cotforce": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@slbdn/cotforce-mcp"
      ],
      "env": {
        "MODE": "your-value",
        "API_BASE_URL": "your-value",
        "MODEL": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • MODE env
    LLM call mode: auto, direct, or sampling
  • API_BASE_URL env
    Base URL for direct HTTP mode (e.g. http://localhost:1234/v1)
  • MODEL env
    Model name or hint (e.g. gemma-4-e4b-it-mlx)

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 islobodan 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“其他”中的其他服务器比较i

  • 星标数多于此分类中其他 32509 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 32509 个服务器的 8% 更新
  • 基础检查结果等于或优于此分类中其他 32509 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

Cotforce MCP 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(1.1.3)于6个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。

有什么可以替代它?

同一分类中有:Spec Driven Development, Remote Desktop Commander, Fomu MCP

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

Spec Driven Development

作者:formulahendry

MCP Server that facilitates spec-driven development workflows, not just Vibe Coding.

在你的电脑上运行★ 440MIT14个月前更新
安装

Remote Desktop Commander

作者:desktop-commander

Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.

在云端运行★ 211昨天更新
安装

Fomu MCP

作者:gabrielmahia

Kenya government form guides: checklists, draft letters, eCitizen, Huduma, timelines. Sample data.

在你的电脑上运行今天更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

CotForce-MCP

"Give brains to your small models."

CotForce enforces step-by-step Chain-of-Thought, turning 4B parameter models into methodical reasoners.


Why this exists

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:

Step 1: Analyze the leftmost column. S+M+C3 = MO. Max sum is 19998. ∴ M=1.

Step 2: S+1+C3 = 10+O. With M=1 and carry, O must be 0. Step 3: D+E = Y+10C1 → C1=1. Now R+C1=9 → C1=0→R=9 (used), C1=1→R=8. ... Step 11: All digits assigned. 9567 + 1085 = 10652. Verified.

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.


⚡ Two modes — one line of config

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:

{

"mcpServers": { "cotforce": { "command": "node", "args": ["node_modules/@slbdn/cotforce-mcp/index.js"], "env": { "MODE": "direct", "API_BASE_URL": "http://localhost:1234/v1", "MODEL": "gemma-4-e4b-it-mlx" } } } }

That's it. The same 4B Gemma that couldn't solve SEND+MORE=MONEY above — now with CotForce, working locally through LMStudio.


🚀 Features

  • Rigid CoT enforcement — forces any LLM to output valid JSON {reasoning, result} via strict system prompts and few‑shot examples.
  • Adaptive multi‑layer parser — plug-in architecture with 5 built-in parsers (direct JSON, fenced blocks, XML/labels, brace-balanced, truncated recovery) in a priority-sorted pipeline. Add custom parsers via CotParser interface. Select parsers via COT_PARSERS env var.
  1. Direct JSON (with code‑fence stripping)
  2. JSON inside markdown fenced blocks
  3. XML / heuristic label extraction ( , Reasoning:)
  4. Brace‑balancing scanner for nested JSON objects
  • Zod runtime validation — validates tool arguments and parsed CoT output with strict schemas.
  • Automatic retry with temperature increase — up to 3 attempts (configurable) with increasing temperature and correction suffixes.
  • Per‑request rejection memo — no global mutable state; safe under concurrent tool calls.
  • Token budgeting with tiktoken — accurate token counting using OpenAI's cl100k_base encoding, with fallback to character heuristic. Tweak via REASONING_OVERHEAD.
  • Configurable model — set MODEL environment variable to hint a specific model; leave unset for host default.
  • Model-specific prompts — automatically selects tuned system prompts for Claude, GPT-4, Gemini, and Grok based on MODEL.
  • Universal compatibility — works with MCP sampling (Claude Desktop) or direct LLM HTTP calls (OpenAI, LMStudio, Ollama, any OpenAI-compatible API). Set API_KEY to use direct mode.
  • Structured logging — timestamped, level‑filtered logs to stderr (supports LOG_LEVEL).
  • Output truncation detection — detects when the LLM response hits the token limit and retries with a conciseness hint (TRUNCATION_THRESHOLD).
  • Token usage exposure — every response includes input / output / budget token counts so callers can optimize.
  • User-supplied result schema — optional resultSchema parameter validates the result field type‑map; mismatches trigger retry.
  • Structured metrics — in-memory counters for requests, success/fail rates, truncations, retries, latency, and token usage. Logged on shutdown.
  • Comprehensive test suite — 151 tests covering parser pipeline, token budgeting, metrics, schema validation, retry loop, progress notifications, caching, and MCP server integration.

📦 Installation

npm install @slbdn/cotforce-mcp

or

git clone https://github.com/islobodan/cotforce-mcp cd cotforce-mcp npm install npm run build

Requires Node.js ≥ 18.

Quick start — Claude Desktop

Add to claude_desktop_config.json:

{

"mcpServers": { "cotforce": { "command": "npx", "args": ["-y", "@slbdn/cotforce-mcp"], "env": { "MODEL": "claude-3-5-sonnet" } } } }

No clone, no build. npx -y pulls and runs directly from npm.


🔧 Configuration

The server is configured via environment variables (all optional):

VariableDefaultDescription
MODEL*(not set)*Model name hint (e.g. claude-3-5-sonnet, gpt-4o). If empty, no hint sent – MCP host decides.
MAX_RETRIES2Number of retry attempts before returning raw output.
BASE_TEMP0.1Initial sampling temperature.
TEMP_INCREMENT0.2Temperature added per retry attempt.
TIMEOUT60000 / 120000Sampling timeout in ms (60s). Direct HTTP mode uses longer default (120s) since local models are slower.
CACHE_TTL3600000Result cache TTL in ms (default 1 hour). Set to 0 to disable.
CACHE_MAX_ENTRIES100Maximum cached results before evicting oldest.
COT_PARSERS*(all)*Comma-separated parser names to use (e.g., direct-json,fenced-block). Skips others.
TRUNCATION_THRESHOLD0.95Ratio of output/budget that triggers truncation detection. Attempts truncated JSON recovery first, then retries with 1.5x budget.
REASONING_OVERHEAD800Fixed 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.
MODEautoauto, 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_URLhttps://api.openai.comBase URL for direct HTTP mode. Change for LMStudio (http://localhost:1234/v1) or other providers.
LOG_LEVELINFOOne of DEBUG, INFO, WARN, ERROR.
Example
MODEL=gpt-4o MAX_RETRIES=3 BASE_TEMP=0.2 TEMP_INCREMENT=0.15 LOG_LEVEL=DEBUG npx @slbdn/cotforce-mcp

🧪 Usage

As an MCP Tool

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):

{

"mcpServers": { "cotforce": { "command": "node", "args": ["/path/to/cotforce-mcp/index.js"], "env": { "MODEL": "claude-3-5-sonnet", "MAX_RETRIES": "2" } } } }

With direct LLM HTTP (LMStudio, OpenAI, Ollama):

{

"mcpServers": { "cotforce": { "command": "node", "args": ["/path/to/cotforce-mcp/index.js"], "env": { "MODE": "direct", "API_BASE_URL": "http://localhost:1234/v1", "MODEL": "local-model", "MAX_RETRIES": "2" } } } }

Note: API_KEY is optional for local endpoints like LMStudio or Ollama. It is required for remote providers like OpenAI or Anthropic.

The root index.js is a launcher that delegates to dist/index.js. It guards against missing builds with a helpful error message.


🩺 Troubleshooting

Response truncated mid-reasoning

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:

REASONING_OVERHEAD=1600  # default is 800, raise for verbose models

Or skip token-heavy parser layers to save budget for reasoning:

COT_PARSERS=direct-json,fenced-block  # skip heuristic and brace-balanced
MCP client timeout

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:

  1. CotForce's own timeout — default 120s for direct HTTP mode. Controlled by the TIMEOUT env var.
  2. The MCP client's timeout — LM Studio, Claude Desktop, Cursor, etc. each have their own default timeout for tool calls (often 30-60s). This is separate from CotForce's timeout.

Fix — check both sides:

Increase CotForce's timeout:

TIMEOUT=180000  # 3 minutes

Check your MCP client's timeout setting:

LM Studio — add "timeout" to mcp.json (milliseconds):

{

"mcpServers": { "cotforce": { "command": "node", "args": ["index.js"], "env": { "TIMEOUT": "180000" }, "timeout": 300000 } } }

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.


Call the Tool
{

"name": "solve_problem", "arguments": { "prompt": "What is 7 * 8 + 2?" } }

With Result Schema Validation
{

"name": "solve_problem", "arguments": { "prompt": "List the prime numbers between 10 and 20", "resultSchema": { "primes": "object", "count": "number" } } }

If the result field doesn't match the schema, the server retries with a correction hint.

More Examples

See EXAMPLES.md for 16 diverse examples including:

  • Logic puzzles, probability, word problems
  • Code analysis, regex, SQL queries
  • Creative writing, recipe adaptation
  • Nested JSON with schema validation
  • Usage with different models and fallbacks
Example Response
{

"content": [{ "type": "text", "text": "🤖 Agentic CoT Result:\n\nReasoning: Step 1: Multiply 7 * 8 = 56. Step 2: Add 2 to get 58.\n\nAnswer: 58\n\n📊 Token Usage: 42 in / 150 out / 4096 budget" }] }

If parsing fails after all retries, the server returns the raw LLM output with a warning.


🧩 Custom Parsers

The parser is a priority-sorted pipeline of plugins. Five built-in parsers run in order:

PriorityNameWhat it does
10direct-jsonParses whole output as JSON (strips json` fences)
20fenced-blockExtracts JSON from markdown code blocks
30heuristicLooks for / XML tags or Reasoning:/Result: labels
40brace-balancedFinds first balanced {} in arbitrary text
50truncated-recoverySalvages reasoning from truncated JSON (hit token limit)

Filter parsers via `COT_PARSERS` env var:

COT_PARSERS=direct-json,fenced-block node index.js

Write a custom parser:

import { CotParser, AgenticCotSchema } from "@slbdn/cotforce-mcp";

class YamlParser implements CotParser { name = "yaml"; priority = 35; // runs after heuristic, before brace-balanced

parse(raw: string): { reasoning: string; result: unknown } | null { // Custom YAML parsing logic here return null; // return n

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx