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

@ff-xiaofan/fastmcp-greeting-server

v1.0.0

Published

A FastMCP scaffold project with greeting tool example, built with Node.js and MCP SDK

Readme

FastMCP Greeting Server

这是一个基于Node.js和MCP SDK的FastMCP脚手架项目,包含一个简单的greeting工具示例。

npm version License: MIT

📚 快速导航

功能特性

  • ✅ 基于TypeScript开发
  • ✅ 使用MCP SDK (官方Model Context Protocol SDK)
  • ✅ 支持多语言问候(中文/英文)
  • ✅ 包含工具和资源示例
  • ✅ 使用stdio传输协议
  • ✅ 内置测试客户端

安装依赖

从 npm 安装(推荐)

npm install -g @your-username/fastmcp-greeting-server

安装后可直接使用:

fastmcp-greeting

本地开发安装

克隆项目并安装依赖:

git clone https://github.com/your-username/fastmcp-demo.git
cd fastmcp-demo
npm install

使用方法

开发模式运行

npm run dev

构建项目

npm run build

运行构建后的项目

npm start

运行测试

执行内置的测试客户端,测试greeting功能:

npm test

测试将会:

  • 连接到MCP服务器
  • 列出可用的工具
  • 测试英文问候
  • 测试中文问候
  • 测试默认语言
  • 列出可用资源
  • 读取帮助文档

工具说明

greeting 工具

向指定用户发送问候语。

参数:

  • name (必需): 要问候的人的名字
  • language (可选): 问候语言,支持 'zh'(中文) 或 'en'(英文),默认为英文

示例:

{
  "name": "Alice",
  "language": "en"
}

资源说明

greeting://help

查看greeting工具的使用帮助文档。

项目结构

fastdemo/
├── src/
│   ├── index.ts          # 主服务器文件
│   └── test-client.ts    # 测试客户端
├── dist/                 # 编译输出目录
├── node_modules/         # 依赖包
├── package.json          # 项目配置
├── tsconfig.json         # TypeScript配置
├── .gitignore           # Git忽略文件
└── README.md            # 项目说明

技术栈

  • @modelcontextprotocol/sdk 1.x (官方MCP SDK)
  • TypeScript 5.x
  • Node.js 20+
  • Zod (参数校验)

License

MIT

🔗 相关链接

  • npm 包: https://www.npmjs.com/package/@your-username/fastmcp-greeting-server
  • GitHub 仓库: https://github.com/your-username/fastmcp-demo
  • 问题反馈: https://github.com/your-username/fastmcp-demo/issues
  • MCP 官方文档: https://modelcontextprotocol.io/

👉 接下来做什么?

  1. 📝 查看 MCP_CONFIG.md 在 Claude Desktop 中配置使用
  2. 🚀 查看 NPM_PUBLISH.md 将你的服务器发布到 npm
  3. 🛠️ 基于这个脚手架添加更多工具和资源

注意: 请将文档中的 @your-username 替换为你的实际 npm 用户名或 GitHub 用户名。