template
Template to quickly set up your own MCP server
claude mcp add --transport stdio mcpdotdirect-template-mcp-server npx -y @mcpdotdirect/template-mcp-server
How to use
This MCP server template provides a starting point for building a Model Context Protocol (MCP) server using FastMCP with TypeScript. It includes a basic server structure that supports two transport methods: a stdio (CLI) transport for local development and an SSE (HTTP) transport for web-based or remote usage. The template is designed to be extended with custom MCP tools, resources, and prompts, allowing you to rapidly scaffold a working server and then tailor it to your specific workflows. You can test your server’s tooling and integration using the included FastMCP utilities and by connecting via Cursor or a direct HTTP endpoint.
To use, install dependencies, then run either the stdio or HTTP server as described in the repository’s instructions. The stdio mode is ideal for local command-line tools and development, while the HTTP mode enables networked usage and collaboration across machines. You can also run in development mode with auto-reload to streamline iteration while building tools and resources.
How to install
Prerequisites:
- Node.js (LTS) and npm/yarn/pnpm (or Bun as suggested by the template)
- Basic familiarity with TypeScript and npm scripts
Installation steps:
- Ensure Node.js and your preferred package manager are installed.
- node -v
- npm -v (or yarn -v / pnpm -v / bun -v)
- Create or clone the MCP server project using the template (examples assume npm is available):
- npx @mcpdotdirect/template-mcp-server
- or, if you’re starting from an existing repo, run: npm install
- Install project dependencies:
- npm install
-
or using yarn/pnpm/bun as you prefer
- Validate the setup by listing available scripts or attempting a build:
- npm run build
- npm run start # for stdio transport
- npm run start:http # for HTTP/SSE transport
- Start the server in stdio mode (CLI):
- npm start
- Start the server in HTTP mode (SSE):
- npm run start:http
- For development with auto-reload (if configured in package.json):
- npm run dev
- npm run dev:http
Notes:
- The template may default to Bun-based scripts; if you prefer Node.js runtimes, adjust the npm scripts in package.json accordingly to use node or ts-node as needed.
Additional notes
Tips and considerations:
- The template supports two transports: stdio and SSE. Use stdio for local tool development and SSE for remote or team usage.
- Environment variables such as PORT (for the HTTP server) can be used to customize behavior. Example: PORT=8080 npm run start:http
- If Cursor integration is planned, you can export mcp.json configurations in .cursor/mcp.json with both stdio (command) and SSE (url) entries.
- When extending with tools, resources, and prompts, follow the existing TypeScript patterns shown in the template to ensure compatibility with FastMCP expectations.
- If you encounter Bun-specific runtime notes, modify the scripts to run with Node.js or your preferred runtime to avoid runtime-specific issues.
Related MCP Servers
bitbucket
Bitbucket MCP - A Model Context Protocol (MCP) server for integrating with Bitbucket Cloud and Server APIs
n8n-workflow-builder
MCP server that allow LLM in agent mode builds n8n workflows for you
openai -agent-dotnet
Sample to create an AI Agent using OpenAI models with any MCP server running on Azure Container Apps
unity-editor
An MCP server and client for LLMs to interact with Unity Projects
website-publisher
AI Website builder and publisher MCP. Quickly publish and deploy your AI generated code as real website URL. Support html, css, js, python etc.
mcp-deep-search
Runs a search across all major providers simultaneously