TemplatesFastify Starter

Fastify Starter

A Fastify MCP server using xmcp's adapter

Fastify Starter preview

A Fastify server with xmcp mounted through the Fastify adapter.

Features

  • Fastify application with MCP mounted at /mcp
  • File-based tool discovery from src/tools/
  • Adapter build via experimental.adapter: "fastify"
  • Type-safe tools with Zod schemas and InferSchema

Getting Started

1. Create the project

2. Install & run

The Fastify server starts at http://localhost:3000, and the MCP endpoint is available at /mcp.

Project Structure

MCP Endpoint

The MCP server is mounted through the generated adapter:

Adding Tools

Create a new .ts file in src/tools/. The tool is automatically discovered:

Build

Learn More

Other templates

One framework to rule them all