npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-helper

v1.1.0

Published

MCP development assistant, helps build MCP client and MCP server.

Downloads

16

Readme

MCP Helper (mcp-cli)

一个用于快速脚手架化创建 Model Context Protocol (MCP) 服务器项目的命令行工具,并可选地执行开发工具链的引导(bootstrap)。

  • 默认文档:英文(见 README.md
  • 本页为中文版本

项目概述

mcp-cli 专注于一件事:在几秒内初始化一个可运行的 MCP 服务器 TypeScript 项目,并提供合理默认值。你还可以选择运行交互式 bootstrap,自动完成 Prettier、Husky、Commitizen、Commitlint、lint-staged 等常见前置配置。

脚手架会提供:

  • 使用 @modelcontextprotocol/sdk 的最小 MCP 服务器(含 ping 工具)
  • 严谨的 TypeScript 配置(tsconfig.json
  • 可选的依赖安装(运行时与开发依赖)
  • 可选的交互式 bootstrap(格式化与 Git hooks 等)

环境要求

  • Node.js 18+(推荐 LTS)
  • 已安装 pnpm 且在 PATH 中

安装与运行

你可以直接在本仓库源码中使用,也可以全局链接后使用。

在本仓库源码中使用

pnpm install
pnpm build
node build/cli.js --help

全局链接(可选)

pnpm link --global
mcp-cli --help

如果未来发布到 npm,可通过 pnpm add -g mcp-helper 安装,然后直接使用 mcp-cli

使用方法

命令

mcp-cli init [name]
  • 传入 name:会在新目录中创建项目
  • 省略 name:使用当前目录

选项

  • -y, --yes:跳过交互输入,使用默认包名与描述
  • -b, --bootstrap:脚手架完成后运行交互式 bootstrap
  • -s, --skip-install:跳过依赖安装

查看帮助:

mcp-cli --help
mcp-cli init --help

快速开始示例

在新目录中创建项目、执行 bootstrap 并安装依赖:

mcp-cli init my-mcp-server -b
cd my-mcp-server
# 如果此前跳过安装,在此处安装:
# pnpm add zod@3 @modelcontextprotocol/sdk dotenv debug
# pnpm add -D typescript @modelcontextprotocol/inspector @types/node
pnpm build
npx @modelcontextprotocol/inspector node build/index.js

在当前目录中初始化:

mcp-cli init -y -b

跳过依赖安装:

mcp-cli init my-mcp-server --skip-install

生成内容说明

脚手架至少会生成:

  • tsconfig.json,面向 ESM 的现代 Node 设置,严格校验
  • src/index.ts,内含最小 MCP 服务器与 ping 工具

模板服务端包含:

  • 使用 @modelcontextprotocol/sdk 的 stdio 传输
  • ping 工具返回 pong
  • 简单的 startServer(),通过 stdio 连接并输出状态/错误

默认(未使用 --skip-install)会自动安装:

  • 运行时依赖:zod@3 @modelcontextprotocol/sdk dotenv debug
  • 开发依赖:typescript @modelcontextprotocol/inspector @types/node

完成后可执行:

pnpm build
npx @modelcontextprotocol/inspector node build/index.js

上述命令与脚手架完成后的 "Next" 提示一致。

可选 Bootstrap

传入 --bootstrap 后,会进入交互式流程,包含以下任务:

  1. 下载编辑器/格式化配置(.editorconfig.prettierrc.prettierignore
  2. 安装并初始化 Husky(pre-commit 钩子运行 lint-staged)
  3. 安装并配置 Commitizen(添加 pnpm commit
  4. 安装并配置 Commitlint(添加 Husky commit-msg 钩子)
  5. 安装 Prettier
  6. 安装并配置 lint-staged
  7. 更新 package.json 脚本与 packageManager

说明:

  • bootstrap 会确保存在 pnpm、Git 仓库与 package.json(必要时询问确认)。
  • 你可以选择要执行的子任务,并在执行前进行确认。

面向本 CLI 的开发

  • 构建:pnpm build
  • 格式化:pnpm format
  • 本地查看帮助:node build/cli.js --help
  • 在不全局链接的情况下试用:node build/cli.js init demo -b

许可证

ISC