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!
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.