MCP Riddle Game Server
Provides tools to fetch random or categorized riddles, verify answers, and view riddle statistics. It supports communication via HTTP and SSE for seamless integration with AI agents.
README
MCP Riddle Game Server
一个基于 Starlette 的 MCP 猜谜游戏服务,支持 HTTP POST 和 SSE 两种通信方式。
功能
- 提供 4 个 MCP 工具:
get_riddle_random:获取谜语(random/sequential/category)get_riddle_answer:校验答案list_categories:列出分类get_riddle_count:谜语统计
- 支持从
riddles.json加载数据 - 可通过环境变量
RIDDLES_JSON覆盖谜语库
项目结构
mcp-riddle/
├── server_sse.py
├── riddles.json
├── requirements.txt
├── Dockerfile
├── DEPLOY.md
└── README.md
本地运行
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
python server_sse.py
启动后默认监听 0.0.0.0:8000。
接口
- SSE:
GET /sse - MCP 消息:
POST /messages - 健康检查:
GET /health
兼容端点(用于部分第三方 Agent):
GET /mcp(SSE 别名)POST /sse(部分平台会对同一路径发消息)POST /sse/messages(SSE 消息别名)POST /mcp(单路径兼容)
健康检查示例
curl http://127.0.0.1:8000/health
HTTP 模式调用示例
curl -X POST http://127.0.0.1:8000/messages \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'
curl -X POST http://127.0.0.1:8000/messages \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{"name":"get_riddle_random","arguments":{"mode":"sequential"}}}'
Docker
docker build -t mcp-riddle .
docker run -d --name mcp-riddle-server -p 48080:8000 --restart always mcp-riddle
curl http://127.0.0.1:48080/health
AI Agent 接入
SSE 方式
{
"mcpServers": {
"riddle-game": {
"url": "http://<server-ip>:48080/sse",
"transport": "sse"
}
}
}
如果平台只允许填一个端点路径,优先使用 /mcp。
HTTP 方式
{
"mcpServers": {
"riddle-game": {
"url": "http://<server-ip>:48080/messages",
"transport": "http"
}
}
}
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.