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

@wangtianci/tianqi-mcp-server

v0.0.1

Published

基于天气的MCP Server

Readme

@wuchubuzai/tianqi-mcp-server 项目配置分析

1. package.json 配置分析

package.json 是 Node.js 项目的核心配置文件,它定义了项目的元数据、依赖项、脚本等信息。以下是对该文件各字段的详细解释:

元数据

  • "name": "@wuchubuzai/tianqi-mcp-server":项目的名称,使用了作用域名称 @wuchubuzai,这通常用于组织内部或私有包。
  • "version": "0.0.1":项目的版本号,遵循语义化版本规范。
  • "description": "基于天气的MCP Server":项目的简要描述。
  • "author": "王天赐":项目的作者信息。
  • "type": "module":指定项目使用 ES 模块系统。
  • "license": "MIT":项目采用的开源许可证,MIT 许可证允许他人自由使用、修改和分发项目代码。

入口文件

  • "main": "bin/index.js":项目的主入口文件,当其他项目引入该包时,默认会加载这个文件。
  • "bin": {"tianqi-mcp-server": "dist/index.js"}:定义了可执行命令,用户全局安装该包后,可以在命令行中使用 tianqi-mcp-server 命令,实际执行的是 dist/index.js 文件。

文件范围

  • "files": ["dist"]:指定在发布包时需要包含的文件或目录,这里只包含 dist 目录。

脚本命令

  • "build": "tsc && shx chmod +x dist/*.js":构建命令,先使用 TypeScript 编译器 tsc 编译代码,然后使用 shx 工具为 dist 目录下的所有 JavaScript 文件添加可执行权限。
  • "prepare": "npm run build":在 npm install 之后自动执行 build 命令。
  • "watch": "tsc --watch":监听 TypeScript 文件的变化,并自动重新编译。

依赖项

  • "dependencies":项目运行时所需的依赖包。
    • @modelcontextprotocol/sdk": "1.10.2":版本为 1.10.2 的 @modelcontextprotocol/sdk 包。
    • "@types/node-fetch": "^2.6.12"node-fetch 包的类型定义文件,版本要求大于等于 2.6.12。
    • "node-fetch": "^3.3.2":用于在 Node.js 环境中发起 HTTP 请求的包,版本要求大于等于 3.3.2。
  • "devDependencies":项目开发时所需的依赖包。
    • "@types/node": "^22.15.3":Node.js 的类型定义文件,版本要求大于等于 22.15.3。
    • "shx": "^0.3.4":一个跨平台的 shell 命令工具,版本要求大于等于 0.3.4。
    • "typescript": "^5.8.3":TypeScript 编译器,版本要求大于等于 5.8.3。

发布配置

  • "publishConfig": {"access": "public", "registry": "https://registry.npmjs.org"}:指定包发布时的配置,access: "public" 表示该包是公开的,可以被任何人访问,registry 指定了包发布的仓库地址。

2. tsconfig.json 配置分析

tsconfig.json 是 TypeScript 项目的配置文件,它定义了 TypeScript 编译器的编译选项和文件范围。以下是对该文件各字段的详细解释:

编译选项

  • "target": "ES2022":指定编译后的 JavaScript 代码的目标版本为 ES2022。
  • "module": "Node16":指定编译后的模块系统为 Node.js 16 的模块系统。
  • "moduleResolution": "Node16":指定模块解析策略为 Node.js 16 的解析策略。
  • "strict": true:启用所有严格类型检查选项,有助于提高代码的健壮性。
  • "esModuleInterop": true:允许在 CommonJS 和 ES 模块之间进行互操作。
  • "skipLibCheck": true:跳过对类型定义文件(.d.ts)的检查,提高编译速度。
  • "forceConsistentCasingInFileNames": true:强制文件名的大小写一致,避免在不同操作系统上出现文件名大小写问题。
  • "resolveJsonModule": true:允许导入 JSON 文件。
  • "outDir": "./dist":指定编译后的输出目录为 dist 目录。
  • "rootDir": ".":指定 TypeScript 源文件的根目录为当前目录。

文件范围

  • "include": ["./**/*.ts"]:指定需要编译的文件范围,这里表示编译当前目录及其子目录下的所有 .ts 文件。
  • "exclude": ["node_modules"]:指定需要排除的文件或目录,这里排除 node_modules 目录。