random_comic

Pack: xkcd · Endpoint: https://gateway.pipeworx.io/xkcd/mcp

Get a random XKCD comic from the full archive.

Example call

Arguments

{}

curl

curl -X POST https://gateway.pipeworx.io/xkcd/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"random_comic","arguments":{}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('random_comic', {});

Response shape

Always returns: number, title, safe_title, alt, img, date, transcript, link, url

FieldTypeDescription
numbernumberThe comic number
titlestringThe comic title
safe_titlestringThe comic title with special characters escaped
altstringAlt text for the comic image
imgstringURL to the comic image
datestringPublication date in YYYY-MM-DD format
transcriptstring | nullTranscript of the comic, or null if not available
linkstring | nullURL link related to the comic, or null if not present
urlstringURL to view the comic on xkcd.com
Full JSON Schema
{
  "type": "object",
  "properties": {
    "number": {
      "type": "number",
      "description": "The comic number"
    },
    "title": {
      "type": "string",
      "description": "The comic title"
    },
    "safe_title": {
      "type": "string",
      "description": "The comic title with special characters escaped"
    },
    "alt": {
      "type": "string",
      "description": "Alt text for the comic image"
    },
    "img": {
      "type": "string",
      "description": "URL to the comic image"
    },
    "date": {
      "type": "string",
      "description": "Publication date in YYYY-MM-DD format"
    },
    "transcript": {
      "type": [
        "string",
        "null"
      ],
      "description": "Transcript of the comic, or null if not available"
    },
    "link": {
      "type": [
        "string",
        "null"
      ],
      "description": "URL link related to the comic, or null if not present"
    },
    "url": {
      "type": "string",
      "description": "URL to view the comic on xkcd.com"
    }
  },
  "required": [
    "number",
    "title",
    "safe_title",
    "alt",
    "img",
    "date",
    "transcript",
    "link",
    "url"
  ]
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "xkcd": {
      "url": "https://gateway.pipeworx.io/xkcd/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026