@weapp-vite/mcp 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +43 -0
  2. package/package.json +3 -3
package/README.md ADDED
@@ -0,0 +1,43 @@
1
+ # @weapp-vite/mcp
2
+
3
+ ## 简介
4
+
5
+ `@weapp-vite/mcp` 是一个基于 Model Context Protocol (MCP) SDK 的示例服务包,展示如何通过 stdio 传输方式注册工具并响应调用。
6
+
7
+ > 该包目前以示例为主,适合用于学习/验证 MCP 工具服务的基本结构。
8
+
9
+ ## 特性
10
+
11
+ - 使用 MCP SDK 创建服务
12
+ - 基于 zod 的入参校验
13
+ - 内置示例工具(`calculate-bmi`、`fetch-weather`)
14
+ - stdio 传输,方便被 MCP Client 集成
15
+
16
+ ## 安装
17
+
18
+ ```bash
19
+ pnpm add @weapp-vite/mcp
20
+ ```
21
+
22
+ ## 使用
23
+
24
+ 在仓库内启动示例服务:
25
+
26
+ ```bash
27
+ pnpm --filter @weapp-vite/mcp start
28
+ ```
29
+
30
+ 然后由 MCP Client 通过 stdio 连接并调用工具。
31
+
32
+ ## 配置
33
+
34
+ 目前没有独立配置文件。请直接修改 `src/index.ts` 来:
35
+
36
+ - 添加/移除工具
37
+ - 调整工具参数与逻辑
38
+ - 修改服务名称与版本
39
+
40
+ ## 相关链接
41
+
42
+ - MCP SDK:https://github.com/modelcontextprotocol/sdk
43
+ - 仓库:https://github.com/weapp-vite/weapp-vite
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weapp-vite/mcp",
3
3
  "type": "module",
4
- "version": "1.0.0",
4
+ "version": "1.0.1",
5
5
  "description": "mcp",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "ISC",
@@ -31,8 +31,8 @@
31
31
  "node": "^20.19.0 || >=22.12.0"
32
32
  },
33
33
  "dependencies": {
34
- "@modelcontextprotocol/sdk": "^1.25.2",
35
- "zod": "^4.3.5"
34
+ "@modelcontextprotocol/sdk": "^1.25.3",
35
+ "zod": "^4.3.6"
36
36
  },
37
37
  "scripts": {
38
38
  "dev": "unbuild --stub",