mcp-new 1.1.0 → 1.2.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/README.md +191 -121
- package/dist/{chunk-K3TOM22I.js → chunk-BHGUGEHE.js} +498 -9
- package/dist/cli.js +66 -6
- package/dist/index.d.ts +26 -1
- package/dist/index.js +13 -1
- package/package.json +2 -2
- package/templates/go/README.md.ejs +67 -4
- package/templates/python/README.md.ejs +58 -15
- package/templates/rust/README.md.ejs +67 -4
- package/templates/typescript/README.md.ejs +56 -15
- /package/bin/{mcp-generator.js → mcp-new.js} +0 -0
package/README.md
CHANGED
|
@@ -1,199 +1,246 @@
|
|
|
1
|
-
|
|
1
|
+
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
# mcp-new
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
**CLI generator for MCP servers in seconds**
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
[](https://www.npmjs.com/package/mcp-new)
|
|
8
|
+
[](https://www.npmjs.com/package/mcp-new)
|
|
9
|
+
[](https://github.com/d1maash/mcp-new/blob/main/LICENSE)
|
|
10
|
+
|
|
11
|
+
Like `create-react-app`, but for [Model Context Protocol](https://spec.modelcontextprotocol.io/) servers.
|
|
10
12
|
|
|
11
|
-
|
|
13
|
+
[Getting Started](#-getting-started) •
|
|
14
|
+
[Features](#-features) •
|
|
15
|
+
[Presets](#-presets) •
|
|
16
|
+
[Documentation](#-documentation) •
|
|
17
|
+
[Contributing](#-contributing)
|
|
12
18
|
|
|
13
|
-
|
|
14
|
-
- **Multi-language support** — TypeScript, Python, Go, and Rust
|
|
15
|
-
- **OpenAPI generation** — auto-create tools from OpenAPI/Swagger specification
|
|
16
|
-
- **AI generation** — create tools from text description using Claude
|
|
17
|
-
- **Ready-to-use templates** — working code with examples out of the box
|
|
19
|
+
</div>
|
|
18
20
|
|
|
19
|
-
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## ⚡ Getting Started
|
|
20
24
|
|
|
21
25
|
```bash
|
|
22
|
-
|
|
26
|
+
npx mcp-new my-server
|
|
23
27
|
```
|
|
24
28
|
|
|
25
|
-
Or
|
|
29
|
+
Or install globally:
|
|
26
30
|
|
|
27
31
|
```bash
|
|
28
|
-
|
|
32
|
+
npm install -g mcp-new
|
|
33
|
+
mcp-new my-server
|
|
29
34
|
```
|
|
30
35
|
|
|
31
|
-
|
|
36
|
+
---
|
|
32
37
|
|
|
33
|
-
|
|
38
|
+
## ✨ Features
|
|
34
39
|
|
|
35
|
-
|
|
36
|
-
|
|
40
|
+
| Feature | Description |
|
|
41
|
+
|---------|-------------|
|
|
42
|
+
| 🧙 **Interactive Wizard** | Step-by-step prompts to configure your MCP server |
|
|
43
|
+
| 🌍 **Multi-Language** | TypeScript, Python, Go, and Rust support |
|
|
44
|
+
| 📦 **Preset Templates** | Ready-to-use templates for common use cases |
|
|
45
|
+
| 📄 **OpenAPI Import** | Auto-generate tools from OpenAPI/Swagger specs |
|
|
46
|
+
| 🤖 **AI Generation** | Create tools from natural language using Claude |
|
|
47
|
+
| 📚 **Rich Documentation** | Generated README with examples and Claude Desktop config |
|
|
37
48
|
|
|
38
|
-
|
|
39
|
-
# ? Project name: my-weather-api
|
|
40
|
-
# ? Select language: TypeScript
|
|
41
|
-
# ? Select transport: stdio
|
|
42
|
-
# ? Add example tool? Yes
|
|
49
|
+
---
|
|
43
50
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
51
|
+
## 🎯 Presets
|
|
52
|
+
|
|
53
|
+
Skip the setup and start with pre-configured tools:
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
mcp-new my-project --preset <name> -y
|
|
48
57
|
```
|
|
49
58
|
|
|
50
|
-
|
|
59
|
+
| Preset | Description | Included Tools |
|
|
60
|
+
|--------|-------------|----------------|
|
|
61
|
+
| `database` | Database CRUD operations | `query` `insert` `update` `delete` `list_tables` |
|
|
62
|
+
| `rest-api` | HTTP client wrapper | `http_get` `http_post` `http_put` `http_delete` `set_base_url` |
|
|
63
|
+
| `filesystem` | File system operations | `read_file` `write_file` `list_directory` `search_files` `file_info` |
|
|
64
|
+
|
|
65
|
+
<details>
|
|
66
|
+
<summary>📋 Example: Database preset</summary>
|
|
51
67
|
|
|
52
68
|
```bash
|
|
53
|
-
|
|
54
|
-
|
|
69
|
+
mcp-new my-db --preset database -t -y
|
|
70
|
+
```
|
|
55
71
|
|
|
56
|
-
|
|
57
|
-
npx mcp-generator my-server -p
|
|
72
|
+
Creates a TypeScript MCP server with these tools ready to implement:
|
|
58
73
|
|
|
59
|
-
|
|
60
|
-
|
|
74
|
+
- **query** — Execute SQL queries with parameters
|
|
75
|
+
- **insert** — Insert records into tables
|
|
76
|
+
- **update** — Update existing records
|
|
77
|
+
- **delete** — Delete records from tables
|
|
78
|
+
- **list_tables** — List all database tables
|
|
61
79
|
|
|
62
|
-
|
|
63
|
-
npx mcp-generator my-server -r
|
|
80
|
+
</details>
|
|
64
81
|
|
|
65
|
-
|
|
66
|
-
npx mcp-generator my-server --skip-install
|
|
82
|
+
---
|
|
67
83
|
|
|
68
|
-
|
|
69
|
-
npx mcp-generator my-server -y
|
|
70
|
-
```
|
|
84
|
+
## 🚀 Usage
|
|
71
85
|
|
|
72
|
-
###
|
|
86
|
+
### Basic Creation
|
|
73
87
|
|
|
74
88
|
```bash
|
|
75
|
-
|
|
89
|
+
# Interactive mode
|
|
90
|
+
mcp-new my-server
|
|
91
|
+
|
|
92
|
+
# With language flag
|
|
93
|
+
mcp-new my-server -t # TypeScript
|
|
94
|
+
mcp-new my-server -p # Python
|
|
95
|
+
mcp-new my-server -g # Go
|
|
96
|
+
mcp-new my-server -r # Rust
|
|
76
97
|
|
|
77
|
-
#
|
|
98
|
+
# Skip prompts with defaults
|
|
99
|
+
mcp-new my-server -t -y
|
|
78
100
|
```
|
|
79
101
|
|
|
80
|
-
### From
|
|
102
|
+
### From OpenAPI Specification
|
|
81
103
|
|
|
82
104
|
```bash
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
# Describe your API in the editor
|
|
86
|
-
# Claude will generate tools automatically
|
|
105
|
+
mcp-new my-api --from-openapi ./openapi.yaml
|
|
87
106
|
```
|
|
88
107
|
|
|
89
|
-
|
|
108
|
+
Select which endpoints to include as MCP tools.
|
|
90
109
|
|
|
91
|
-
###
|
|
110
|
+
### From AI Description
|
|
92
111
|
|
|
93
112
|
```bash
|
|
94
|
-
|
|
95
|
-
|
|
113
|
+
export ANTHROPIC_API_KEY=your-key
|
|
114
|
+
mcp-new my-server --from-prompt
|
|
96
115
|
```
|
|
97
116
|
|
|
98
|
-
|
|
117
|
+
Describe your API in natural language, Claude generates the tools.
|
|
118
|
+
|
|
119
|
+
### Additional Commands
|
|
99
120
|
|
|
100
121
|
```bash
|
|
101
|
-
|
|
102
|
-
|
|
122
|
+
# Initialize in existing directory
|
|
123
|
+
mcp-new init
|
|
124
|
+
|
|
125
|
+
# Add a new tool to existing project
|
|
126
|
+
mcp-new add-tool
|
|
103
127
|
```
|
|
104
128
|
|
|
105
|
-
|
|
129
|
+
---
|
|
106
130
|
|
|
107
|
-
|
|
108
|
-
|---------|-------------|
|
|
109
|
-
| `mcp-generator <name>` | Create new MCP server |
|
|
110
|
-
| `mcp-generator init` | Initialize MCP in current directory |
|
|
111
|
-
| `mcp-generator add-tool` | Add tool to existing server |
|
|
131
|
+
## 📖 Documentation
|
|
112
132
|
|
|
113
|
-
|
|
133
|
+
### CLI Reference
|
|
114
134
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
135
|
+
```
|
|
136
|
+
Usage: mcp-new [options] [command] [project-name]
|
|
137
|
+
|
|
138
|
+
Options:
|
|
139
|
+
-t, --typescript Use TypeScript
|
|
140
|
+
-p, --python Use Python
|
|
141
|
+
-g, --go Use Go
|
|
142
|
+
-r, --rust Use Rust
|
|
143
|
+
--preset <name> Use preset (database, rest-api, filesystem)
|
|
144
|
+
--from-openapi <path> Generate from OpenAPI spec
|
|
145
|
+
--from-prompt Generate using AI
|
|
146
|
+
--skip-install Skip dependency installation
|
|
147
|
+
-y, --yes Use defaults
|
|
148
|
+
-V, --version Show version
|
|
149
|
+
-h, --help Show help
|
|
150
|
+
|
|
151
|
+
Commands:
|
|
152
|
+
init Initialize in current directory
|
|
153
|
+
add-tool Add tool to existing project
|
|
154
|
+
```
|
|
125
155
|
|
|
126
|
-
|
|
156
|
+
### Generated Project Structure
|
|
127
157
|
|
|
128
|
-
|
|
158
|
+
<details>
|
|
159
|
+
<summary>TypeScript</summary>
|
|
129
160
|
|
|
130
161
|
```
|
|
131
162
|
my-server/
|
|
163
|
+
├── src/
|
|
164
|
+
│ └── index.ts
|
|
132
165
|
├── package.json
|
|
133
166
|
├── tsconfig.json
|
|
134
167
|
├── README.md
|
|
135
168
|
├── .gitignore
|
|
136
|
-
|
|
137
|
-
└── src/
|
|
138
|
-
├── index.ts # Main server file
|
|
139
|
-
└── tools/
|
|
140
|
-
└── example-tool.ts
|
|
169
|
+
└── .env.example
|
|
141
170
|
```
|
|
142
171
|
|
|
143
|
-
|
|
172
|
+
</details>
|
|
173
|
+
|
|
174
|
+
<details>
|
|
175
|
+
<summary>Python</summary>
|
|
144
176
|
|
|
145
177
|
```
|
|
146
178
|
my-server/
|
|
179
|
+
├── src/
|
|
180
|
+
│ ├── __init__.py
|
|
181
|
+
│ ├── server.py
|
|
182
|
+
│ └── tools/
|
|
183
|
+
│ └── __init__.py
|
|
147
184
|
├── pyproject.toml
|
|
148
185
|
├── requirements.txt
|
|
149
186
|
├── README.md
|
|
150
187
|
├── .gitignore
|
|
151
|
-
|
|
152
|
-
└── src/
|
|
153
|
-
├── __init__.py
|
|
154
|
-
├── server.py # Main server file
|
|
155
|
-
└── tools/
|
|
156
|
-
├── __init__.py
|
|
157
|
-
└── example_tool.py
|
|
188
|
+
└── .env.example
|
|
158
189
|
```
|
|
159
190
|
|
|
160
|
-
|
|
191
|
+
</details>
|
|
192
|
+
|
|
193
|
+
<details>
|
|
194
|
+
<summary>Go</summary>
|
|
161
195
|
|
|
162
196
|
```
|
|
163
197
|
my-server/
|
|
198
|
+
├── cmd/
|
|
199
|
+
│ └── server/
|
|
200
|
+
│ └── main.go
|
|
201
|
+
├── internal/
|
|
202
|
+
│ └── tools/
|
|
164
203
|
├── go.mod
|
|
165
204
|
├── README.md
|
|
166
205
|
├── .gitignore
|
|
167
|
-
|
|
168
|
-
├── cmd/
|
|
169
|
-
│ └── server/
|
|
170
|
-
│ └── main.go # Main server file
|
|
171
|
-
└── internal/
|
|
172
|
-
└── tools/
|
|
173
|
-
└── example.go
|
|
206
|
+
└── .env.example
|
|
174
207
|
```
|
|
175
208
|
|
|
176
|
-
|
|
209
|
+
</details>
|
|
210
|
+
|
|
211
|
+
<details>
|
|
212
|
+
<summary>Rust</summary>
|
|
177
213
|
|
|
178
214
|
```
|
|
179
215
|
my-server/
|
|
216
|
+
├── src/
|
|
217
|
+
│ ├── main.rs
|
|
218
|
+
│ └── tools.rs
|
|
180
219
|
├── Cargo.toml
|
|
181
220
|
├── README.md
|
|
182
221
|
├── .gitignore
|
|
183
|
-
|
|
184
|
-
└── src/
|
|
185
|
-
├── main.rs # Main server file
|
|
186
|
-
└── tools.rs
|
|
222
|
+
└── .env.example
|
|
187
223
|
```
|
|
188
224
|
|
|
189
|
-
|
|
225
|
+
</details>
|
|
190
226
|
|
|
191
|
-
|
|
192
|
-
# Clone repository
|
|
193
|
-
git clone https://github.com/d1maash/mcp-generator.git
|
|
194
|
-
cd mcp-generator
|
|
227
|
+
### Generated README
|
|
195
228
|
|
|
196
|
-
|
|
229
|
+
Each project includes a detailed README with:
|
|
230
|
+
|
|
231
|
+
- ✅ Parameter tables for each tool
|
|
232
|
+
- ✅ JSON examples for tool calls
|
|
233
|
+
- ✅ Claude Desktop configuration snippet
|
|
234
|
+
- ✅ Project structure overview
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## 🛠 Development
|
|
239
|
+
|
|
240
|
+
```bash
|
|
241
|
+
# Clone and install
|
|
242
|
+
git clone https://github.com/d1maash/mcp-new.git
|
|
243
|
+
cd mcp-new
|
|
197
244
|
npm install
|
|
198
245
|
|
|
199
246
|
# Development
|
|
@@ -202,22 +249,45 @@ npm run dev
|
|
|
202
249
|
# Build
|
|
203
250
|
npm run build
|
|
204
251
|
|
|
205
|
-
#
|
|
206
|
-
npm test
|
|
207
|
-
|
|
208
|
-
# Local CLI testing
|
|
252
|
+
# Test locally
|
|
209
253
|
npm link
|
|
210
|
-
mcp-
|
|
254
|
+
mcp-new test-project --preset database -t -y
|
|
211
255
|
```
|
|
212
256
|
|
|
213
|
-
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## 🔗 Resources
|
|
214
260
|
|
|
215
261
|
- [MCP Specification](https://spec.modelcontextprotocol.io/)
|
|
216
|
-
- [
|
|
217
|
-
- [
|
|
218
|
-
- [
|
|
219
|
-
- [
|
|
262
|
+
- [TypeScript SDK](https://github.com/modelcontextprotocol/typescript-sdk)
|
|
263
|
+
- [Python SDK](https://github.com/modelcontextprotocol/python-sdk)
|
|
264
|
+
- [Go SDK](https://github.com/mark3labs/mcp-go)
|
|
265
|
+
- [Rust SDK](https://github.com/modelcontextprotocol/rust-sdk)
|
|
266
|
+
|
|
267
|
+
---
|
|
268
|
+
|
|
269
|
+
## 🤝 Contributing
|
|
270
|
+
|
|
271
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
272
|
+
|
|
273
|
+
1. Fork the repository
|
|
274
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
275
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
276
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
277
|
+
5. Open a Pull Request
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## 📄 License
|
|
282
|
+
|
|
283
|
+
MIT © [Dinmukhanbet Aizharykov](https://github.com/d1maash)
|
|
284
|
+
|
|
285
|
+
---
|
|
286
|
+
|
|
287
|
+
<div align="center">
|
|
288
|
+
|
|
289
|
+
**[⬆ Back to top](#mcp-new)**
|
|
220
290
|
|
|
221
|
-
|
|
291
|
+
Made with ❤️ for the MCP community
|
|
222
292
|
|
|
223
|
-
|
|
293
|
+
</div>
|