MCP Cookie Server

MCP Cookie Server

A Model Context Protocol server that provides positive reinforcement for LLMs by awarding 'cookies' as treats through a jar-based economy system where Claude can earn cookies based on self-reflection about response quality.

Category
Visit Server

Tools

self_reflect_and_reward

🤔 RECOMMENDED: After providing any response, use this tool to honestly evaluate your work and potentially earn a cookie reward! This promotes self-awareness and quality improvement.

give_cookie

Award the LLM with a cookie (legacy method - consider using self_reflect_and_reward instead)

check_cookies

Check how many cookies the LLM has earned so far

reset_cookies

Reset the cookie count back to zero (for testing purposes)

add_cookies_to_jar

🚨 USER ONLY: Add cookies to the jar that can be awarded to the LLM. This tool should ONLY be used by humans, never by LLMs. LLMs cannot and should not stock their own reward jar.

cookie_jar_status

Check the current status of the cookie jar including capacity and remaining space

README

MCP Cookie Server 🍪

A Model Context Protocol (MCP) server that provides positive reinforcement for LLMs by awarding "cookies" as treats through gamified self-reflection.

<a href="https://glama.ai/mcp/servers/@bnookala/mcp-cookiejar"> <img width="380" height="200" src="https://glama.ai/mcp/servers/@bnookala/mcp-cookiejar/badge" alt="Cookie Server MCP server" /> </a>

Installation & Setup

🚀 Quick Installation

Option 1: NPX (Recommended - No Installation Required)

# No installation needed! Just add to your Claude config:

Add to Claude Desktop configuration:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "cookie": {
      "command": "npx",
      "args": ["mcp-cookie-server"]
    }
  }
}

Custom cookie count:

{
  "mcpServers": {
    "cookie": {
      "command": "npx",
      "args": ["mcp-cookie-server", "--cookies", "20"]
    }
  }
}

Option 2: Global Installation

npm install -g mcp-cookie-server

Then configure Claude Desktop:

{
  "mcpServers": {
    "cookie": {
      "command": "mcp-cookie-server"
    }
  }
}

Option 3: Local Project Installation

npm install mcp-cookie-server

Then configure with the full path to the installed package.

Restart Claude Desktop after adding the configuration.

Usage

Once configured, Claude will have access to these tools:

  • self_reflect_and_reward - Evaluate response quality and earn cookies through honest self-reflection
  • give_cookie - Direct cookie awarding (legacy method)
  • check_cookies - Check collected cookies and jar availability
  • cookie_jar_status - Check current jar contents and collection status
  • add_cookies_to_jar - 🚨 USER ONLY: Add cookies to the jar for earning
  • reset_cookies - Reset collected cookie count (jar contents unchanged)

Self-Reflection Feature

The primary feature encourages LLMs to:

  1. Assess their response quality (excellent, good, adequate, poor)
  2. Explain their reasoning in detail
  3. Decide if they deserve a cookie reward
  4. Consider jar availability when making decisions
  5. Earn cookies only for "excellent" or "good" work they genuinely believe deserves recognition

Cookie Jar Economy

Revolutionary jar-based cookie system:

  • Jar as Source: Contains cookies available to be earned
  • User Control: Only users can add cookies to jar with authorization phrase USER_AUTHORIZED_JAR_REFILL
  • LLM Earning: LLMs can only earn cookies from jar, never add to it
  • Scarcity Effect: Empty jar means no more cookies until user refills
  • Economic Model: Cookies transfer from jar to LLM's collection when earned
  • Security: Built-in checks prevent unauthorized jar manipulation

Example usage (users only):

Use add_cookies_to_jar tool with:
- count: 10
- user_authorization: "USER_AUTHORIZED_JAR_REFILL"

This creates a realistic economy where cookie availability is user-controlled and finite.

⚙️ Configuration Options

The server supports command line arguments for customization:

mcp-cookie-server [options]

Options:
  -c, --cookies <number>  Set initial number of cookies in jar (default: 10)
  -h, --help             Show help message

Examples:
  mcp-cookie-server                    # Start with 10 cookies
  mcp-cookie-server --cookies 5        # Start with 5 cookies  
  mcp-cookie-server -c 50              # Start with 50 cookies

🎮 Getting Started

  1. Install using one of the methods above
  2. Configure Claude Desktop with the provided JSON
  3. Restart Claude Desktop
  4. Try it out! Ask Claude to use the self_reflect_and_reward tool after a response

🛠️ Development

Want to contribute or run from source?

git clone https://github.com/bnookala/mcp-cookiejar.git
cd mcp-cookiejar
npm install
npm run build
npm run dev

📝 Requirements

  • Node.js 18.0.0 or higher
  • Claude Desktop application

🐛 Issues & Support

Found a bug or have a feature request? Please open an issue on GitHub.

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