@leanmcp/cli 0.2.0 → 0.2.2

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 CHANGED
@@ -14,14 +14,15 @@ Command-line tool for creating LeanMCP projects with production-ready templates.
14
14
 
15
15
  ## Installation
16
16
 
17
- ### Global Installation (Recommended)
18
-
19
17
  ```bash
18
+ # npm
20
19
  npm install -g @leanmcp/cli
21
- ```
22
20
 
23
- ### Run Without Installing
21
+ # GitHub Packages
22
+ npm install -g @leanmcp/cli --registry=https://npm.pkg.github.com
23
+ ```
24
24
 
25
+ Or use without installing:
25
26
  ```bash
26
27
  npx @leanmcp/cli create my-mcp-server
27
28
  ```
@@ -393,6 +394,23 @@ Adds a new service to an existing project:
393
394
  - Includes example Tool, Prompt, and Resource implementations
394
395
  - Uses schema validation with `@SchemaConstraint` decorators
395
396
 
397
+ ## 🌟 Showcase Your MCP Server
398
+
399
+ Built something cool with LeanMCP? We'd love to feature it!
400
+
401
+ ### How to Get Featured
402
+
403
+ 1. **Build** an awesome MCP server using LeanMCP
404
+ 2. **Share** your project on GitHub
405
+ 3. **Submit** for showcase:
406
+ - Open an issue: [Request Showcase](https://github.com/LeanMCP/leanmcp-sdk/issues/new?title=[Showcase]%20Your%20Project%20Name)
407
+ - Include:
408
+ - Project name and description
409
+ - GitHub repository link
410
+ - What makes it unique
411
+ - Screenshots or demo
412
+
413
+
396
414
  ## License
397
415
 
398
416
  MIT
@@ -48,7 +48,7 @@ program.command("create <projectName>").description("Create a new LeanMCP projec
48
48
  author: "",
49
49
  license: "MIT",
50
50
  dependencies: {
51
- "@leanmcp/core": "^0.2.0",
51
+ "@leanmcp/core": "^3.1.0",
52
52
  "dotenv": "^16.5.0"
53
53
  },
54
54
  devDependencies: {
@@ -143,27 +143,38 @@ class CalculateInput {
143
143
  operation?: string;
144
144
  }
145
145
 
146
+ class EchoInput {
147
+ @SchemaConstraint({
148
+ description: "Message to echo back",
149
+ minLength: 1
150
+ })
151
+ message!: string;
152
+ }
153
+
146
154
  export class ExampleService {
147
155
  @Tool({
148
156
  description: "Perform arithmetic operations with automatic schema validation",
149
157
  inputClass: CalculateInput
150
158
  })
151
159
  async calculate(input: CalculateInput) {
160
+ // Ensure numerical operations by explicitly converting to numbers
161
+ const a = Number(input.a);
162
+ const b = Number(input.b);
152
163
  let result: number;
153
164
 
154
165
  switch (input.operation || "add") {
155
166
  case "add":
156
- result = input.a + input.b;
167
+ result = a + b;
157
168
  break;
158
169
  case "subtract":
159
- result = input.a - input.b;
170
+ result = a - b;
160
171
  break;
161
172
  case "multiply":
162
- result = input.a * input.b;
173
+ result = a * b;
163
174
  break;
164
175
  case "divide":
165
- if (input.b === 0) throw new Error("Cannot divide by zero");
166
- result = input.a / input.b;
176
+ if (b === 0) throw new Error("Cannot divide by zero");
177
+ result = a / b;
167
178
  break;
168
179
  default:
169
180
  throw new Error("Invalid operation");
@@ -181,8 +192,11 @@ export class ExampleService {
181
192
  };
182
193
  }
183
194
 
184
- @Tool({ description: "Echo a message back" })
185
- async echo(input: { message: string }) {
195
+ @Tool({
196
+ description: "Echo a message back",
197
+ inputClass: EchoInput
198
+ })
199
+ async echo(input: EchoInput) {
186
200
  return {
187
201
  content: [{
188
202
  type: "text" as const,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leanmcp/cli",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "Command-line interface for scaffolding LeanMCP projects",
5
5
  "bin": {
6
6
  "leanmcp": "bin/leanmcp.js"