MCP Chain of Draft Prompt

v1.0.0Developer Toolsstable

MCP prompt tool applying Chain-of-Draft (CoD) reasoning - BYOLLM

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

What is MCP Chain of Draft Prompt?

MCP Chain of Draft Prompt is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to mcp prompt tool applying chain-of-draft (cod) reasoning - byollm

MCP prompt tool applying Chain-of-Draft (CoD) reasoning - BYOLLM

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

Features

  • MCP prompt tool applying Chain-of-Draft (CoD) reasoning - BY

Use Cases

Chain-of-Draft reasoning for MCP
Prompt optimization with CoD
brendancopley

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedApr 30, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx mcp-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 MCP Chain of Draft Prompt

The MCP Chain of Draft Prompt Tool is a Python-based MCP server that applies Chain-of-Draft (CoD) reasoning to any prompt before forwarding it to a language model of your choosing — a BYOLLM (Bring Your Own LLM) design that keeps you in control of which backend handles the actual inference. CoD reformats reasoning into concise draft steps that preserve accuracy while using far fewer tokens than traditional Chain-of-Thought prompting, delivering comparable results for math, logic, code, and scientific reasoning at a fraction of the cost. It supports Anthropic Claude, OpenAI GPT, Mistral, Ollama, and any OpenAI-compatible custom endpoint.

Prerequisites

  • Python 3.10 or later
  • At least one LLM provider configured: ANTHROPIC_API_KEY, OPENAI_API_KEY, MISTRAL_API_KEY, or a running Ollama instance
  • An MCP-compatible client such as Claude Desktop or Cursor
  • pip for installing Python dependencies from the requirements.txt
1

Clone the repository and install Python dependencies

Clone the mcp-chain-of-draft-prompt-tool repository and install its requirements.

git clone https://github.com/brendancopley/mcp-chain-of-draft-prompt-tool.git
cd mcp-chain-of-draft-prompt-tool
python3 -m venv venv && source venv/bin/activate
pip install -r requirements.txt
2

Configure your LLM provider

Set the MCP_LLM_PROVIDER variable to select your backend and export the matching API key. For local models via Ollama, set MCP_OLLAMA_MODEL to the model name.

export MCP_LLM_PROVIDER=anthropic
export ANTHROPIC_API_KEY=sk-ant-YOUR_KEY
# Or for Ollama:
# export MCP_LLM_PROVIDER=ollama
# export MCP_OLLAMA_MODEL=llama3.2
# Or for custom endpoint:
# export MCP_LLM_PROVIDER=custom
# export MCP_CUSTOM_LLM_ENDPOINT=http://localhost:8080/v1
3

Start the MCP server

Launch the Python MCP server. It listens for incoming tool calls and wraps each prompt with the CoD transformation before routing to the configured LLM.

python server.py
4

Register the server in your MCP client configuration

Add the server to claude_desktop_config.json so your MCP client can discover and invoke its tools.

5

Restart your MCP client and test a reasoning task

Restart Claude Desktop and ask it to use chain_of_draft_solve on a math or logic problem. Compare the response length and accuracy to what you would get from a direct prompt.

MCP Chain of Draft Prompt Examples

Client configuration

Claude Desktop configuration using Anthropic as the LLM backend. Adjust the python path to your virtual environment.

{
  "mcpServers": {
    "mcp-chain-of-draft": {
      "command": "/path/to/venv/bin/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

Invoke the CoD tools directly for domain-specific reasoning with minimal token overhead.

- "Use chain_of_draft_solve: What is 847 x 23 and verify by estimating the answer first."
- "Use code_solve to write a function that finds all prime numbers up to N using the Sieve of Eratosthenes."
- "Use logic_solve: If all birds have feathers and penguins are birds, do penguins have feathers?"
- "Use get_performance_stats to show how many tokens CoD saved on the last 10 queries versus standard CoT."
- "Use analyze_problem_complexity to decide if this thermodynamics problem suits CoD or CoT."

Troubleshooting MCP Chain of Draft Prompt

Server exits immediately with ImportError or ModuleNotFoundError

Activate the virtual environment before running the server: 'source venv/bin/activate'. Ensure the MCP config's command path points to the venv's python binary, not the system python. Re-run 'pip install -r requirements.txt' inside the activated venv.

LLM provider returns authentication errors

Verify that MCP_LLM_PROVIDER matches exactly one of: anthropic, openai, mistral, ollama, or custom. Each value requires its corresponding key. For 'custom', also set MCP_CUSTOM_LLM_ENDPOINT to the full base URL of the OpenAI-compatible API.

Responses don't seem any shorter than normal Chain-of-Thought

CoD compression is most effective on structured multi-step reasoning (algebra, code, formal logic). For open-ended creative or conversational prompts, the scaffold overhead may eliminate savings. Use analyze_problem_complexity to confirm CoD suitability before invoking chain_of_draft_solve.

Frequently Asked Questions about MCP Chain of Draft Prompt

What is MCP Chain of Draft Prompt?

MCP Chain of Draft Prompt is a Model Context Protocol (MCP) server that mcp prompt tool applying chain-of-draft (cod) reasoning - byollm It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP Chain of Draft Prompt?

Follow the installation instructions on the MCP Chain of Draft Prompt GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with MCP Chain of Draft Prompt?

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

Is MCP Chain of Draft Prompt free to use?

Yes, MCP Chain of Draft Prompt is open source and available under the MIT 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": { "mcp-chain-of-draft-prompt-tool": { "command": "npx", "args": ["-y", "mcp-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 MCP Chain of Draft Prompt?

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