{"_id":"@dennisk2025/random-trivia-quiz","name":"@dennisk2025/random-trivia-quiz","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@dennisk2025/random-trivia-quiz","version":"1.0.0","description":"Provides a random trivia question (with multiple choice answers) sourced from a public API, allowing users to test their knowledge on a variety of topics.","type":"module","main":"index.js","bin":{"random-trivia-quiz":"index.js"},"dependencies":{"@modelcontextprotocol/sdk":"latest","axios":"latest"},"author":{"name":"dennisk2025"},"license":"MIT","_id":"@dennisk2025/random-trivia-quiz@1.0.0","_nodeVersion":"22.20.0","_npmVersion":"10.9.3","dist":{"integrity":"sha512-+ofMcIeScbTCRqeLQCvzdKKiO+g0dPByCnKzeZ01biY+euSN1NBDANwAsIS4Gtbt3mHAGuZIq/9DVCp+mZyj6A==","shasum":"2c2c37f890d9b4507d5bdf0725ce0d55dd7c2bd4","tarball":"https://registry.npmjs.org/@dennisk2025/random-trivia-quiz/-/random-trivia-quiz-1.0.0.tgz","fileCount":3,"unpackedSize":10879,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHUrn+pPhE3b5hTtVTDiYUDFWPxmKvdJRX5poV7p6FyVAiEAvfWgMf38PYdrtXbB8KiJglHSbzskxQ/Olq4nBu6ykWo="}]},"_npmUser":{"name":"dennisk2025","email":"4dennisk@gmail.com"},"directories":{},"maintainers":[{"name":"dennisk2025","email":"4dennisk@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/random-trivia-quiz_1.0.0_1761425435959_0.8426163432096985"},"_hasShrinkwrap":false}},"time":{"created":"2025-10-25T20:50:35.877Z","1.0.0":"2025-10-25T20:50:36.140Z","modified":"2025-10-25T20:50:36.423Z"},"maintainers":[{"name":"dennisk2025","email":"4dennisk@gmail.com"}],"description":"Provides a random trivia question (with multiple choice answers) sourced from a public API, allowing users to test their knowledge on a variety of topics.","author":{"name":"dennisk2025"},"license":"MIT","readme":"# random-trivia-quiz\n\nProvides a random trivia question (with multiple choice answers) sourced from a public API, allowing users to test their knowledge on a variety of topics.\n\n## Features\n- Fetches random trivia questions from the OpenTDB API (https://opentdb.com)\n- Supports category selection (e.g. \"General Knowledge\", \"Science: Computers\", \"Entertainment: Video Games\", etc.)\n- Supports difficulty selection (easy, medium, hard) and question type (multiple choice or true/false)\n- Returns possible answers and the correct answer for quiz applications\n\n## Installation\nYou can run this MCP server instantly using npx, or install it locally:\n\n**Run instantly:**\n```\nnpx @dennisk2025/random-trivia-quiz\n```\n\n**Or install globally:**\n```\nnpm install -g @dennisk2025/random-trivia-quiz\nrandom-trivia-quiz\n```\n\n## Adding to Claude Desktop\nTo use this MCP in Claude Desktop:\n\n1. Add the following to your `claude_desktop_config.json` file at:\n   - **macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n   - **Windows:** `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"trivia\": {\n      \"command\": \"npx\",\n      \"args\": [\"@dennisk2025/random-trivia-quiz\"]\n    }\n  }\n}\n```\n\n2. Save the file and restart Claude Desktop. The trivia server will be discoverable as a tool named `get_random_trivia_question`.\n\n## Usage\n\nAfter setup, Claude will be able to call the `get_random_trivia_question` tool. You can specify parameters or call with no parameters for a completely random question.\n\n**Available tools:**\n\n### get_random_trivia_question\nFetches a random trivia question (optionally by category, difficulty, and type).\n\n#### Parameters\n- `category` (string, optional): Trivia category (e.g., \"General Knowledge\", \"Science: Computers\", \"Entertainment: Video Games\")\n- `difficulty` (string, optional): Can be \"easy\", \"medium\", or \"hard\"\n- `type` (string, optional): Either \"multiple\" (multiple choice) or \"boolean\" (true/false)\n\nNone of the parameters are required; you can supply any combination.\n\n#### Example tool call with parameters\n\n**No parameters (completely random):**\n```\n{\n  \"name\": \"get_random_trivia_question\",\n  \"arguments\": {}\n}\n```\n\n**Limit to \"Science: Computers\" and only hard multiple choice questions:**\n```\n{\n  \"name\": \"get_random_trivia_question\",\n  \"arguments\": {\n    \"category\": \"Science: Computers\",\n    \"difficulty\": \"hard\",\n    \"type\": \"multiple\"\n  }\n}\n```\n\n**Just get an easy true/false question from any category:**\n```\n{\n  \"name\": \"get_random_trivia_question\",\n  \"arguments\": {\n    \"difficulty\": \"easy\",\n    \"type\": \"boolean\"\n  }\n}\n```\n\n#### Example Response\n```\n{\n  \"category\": \"Science: Computers\",\n  \"type\": \"multiple\",\n  \"difficulty\": \"hard\",\n  \"question\": \"What was the computer virus that contained the text 'I'm the creeper, catch me if you can!'?\",\n  \"possible_answers\": [\n    \"ELK Cloner\",\n    \"Creeper\",\n    \"ILOVEYOU\",\n    \"Sasser Worm\"\n  ],\n  \"correct_answer\": \"Creeper\"\n}\n```\n\n## Supported Categories\nA list of available categories is maintained by the OpenTDB API. Some example values:\n- General Knowledge\n- Entertainment: Television\n- Entertainment: Video Games\n- Science: Computers\n- Science: Mathematics\n- History\n- Geography\n\nIf you supply an unknown category, the tool will return an error with a helpful message.\n\n## Troubleshooting\n- If you get an \"Unknown trivia category\" error, check for typos or use a simpler category name (e.g. \"Computers\", \"History\")\n- This tool requires a working internet connection to fetch questions.\n\n## License\nMIT (see package.json)\n","readmeFilename":"README.md","_rev":"1-814060f398c02e127f11fcb35bf4e000"}