MCP.so
登录

MCP Server Template (

@bsmi021

关于 MCP Server Template (

This template helps you quickly bootstrap a new Model Context Protocol (MCP) server project based on recommended practices.

基本信息

分类

开发工具

许可证

MIT license

运行时

node

传输方式

stdio

发布者

bsmi021

配置

使用下面的配置,将此服务器添加到你的 MCP 客户端。

{
  "mcpServers": {
    "custom-mcp-template": {
      "command": "npx",
      "args": [
        "create-mcp-server",
        "my-new-mcp-server"
      ]
    }
  }
}

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is MCP Server Template?

MCP Server Template is a bootstrap tool that helps developers quickly scaffold a new Model Context Protocol (MCP) server project following recommended practices. It generates a ready-to-develop project structure with configuration, service, and tool templates.

How to use MCP Server Template?

Run npx create-mcp-server my-new-mcp-server (or the locally linked version) to create a new project directory. After creation, change into the new directory, run npm install, then use npm run dev to start the development server with auto-reloading.

Key features of MCP Server Template

  • Bootstrap a new MCP server project in one command.
  • Prompts for project details (name, description) during initialization.
  • Predefined project structure (src/config, src/services, src/tools, etc.).
  • Includes TypeScript, ESLint, Prettier, and Husky configuration.
  • Step-by-step guide for adding new tools and services.
  • Development mode with ts-node and nodemon for auto-reloading.

Use cases of MCP Server Template

  • Quickly scaffold a new MCP server for custom integrations.
  • Learn MCP server development by following the structured template.
  • Establish a consistent project baseline for multiple MCP server projects.

FAQ from MCP Server Template

How do I create a new MCP server using this template?

Run npx create-mcp-server my-new-mcp-server in your terminal. You will be prompted for project name and description; the template files are then copied into a new directory.

What are the steps after creating the project?

Change to the new directory, run npm install, optionally run npx husky install for pre-commit hooks, then use npm run dev to start developing. Build for production with npm run build and start with npm start.

How do I add a new tool to the generated server?

Define types in src/types, implement a service in src/services, create tool params and registration in src/tools, then register the tool in src/tools/index.ts. Update configuration in src/config/ConfigurationManager.ts if needed.

What configuration is included?

The template includes TypeScript (tsconfig.json), ESLint (.eslintrc.json), Prettier (.prettierrc.json), and Husky for Git hooks. The project structure places configuration logic in src/config/ConfigurationManager.ts.

Can I use this template without publishing to npm?

Yes. If not published, clone the template directory locally and run npm link inside it. Then use create-mcp-server my-new-mcp-server from any location.

评论

开发工具 分类下的更多 MCP 服务器