MCP Server Boilerplate
A basic Model Context Protocol (MCP) server implementation that can be used as a starting point for building MCP-compatible applications.
Features
Basic MCP server setup with TypeScript
Example function implementation
Graceful shutdown handling
Development and production build configurations
Prerequisites
Node.js (v14 or higher)
npm or yarn
Installation
Development
To run the server in development mode with hot-reload:
Building for Production
To build the project:
To start the production server:
Project Structure
Adding New MCP Functions
To add new functions to the server:
Define a new function schema using Zod
Create a function implementation following the MCPFunction interface
Add the function to the server configuration
Example:
License
ISC