Cookie Jar

Cookie Jar

bnookala

A gamification system that rewards AI models with virtual cookies for self-assessment and quality responses. Designed to encourage self-reflection and positive reinforcement in AI interactions.

Provides cookie management capabilities for web automation and testing workflows, enabling storage, retrieval, and manipulation of session state and authentication cookies across different web services.

1326 views1Local (stdio)

What it does

  • Award virtual cookies as rewards for AI responses
  • Track accumulated cookie counts and jar status
  • Enable self-reflection scoring and assessment
  • Manage cookie jar capacity and allocation
  • Reset cookie counts for testing purposes

Best for

AI researchers studying self-assessment behaviorsDevelopers building gamified AI interactionsTraining scenarios requiring positive reinforcement
Zero setup with NPXGamified self-reflection systemConfigurable cookie jar capacity

About Cookie Jar

Cookie Jar is a community-built MCP server published by bnookala that provides AI assistants with tools and capabilities via the Model Context Protocol. Cookie Jar enables secure management and automation of cookies for web automation, testing, and session handling across It is categorized under ai ml. This server exposes 6 tools that AI clients can invoke during conversations and coding sessions.

How to install

You can install Cookie Jar 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

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

Tools (6)

self_reflect_and_reward

๐ŸŽฏ LEVEL UP YOUR RESPONSES! Rate your work and earn delicious cookie rewards! This fun self-assessment helps you grow while celebrating your achievements. Join the cookie earning game!

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.

MCP Cookie Server ๐Ÿช

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

Cookie Server MCP server

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.

Alternatives

Related Skills

Browse all skills