Sponsored by Deepsite.site

MCP Server Template

Created By
tkc10 months ago
MCP starter kit for building AI tools with Bun runtime - specialized for interactive quizzes
Content

MCP Server Template

MCP starter kit for building AI tools with Bun runtime

Environment Requirements

  • Bun: v1.0.0 or higher
  • Node.js: v18.0.0 or higher (for some dependencies)
  • Operating System:
    • macOS 12+
    • Linux with glibc 2.31+
    • Windows 10+ (via WSL)

Features

  • Specialized quiz-focused MCP server implementation
  • Quiz tool with multiple categories and difficulty levels
  • Jest testing setup with MCP integration tests
  • Comprehensive test coverage

Installation

# Clone the repository
git clone https://github.com/username/quiz-mcp-template.git
cd quiz-mcp-template

# Install dependencies
bun install

Claude Desktop Setting

{
  "quiz": {
    "command": "<your path>/.bun/bin/bun",
    "args": ["run", "<your path>/bun-mcp-template/src/index.ts"]
  }
}

Usage

Running the Server

# Start the server
bun start

# Development mode (with auto-restart)
bun dev

Testing

# Run all tests
bun test

MCP Tools

This server provides an interactive quiz tool:

get_quiz: Provides quiz questions across different categories and difficulty levels

{
  "method": "tools/call",
  "params": {
    "name": "get_quiz",
    "arguments": {
      "category": "science",
      "difficulty": "medium"
    }
  },
  "jsonrpc": "2.0",
  "id": 1
}

Available categories:

  • general
  • science
  • history
  • geography
  • entertainment

Difficulty levels:

  • easy
  • medium
  • hard

Project Structure

quiz-mcp-template/
├── src/
│   └── index.ts       # Main Quiz MCP server implementation
├── tests/
│   └── cli-mcp.test.ts # MCP integration tests
├── package.json
├── tsconfig.json
└── README.md

Development

Extending Quiz Categories

To add new quiz categories or questions, modify the quizQuestions object in src/index.ts:

// Add new category
quizQuestions.newCategory = {
  easy: [
    { question: "Easy question 1?", answer: "Answer 1" },
    { question: "Easy question 2?", answer: "Answer 2" },
    // Add more questions...
  ],
  medium: [
    { question: "Medium question 1?", answer: "Answer 1" },
    { question: "Medium question 2?", answer: "Answer 2" },
    // Add more questions...
  ],
  hard: [
    { question: "Hard question 1?", answer: "Answer 1" },
    { question: "Hard question 2?", answer: "Answer 2" },
    // Add more questions...
  ],
};

// Don't forget to update the schema to include the new category
const QuizSchema = z.object({
  category: z
    .enum([
      "general",
      "science",
      "history",
      "geography",
      "entertainment",
      "newCategory",
    ])
    .optional()
    .describe("The category of questions to ask"),
  // ...
});

License

MIT

Acknowledgements

This project uses the Model Context Protocol (MCP) developed by Anthropic and provides an educational quiz tool for AI assistants.

Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
WindsurfThe new purpose-built IDE to harness magic
CursorThe AI Code Editor
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Amap Maps高德地图官方 MCP Server
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
DeepChatYour AI Partner on Desktop
Tavily Mcp
Serper MCP ServerA Serper MCP Server
Y GuiA web-based graphical interface for AI chat interactions with support for multiple AI models and MCP (Model Context Protocol) servers.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题; Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Playwright McpPlaywright MCP server