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

yo-mcp-server

v1.0.3

Published

各大厂商开源的模型都是基于开放数据进行的训练,数据更新有一定的延迟,在不依赖外部知识库或者工具的前提下模型是无法知道训练完成之后的数据的。 后期OpenAI 推出了 Function Calling 使得模型可以调用外部工具获得超出基础训练数据之外的数据。 早期各大厂商支持Function Calling是不统一的,这不利于 AI 发展,故有了统一的协议来统一外部数据、工具与大模型交互的协议,MCP。 有了MCP协议各大厂商都推出了对应的MCP Server,在早期没有统一时开发者需要自己去使用Funct

Readme

闲谈

各大厂商开源的模型都是基于开放数据进行的训练,数据更新有一定的延迟,在不依赖外部知识库或者工具的前提下模型是无法知道训练完成之后的数据的。 后期OpenAI 推出了 Function Calling 使得模型可以调用外部工具获得超出基础训练数据之外的数据。 早期各大厂商支持Function Calling是不统一的,这不利于 AI 发展,故有了统一的协议来统一外部数据、工具与大模型交互的协议,MCP。 有了MCP协议各大厂商都推出了对应的MCP Server,在早期没有统一时开发者需要自己去使用Function Calling实现开发重复,带来了很大的研发成本。 遵循MCP开发的MCP Server 可以像插入电脑外设扩充功能一样简单,大大降低了重复研发的成本。

MCP(Model Context Protocol)

官方网站:https://modelcontextprotocol.io/introduction

由Anthropic公司推出的开放标准协议。简单理解 举个栗子:USB摄像头插上电脑USB接口电脑就能识别,电脑就能采集摄像头中画面 你帅气的脸庞就能让你的女朋友看到,USB摄像头与电脑之间正是遵循了统一的通信协议所以才能通信。而MCP协议定义了大模型与外部数据/工具通信的协议。

1745595841018

MCP Server 与 MCP Client

MCP官方针对 MCP Server 和 MCP Client 都有对应的SDK提供,可以拿来即用 站在巨人肩膀上开发。

1745601913248

MCP Server与MCP Client中的两种通信方式(STDIO/SSE)

1、STDIO

  • STDIO 是客户端和服务器通过本地进程的标准输入输出直接通信,由于是本机进程之间的通信 无需网络环境,可以离线运行(前提MCP服务不依赖外部网络通信)。STDIO 会将MCP Server 下载到你本地的电脑中 并执行 返回对应的执行结果。 总结:STDIO为程序的输入输出提供了统一的标准方式,无论是什么类型的程序 只要遵循 STDIO协议 就可以方便的进行数据的输入和输出。

    STDIO 提供了两种类型的 本机运行MCP Server 的命令 npx和uvx

    npx是由NodeJs提供的Js脚本运行工具(依赖NodeJS环境)

    • 如果目标包尚未全局安装或在本地项目中安装,npx 会临时从 npm 注册表下载该包,并在临时目录中执行该包的命令,命令执行完成后,临时目录会被清理,包不会保留在用户的机器上。
    • 如果目标包已经在本地项目的 node_modules/.bin 或全局环境中安装,npx 会直接使用已安装的版本,而不会重新下载。

    uvx是python脚本的执行工具(依赖Python环境)

2、SSE

  • SSE 是通过HTTP协议连接到远程服务器,由服务器计算出结果后通过SSE推送结果到MCP Client,例:MCP HOST 通过网络请求调用远程MCP Server上的的天气工具执行得到结果后,服务器通过SSE推送天气信息到客户端。简单讲就是通过HTTP服务调用托管在远程服务器的MCP Server 返回结果

MCP Server 简单实现 代码讲解

巴拉巴拉......

错过了现场分享自己拉取代码看吧,仓库地址: https://git.kailinesb.com/chenyuqiao/node-mcp

git clone https://git.kailinesb.com/chenyuqiao/node-mcp.git

1745766581357

1745766602965

在macOS/Linux如果执行脚本遇到 Permission denied 提示则表明 JS 脚本需要添加可执行权限,可以使用如下命令修改 可执行权限

chmod +x index.js

在Windows碰到这个问题(我没遇到过),如果遇到了大家可以 点击这个链接:有问题点我就对了

使用Trae 编辑器配置MCP Server

1745766101639

1745766136201

1745766159487

1745766186635

本机调用

{
  "mcpServers": {
    "MyMCPServer": {
      "command": "node",
      "args": [
        "D:xxx/workspace/path-to-your-mcpserver.js", //注意这里必须是绝对路径,windows用户需要注意下/和\
      ]
    }
  }
}

npm托管 npx 调用

{
  "mcpServers": {
    "MyMCPServer": {
      "command": "npx",
      "args": [
        "-y",
        "D:xxx/workspace/path-to-your-mcpserver.js", //注意这里必须是绝对路径,windows用户需要注意下/和\
      ]
    }
  }
}