Quiz App Server
БесплатноНе проверенA Python MCP server built with FastMCP that exposes tools for a quiz app, optionally backed by a MySQL database.
Описание
A Python MCP server built with FastMCP that exposes tools for a quiz app, optionally backed by a MySQL database.
README
A Python MCP (Model Context Protocol) server built with FastMCP. Exposes tools to:
- Claude Desktop, locally, over stdio
- claude.ai, remotely, over HTTP (deployed on Render)
Optionally backed by a MySQL database via SQLAlchemy.
Project layout
.
├── server.py # entry point — branches on RENDER env var (stdio vs HTTP)
├── config.py # loads .env, exposes shared SQLAlchemy engine
├── tools/
│ ├── __init__.py
│ └── quiz.py # tool definitions — register(mcp) adds them to a FastMCP instance
├── .env # secrets — never commit
├── .env.example
└── requirements.txt
Setup
python -m venv venv
.\venv\Scripts\pip install -r requirements.txt
copy .env.example .env
# fill in .env with real DB credentials (or remove the DB_* lines if unused)
Run locally (stdio)
.\venv\Scripts\python.exe server.py
Or use the MCP inspector to call tools manually:
.\venv\Scripts\python.exe -m mcp dev server.py
Connect to Claude Desktop
Add to %APPDATA%\Claude\claude_desktop_config.json:
{
"mcpServers": {
"quizapp": {
"command": "C:\\path\\to\\project\\venv\\Scripts\\python.exe",
"args": ["C:\\path\\to\\project\\server.py"]
}
}
}
Restart Claude Desktop — tools appear automatically.
Deploy to Render (HTTP, for claude.ai)
Push to GitHub (
.envis gitignored — never commit it).Create a Render Web Service connected to the repo.
Set environment variables in the Render dashboard:
Variable Value RENDERtrueDB_HOSTyour DB host DB_USERyour DB user DB_PASSWORDyour DB password DB_NAMEyour DB name Start command:
python server.pyIn
server.py, updateBASE_URLunder theRENDERbranch to your actual Render URL.In claude.ai → Settings → Connectors, add:
https://your-app.onrender.com/mcp
No auth is currently configured on the HTTP endpoint — anyone with the URL can call every tool, including DB-backed ones. This was an explicit choice to keep setup simple for now; revisit before exposing anything sensitive (see Security below).
Note
OAuth was removed from the HTTP endpoint for now — we're not using claude.ai against this server's DB/tools yet, so it wasn't worth the extra complexity. Add it back later if needed.
Keep-alive
Render's free tier sleeps after 15 minutes idle, which makes the first request after sleep slow (30–60s) or time out. Mitigations already in place:
- A background thread in
server.pypings/healthevery 10 minutes. - Add an external monitor (e.g. UptimeRobot) on
https://your-app.onrender.com/healthevery 5 minutes — not on/mcp.
Adding a new tool
Open tools/quiz.py and add a function inside register(mcp):
@mcp.tool()
def my_new_tool(param1: str, param2: int) -> dict:
"""
One-sentence description of what this tool does.
The agent reads this docstring to decide when to call the tool.
Args:
param1: What this string parameter means.
param2: What this integer parameter means.
"""
result = do_something(param1, param2)
return {"result": result}
No separate registration step — register(mcp) is called for both the stdio and HTTP instances.
Security
.envis gitignored — never commit it.- Tools never return raw SQL or expose the DB schema.
- All queries use parameterized SQL (
text("... WHERE id = :id"), not string interpolation). - Any user-supplied table/column name should be checked against an allowlist before use in SQL.
- The Render HTTP endpoint has no authentication — treat it as public. Don't add tools that expose sensitive data or destructive DB operations until auth is added back.
Установка Quiz App Server
У этого сервера нет опубликованного пакета — он собирается из исходников. Открой репозиторий и следуй инструкции в README.
▸ github.com/sathvik1607/Quiz_mcp_serverFAQ
Quiz App Server MCP бесплатный?
Да, Quiz App Server MCP бесплатный — установка в пару кликов через Unyly без оплаты.
Нужен ли API-ключ для Quiz App Server?
Нет, Quiz App Server работает без API-ключей и переменных окружения.
Quiz App Server — hosted или self-hosted?
Self-hosted: сервер запускается локально на твоей машине командой из раздела установки.
Как установить Quiz App Server в Claude Desktop, Claude Code или Cursor?
Открой Quiz App Server на unyly.org, выбери вкладку своего клиента (Claude Desktop, Claude Code, Cursor) и нажми Install — конфиг сгенерируется автоматически, без правки JSON.
Похожие MCP
wenb1n-dev/SmartDB_MCP
A universal database MCP server supporting simultaneous connections to multiple databases. It provides tools for database operations, health analysis, SQL optim
автор: wenb1n-devPostgres Server
This server enables interaction with PostgreSQL databases through the Model Context Protocol, optimized for the AWS Bedrock AgentCore Runtime. It provides tools
автор: madhurprashPostgres
Query your database in natural language
автор: AnthropicPostgreSQL
Read-only database access with schema inspection.
автор: modelcontextprotocolCompare Quiz App Server with
Не уверен что выбрать?
Найди свой стек за 60 секунд
Автор?
Embed-бейдж для README
Похожее
Все в категории data
