Skip to main content
Glama
Sankar2316

trivia-mcp-server

by Sankar2316
README.md
# 🧠 Trivia Quiz MCP Server for Kiro

A custom MCP server that connects Kiro to the Open Trivia Database (https://opentdb.com/) — giving Kiro the ability to fetch real quiz questions, categories, and stats to build interactive quiz applications.

## šŸ”Œ What It Connects To

**Open Trivia Database (opentdb.com)** — a free, real API with 4,000+ trivia questions across 24 categories. No API key required.

## šŸ› ļø Tools

| Tool | Description |
|------|-------------|
| `get_trivia_questions` | Fetch random trivia questions by difficulty (easy/medium/hard) |
| `list_trivia_categories` | List all 24 available quiz categories |
| `get_category_stats` | Get question count stats per category |

## šŸŽÆ What I Built With It

An **interactive HTML trivia quiz app** that Kiro builds using real data from the MCP server — fetching live questions, showing multiple choice options, tracking score, and displaying results. This is only possible because of the MCP integration — without it, Kiro has no access to trivia data.

## šŸŽ„ Demo Video

[Watch Demo](https://drive.google.com/file/d/1vpYfxCJJ-q2_LqeVQlgCOc1d0xlEIHtc/view?usp=sharing)

## šŸ› ļø Setup

### Prerequisites
- Node.js 18+
- Kiro (latest version)

### Installation

git clone https://github.com/Sankar2316/trivia-mcp-server.git
cd trivia-mcp-server
npm install
npm run build

### No API Key Needed! šŸŽ‰

Open Trivia DB is completely free — no signup, no authentication.

### Configure in Kiro

The .kiro/settings/mcp.json is already included. Just open this folder in Kiro and the MCP server auto-connects.

### Test

npx @modelcontextprotocol/inspector node dist/index.js

## šŸ“ Project Structure

trivia-mcp-server/
ā”œā”€ā”€ .kiro/
│   └── settings/
│       └── mcp.json
ā”œā”€ā”€ src/
│   └── index.ts
ā”œā”€ā”€ dist/
ā”œā”€ā”€ package.json
ā”œā”€ā”€ tsconfig.json
└── README.md

## šŸ“œ License

MIT

TDQS

A3.9/5.0

Scored across 2 tools

Disambiguation5/5

The two tools have clearly distinct purposes: one retrieves random questions, the other lists categories. No ambiguity.

Naming Consistency5/5

Both tools follow a consistent verb_noun pattern: get_trivia_questions, list_trivia_categories.

Tool Count3/5

With only 2 tools, the server feels thin. While it covers basic functionality, the small number is borderline for a trivia server.

Completeness3/5

The server lacks the ability to get questions filtered by category or difficulty, making the category list standalone and less useful. Notable missing operations.

Maintenance

ActivityStale
ResponsivenessNo issues