MCP Cookie Server
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.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@MCP Cookie Server self-reflect on my last response and award a cookie if deserved"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: MCP Think Tool Server
๐ 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-serverThen configure Claude Desktop:
{
"mcpServers": {
"cookie": {
"command": "mcp-cookie-server"
}
}
}Option 3: Local Project Installation
npm install mcp-cookie-serverThen 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_REFILLLLM 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
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_rewardtool 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.
Available Tools
6 toolsadd_cookies_to_jarA
๐จ 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.
Inputs: count (required), user_authorization (required).
check_cookiesB
Check how many cookies the LLM has earned so far
Inputs: no named parameters.
cookie_jar_statusB
Check the current status of the cookie jar including capacity and remaining space
Inputs: no named parameters.
give_cookieA
Award the LLM with a cookie (legacy method - consider using self_reflect_and_reward instead)
Inputs: message.
reset_cookiesA
Reset the cookie count back to zero (for testing purposes)
Inputs: no named parameters.
self_reflect_and_rewardC
๐ฏ 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!
Inputs: response_quality (required), reasoning (required), deserves_cookie (required), what_made_it_special.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogโฆ
TDQS
Scored across 6 tools
The tools have overlapping purposes that could cause confusion. 'check_cookies' and 'cookie_jar_status' both provide cookie-related status information, and 'give_cookie' and 'self_reflect_and_reward' both involve awarding cookies. However, the descriptions help clarify some distinctions, such as 'self_reflect_and_reward' being a more advanced method.
The naming conventions are mixed. Most tools use snake_case (e.g., 'add_cookies_to_jar', 'check_cookies'), but there is inconsistency in verb usage, such as 'give_cookie' using 'give' while others use 'add', 'check', or 'reset'. The naming is readable but lacks a uniform pattern.
With 6 tools, the count is well-scoped for a cookie management server. Each tool appears to serve a distinct purpose in the domain, such as adding, checking, awarding, and resetting cookies, making the number appropriate and manageable.
The tool set covers core operations for cookie management, including adding, checking, awarding, and resetting cookies. A minor gap exists in update or delete operations for specific cookies, but agents can likely work around this given the server's focus on reward tracking rather than detailed cookie manipulation.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoโฆ
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
FixMyPrompt is a remote MCP server for coding agents. It saves the steps your agent worked out as project memories and fetches them in later sessions, scores and rewrites prompts, and checks CLAUDE.md and AGENTS.md files. Works with Claude Code, Codex and Cursor. Free plan available.
Hosted X Ads MCP server for Claude, ChatGPT and Cursor, with each action switched per account.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables Claude to manage software development projects with complete context awareness and code execution through Docker environments.17 npm4-
- AlicenseAqualityDmaintenanceA Model Context Protocol server that provides Claude with a dedicated space for structured thinking during complex problem-solving tasks, helping improve its reasoning capabilities.165 npm16MIT
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides AI assistants like Claude with a dedicated space for structured thinking during complex problem-solving tasks.MIT
- AlicenseNot gradedqualityDmaintenanceAn enhanced Model Context Protocol server that enables Claude to seamlessly collaborate with multiple AI models (Gemini, OpenAI, local models) for code analysis and development tasks, maintaining context across conversations.40 npm54Apache 2.0