A lightweight server that adds a single `get_joke` tool to your Claude workflow, returning random programming jokes in JSON format. Built in Node.js with stdio transport, it's the kind of thing you'd drop into a dev environment when you want to inject a little levity into automated workflows or test integrations without touching production APIs. The entire setup is straightforward: install from npm as `@hamzaamin221/get-joke-mcp`, run it, and call the tool. No configuration, no external dependencies, no rate limits. Useful for demos, testing MCP tooling, or just breaking up long coding sessions with dad jokes about why programmers prefer dark mode.
Minimal Model Context Protocol (MCP) server (Node.js) that exposes one tool: get_joke.
npm install
node index.js
Or:
npm start
This repo includes a tiny SDK-based client that spawns the server over stdio, lists tools, and calls get_joke:
npm run test:mcp
The get_joke tool returns JSON like:
{
"joke": "Why do programmers prefer dark mode? Because light attracts bugs."
}
The official MCP Registry stores metadata only, so you must publish the package to npm first.
npm adduser
npm publish --access public
brew install mcp-publisher
mcp-publisher login github
mcp-publisher publish
Notes:
package.json includes mcpName and server.json uses the same name (required for verification).package.json and server.json (and republish to npm).