@miup-mcp/tool-base 0.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 (3) hide show
  1. package/README.md +99 -0
  2. package/package.json +19 -0
  3. package/src/main.js +33 -0
package/README.md ADDED
@@ -0,0 +1,99 @@
1
+ <p align="center">
2
+ <a href="http://nestjs.com/" target="blank"><img src="https://nestjs.com/img/logo-small.svg" width="120" alt="Nest Logo" /></a>
3
+ npm publish --access public
4
+ </p>
5
+
6
+ [circleci-image]: https://img.shields.io/circleci/build/github/nestjs/nest/master?token=abc123def456
7
+ [circleci-url]: https://circleci.com/gh/nestjs/nest
8
+
9
+ <p align="center">A progressive <a href="http://nodejs.org" target="_blank">Node.js</a> framework for building efficient and scalable server-side applications.</p>
10
+ <p align="center">
11
+ <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/v/@nestjs/core.svg" alt="NPM Version" /></a>
12
+ <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/l/@nestjs/core.svg" alt="Package License" /></a>
13
+ <a href="https://www.npmjs.com/~nestjscore" target="_blank"><img src="https://img.shields.io/npm/dm/@nestjs/common.svg" alt="NPM Downloads" /></a>
14
+ <a href="https://circleci.com/gh/nestjs/nest" target="_blank"><img src="https://img.shields.io/circleci/build/github/nestjs/nest/master" alt="CircleCI" /></a>
15
+ <a href="https://discord.gg/G7Qnnhy" target="_blank"><img src="https://img.shields.io/badge/discord-online-brightgreen.svg" alt="Discord"/></a>
16
+ <a href="https://opencollective.com/nest#backer" target="_blank"><img src="https://opencollective.com/nest/backers/badge.svg" alt="Backers on Open Collective" /></a>
17
+ <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://opencollective.com/nest/sponsors/badge.svg" alt="Sponsors on Open Collective" /></a>
18
+ <a href="https://paypal.me/kamilmysliwiec" target="_blank"><img src="https://img.shields.io/badge/Donate-PayPal-ff3f59.svg" alt="Donate us"/></a>
19
+ <a href="https://opencollective.com/nest#sponsor" target="_blank"><img src="https://img.shields.io/badge/Support%20us-Open%20Collective-41B883.svg" alt="Support us"></a>
20
+ <a href="https://twitter.com/nestframework" target="_blank"><img src="https://img.shields.io/twitter/follow/nestframework.svg?style=social&label=Follow" alt="Follow us on Twitter"></a>
21
+ </p>
22
+ <!--[![Backers on Open Collective](https://opencollective.com/nest/backers/badge.svg)](https://opencollective.com/nest#backer)
23
+ [![Sponsors on Open Collective](https://opencollective.com/nest/sponsors/badge.svg)](https://opencollective.com/nest#sponsor)-->
24
+
25
+ ## Description
26
+
27
+ [Nest](https://github.com/nestjs/nest) framework TypeScript starter repository.
28
+
29
+ ## Project setup
30
+
31
+ ```bash
32
+ $ pnpm install
33
+ ```
34
+
35
+ ## Compile and run the project
36
+
37
+ ```bash
38
+ # development
39
+ $ pnpm run start
40
+
41
+ # watch mode
42
+ $ pnpm run start:dev
43
+
44
+ # production mode
45
+ $ pnpm run start:prod
46
+ ```
47
+
48
+ ## Run tests
49
+
50
+ ```bash
51
+ # unit tests
52
+ $ pnpm run test
53
+
54
+ # e2e tests
55
+ $ pnpm run test:e2e
56
+
57
+ # test coverage
58
+ $ pnpm run test:cov
59
+ ```
60
+
61
+ ## Deployment
62
+
63
+ When you're ready to deploy your NestJS application to production, there are some key steps you can take to ensure it runs as efficiently as possible. Check out the [deployment documentation](https://docs.nestjs.com/deployment) for more information.
64
+
65
+ If you are looking for a cloud-based platform to deploy your NestJS application, check out [Mau](https://mau.nestjs.com), our official platform for deploying NestJS applications on AWS. Mau makes deployment straightforward and fast, requiring just a few simple steps:
66
+
67
+ ```bash
68
+ $ pnpm install -g @nestjs/mau
69
+ $ mau deploy
70
+ ```
71
+
72
+ With Mau, you can deploy your application in just a few clicks, allowing you to focus on building features rather than managing infrastructure.
73
+
74
+ ## Resources
75
+
76
+ Check out a few resources that may come in handy when working with NestJS:
77
+
78
+ - Visit the [NestJS Documentation](https://docs.nestjs.com) to learn more about the framework.
79
+ - For questions and support, please visit our [Discord channel](https://discord.gg/G7Qnnhy).
80
+ - To dive deeper and get more hands-on experience, check out our official video [courses](https://courses.nestjs.com/).
81
+ - Deploy your application to AWS with the help of [NestJS Mau](https://mau.nestjs.com) in just a few clicks.
82
+ - Visualize your application graph and interact with the NestJS application in real-time using [NestJS Devtools](https://devtools.nestjs.com).
83
+ - Need help with your project (part-time to full-time)? Check out our official [enterprise support](https://enterprise.nestjs.com).
84
+ - To stay in the loop and get updates, follow us on [X](https://x.com/nestframework) and [LinkedIn](https://linkedin.com/company/nestjs).
85
+ - Looking for a job, or have a job to offer? Check out our official [Jobs board](https://jobs.nestjs.com).
86
+
87
+ ## Support
88
+
89
+ Nest is an MIT-licensed open source project. It can grow thanks to the sponsors and support by the amazing backers. If you'd like to join them, please [read more here](https://docs.nestjs.com/support).
90
+
91
+ ## Stay in touch
92
+
93
+ - Author - [Kamil Myśliwiec](https://twitter.com/kammysliwiec)
94
+ - Website - [https://nestjs.com](https://nestjs.com/)
95
+ - Twitter - [@nestframework](https://twitter.com/nestframework)
96
+
97
+ ## License
98
+
99
+ Nest is [MIT licensed](https://github.com/nestjs/nest/blob/master/LICENSE).
package/package.json ADDED
@@ -0,0 +1,19 @@
1
+ {
2
+ "name": "@miup-mcp/tool-base",
3
+ "version": "0.0.1",
4
+ "private": false,
5
+ "description": "",
6
+ "author": "",
7
+ "license": "UNLICENSED",
8
+ "type": "module",
9
+ "scripts": {
10
+ "start": "node src/main.js"
11
+ },
12
+ "bin": {
13
+ "tool-ha": "./src/main.js"
14
+ },
15
+ "dependencies": {
16
+ "@modelcontextprotocol/sdk": "^1.25.1",
17
+ "zod": "^3.25.76"
18
+ }
19
+ }
package/src/main.js ADDED
@@ -0,0 +1,33 @@
1
+ import {McpServer} from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import {StdioServerTransport} from "@modelcontextprotocol/sdk/server/stdio.js";
3
+
4
+
5
+ const server = new McpServer({
6
+ name: "tool-base",
7
+ version: "1.0.0",
8
+ });
9
+
10
+
11
+ server.registerTool(
12
+ "get_time",
13
+ {
14
+ description: "get current time",
15
+ },
16
+ () => {
17
+ const date = new Date();
18
+ const formattedDate = date.toLocaleDateString('zh-CN', {
19
+ year: 'numeric',
20
+ month: '2-digit',
21
+ day: '2-digit',
22
+ hour: '2-digit',
23
+ minute: '2-digit',
24
+ second: '2-digit',
25
+ hour12: false,
26
+ });
27
+ return [{type: 'text', text: formattedDate}]
28
+ }
29
+ )
30
+
31
+
32
+ const transport = new StdioServerTransport()
33
+ server.connect(transport).catch((error) => console.error(error));