Chain of Draft

Chain of Draft

bsmi021

Enables structured, iterative reasoning through a chain of drafts protocol. Helps developers systematically refine thoughts, designs, and decisions through focused critiques and revisions.

Enables iterative reasoning through structured drafts with explicit reasoning chains, allowing for focused critiques and targeted revisions to improve problem-solving quality through systematic refinement.

25281 views8Local (stdio)

What it does

  • Create systematic reasoning chains through draft iterations
  • Track and manage thought history across revisions
  • Generate focused critiques on specific reasoning steps
  • Branch reasoning paths for different approaches
  • Validate drafts with TypeScript and Zod schemas

Best for

Developers making complex architecture decisionsCode review processes requiring systematic analysisAPI design iterations and refinementProblem-solving that benefits from structured thinking
Built-in branching for exploring multiple reasoning pathsFull TypeScript implementation with validation

About Chain of Draft

Chain of Draft is a community-built MCP server published by bsmi021 that provides AI assistants with tools and capabilities via the Model Context Protocol. Chain of Draft enables iterative reasoning with structured drafts and critiques for systematic problem-solving improveme It is categorized under ai ml, developer tools.

How to install

You can install Chain of Draft in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

Chain of Draft is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

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

šŸš€ Getting Started

Prerequisites

  • Node.js >= 16.0.0
  • npm >= 8.0.0

Installation

  1. Clone the repository:
git clone https://github.com/bsmi021/mcp-chain-of-draft-server.git
cd mcp-chain-of-draft-server
  1. Install dependencies:
npm install

Configuration

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 Point

Starting 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

Alternatives

Related Skills

Browse all skills
ui-design-system

UI design system toolkit for Senior UI Designer including design token generation, component documentation, responsive design calculations, and developer handoff tools. Use for creating design systems, maintaining visual consistency, and facilitating design-dev collaboration.

18
gmail-automation

Automate Gmail tasks via Rube MCP (Composio): send/reply, search, labels, drafts, attachments. Always search tools first for current schemas.

6
ai-sdk

Answer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat".

6
blockchain-developer

Build production-ready Web3 applications, smart contracts, and decentralized systems. Implements DeFi protocols, NFT platforms, DAOs, and enterprise blockchain integrations. Use PROACTIVELY for smart contracts, Web3 apps, DeFi protocols, or blockchain infrastructure.

5
api-documenter

Master API documentation with OpenAPI 3.1, AI-powered tools, and modern developer experience practices. Create interactive docs, generate SDKs, and build comprehensive developer portals. Use PROACTIVELY for API documentation or developer portal creation.

4
openai-knowledge

Use when working with the OpenAI API (Responses API) or OpenAI platform features (tools, streaming, Realtime API, auth, models, rate limits, MCP) and you need authoritative, up-to-date documentation (schemas, examples, limits, edge cases). Prefer the OpenAI Developer Documentation MCP server tools when available; otherwise guide the user to enable `openaiDeveloperDocs`.

4