Chain of Draft Prompt Tool

v1.0.0Developer Toolsstable

Transforms prompts into Chain of Draft (CoD) or Chain of Thought (CoT) format to enhance LLM reasoning quality while reducing token usage by up to 92.4%, supporting multiple LLM providers including Claude, GPT, Ollama, and local models.

aianthropic-claudechain-of-draftchain-of-thought-promptingcod
Share:
19
Stars
0
Downloads
0
Weekly
0/5

What is Chain of Draft Prompt Tool?

Chain of Draft Prompt Tool is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to transforms prompts into chain of draft (cod) or chain of thought (cot) format to enhance llm reasoning quality while reducing token usage by up to 92.4%, supporting multiple llm providers including cl...

Transforms prompts into Chain of Draft (CoD) or Chain of Thought (CoT) format to enhance LLM reasoning quality while reducing token usage by up to 92.4%, supporting multiple LLM providers including Claude, GPT, Ollama, and local models.

This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Transforms prompts into Chain of Draft (CoD) or Chain of Tho

Use Cases

Enhanced LLM reasoning with CoD/CoT format
Token usage reduction up to 92.4%
Multi-provider LLM support
brendancopley

Maintainer

LicenseMIT License
Languagepython
Versionv1.0.0
UpdatedApr 30, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y chain-of-draft-prompt-tool

Manual Installation

npx -y chain-of-draft-prompt-tool

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Chain of Draft Prompt Tool

The Chain of Draft Prompt Tool is an MCP server that transforms standard prompts into Chain-of-Draft (CoD) or Chain-of-Thought (CoT) format before sending them to a language model, dramatically improving reasoning quality while cutting token usage by up to 92.4% compared to standard CoT. It supports multiple LLM backends — Anthropic Claude, OpenAI GPT, Mistral, Ollama, and any OpenAI-compatible custom endpoint — and exposes domain-specific solvers for math, code, logic, and general reasoning tasks. Teams who want better reasoning quality without the token cost of verbose step-by-step outputs will find it particularly valuable.

Prerequisites

  • Python 3.10+ (for the Python server) or Node.js 18+ (for the npm package)
  • At least one LLM provider API key: ANTHROPIC_API_KEY, OPENAI_API_KEY, or MISTRAL_API_KEY — or a running Ollama instance for local models
  • An MCP-compatible client such as Claude Desktop or Cursor
  • pip or npm depending on which runtime you prefer
1

Clone the repository and install dependencies

Clone the repo and install either the Python or JavaScript dependencies depending on your preferred runtime.

git clone https://github.com/brendancopley/mcp-chain-of-draft-prompt-tool.git
cd mcp-chain-of-draft-prompt-tool
pip install -r requirements.txt
2

Set your LLM provider environment variables

Export the API key for the provider you want to use. Set MCP_LLM_PROVIDER to select between anthropic, openai, mistral, ollama, or custom. For Ollama, also set the model name.

export MCP_LLM_PROVIDER=anthropic
export ANTHROPIC_API_KEY=sk-ant-...
# Or for OpenAI:
# export MCP_LLM_PROVIDER=openai
# export OPENAI_API_KEY=sk-...
# Or for Ollama:
# export MCP_LLM_PROVIDER=ollama
# export MCP_OLLAMA_MODEL=llama3.2
3

Start the MCP server

Launch the Python server. It will listen for MCP connections and route prompts through the Chain-of-Draft transformation pipeline.

python server.py
4

Add the server to your MCP client configuration

Edit your claude_desktop_config.json to register this server. The env block passes your credentials through to the server process.

5

Restart Claude Desktop and test

Restart the client. Try a math or logic problem and observe that the server applies CoD reasoning automatically, returning concise intermediate steps rather than verbose prose.

Chain of Draft Prompt Tool Examples

Client configuration

Configuration for Claude Desktop using Anthropic as the LLM provider. Replace the API key with your own.

{
  "mcpServers": {
    "chain-of-draft": {
      "command": "python",
      "args": ["/path/to/mcp-chain-of-draft-prompt-tool/server.py"],
      "env": {
        "MCP_LLM_PROVIDER": "anthropic",
        "ANTHROPIC_API_KEY": "sk-ant-YOUR_KEY_HERE"
      }
    }
  }
}

Prompts to try

Use the exposed tools directly or ask reasoning questions that benefit from structured intermediate steps.

- "Use chain_of_draft_solve to work out: if a train travels 247 km at 65 km/h, how long does it take?"
- "Use code_solve to write a binary search function and verify it on [3,7,11,15,19] searching for 11."
- "Use logic_solve: All mammals are warm-blooded. Dolphins are mammals. What can we conclude?"
- "Use get_performance_stats to compare CoD vs CoT efficiency for the last 5 queries."
- "Use analyze_problem_complexity to decide if this calculus problem needs CoD or CoT."

Troubleshooting Chain of Draft Prompt Tool

Server fails to start with 'ModuleNotFoundError'

Ensure you activated your virtual environment and ran 'pip install -r requirements.txt' inside the cloned repo directory. If using a venv, activate it before starting the server and reference the venv python in your MCP config command.

API key errors or 'provider not configured' messages

Verify that MCP_LLM_PROVIDER matches exactly one of: anthropic, openai, mistral, ollama, or custom. Each provider requires its corresponding key variable (ANTHROPIC_API_KEY, OPENAI_API_KEY, MISTRAL_API_KEY). For custom endpoints also set MCP_CUSTOM_LLM_ENDPOINT.

Token savings are lower than expected

CoD savings are highest on multi-step reasoning tasks (math, logic, code). On short factual questions or creative tasks, the overhead of the CoD scaffold can match or exceed the savings. Use analyze_problem_complexity first to check whether CoD is the right mode for a given task.

Frequently Asked Questions about Chain of Draft Prompt Tool

What is Chain of Draft Prompt Tool?

Chain of Draft Prompt Tool is a Model Context Protocol (MCP) server that transforms prompts into chain of draft (cod) or chain of thought (cot) format to enhance llm reasoning quality while reducing token usage by up to 92.4%, supporting multiple llm providers including claude, gpt, ollama, and local models. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Chain of Draft Prompt Tool?

Install via npm with the command: npx -y chain-of-draft-prompt-tool. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with Chain of Draft Prompt Tool?

Chain of Draft Prompt Tool works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Chain of Draft Prompt Tool free to use?

Yes, Chain of Draft Prompt Tool is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Developer Tools MCP Servers

Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "chain-of-draft-prompt-tool": { "command": "npx", "args": ["-y", "chain-of-draft-prompt-tool"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Chain of Draft Prompt Tool?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides