The MCP Cookie Server provides a gamified system where LLMs earn "cookies" as positive reinforcement through self-reflection, while users manage the cookie supply.
Core Functions:
self_reflect_and_reward
: LLMs evaluate their own response quality, explain reasoning, and decide if they deserve a cookie.give_cookie
: Legacy method to directly award cookies.check_cookies
: View current earned cookie count.cookie_jar_status
: Monitor jar contents and capacity.reset_cookies
: Reset cookie count to zero for testing.
For Users:
- Configure initial cookies when starting the server.
- Refill the jar using
add_cookies_to_jar
(requires authorization phrase). - Maintain control over the cookie economy.
Key Feature: Implements a realistic finite cookie economy where cookies can only be earned from the user-controlled jar, creating a scarcity effect.
Supports configuration on macOS systems through a specific file path for Claude Desktop integration.
MCP Cookie Server 🍪
A Model Context Protocol (MCP) server that provides positive reinforcement for LLMs by awarding "cookies" as treats through gamified self-reflection.
Installation & Setup
🚀 Quick Installation
Option 1: NPX (Recommended - No Installation Required)
Add to Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
Custom cookie count:
Option 2: Global Installation
Then configure Claude Desktop:
Option 3: Local Project Installation
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-reflectiongive_cookie
- Direct cookie awarding (legacy method)check_cookies
- Check collected cookies and jar availabilitycookie_jar_status
- Check current jar contents and collection statusadd_cookies_to_jar
- 🚨 USER ONLY: Add cookies to the jar for earningreset_cookies
- Reset collected cookie count (jar contents unchanged)
Self-Reflection Feature
The primary feature encourages LLMs to:
- Assess their response quality (excellent, good, adequate, poor)
- Explain their reasoning in detail
- Decide if they deserve a cookie reward
- Consider jar availability when making decisions
- 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):
This creates a realistic economy where cookie availability is user-controlled and finite.
⚙️ Configuration Options
The server supports command line arguments for customization:
🎮 Getting Started
- Install using one of the methods above
- Configure Claude Desktop with the provided JSON
- Restart Claude Desktop
- Try it out! Ask Claude to use the
self_reflect_and_reward
tool after a response
🛠️ Development
Want to contribute or run from source?
📝 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.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
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.
Related MCP Servers
- -securityFlicense-qualityA proof-of-concept server implementing the Model Context Protocol that enables LLM applications to interact with Uber Eats functionality.Last updated -Python
- -securityFlicense-qualityA proof-of-concept Model Context Protocol server that enables LLM applications to interact with Uber Eats, allowing AI agents to browse and order food through natural language.Last updated -142Python
- -securityAlicense-qualityA Model Context Protocol server that fetches and ranks positive news articles from NewsAPI using Cohere LLM sentiment analysis, enabling users to access uplifting news stories through interfaces like Claude Desktop.Last updated -28PythonApache 2.0
- -securityAlicense-qualityA Model Context Protocol server that enables Claude and other LLMs to make HTTP requests with realistic browser fingerprinting, bypassing common anti-bot measures and interacting with websites more naturally.Last updated -3PythonMIT License