Token导航 LogoToken导航TokenDH.com
Create MCP Server Ts logo
开发工具stdio官方级别未说明来源级核验

Create MCP Server Ts

MCP Server

create-ts-mcp-server

一个用于快速创建标准化MCP(Model Context Protocol)服务器的命令行工具,支持交互式配置和多级API开发。

工具数

0

提示词数

0

GitHub Stars

0

资源数

0
命令行工具JavaScriptAPI开发TypeScript

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

Makoq

提供方

Makoq

最后核验

2026/5/17 20:22

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx create-ts-mcp-server your-mcp-server-name

详细介绍

](https://www.npmjs.com/package/create-ts-mcp-server)

MCP服务器脚手架工具

一个使用Node.js快速创建标准化MCP(模型上下文协议)服务器的命令行工具

✨特性

🛠️ 交互式配置

  • 为用户提供
  • 友好指挥
  • 线路交互界面

📦 多级API支持

  • 同时支持High
  • 水平和低
  • API开发水平

⚡ 快速生成

  • 基于模板引擎的快速项目生成

🔧 智能配置

  • 自动生成package.json和TypeScript配置

快速开始

npx create-ts-mcp-server your-mcp-server-name

🚀 使用指南

创建项目


# by npx

npx create-ts-mcp-server your-server-name

CLI初始化步骤

# config your project name
? What is the name of your MCP (Model Context Protocol) server? (your-mcp-server-name)
# config your project description
? What is the description of your server? (A Model Context Protocol server)
# @modelcontextprotocol/sdk API level,High-Level upper layer encapsulation of simple and easy-to-use API (suitable for most simple scenarios, more recommended), Low-Level API for underlying detail processing is suitable for complex scenarios
? What is the API level of your server?
 High-Level use (Recommended): It is a commonly used and encapsulated interface for developers. It shields many complex details, is easy to use, and is suitable for most scenarios.
 Low-Level use: It is a low-level interface, which is suitable for developers who need to customize the implementation details. (Use arrow keys)
❯ High-Level API
  Low-Level API
# success message
✔ MCP server created successfully!

Next steps:
  cd your-mcp-server-name
  npm install
  npm run build  #  build your server first
  npm run inspector # debug your server

发展指挥

cd your-server-name

npm install # install dependencies

npm run build # build project

npm run inspector # debug your server

目录结构

生成的典型项目结构如下:

your-server-name/
├── src/
│   ├── index.ts      # Service entry file
├── test/             
├── package.json
└── tsconfig.json

📚 API等级说明

高级API

用例:快速开发标准服务功能:

预配置的通用中间件 自动错误处理 标准化路由配置 开箱即用的RESTful支持

例子:

// Quickly create a service instance
server.tool(
  "calculate-bmi",
  {
    weightKg: z.number(),
    heightM: z.number()
  },
  async ({ weightKg, heightM }) => ({
    content: [{
      type: "text",
      text: String(weightKg / (heightM * heightM))
    }]
  })
);

API低水平

用例:需要深度定制的场景功能:

对请求生命周期的完全控制 中间件链的手动管理 自定义协议处理 低级性能优化

例子:

server.setRequestHandler(CallToolRequestSchema, async (request) => {
  switch (request.params.name) {
    case "create_note": {
      const title = String(request.params.arguments?.title);
      const content = String(request.params.arguments?.content);
      if (!title || !content) {
        throw new Error("Title and content are required");
      }

      const id = String(Object.keys(notes).length + 1);
      notes[id] = { title, content };

      return {
        content: [{
          type: "text",
          text: `Created note ${id}: ${title}`
        }]
      };
    }

    default:
      throw new Error("Unknown tool");
  }
});

目录标签

目录标签

命令行工具JavaScriptAPI开发TypeScript本地部署服务器脚手架Node.js

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

来源包(packageName,安装包名)

create-ts-mcp-server

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdionone部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP