get_comic

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

Fetch a specific XKCD comic by its number (e.g., 353 for ‘Python’). Returns title, image URL, alt text, publication date, transcript, and permalink.

Parameters

NameTypeRequiredDescription
numbernumberyesThe XKCD comic number (e.g. 1, 353, 2867).

Example call

Arguments

{
  "number": 353
}

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":"get_comic","arguments":{"number":353}}}'

TypeScript (@pipeworx/sdk)

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

const result = await pipeworx.call('get_comic', {
  "number": 353
});

More examples

{
  "number": 1
}

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 July 21, 2026