πŸͺ cookie-jar-mcp Β· live at /api/mcp

MCP, explained like
you are five

An AI is very smart and very stuck. It can think, but it can't touch anything. MCP is the standard way to hand it a toy box and say: here, use these.

The one idea behind all of it

🧠

The AI is a brain in a jar

It knows a lot. It has no hands. It cannot see your files, hit your database, or roll a real die.

🧰

Your server has the hands

Your code can do all of that. It just has no idea what the human wants.

πŸ”Œ

MCP is the plug

One agreed shape of message, so any AI can use any server. Write it once. It works everywhere.

Before MCP, every AI app needed custom glue for every service. Ten AIs times ten services meant a hundred glue jobs. MCP turns that into ten plus ten. It is USB-C for AI: one shape of plug, and everything fits.

What actually happens, in six steps

There is no magic anywhere in here. It is six ordinary HTTP messages.

1

The AI knocks

Claude opens the conversation with a message called initialize. It's a handshake: β€œhi, I'm a client, which version of MCP do you speak?”

2

The AI reads the list

Next it sends tools/list. Your server answers with the name, description, and required inputs of every tool. Claude now knows exactly what you can do.

3

You ask for something

You type β€œroll me three d20s.” Claude reads your sentence, looks at the list, and notices roll_dice fits.

4

The AI points at a toy

Claude sends tools/call with the tool name and the arguments it filled in: { sides: 20, times: 3 }.

5

Your code runs

Your JavaScript function runs on your server, on your machine, with your data. Claude never sees the inside β€” only the answer.

6

The answer comes home

Your function returns text. Claude reads it and writes a normal human sentence back to you. Done.

Try it yourself, right now

These buttons talk to the real MCP server running at /api/mcp. You are looking at the exact messages Claude sends. That's the whole protocol β€” no hidden parts.

The simplest tool that can exist. One input, one sentence back.

Three things a server can offer

Almost everyone only ever builds tools. The other two are worth knowing because they answer a question tools can't: who gets to decide?

πŸ”§

Tools

the AI decides

Verbs. Things to DO. Roll dice, send an email, query a database. The AI picks these on its own when your description convinces it.

πŸ“„

Resources

the app decides

Nouns. Things to READ. A file, a config, a live status. They have an address (cookiejar://status) instead of arguments.

πŸ’¬

Prompts

the human decides

Saved fill-in-the-blank instructions. In Claude Desktop these appear in the β€œ+” menu. You pick them on purpose; the AI never picks them for you.

Plug this into Claude

Claude Code, one line in your terminal. Replace the URL with wherever this page is running.

claude mcp add --transport http cookie-jar https://learn-mcp-5-year-old.vercel.app/api/mcp

Then just say β€œroll me three twenty-sided dice” and watch Claude reach into the jar.