Scratchpad MCP Server

Scratchpad MCP Server

Provides a 'think' tool that allows Claude and other LLMs to add dedicated thinking steps during complex tool use scenarios, creating space for structured reasoning and improving problem-solving capabilities.

Category
Visit Server

README

MCP Scratchpad Server

An MCP (Model Context Protocol) server that provides a "think" tool for structured reasoning, based on the Anthropic blog post.

Overview

The Scratchpad MCP server allows Claude and other LLMs to add dedicated thinking steps during complex tool use scenarios. This improves problem-solving by creating space for structured reasoning and helps the model carefully process tool call outputs.

Features

  • Think Tool: Add thoughts to a timestamped log for structured reasoning
  • Thoughts Log Resource: View all logged thoughts in JSON format
  • Clear Tool: Reset the thinking log when needed
  • Structured Thinking Prompt: Template for systematic problem-solving

Installation

Prerequisites

  • Python 3.11 or higher
  • uv package manager (recommended)

Setup

  1. Clone or download this repository
  2. Install dependencies:
    uv add "mcp[cli]"
    

Usage

Testing with MCP Inspector

Run the server in development mode:

uv run mcp dev scratchpad_server.py

This opens the MCP Inspector where you can:

  • Test the think tool
  • View the thoughts log resource
  • Clear the log
  • Try the structured thinking prompt

Installing in Claude Desktop

Install the server for use with Claude:

uv run mcp install scratchpad_server.py --name "Scratchpad"

Tools

think

Add a thinking step to the log.

Parameters:

  • thought (string): The thought to log

Example:

{
  "thought": "I need to break this problem into smaller parts..."
}

clear_thoughts

Clear all thoughts from the log.

No parameters required

Resources

log://thoughts

Returns all logged thoughts as a JSON array with timestamps.

Example output:

[
  {
    "timestamp": "2024-01-20T10:30:45.123456",
    "thought": "First, I need to understand the requirements..."
  },
  {
    "timestamp": "2024-01-20T10:31:02.789012",
    "thought": "The main components are X, Y, and Z..."
  }
]

Prompts

Structured Thinking

A template for systematic problem-solving using the think tool.

Parameters:

  • topic (string): The topic or problem to think through

Use Cases

The scratchpad tool is particularly useful for:

  1. Long chains of tool calls: Keep track of intermediate results and reasoning
  2. Complex problem-solving: Break down problems systematically
  3. Policy-heavy environments: Verify compliance with guidelines
  4. Sequential decision making: Document the reasoning process
  5. Edge case handling: Think through unusual scenarios

Example Workflow

  1. Start with a complex problem
  2. Use the "Structured Thinking" prompt to set up the approach
  3. Use the think tool multiple times to log reasoning steps
  4. Check progress with the log://thoughts resource
  5. Clear the log when starting a new problem

Best Practices

  • Use descriptive thoughts that explain the "why" not just the "what"
  • Break complex problems into smaller, manageable parts
  • Validate reasoning at each step
  • Summarize conclusions at the end
  • Clear the log between unrelated tasks

Development

To modify the server:

  1. Edit scratchpad_server.py
  2. Test changes with uv run mcp dev scratchpad_server.py
  3. Reinstall in Claude Desktop if needed

Future Enhancements

Potential improvements:

  • Persist thoughts to a file
  • Add search/filter capabilities
  • Support for thought categories or tags
  • Export thoughts in different formats
  • Integration with other reasoning tools

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured