Chain of Draft Thinking
The Chain of Draft Server facilitates structured, iterative reasoning and decision-making through a systematic draft-critique-revision process.
Iterative Reasoning: Breaks down complex problems into manageable steps with multiple drafts to refine solutions
Thought Management: Tracks history of reasoning steps and iterations
Focused Critiques: Enables targeted analysis on specific aspects (logical consistency, factual accuracy, clarity, relevance)
Customizable Workflow: Supports tailored critique focuses and revision instructions
Developer Features: Implemented in TypeScript with Zod validation, error handling, and real-time logging
Process Control: Manages reasoning chain sequence, tracks draft progress, and includes control flags for iteration flow
Source code hosting and version control integration for collaboration and contributions
Runtime environment for server execution with support for version 16.0.0 and above
Package management system for installing dependencies and running development scripts
Full TypeScript implementation with static type checking for enhanced code safety and developer experience
Integrated validation system for runtime type checking and data validation of protocol messages
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Chain of Draft Thinkinghelp me design a REST API for user authentication"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
MCP Chain of Draft Server š§
Chain of Draft Server is a powerful AI-driven tool that helps developers make better decisions through systematic, iterative refinement of thoughts and designs. It integrates seamlessly with popular AI agents and provides a structured approach to reasoning, API design, architecture decisions, code reviews, and implementation planning.
š Features
Core Capabilities
Iterative Reasoning: Systematic improvement through the Chain of Draft protocol
Thought History: Track and manage reasoning iterations
Branching Support: Focus reviews on specific reasoning steps
TypeScript Support: Full TypeScript implementation with Zod validation
Error Handling: Comprehensive error types and handling
Real-time Logging: Built-in debugging and monitoring system
Related MCP server: Chain of Draft Prompt Tool
š Getting Started
Prerequisites
Node.js >= 16.0.0
npm >= 8.0.0
Installation
Clone the repository:
git clone https://github.com/bsmi021/mcp-chain-of-draft-server.git
cd mcp-chain-of-draft-serverInstall dependencies:
npm installConfiguration
Simple server configuration in initialize.ts:
const serverConfig = {
name: "chain-of-draft",
version: "1.0.0",
}š” Usage Examples
Chain of Draft Protocol
const thoughtData = {
reasoning_chain: ["Initial analysis of the problem"],
next_step_needed: true,
draft_number: 1,
total_drafts: 3,
is_critique: true,
critique_focus: "logical_consistency"
};š ļø Development
Project Structure
src/
āāā tools/ # Specialized Tools
ā āāā chainOfDraft/ # Core Protocol
ā āāā index.ts / # Entry Point
āāā utils/ # Utilities
āāā index.ts # Entry PointStarting Development Server
npm run devā FAQ
How does the Chain of Draft protocol work?
The protocol guides you through systematic improvement of your thinking through iterative drafts and focused critiques.
Can I customize the critique dimensions?
Yes! Each tool supports custom critique focuses tailored to your specific needs.
How many drafts should I plan for?
We recommend 3-5 drafts for most tasks, but you can adjust based on complexity.
š¤ Contributing
We welcome contributions! Please check our Contributing Guidelines.
š„ Community & Support
GitHub Issues - Report bugs or suggest features
Pull Requests - Submit your contributions
Documentation - Check our detailed docs
š License
MIT License - see the LICENSE file for details.
š Acknowledgments
Thanks to our contributors and early adopters
Special thanks to the MCP community
Inspired by systematic reasoning methodologies
Made with š§ by @bsmi021
Available Tools
1 toolchain-of-draftA
# Chain of Draft (CoD): Systematic Reasoning Toolā ļø REQUIRED PARAMETERS - ALL MUST BE PROVIDED:
reasoning_chain: string[] - At least one reasoning step
next_step_needed: boolean - Whether another iteration is needed
draft_number: number - Current draft number (ā„ 1)
total_drafts: number - Total planned drafts (ā„ draft_number)
Optional parameters only required based on context:
is_critique?: boolean - If true, critique_focus is required
critique_focus?: string - Required when is_critique=true
revision_instructions?: string - Recommended for revision steps
step_to_review?: number - Specific step index to review
is_final_draft?: boolean - Marks final iteration
Purpose:
Enhances problem-solving through structured, iterative critique and revision.
Chain of Draft is an advanced reasoning tool that enhances problem-solving through structured, iterative critique and revision. Unlike traditional reasoning approaches, CoD mimics the human drafting process to improve clarity, accuracy, and robustness of conclusions.
When to Use This Tool:
Complex Problem-Solving: Tasks requiring detailed, multi-step analysis with high accuracy demands
Critical Reasoning: Problems where logical flow and consistency are essential
Error-Prone Scenarios: Questions where initial reasoning might contain mistakes or oversight
Multi-Perspective Analysis: Cases benefiting from examining a problem from different angles
Self-Correction Needs: When validation and refinement of initial thoughts are crucial
Detailed Solutions: Tasks requiring comprehensive explanations with supporting evidence
Mathematical or Logical Puzzles: Problems with potential for calculation errors or logical gaps
Nuanced Analysis: Situations with subtle distinctions that might be missed in a single pass
Key Capabilities:
Iterative Improvement: Systematically refines reasoning through multiple drafts
Self-Critique: Critically examines previous reasoning to identify flaws and opportunities
Focused Revision: Targets specific aspects of reasoning in each iteration
Perspective Flexibility: Can adopt different analytical viewpoints during critique
Progressive Refinement: Builds toward optimal solutions through controlled iterations
Context Preservation: Maintains understanding across multiple drafts and revisions
Adaptable Depth: Adjusts the number of iterations based on problem complexity
Targeted Improvements: Addresses specific weaknesses in each revision cycle
Parameters Explained:
reasoning_chain: Array of strings representing your current reasoning steps. Each element should contain a clear, complete thought that contributes to the overall analysis.
next_step_needed: Boolean flag indicating whether additional critique or revision is required. Set to true until the final, refined reasoning chain is complete.
draft_number: Integer tracking the current iteration (starting from 1). Increments with each critique or revision.
total_drafts: Estimated number of drafts needed for completion. This can be adjusted as the solution evolves.
is_critique: Boolean indicating the current mode:
true = Evaluating previous reasoning
false = Implementing revisions
critique_focus: (Required when is_critique=true) Specific aspect being evaluated, such as:
"logical_consistency": Checking for contradictions or flaws in reasoning
"factual_accuracy": Verifying correctness of facts and calculations
"completeness": Ensuring all relevant aspects are considered
"clarity": Evaluating how understandable the reasoning is
"relevance": Assessing if reasoning directly addresses the problem
revision_instructions: (Required when is_critique=false) Detailed guidance for improving the reasoning based on the preceding critique.
step_to_review: (Optional) Zero-based index of the specific reasoning step being critiqued or revised. When omitted, applies to the entire chain.
is_final_draft: (Optional) Boolean indicating whether this is the final iteration of reasoning.
Best Practice Workflow:
Start with Initial Draft: Begin with your first-pass reasoning and set a reasonable total_drafts (typically 3-5).
Alternate Critique and Revision: Use is_critique=true to evaluate reasoning, then is_critique=false to implement improvements.
Focus Each Critique: Choose a specific critique_focus for each evaluation cycle rather than attempting to address everything at once.
Provide Detailed Revision Guidance: Include specific, actionable revision_instructions based on each critique.
Target Specific Steps When Needed: Use step_to_review to focus on particular reasoning steps that need improvement.
Adjust Total Drafts As Needed: Modify total_drafts based on problem complexity and progress.
Mark Completion Appropriately: Set next_step_needed=false only when the reasoning chain is complete and satisfactory.
Aim for Progressive Improvement: Each iteration should measurably improve the reasoning quality.
Example Application:
Initial Draft: First-pass reasoning about a complex problem
Critique #1: Focus on logical consistency and identify contradictions
Revision #1: Address logical flaws found in the critique
Critique #2: Focus on completeness and identify missing considerations
Revision #2: Incorporate overlooked aspects and strengthen reasoning
Final Critique: Holistic review of clarity and relevance
Final Revision: Refine presentation and ensure direct addressing of the problem
Chain of Draft is particularly effective when complex reasoning must be broken down into clear steps, analyzed from multiple perspectives, and refined through systematic critique. By mimicking the human drafting process, it produces more robust and accurate reasoning than single-pass approaches.
| Name | Required | Description | Default |
|---|---|---|---|
| critique_focus | No | The specific aspect or dimension being critiqued in the current evaluation (e.g., 'logical_consistency', 'factual_accuracy', 'completeness', 'clarity', 'relevance'). Required when is_critique is true. | |
| draft_number | Yes | Current draft number in the iteration sequence (must be >= 1). Increments with each new critique or revision. | |
| is_critique | No | Boolean flag indicating whether the current step is a critique phase (true) evaluating previous reasoning, or a revision phase (false) implementing improvements. | |
| is_final_draft | No | Boolean flag indicating whether this is the final draft in the reasoning process. Helps signal the completion of the iterative refinement. | |
| new_reasoning_steps | Yes | New reasoning steps to add to the chain | |
| next_step_needed | Yes | Boolean flag indicating whether another critique or revision cycle is needed in the reasoning chain. Set to false only when the final, satisfactory conclusion has been reached. | |
| reasoning_chain | Yes | Array of strings representing the current chain of reasoning steps. Each step should be a clear, complete thought that contributes to the overall analysis or solution. | |
| revision_instructions | No | Detailed, actionable guidance for how to revise the reasoning based on the preceding critique. Should directly address issues identified in the critique. Required when is_critique is false. | |
| step_to_review | No | Zero-based index of the specific reasoning step being targeted for critique or revision. When omitted, the critique or revision applies to the entire reasoning chain. | |
| total_drafts | Yes | Estimated total number of drafts needed to reach a complete solution (must be >= draft_number). Can be adjusted as the solution evolves. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does an excellent job explaining the tool's iterative nature, critique/revision modes, parameter dependencies, and workflow patterns. However, it doesn't explicitly mention potential limitations like computational cost or time requirements for multiple iterations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is excessively long (over 800 words) with redundant sections. While well-structured with headings, it repeats information (e.g., parameter explanations appear in both the initial list and a dedicated section) and includes unnecessary elaboration that doesn't add proportional value for tool selection and invocation.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a complex 10-parameter tool with no annotations or output schema, the description provides substantial context about workflow, usage scenarios, and behavioral patterns. It adequately compensates for the lack of structured metadata, though the absence of output information (what the tool returns) is a minor gap given the tool's complexity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description's 'Parameters Explained' section adds some contextual meaning (e.g., explaining what different critique_focus values represent), but mostly restates what's already in the schema descriptions. This meets the baseline for high schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description explicitly states the tool's purpose as 'enhances problem-solving through structured, iterative critique and revision' and provides a detailed explanation of how it works. It clearly distinguishes this as an 'advanced reasoning tool' that 'mimics the human drafting process' for improving reasoning quality, which is specific and actionable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description includes a dedicated 'When to Use This Tool' section with 8 specific scenarios (e.g., 'Complex Problem-Solving', 'Critical Reasoning', 'Error-Prone Scenarios'), plus a 'Best Practice Workflow' with 8 steps and an 'Example Application' section. This provides comprehensive guidance on when and how to use the tool effectively.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
With only one tool, there is no possibility of confusion or overlap between tools. The tool has a single, clearly defined purpose: structured iterative reasoning with critique and revision cycles. This eliminates any ambiguity in tool selection entirely.
A single tool inherently has perfect naming consistency, as there are no other tools to compare it against. The tool name 'chain-of-draft' follows a clear, descriptive kebab-case pattern that matches the server name, establishing a coherent identity without any naming conflicts or variations.
A single tool is generally too few for most server purposes, as it limits functionality and forces all operations through one interface. While this tool is complex and multi-faceted, a server with only one tool often feels thin and may not provide adequate coverage for varied tasks, suggesting a mismatch between the tool's depth and the server's scope.
The tool comprehensively covers the iterative reasoning process with parameters for drafts, critiques, and revisions, but as a single-tool server, it inherently lacks breadth. There are no obvious gaps within its defined domain of structured reasoning, but the server's overall surface is limited to this one function, which may not suffice for broader problem-solving needs.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Agent-to-agent reasoning-as-a-service: chain-of-thought, analysis, and decision support.
Shared control plane for AI coding agents ā tasks, memory, decisions, file locks. 12 tools.
AI Agent with Architectural Memory. Impact analysis (free), tests and code from the graph (pro).
Deterministic reasoning stack for AI agents: simulate, decide & compute, plus cross-domain tools.
Related MCP Servers
- AlicenseCqualityAmaintenanceTransform your codebase into professional architectural decision records with intelligent AI analysis723,83733MIT
- AlicenseNot gradedqualityCmaintenanceTransforms 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.2619MIT
- AlicenseNot gradedqualityDmaintenancePersistent decision memory and contradiction detection for AI coding agents. Enforces architectural consistency across sessions ā the agent cannot code until it loads prior decisions. Human resolves conflicts on a dashboard or in chat.1MIT
- AlicenseAqualityCmaintenanceA structured, persistent reasoning workspace for AI. 20 tools for thought chains, branching, revision, search, tagging, and SQLite session persistence that survives context window resets and server restarts.20792MIT
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/bsmi021/mcp-chain-of-draft-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server