# mcp-thinkgate [Health: Active]

**Category:** 🗣️ Conversational AI  
**Repository:** https://github.com/tjp2021/mcp-thinkgate  
**GitHub Stars:** 3  
**npm Downloads (last month):** 132  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mcp-thinkgate

## Description
Auto-classifies prompt complexity and routes to the right Claude thinking mode. No API key needed.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "mcp-thinkgate": {
    "command": "npx",
    "args": ["-y","mcp-thinkgate"]
  }
}
```

## Documentation

## What mcp-thinkgate MCP server does

mcp-thinkgate MCP server evaluates an incoming prompt and assigns one of three complexity tiers: `fast`, `think`, or `ultrathink`. Each tier maps to an effort level: none, medium, or maximum/high. The result also includes a confidence value and a one-sentence explanation of the classification.

The intended use is automatic routing for Claude-based agents that receive a mixed workload. Short factual questions and simple edits can use the fast tier, while architecture work, debugging, multi-step analysis, system design, proofs, and other open-ended tasks can receive more reasoning effort. The server does not perform the requested task itself; it advises the surrounding agent about how to run it.

## How it works

With an Anthropic API key, the classifier sends the prompt through a relatively inexpensive Haiku call, then returns a routing recommendation. Without a key, mcp-thinkgate MCP server uses a rule-based fallback, which is free and preferred for automatic routing when an API call is not wanted.

Profiles determine the model mapping for each tier. The default `claude` profile maps the tiers to Haiku, Sonnet, and Opus model variants. `openrouter-cost` and `openrouter-balanced` provide alternative mappings. A caller can select a profile through `THINKGATE_PROFILE` or by passing a profile to `classifyPrompt`; individual tier models can also be overridden.

The MCP result is only a recommendation. The host or agent integration must actually select the model and apply the effort setting. The reference TinyClaw integration does this before invoking the Claude CLI.

## Setup and configuration

The server requires Node.js 20 or newer. For an MCP client, configure it as an `npx -y mcp-thinkgate` stdio server, then restart the client. The supplied example targets Claude Desktop and Claude Code. An `ANTHROPIC_API_KEY` may be provided to enable API-backed classification, but it is optional because rule-based classification works without one.

For application code, install the npm package and import `classifyPrompt`. Pass the user message and optionally an Anthropic key; calling it without the key uses the fallback. `setLogLevel` can lower logging from the default `info` level to `error`, with logs written to stderr.

## Tools and capabilities

- Classifies prompts into `fast`, `think`, and `ultrathink` tiers.
- Reports recommended effort, confidence, and reasoning.
- Supports Claude and two OpenRouter model-mapping profiles.
- Allows profile selection and per-tier model overrides.
- Runs through MCP or as the `classifyPrompt` npm library function.
- Provides a no-key rule-based fallback.

## Limitations and notes

mcp-thinkgate MCP server does not automatically change the host model or Claude effort setting. Integrations must consume its output and perform that switch. API-backed classification requires an Anthropic key, while the fallback does not. The package is designed for Node.js 20 or later.

_Full upstream README: https://allmcps.com/mcp/mcp-thinkgate/readme_

