Cookie Jar logo

Cookie Jar

Community
bnookala

Have you ever wanted to award your LLM with a cookie? Well now you can!

Publisherbnookala
Repositorymcp-cookiejar
LanguageJavaScript
Forks
0
Stars
2
Available tools
6
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    Cookie Jar exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 6 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    2 stars and 0 forks from the linked repository.

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)

bash
# 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

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

Custom cookie count:

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

Option 2: Global Installation

bash
npm install -g mcp-cookie-server

Then configure Claude Desktop:

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

Option 3: Local Project Installation

bash
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:

bash
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?

bash
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.

Installation

TypingMind
Prerequisites:

Node.js 18+

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

Available Tools

  • 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.

  • cookie_jar_status

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

Use Cookie Jar MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once Cookie Jar is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add Cookie Jar as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the Cookie Jar MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "cookie-jar": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-cookie-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the Cookie Jar MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the Cookie Jar MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use Cookie Jar to help me with this task?
Cookie Jar
Sure. I read it.
Here is what I found using Cookie Jar.

Frequently asked questions

What is the Cookie Jar MCP server used for?

Cookie Jar is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use Cookie Jar MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use Cookie Jar with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use Cookie Jar MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With Cookie Jar connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect Cookie Jar MCP to TypingMind?

Cookie Jar runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does Cookie Jar MCP provide in TypingMind?

Cookie Jar exposes 6 MCP tools that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use Cookie Jar MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If Cookie Jar requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇