home / mcp / dad jokes mcp server

Dad Jokes MCP Server

Provides dad jokes via MCP by querying icanhazdadjoke.com and exposing tools to fetch random jokes, search by keyword, and retrieve by ID.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "aamangeldi-dad-jokes-mcp": {
      "command": "fastmcp",
      "args": [
        "run",
        "server.py"
      ]
    }
  }
}

You run a lightweight MCP server that serves dad jokes by querying icanhazdadjoke.com. It exposes practical tools that let you fetch a random joke, search jokes by a keyword, or retrieve a specific joke by its ID, all through your MCP client.

How to use

You can use three core tools to interact with the Dad Jokes MCP Server. First, fetch a random joke to get a quick laugh. Second, search jokes by a keyword to find jokes that match a topic you’re interested in. Third, retrieve a specific joke by its ID when you already know the joke you want.

Intended interactions include combining these tools into your automation or using them directly from an MCP client to build joke-driven experiences in your apps, chats, or demonstrations.

How to install

Prerequisites you need before installing: Python 3.11 or newer, and pip.

Step-by-step commands to set up and run locally:

git clone https://github.com/aamangeldi/dad-jokes-mcp.git
cd dad-jokes-mcp

python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install fastmcp smithery httpx

fastmcp run server.py

Notes and configuration

This server requires no authentication or extra configuration. It utilizes the free icanhazdadjoke.com API by default.

Key capabilities include: random joke retrieval, keyword-based search, and direct access to a joke by its ID.

Development and deployment notes: you can run the server locally during development, or deploy to Smithery with the runtime set to Python and the FastMCP implementation.

Tools exposed by the server

get_random_joke_tool – fetches a random dad joke.

search_jokes_tool – searches jokes by a given term and returns multiple results (default 5, max 30).

get_joke_by_id_tool – retrieves a joke using its unique ID.

Available tools

get_random_joke_tool

Fetches a random dad joke from the API and exposes it through your MCP client.

search_jokes_tool

Searches for dad jokes that contain a given term and returns a list of results, with configurable limit.

get_joke_by_id_tool

Retrieves a specific joke by its unique ID so you can display or reference it precisely.

Dad Jokes MCP Server - aamangeldi/dad-jokes-mcp