Tooluck logoTooluck
SKILL.md

leanmcp-builder

Agent skill fromLeanmcp/gateway-skills

Build MCP servers using the Leanmcp SDK with decorator-based TypeScript. Use this skill when users ask for "leanmcp", "MCP with decorators", "MCP with authentication", "MCP with elicitation", "MCP with environment injection", or want a simpler, more elegant way to build MCP servers. Leanmcp provides automatic schema generation, dependency injection, authentication, and user input collection.

How to install leanmcp-builder

install leanmcp-builder
# install the gateway-skills pack with the skills CLI
npx skills add Leanmcp/gateway-skills

# or add only this skill to Claude Code: copy the folder

skills/leanmcp-builder/

# into

~/.claude/skills/leanmcp-builder/ (all projects)

.claude/skills/leanmcp-builder/ (one project)

skills/leanmcp-builder/SKILL.md

MITFull file
1# Leanmcp Builder Skill
2
3This skill guides you in building MCP servers using the Leanmcp SDK - a decorator-based TypeScript framework for elegant MCP development.
4
5## When to Use This Skill
6
7- User asks for "leanmcp server"
8- User wants "MCP with decorators"
9- User needs "authenticated MCP server"
10- User wants "simpler MCP development"
11- User mentions "@leanmcp/core"
12- User needs "user input collection" or "elicitation"
13- User wants "environment injection" for multi-tenant secrets
14
15## Leanmcp vs Vanilla MCP
16
17| Feature | Vanilla MCP | Leanmcp SDK |
18|---------|-------------|-------------|
19| Tool definition | Manual schema | `@Tool` decorator with auto-schema |
20| Input validation | Manual | Automatic with `@SchemaConstraint` |
21| Service discovery | Manual registration | Auto-discovery from `./mcp` directory |
22| Authentication | DIY | `@Authenticated` decorator |
23| User input | Not built-in | `@Elicitation` decorator |
24| Secrets | DIY | `@RequireEnv` + `getEnv()` |
25
26## Core Packages
27
28```bash
29# Minimal setup
30npm install @leanmcp/core
31
32# With authentication
33npm install @leanmcp/auth
34
35# With user input forms
36npm install @leanmcp/elicitation
37
38# With user secrets
39npm install @leanmcp/env-injection
40
41# CLI (global or dev)
42npm install -g @leanmcp/cli
43```
44
45## Project Structure
46
47```
48my-leanmcp-server/
49├── main.ts # Entry point (minimal)
50├── mcp/ # Auto-discovered services
51│ ├── example/
52│ │ └── index.ts # Exports ExampleService
53…

Excerpt shown under the repository's MIT license.

More skills in gateway-skills

Keep exploring

Similar skill repositories

thedotmack /

claude-mem
116k

Persistent Context Across Sessions for Every Agent – Captures everything your agent does during sessions, compresses it with AI, and injects relevant context back into future sessions. Works with Claude Code, OpenClaw, Codex, Gemini, Hermes, Copilot, OpenCode + More

CCCXGHGM+135 skills

Newsletter

Join the Community

Subscribe to our newsletter for the latest news and updates