Skip to content

Professional toolkit for building Model Context Protocol servers with hot reload, scaffolding and best practices

License

Notifications You must be signed in to change notification settings

JamieLivingstone/mcp-server-kit

Repository files navigation

MCP Server Kit

A TypeScript starter template for building Model Context Protocol (MCP) servers. Provides project structure, code generators, and conventions so you can focus on building tools, resources, and prompts.

Features

  • ⚙️ TypeScript-first setup
  • 🧩 Stdio-based MCP server
  • 🛠 Generators for tools, prompts, and resources
  • 🧹 Linting, formatting and type checking out of the box
  • 📁 Clear, MCP-aligned project structure

What is MCP?

The Model Context Protocol is an open standard that enables LLM applications to connect to external data sources and tools. MCP servers expose three primitives:

  • Tools — Actions the LLM can execute (e.g., query a database, call an API)
  • Resources — Read-only data the LLM can access (e.g., database schema, config files)
  • Prompts — Reusable templates with arguments (e.g., "design a table for X")

Tech Stack

Category Technology
Runtime Node.js
Language TypeScript (strict mode)
Linting & Formatting Biome
Schema Validation Zod
MCP SDK @modelcontextprotocol/sdk

Getting Started

nvm use         # Use the correct Node version
npm install     # Install dependencies
npm run build   # Build the project

The compiled server will be available at dist/server.js.

Project Structure

src/
├── server.ts      # Server entry point
├── lib/           # Shared utilities
├── prompts/       # MCP prompt definitions
├── resources/     # MCP resource definitions
└── tools/         # MCP tool implementations

Included Examples

The template includes working examples to demonstrate patterns:

Prompts

Prompt Description
design-table Takes a data description and generates PostgreSQL table design with example usage patterns

Resources

Resource URI Description
Schema postgres://schema Returns complete database schema with tables, columns, types, and constraints
Stats postgres://stats Returns database statistics: version, size, connections, and uptime

Tools

Tool Description
sql-query-executor Execute SQL queries against a PostgreSQL database

Code Generators

Scaffold new MCP components:

npm run generate           # Show all generator options
npm run generate:prompt    # Create a new prompt
npm run generate:resource  # Create a new resource
npm run generate:tool      # Create a new tool

Generators create the file and auto-register it with the server.

Commands

Command Description
npm run build Compile TypeScript to dist/
npm run lint Check for linting and type errors
npm run lint:fix Auto-fix linting issues
npm run format Format code with Biome
npm run generate Scaffold new MCP components
npm run generate:prompt Scaffold a new prompt
npm run generate:resource Scaffold a new resource
npm run generate:tool Scaffold a new tool

MCP Client Compatibility

Some MCP features require specific client support. As of January 2026, most clients do not support:

  • Elicitation — Interactive input requests from the server to the user
  • Sampling — Server-initiated LLM completions

Check the MCP Clients documentation to see which features your client supports. As these features gain wider support, the examples in this template will be updated to demonstrate more advanced use cases.

License

MIT

About

Professional toolkit for building Model Context Protocol servers with hot reload, scaffolding and best practices

Resources

License

Stars

Watchers

Forks