@weapp-vite/mcp 0.0.5 → 1.0.0

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@weapp-vite/mcp",
3
3
  "type": "module",
4
- "version": "0.0.5",
4
+ "version": "1.0.0",
5
5
  "description": "mcp",
6
6
  "author": "ice breaker <1324318532@qq.com>",
7
7
  "license": "ISC",
@@ -18,19 +18,21 @@
18
18
  "exports": {
19
19
  ".": {
20
20
  "types": "./dist/index.d.ts",
21
- "import": "./dist/index.mjs",
22
- "require": "./dist/index.cjs"
21
+ "import": "./dist/index.mjs"
23
22
  }
24
23
  },
25
- "main": "./dist/index.cjs",
24
+ "main": "./dist/index.mjs",
26
25
  "module": "./dist/index.mjs",
27
26
  "types": "./dist/index.d.ts",
28
27
  "files": [
29
28
  "dist"
30
29
  ],
30
+ "engines": {
31
+ "node": "^20.19.0 || >=22.12.0"
32
+ },
31
33
  "dependencies": {
32
- "@modelcontextprotocol/sdk": "^1.25.1",
33
- "zod": "^4.2.1"
34
+ "@modelcontextprotocol/sdk": "^1.25.2",
35
+ "zod": "^4.3.5"
34
36
  },
35
37
  "scripts": {
36
38
  "dev": "unbuild --stub",
package/dist/index.cjs DELETED
@@ -1,39 +0,0 @@
1
- 'use strict';
2
-
3
- const mcp_js = require('@modelcontextprotocol/sdk/server/mcp.js');
4
- const stdio_js = require('@modelcontextprotocol/sdk/server/stdio.js');
5
- const zod = require('zod');
6
-
7
- const server = new mcp_js.McpServer({
8
- name: "Demo",
9
- version: "1.0.0"
10
- });
11
- server.tool(
12
- "calculate-bmi",
13
- {
14
- weightKg: zod.z.number(),
15
- heightM: zod.z.number()
16
- },
17
- async ({ weightKg, heightM }) => ({
18
- content: [{
19
- type: "text",
20
- text: String(weightKg / (heightM * heightM))
21
- }]
22
- })
23
- );
24
- server.tool(
25
- "fetch-weather",
26
- { city: zod.z.string() },
27
- async ({ city }) => {
28
- const response = await fetch(`https://api.weather.com/${city}`);
29
- const data = await response.text();
30
- return {
31
- content: [{ type: "text", text: data }]
32
- };
33
- }
34
- );
35
- const transport = new stdio_js.StdioServerTransport();
36
- async function main() {
37
- await server.connect(transport);
38
- }
39
- main();
package/dist/index.d.cts DELETED
@@ -1,2 +0,0 @@
1
-
2
- export { };