Chain of Draft Prompt Tool
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.
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
Maintainer
Works with
Installation
NPM
npx -y chain-of-draft-prompt-toolManual Installation
npx -y chain-of-draft-prompt-toolConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
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
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.txtSet 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.2Start 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.pyAdd 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.
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.
Chain of Draft Prompt Tool Alternatives — Similar Developer Tools Servers
Looking for alternatives to Chain of Draft Prompt Tool? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
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.
Set Up Chain of Draft Prompt Tool in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
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.