Skip to content

Beginner's Guide

sensor-humor is an MCP server that adds a comedy sidekick to your AI coding assistant. When connected, your LLM gains access to tools that generate jokes, roasts, heckles, and catchphrases — all in a configurable comedic voice. It runs locally using Ollama for text generation and optionally Piper TTS for spoken output.

It does not change how your LLM behaves by default. The host LLM calls sensor-humor tools only when it wants humor, gets structured JSON back, and decides whether to use it. You can stop calling the tools at any time to turn it off.

  • Developers who want lighthearted commentary during coding sessions
  • Teams looking for a shared comedic sidekick that roasts bad code patterns
  • Anyone experimenting with MCP tool integration and wants a fun, self-contained example

No comedy writing experience required. The moods and prompts handle all the creative direction.

sensor-humor has 6 moods that control the comedic voice:

MoodIn one sentence
dry (default)Flat, deadpan observations stated like devastating news
roastAffectionate burns with verdict/diagnosis labels
chaoticNormal setup followed by one absurd escalation
cheekyPlayful teasing with warm openers
cynicBitter, jaded realism — nothing surprises you
zoomerGen-Z snark with caps blocks and slang

Switch moods at any time with mood_set. All tools adopt the active mood.

Every server instance maintains an in-memory session that tracks:

  • Running gags — tagged setups that evolve as they get reused
  • Recent bits — the last 20 outputs, available for callbacks
  • Catchphrases — reusable phrases with usage counts
  • Turn counter — incremented on every tool call

The session resets when the server stops. This is intentional — comedy has a shelf life, and yesterday’s inside jokes should not persist.

There are 8 tools available:

ToolWhat it does
mood_setSwitch the active mood
mood_getCheck current mood and session stats
comic_timingRewrite boring text with comedic delivery
roastDeliver an affectionate burn with severity rating
heckleQuick one-line jab
catchphrase_generateCreate a reusable recurring bit
catchphrase_callbackRecall the most-used catchphrase
debug_statusInspect full session state and config

Before you begin, make sure you have:

  1. Node.js 18 or later — check with node --version
  2. Ollama installed and running — download from ollama.com if needed
  3. An MCP client — Claude Code, Cursor, or any MCP-compatible host
Terminal window
ollama pull qwen2.5:7b

This is the default model. It produces concise, schema-compliant comedy output. You can use a different model by setting the SENSOR_HUMOR_MODEL environment variable.

Terminal window
npm install sensor-humor

Or for development:

Terminal window
git clone https://github.com/mcp-tool-shop-org/sensor-humor.git
cd sensor-humor
npm install
npm run build
Terminal window
npm start

The server runs on stdio transport. Your MCP client connects to it as a local tool server. Add SENSOR_HUMOR_DEBUG=true before npm start to see detailed prompt and response logs.

Add sensor-humor as an MCP server in your client’s configuration. The exact steps depend on your client — consult your client’s documentation for adding local stdio MCP servers.

In your MCP client, try:

mood_set(style: "dry")
comic_timing(text: "null pointer at line 42")

You should get back a flat, deadpan rewrite of your input as structured JSON.

Set a mood, then roast whatever you are working on:

mood_set(style: "roast")
roast(target: "500-line switch statement with no default case", context: "code")

The roast comes back with a verdict label and severity rating (1-5).

Use catchphrase_generate to create a recurring bit, then catchphrase_callback to bring it back later:

catchphrase_generate(context: "deploying to production on Friday")
# ... later in the session ...
catchphrase_callback()

The callback returns the most-used catchphrase from the session.

The comic_timing tool supports specific techniques:

  • rule-of-three — two normal items, then one that breaks the pattern
  • misdirection — set up an expectation, deliver something different
  • escalation — start reasonable, get progressively more absurd
  • callback — reference earlier material from this session
  • understatement — describe something dramatic as completely mundane
  • auto — let the sidekick choose the best technique
comic_timing(text: "the build failed again", technique: "escalation")

Make sure Ollama is running. Start it with ollama serve or check that the Ollama desktop app is active. If Ollama is on a non-default host, set OLLAMA_HOST (default: http://127.0.0.1:11434).

Try switching moods. Each mood has a distinct prompt skeleton that forces the model into a different comedic shape. The chaotic and zoomer moods tend to produce the most varied output.

The model occasionally produces malformed JSON. sensor-humor retries once automatically and falls back to a safe default if both attempts fail. If this happens frequently, try a different model with stronger JSON schema adherence.

Comedy quality depends on the model. The default qwen2.5:7b was chosen for its balance of speed, instruction following, and conciseness. Larger models (13B+) may produce higher quality output at the cost of latency.