Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

fastmcp-boilerplate

MCP.Pizza Chef: punkpeye

FastMCP Boilerplate is a starter MCP server built with FastMCP, TypeScript, ESLint, and Prettier. It provides a ready-to-use setup including testing, linting, formatting, and publishing workflows, enabling developers to quickly build and deploy MCP servers. This boilerplate simplifies MCP server development with modern tooling and best practices.

Use This MCP server To

Quickly scaffold a new MCP server project Set up a TypeScript-based MCP server with linting and formatting Develop and test MCP server functionality locally Publish MCP servers to NPM for reuse Use CLI to interact with the MCP server during development

README

FastMCP Boilerplate

A boilerplate for FastMCP.

This boilerplate is a good starting point for building an MCP server. It includes a basic setup for testing, linting, formatting, and publishing to NPM.

Development

To get started, clone the repository and install the dependencies.

git clone https://github.com/punkpeye/fastmcp-boilerplate.git
cd fastmcp-boilerplate
npm install
npm run dev

Note

If you are starting a new project, you may want to fork fastmcp-boilerplate and start from there.

Start the server

If you simply want to start the server, you can use the start script.

npm run start

However, you can also interact with the server using the dev script.

npm run dev

This will start the server and allow you to interact with it using CLI.

Testing

A good MCP server should have tests. However, you don't need to test the MCP server itself, but rather the tools you implement.

npm run test

In the case of this boilerplate, we only test the implementation of the add tool.

Linting

Having a good linting setup reduces the friction for other developers to contribute to your project.

npm run lint

This boilerplate uses Prettier, ESLint and TypeScript ESLint to lint the code.

Formatting

Use npm run format to format the code.

npm run format

GitHub Actions

This repository has a GitHub Actions workflow that runs linting, formatting, tests, and publishes package updates to NPM using semantic-release.

In order to use this workflow, you need to:

  1. Add NPM_TOKEN to the repository secrets
    1. Create a new automation token
    2. Add token as NPM_TOKEN environment secret (Settings → Secrets and Variables → Actions → "Manage environment secrets" → "release" → Add environment secret)
  2. Grant write access to the workflow (Settings → Actions → General → Workflow permissions → "Read and write permissions")

fastmcp-boilerplate FAQ

How do I start the FastMCP boilerplate server?
Clone the repo, install dependencies, then run `npm run start` or `npm run dev` to start the server.
Does the boilerplate include testing setup?
Yes, it includes a basic testing setup to ensure MCP server reliability.
What technologies does FastMCP boilerplate use?
It uses FastMCP, TypeScript, ESLint, and Prettier for development and code quality.
Can I customize the boilerplate for my own MCP server?
Yes, the boilerplate is designed to be forked and customized for your specific MCP server needs.
Is there a recommended way to interact with the server during development?
Use the `npm run dev` script to start the server with CLI interaction for easier testing and debugging.
How does this boilerplate help with publishing MCP servers?
It includes scripts and configuration to publish your MCP server package to NPM efficiently.