CPR Training MCP Server
Provides structured CPR training resources including lessons, demonstration videos, and reflective questions through an MCP interface. Enables AI assistants to deliver trusted cardiopulmonary resuscitation training content on demand.
README
CPR MCP Server
This project provides a beginner-friendly Model Context Protocol (MCP) server implemented in TypeScript. The server exposes CPR (Cardiopulmonary Resuscitation) training resources — a structured lesson, a demonstration video link, and a reflective question — so that AI assistants and applications can pull trusted content on demand.
The server is transport-agnostic JSON-RPC over HTTP, making it easy to run locally or deploy to Render for wider access.
Features
- ✅ Structured CPR lesson covering danger checks, response, airway, breathing, compressions, and AED usage.
- 🎬 Demonstration video reference with guidance on what to watch for.
- ❓ Reflective check question so each interaction ends by confirming understanding.
- 📦 MCP-style JSON-RPC interface with
initialize,resources/*, andprompts/*methods. - 🌐 Built-in REST helpers (
/resources,/prompts) for quick manual testing. - ☁️ Render-ready with zero external dependencies.
Prerequisites
- Node.js 18 or newer (comes with
npm). - Git (for cloning the repository).
1. Clone the project
git clone <your-fork-or-repo-url>
cd MCP_Server
If you are starting from this template on a fresh machine, replace <your-fork-or-repo-url> with the repository address where you store your copy.
2. Install dependencies
The project only relies on TypeScript tooling, so installation is quick:
npm install
Tip: If you are working behind a proxy, configure
npm config set proxy http://...before running the command.
3. Run the MCP server locally
Development mode (TypeScript directly)
npm run dev
This command uses ts-node-dev so the server restarts automatically when you edit files. You will see a console message similar to:
CPR MCP server listening on port 3000
Production build
npm run build
npm start
npm run build emits compiled JavaScript into dist/, and npm start runs the compiled code with Node.js.
By default the server listens on port 3000. Override this by exporting PORT before running the server:
PORT=8080 npm start
4. Explore the API
The server speaks JSON-RPC 2.0 at /mcp and also exposes helper endpoints for humans.
4.1 Quick health check
curl http://localhost:3000/
Response:
{
"message": "CPR MCP Server is running.",
"endpoints": {
"rpc": "/mcp",
"resources": "/resources",
"prompts": "/prompts"
}
}
4.2 List MCP resources
curl http://localhost:3000/resources
4.3 Fetch the lesson via JSON-RPC
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "resources/read",
"params": {
"uri": "cpr://lesson"
}
}'
4.4 Get the question prompt
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 2,
"method": "prompts/get",
"params": {
"name": "cpr-quick-start"
}
}'
5. Deploy to Render
Render can host this server as a free web service.
- Commit your changes and push them to a GitHub/GitLab repository.
- Create a new Web Service on Render and connect your repository.
- Choose the Node environment.
- Set the Build Command to:
npm install && npm run build - Set the Start Command to:
npm start - Keep the default
PORTenvironment variable that Render injects. - (Optional) Add a health check hitting
/to ensure the service is ready.
When Render finishes deployment you will receive a public URL like https://cpr-mcp.onrender.com. Test it with the same curl commands, swapping localhost:3000 for your Render domain.
6. Customising the content
- Edit
src/content/cprLesson.tsto update the lesson copy, link to a different video, or change the reflective question. - Add more entries to
RESOURCESinsrc/resources.tsto expose additional articles, downloads, or checklists. - Create new entries in
PROMPTSfor other pre-composed tutor responses your MCP client can reuse.
After making changes, rebuild (npm run build) and redeploy.
7. Next steps
- Connect the MCP server to an MCP-compatible client (for example, a local AI assistant) by pointing it to the
/mcpendpoint. - Expand the protocol support with additional methods such as
tools/listortools/callif your client expects them. - Add automated tests for JSON-RPC handlers to keep the CPR content verified.
Happy learning, and remember: ensure the area is safe before you begin CPR!
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。
mcp-server-qdrant
这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。