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
访问服务器

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选