boot-mcp

A starter template for building Model Context Protocol (MCP) applications with TypeScript.

Visit Server
Added on 3/28/2025

boot-mcp

npm version npm downloads bundle JSDocs License javascript_code style

A starter template for building Model Context Protocol (MCP) applications with TypeScript.

What is MCP?

The Model Context Protocol (MCP) lets you build servers that expose data and functionality to LLM applications in a secure, standardized way. Think of it like a web API, but specifically designed for LLM interactions. MCP servers can:

  • Expose data through Resources (think of these sort of like GET endpoints; they are used to load information into the LLM's context)
  • Provide functionality through Tools (sort of like POST endpoints; they are used to execute code or otherwise produce a side effect)
  • Define interaction patterns through Prompts (reusable templates for LLM interactions)

Installation

# npm
npm install

# pnpm
pnpm install

# yarn
yarn install

Quick Start

This template includes examples of MCP servers with different transports:

  • Stdio transport (for command-line tools and direct integrations)
  • HTTP with SSE transport (for remote servers)

Running the Example Server

# Start the stdio server
pnpm start

# Start the HTTP server
pnpm start:http

Project Structure

boot-mcp/
├── src/
│   ├── index.ts          # Main entry point
│   ├── server/           # MCP server implementations
│   │   ├── stdio.ts      # Stdio transport server
│   │   └── http.ts       # HTTP with SSE transport server
│   ├── resources/        # Resource implementations
│   ├── tools/            # Tool implementations
│   └── prompts/          # Prompt implementations
├── examples/             # Example usage
└── test/                 # Tests

License

MIT License © Kirk Lin