@mcp-tool-kit/shared 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.
- package/LICENSE +21 -0
- package/README.md +125 -0
- package/package.json +47 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023 Watermark Design
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
# create-mcp-kit
|
|
2
|
+
A CLI tool to create MCP (Model Context Protocol) applications with ease.
|
|
3
|
+
|
|
4
|
+
## Features
|
|
5
|
+
- 🚀 Quick project scaffolding
|
|
6
|
+
- 📦 TypeScript support out of the box
|
|
7
|
+
- 🛠️ Built-in development tools
|
|
8
|
+
- 🔧 Configurable project templates
|
|
9
|
+
|
|
10
|
+
## Usage
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm create mcp-kit@latest
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
or
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
yarn create mcp-kit@latest
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
or
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pnpm create mcp-kit@latest
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Project Structure
|
|
29
|
+
|
|
30
|
+
```text
|
|
31
|
+
The generated project will have the following structure:
|
|
32
|
+
|
|
33
|
+
├── src/
|
|
34
|
+
│ ├── tools/ # MCP tools implementation
|
|
35
|
+
│ ├── resources/ # MCP resources implementation
|
|
36
|
+
│ ├── prompts/ # MCP prompts implementation
|
|
37
|
+
│ ├── services/ # Server implementations (stdio/web)
|
|
38
|
+
│ └── index.ts # Entry point
|
|
39
|
+
├── tests/ # Test files
|
|
40
|
+
├── scripts/ # Build and development scripts
|
|
41
|
+
├── .github/ # GitHub Actions workflows
|
|
42
|
+
└── package.json
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Development Scripts
|
|
46
|
+
|
|
47
|
+
- npm run dev - Start the development server in stdio mode
|
|
48
|
+
- npm run dev:web - Start the development server in web mode
|
|
49
|
+
- npm run build - Build the project
|
|
50
|
+
- npm run test - Run tests
|
|
51
|
+
- npm run coverage - Generate test coverage report
|
|
52
|
+
|
|
53
|
+
## Features
|
|
54
|
+
### MCP Tools
|
|
55
|
+
Implement custom tools that can be used by MCP clients:
|
|
56
|
+
|
|
57
|
+
```ts
|
|
58
|
+
server.registerTool(
|
|
59
|
+
'GetData',
|
|
60
|
+
{
|
|
61
|
+
title: 'Get Data',
|
|
62
|
+
description: 'Get Data',
|
|
63
|
+
inputSchema: {
|
|
64
|
+
keyword: z.string().describe('search keyword'),
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
async ({ keyword }) => {
|
|
68
|
+
// Your implementation
|
|
69
|
+
}
|
|
70
|
+
)
|
|
71
|
+
```
|
|
72
|
+
### MCP Resources
|
|
73
|
+
Define resources that can be accessed by MCP clients:
|
|
74
|
+
|
|
75
|
+
```ts
|
|
76
|
+
server.registerResource(
|
|
77
|
+
'search',
|
|
78
|
+
new ResourceTemplate('search://{keyword}', {
|
|
79
|
+
list: undefined,
|
|
80
|
+
}),
|
|
81
|
+
{
|
|
82
|
+
title: 'Search Resource',
|
|
83
|
+
description: 'Dynamic generate search resource',
|
|
84
|
+
},
|
|
85
|
+
async (uri, { keyword }) => {
|
|
86
|
+
// Your implementation
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
```
|
|
90
|
+
### MCP Prompts
|
|
91
|
+
Create reusable prompts for MCP clients:
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
server.registerPrompt(
|
|
95
|
+
'echo',
|
|
96
|
+
{
|
|
97
|
+
title: 'Echo Prompt',
|
|
98
|
+
description: 'Creates a prompt to process a message.',
|
|
99
|
+
argsSchema: {
|
|
100
|
+
message: z.string(),
|
|
101
|
+
},
|
|
102
|
+
},
|
|
103
|
+
({ message }) => {
|
|
104
|
+
// Your implementation
|
|
105
|
+
}
|
|
106
|
+
)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## Contributing
|
|
110
|
+
|
|
111
|
+
Feel free to dive in! [Open an issue](https://github.com/my-mcp-hub/mcp-kit/issues/new/choose) or submit PRs.
|
|
112
|
+
|
|
113
|
+
Standard Readme follows the [Contributor Covenant](http://contributor-covenant.org/version/1/3/0/) Code of Conduct.
|
|
114
|
+
|
|
115
|
+
### Contributors
|
|
116
|
+
|
|
117
|
+
This project exists thanks to all the people who contribute.
|
|
118
|
+
|
|
119
|
+
<a href="https://github.com/my-mcp-hub/mcp-kit/graphs/contributors">
|
|
120
|
+
<img src="https://contrib.rocks/image?repo=my-mcp-hub/mcp-kit" />
|
|
121
|
+
</a>
|
|
122
|
+
|
|
123
|
+
## License
|
|
124
|
+
|
|
125
|
+
[MIT](LICENSE) © MichaelSun
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mcp-tool-kit/shared",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "mcp tool kit shared",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"author": "zhensherlock",
|
|
7
|
+
"homepage": "https://github.com/my-mcp-hub/mcp-kit/tree/master/packages/shared#readme",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"mcp",
|
|
10
|
+
"mcp server",
|
|
11
|
+
"mcp client",
|
|
12
|
+
"mcp kit",
|
|
13
|
+
"mcp tool kit",
|
|
14
|
+
"create mcp",
|
|
15
|
+
"create mcp server",
|
|
16
|
+
"create mcp client",
|
|
17
|
+
"modelcontextprotocol",
|
|
18
|
+
"typescript"
|
|
19
|
+
],
|
|
20
|
+
"main": "dist/index.js",
|
|
21
|
+
"types": "dist/types/index.d.ts",
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"registry": "https://registry.npmjs.org/",
|
|
24
|
+
"access": "public"
|
|
25
|
+
},
|
|
26
|
+
"license": "MIT",
|
|
27
|
+
"files": [
|
|
28
|
+
"dist",
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"README.md"
|
|
31
|
+
],
|
|
32
|
+
"repository": {
|
|
33
|
+
"type": "git",
|
|
34
|
+
"url": "git+https://github.com/my-mcp-hub/mcp-kit.git"
|
|
35
|
+
},
|
|
36
|
+
"bugs": {
|
|
37
|
+
"url": "https://github.com/my-mcp-hub/mcp-kit/issues"
|
|
38
|
+
},
|
|
39
|
+
"dependencies": {},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"clean:dist": "rimraf dist",
|
|
42
|
+
"build:types": "tsc",
|
|
43
|
+
"build": "npm run clean:dist && npm run build:types && rolldown -c rolldown.config.ts",
|
|
44
|
+
"test": "vitest run",
|
|
45
|
+
"coverage": "rimraf coverage && vitest run --coverage"
|
|
46
|
+
}
|
|
47
|
+
}
|