mcp-ts-simple-template
The MCP TypeScript Simple Template is designed to help developers create Model Context Protocol (MCP) servers using TypeScript. It provides a foundation for building custom MCP tools that can integrate with AI systems and includes a basic implementation with a sample BMI calculator tool.
MCP TypeScript Simple Template
A simple TypeScript template for building Model Context Protocol (MCP) servers. This template provides a foundation for creating custom MCP tools and includes a sample BMI calculator tool. It demonstrates how to set up an MCP server in TypeScript, define and implement MCP tools with input validation using Zod, and connect the server to standard I/O for communication.
Prerequisites
- Node.js (v20 or higher recommended)
- npm or yarn
Installation
- Clone the repository
- Install dependencies using npm or yarn
Usage
Build and start the server by running npm start
.
Creating Custom Tools
To create a new tool, modify index.ts
to add custom logic.
Dependencies
@modelcontextprotocol/sdk
zod
dotenv
typescript