mcpField
J
jokebox

jokebox

Local
github.com/CloudCorpRecordsGames & Entertainment0Updated 1w ago

About jokebox

jokebox is a CLI and stdio MCP server for retrieving dad jokes from icanhazdadjoke.com. It supports random retrieval, keyword search, and lookup by joke ID.

Key features

  1. 01Fetch a random dad joke
  2. 02Search jokes by keyword
  3. 03Retrieve a joke by ID
  4. 04CLI and stdio MCP server

Use cases

  1. 01Get a joke at random
  2. 02Find jokes containing a phrase
  3. 03Retrieve a previously identified joke

MCP support

Exposes tools to MCP clients for random jokes, keyword search, and retrieval by joke ID.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"cloudcorprecords-jokebox": {
"command": "npx",
"args": [
"-y",
"@reneturcios/jokebox"
]
}
}
}
Run commandnpx -y @reneturcios/jokebox

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm@reneturcios/jokebox0.1.0
ocighcr.io/cloudcorprecords/jokebox:0.1.0

Tools

3

Saved tool list · updated 1w ago

This tool takes no parameters.

Details

From the project README

jokebox

jokebox serves dad jokes from icanhazdadjoke.com. Ask for a joke at random, hunt for jokes that mention a word or phrase, or pull up one specific joke again when you know its ID. One binary offers both a small command-line interface and a stdio MCP server, so the same install works in a terminal and inside an MCP client.

There is nothing to configure: the upstream service is public, needs no API key, and asks only that clients identify themselves and accept JSON answers — jokebox does both on every request.

Install

npx @reneturcios/jokebox random

Or run the container image:

docker run -i ghcr.io/cloudcorprecords/jokebox

The container defaults to the MCP server (see below). Pass CLI arguments to use it as a CLI instead.

CLI

jokebox random
jokebox search pizza
jokebox search pizza --limit 3
jokebox joke R7UfaahVfFd

jokebox --version

Every command prints JSON. random prints one joke as { "id": ..., "joke": ... }. search prints { "term": ..., "total_jokes": ..., "jokes": [...] }, where total_jokes counts every match the upstream holds for the term and jokes holds the requested page of them. joke prints the single joke stored under the given ID.

Search limits: --limit is an integer from 1 to 30 and defaults to 5. An out-of-range limit, a missing search term, or a missing joke ID is a usage error and no request is sent.

Exit codes: 0 on success, 1 when the upstream request fails (the error names the HTTP status or the malformed answer), 2 for usage errors.

MCP server

One bin serves both faces. The mcp subcommand starts a stdio MCP server:

npx -y @reneturcios/jokebox mcp

MCP client configuration:

{
  "mcpServers": {
    "jokebox": {
      "command": "npx",
      "args": ["-y", "@reneturcios/jokebox", "mcp"]
    }
  }
}
Tools
ToolInputWhat it returns
get_random_joke_tool(none)One random dad joke: its id and joke text.
search_jokes_toolterm (string, required), limit (integer, optional, default 5, max 30)Jokes containing the term: the term, the total match count, and the matching jokes.
get_joke_by_id_tooljoke_id (string, required)The single joke stored under that ID.

Development

npm install
npm run build   # tsc -> dist/
npm test        # node test runner over test/*.test.ts, no network (fake fetch only)
npm run dev     # run the CLI from source via tsx

License

MIT — see LICENSE.

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.