mcp-template-node

mcp-template-node

3.5

A template repository for creating Model Context Protocol (MCP) servers in Node.js/TypeScript, demonstrating a simple notes management system using the MCP protocol.

The MCP Template Node is a foundational repository designed to facilitate the creation of Model Context Protocol (MCP) servers using Node.js and TypeScript. It provides a structured approach to implementing MCP, which is a standardized protocol for providing context to Large Language Models (LLMs). This template includes a simple notes management system that showcases basic CRUD operations, serving as a practical example of MCP concepts such as Tools, Resources, and Prompts. The project is built with TypeScript, ensuring strict type checking, and includes comprehensive error handling, validation, and unit tests using Vitest. Additionally, it offers in-memory storage for notes, a GitHub Actions CI workflow for testing and building, and a VS Code debugging configuration. The template is designed to be easily extendable, allowing developers to add new types, tools, resources, and prompt templates as needed.

Features

  • TypeScript implementation with strict type checking
  • Simple notes management system with basic CRUD operations
  • Comprehensive error handling and validation
  • Unit tests with Vitest
  • GitHub Actions CI workflow for testing and building

MCP Tools

  • {'Create Note': 'Creates a new note with title and content.'}
  • {'List Notes': 'Lists all available notes with their IDs and titles.'}
  • {'Get Note': 'Retrieves a specific note by ID.'}
  • {'Update Note': "Updates an existing note's title, content, or tags."}
  • {'Delete Note': 'Deletes a note by ID.'}

Usage with Different Platforms

Node.js

bash
git clone https://github.com/Rethunk-Tech/mcp-template-node.git
cd mcp-template-node
yarn install
yarn build
yarn start

Testing

bash
yarn test
yarn test:watch
yarn test:coverage

Development

bash
yarn dev
yarn lint
yarn lint:fix