mcpill 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/CHANGELOG.md +8 -0
- package/README.md +76 -10
- package/dist/cli.js +138 -46
- package/package.json +1 -1
- package/src/commands/init.ts +136 -46
- package/.claude/commands/add-card.md +0 -9
- package/.claude/commands/append-card.md +0 -10
- package/.claude/commands/play-card.md +0 -14
- package/.claude/commands/turn.md +0 -28
- package/.claude/settings.json +0 -10
- package/.flowdeck/.flowdeckignore +0 -5
- package/.flowdeck/AGENT.md +0 -46
- package/.flowdeck/TODO.md.template +0 -14
- package/.flowdeck/_discard/start/DISCARD.md +0 -8
- package/.flowdeck/_discard/start/TODO.md +0 -35
- package/.flowdeck/_discard/start/turn.log +0 -28
- package/.flowdeck/_energy/ADR.md.template +0 -100
- package/.flowdeck/_energy/CLAUDE.md.template +0 -95
- package/.flowdeck/_energy/GENERALINSIGHTS.md.template +0 -57
- package/.flowdeck/_energy/MISSION.md.template +0 -89
- package/.flowdeck/_energy/OPEN-QUESTIONS.md.template +0 -109
- package/.flowdeck/_energy/PROJECTINSIGHTS.md.template +0 -64
- package/.flowdeck/_energy/SPEC.md.template +0 -101
- package/.flowdeck/_frozen/FROZEN.md +0 -4
- package/.flowdeck/_meld/MELD.md +0 -4
- package/.flowdeck/_stock/STOCK.md +0 -4
- package/.flowdeck/reframe/TODO.md +0 -71
- package/FLOWDECK.md +0 -17
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.2.0
|
|
4
|
+
|
|
5
|
+
- `mcpill init` now scaffolds `PILL.md` — an intent-level spec the developer fills in plain English
|
|
6
|
+
- `PILL.md` embeds agent instructions; tell Claude "Build this PILL.md" to generate source files and compile
|
|
7
|
+
- Example source files (`tools/echo.md`, `prompts/greeting.md`, `server.md`) still scaffolded for direct editing
|
|
8
|
+
- Removed `tools.js`, `prompts.json`, `resources.md` from `.mcpill/` initial scaffold (generated by `mcpill compile`)
|
|
9
|
+
- Updated `mcpill init` console output to guide both entry points
|
|
10
|
+
|
|
3
11
|
## 1.1.0
|
|
4
12
|
|
|
5
13
|
- Renamed to `mcpill`; `@ruco-ai/mcpill` deprecated — install `mcpill` instead
|
package/README.md
CHANGED
|
@@ -10,28 +10,42 @@ CLI for building, validating, and publishing MCP servers using the pill format.
|
|
|
10
10
|
npm install -g mcpill
|
|
11
11
|
```
|
|
12
12
|
|
|
13
|
-
##
|
|
13
|
+
## Workflows
|
|
14
|
+
|
|
15
|
+
### PILL-first (recommended for new servers)
|
|
16
|
+
|
|
17
|
+
Describe your server in plain English, let Claude generate the source files.
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
mcpill init # scaffolds PILL.md + example source files
|
|
21
|
+
# fill PILL.md # describe your server: tools, resources, prompts
|
|
22
|
+
# tell Claude: "Build this PILL.md" # agent generates source files + runs compile
|
|
23
|
+
mcpill run # start the server
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
`PILL.md` embeds the agent instructions — Claude knows exactly what to generate and how.
|
|
27
|
+
|
|
28
|
+
### Direct edit (for devs who know the pill format)
|
|
14
29
|
|
|
15
30
|
```
|
|
16
|
-
mcpill init
|
|
17
|
-
#
|
|
18
|
-
mcpill compile
|
|
19
|
-
mcpill
|
|
20
|
-
mcpill run # start the MCP server locally (dev)
|
|
21
|
-
mcpill pack # prepare bin/server.js + package.json for npm
|
|
22
|
-
mcpill publish # pack + npm publish
|
|
31
|
+
mcpill init # scaffolds server.md + tools/ + prompts/
|
|
32
|
+
# edit source files # tools/*.md, prompts/*.md, server.md
|
|
33
|
+
mcpill compile # compile source → .{name}/ pill artifact
|
|
34
|
+
mcpill run # start the server
|
|
23
35
|
```
|
|
24
36
|
|
|
37
|
+
---
|
|
38
|
+
|
|
25
39
|
## Commands
|
|
26
40
|
|
|
27
41
|
### `mcpill init`
|
|
28
42
|
|
|
29
43
|
Scaffolds a new project in the current directory:
|
|
30
44
|
|
|
31
|
-
- `
|
|
45
|
+
- `PILL.md` — intent-level spec; fill this and hand to Claude to generate source files
|
|
46
|
+
- `server.md` — server config + resources
|
|
32
47
|
- `tools/echo.md` — example tool
|
|
33
48
|
- `prompts/greeting.md` — example prompt
|
|
34
|
-
- `.mcpill/` — pre-compiled pill artifact
|
|
35
49
|
- `package.json` — with `pack` and `publish` scripts ready
|
|
36
50
|
|
|
37
51
|
### `mcpill compile`
|
|
@@ -83,3 +97,55 @@ mcpill publish --access restricted
|
|
|
83
97
|
## Options
|
|
84
98
|
|
|
85
99
|
All commands accept `--dir <path>` to target a directory other than the current working directory.
|
|
100
|
+
|
|
101
|
+
## Pill source format
|
|
102
|
+
|
|
103
|
+
### `server.md`
|
|
104
|
+
|
|
105
|
+
```markdown
|
|
106
|
+
## Config
|
|
107
|
+
name: my-server
|
|
108
|
+
transport: stdio
|
|
109
|
+
|
|
110
|
+
## Resources
|
|
111
|
+
uri: info://status
|
|
112
|
+
name: Status
|
|
113
|
+
---
|
|
114
|
+
The server is running.
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### `tools/{name}.md`
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
# tool-name
|
|
121
|
+
|
|
122
|
+
Description of what the tool does
|
|
123
|
+
|
|
124
|
+
## Parameters
|
|
125
|
+
|
|
126
|
+
- param (string): Description of the parameter
|
|
127
|
+
|
|
128
|
+
## Handler
|
|
129
|
+
|
|
130
|
+
\`\`\`js
|
|
131
|
+
async ({ param }) => {
|
|
132
|
+
return { content: [{ type: "text", text: param }] };
|
|
133
|
+
}
|
|
134
|
+
\`\`\`
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### `prompts/{name}.md`
|
|
138
|
+
|
|
139
|
+
```markdown
|
|
140
|
+
# prompt-name
|
|
141
|
+
|
|
142
|
+
Description of the prompt
|
|
143
|
+
|
|
144
|
+
## Args
|
|
145
|
+
|
|
146
|
+
- name (string): The name to greet
|
|
147
|
+
|
|
148
|
+
## Message
|
|
149
|
+
|
|
150
|
+
> user: Say hello to {{name}}
|
|
151
|
+
```
|
package/dist/cli.js
CHANGED
|
@@ -9,45 +9,141 @@ import { readFileSync as readFileSync3 } from "fs";
|
|
|
9
9
|
// src/commands/init.ts
|
|
10
10
|
import fs from "fs";
|
|
11
11
|
import path from "path";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
12
|
+
function makePillMd(projectName) {
|
|
13
|
+
return `<!-- \u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
14
|
+
FOR THE AGENT \u2014 read this before doing anything else
|
|
15
|
+
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550
|
|
16
|
+
|
|
17
|
+
You are building an mcpill MCP server from this document.
|
|
18
|
+
|
|
19
|
+
STEPS:
|
|
20
|
+
|
|
21
|
+
1. PARSE the sections below:
|
|
22
|
+
- ## Server \u2192 server name, description, transport (+ port if http)
|
|
23
|
+
- ## Tool: <name> \u2192 one tool per section (repeatable)
|
|
24
|
+
- ## Resource: <name> \u2192 static resource (optional, repeatable)
|
|
25
|
+
- ## Prompt: <name> \u2192 prompt template (optional, repeatable)
|
|
26
|
+
|
|
27
|
+
2. CREATE a directory named after the server. Generate inside it:
|
|
28
|
+
|
|
29
|
+
server.md
|
|
30
|
+
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
31
|
+
## Config
|
|
32
|
+
name: {name}
|
|
33
|
+
transport: {transport}
|
|
34
|
+
port: {port} \u2190 only if transport is http
|
|
35
|
+
|
|
36
|
+
## Resources
|
|
37
|
+
uri: {uri}
|
|
38
|
+
name: {resource-name}
|
|
39
|
+
---
|
|
40
|
+
{content}
|
|
41
|
+
\u2190 omit ## Resources entirely if none specified
|
|
42
|
+
\u2190 separate multiple resources with a blank line + --- + blank line
|
|
43
|
+
|
|
44
|
+
tools/{tool-name}.md (one file per ## Tool section)
|
|
45
|
+
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
46
|
+
# {tool-name}
|
|
47
|
+
|
|
48
|
+
{description}
|
|
49
|
+
|
|
50
|
+
## Parameters
|
|
51
|
+
|
|
52
|
+
- {param} ({type}): {description}
|
|
53
|
+
|
|
54
|
+
## Handler
|
|
55
|
+
|
|
56
|
+
\`\`\`js
|
|
57
|
+
async ({ {param} }) => {
|
|
58
|
+
// real implementation \u2014 not a stub
|
|
59
|
+
return { content: [{ type: "text", text: {result} }] };
|
|
60
|
+
}
|
|
61
|
+
\`\`\`
|
|
62
|
+
|
|
63
|
+
prompts/{prompt-name}.md (one file per ## Prompt section)
|
|
64
|
+
\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
65
|
+
# {prompt-name}
|
|
66
|
+
|
|
67
|
+
{description}
|
|
68
|
+
|
|
69
|
+
## Args
|
|
70
|
+
|
|
71
|
+
- {arg} ({type}): {description}
|
|
72
|
+
|
|
73
|
+
## Message
|
|
74
|
+
|
|
75
|
+
> user: {message with {{arg}} placeholders}
|
|
76
|
+
\u2190 omit ## Args if the prompt takes no arguments
|
|
77
|
+
|
|
78
|
+
3. TRANSLATE each tool's \`behavior\` field into a working JS async handler.
|
|
79
|
+
- Implement the described logic fully \u2014 no stubs, no TODOs.
|
|
80
|
+
- Handler is self-contained: no top-level imports.
|
|
81
|
+
- For file I/O or network calls: use dynamic import inside the handler.
|
|
82
|
+
- Return shape must be: { content: [{ type: "text", text: string }] }
|
|
83
|
+
- Allowed parameter types: string | number | boolean. Default unknown types to string.
|
|
84
|
+
|
|
85
|
+
4. RUN \`mcpill compile\` (or \`mcpill compile --dir {server-name}\`).
|
|
86
|
+
|
|
87
|
+
5. REPORT what was generated and show the user the next commands:
|
|
88
|
+
mcpill validate
|
|
89
|
+
mcpill run
|
|
90
|
+
mcpill pack / mcpill publish
|
|
91
|
+
|
|
92
|
+
EDGE CASES:
|
|
93
|
+
- transport http without port \u2192 default to 3333
|
|
94
|
+
- prompt message without role prefix \u2192 wrap as \`> user: {message}\`
|
|
95
|
+
- server name with spaces \u2192 convert to kebab-case for directory and name field
|
|
96
|
+
\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550 -->
|
|
97
|
+
|
|
98
|
+
# Pill: ${projectName}
|
|
99
|
+
|
|
48
100
|
---
|
|
49
|
-
|
|
101
|
+
|
|
102
|
+
## Server
|
|
103
|
+
|
|
104
|
+
name: ${projectName}
|
|
105
|
+
description:
|
|
106
|
+
transport: stdio
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Tool: echo
|
|
111
|
+
|
|
112
|
+
description: Echo a message back to the caller.
|
|
113
|
+
inputs:
|
|
114
|
+
- message (string): The message to echo.
|
|
115
|
+
output: The same message, echoed back as text.
|
|
116
|
+
behavior: |
|
|
117
|
+
Return the message input unchanged.
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## Tool: greet
|
|
122
|
+
|
|
123
|
+
description: Generate a personalised greeting.
|
|
124
|
+
inputs:
|
|
125
|
+
- name (string): The name of the person to greet.
|
|
126
|
+
output: A greeting string addressed to the given name.
|
|
127
|
+
behavior: |
|
|
128
|
+
Return "Hello, {name}!" as a text response.
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## Next Steps
|
|
133
|
+
|
|
134
|
+
Fill in your server above (replace or extend the example tools), then tell Claude:
|
|
135
|
+
|
|
136
|
+
> "Build this PILL.md"
|
|
137
|
+
|
|
138
|
+
After the source files are generated:
|
|
139
|
+
|
|
140
|
+
- [ ] \`mcpill compile\`
|
|
141
|
+
- [ ] \`mcpill validate\`
|
|
142
|
+
- [ ] \`mcpill run\`
|
|
143
|
+
- [ ] \`mcpill pack\`
|
|
144
|
+
- [ ] \`mcpill publish\`
|
|
50
145
|
`;
|
|
146
|
+
}
|
|
51
147
|
var SERVER_MD_TEMPLATE = `## Config
|
|
52
148
|
name: my-server
|
|
53
149
|
transport: stdio
|
|
@@ -100,9 +196,6 @@ async function runInit(opts) {
|
|
|
100
196
|
2
|
|
101
197
|
);
|
|
102
198
|
fs.mkdirSync(mcpillDir, { recursive: true });
|
|
103
|
-
fs.writeFileSync(path.join(mcpillDir, "tools.js"), TOOLS_JS);
|
|
104
|
-
fs.writeFileSync(path.join(mcpillDir, "prompts.json"), PROMPTS_JSON);
|
|
105
|
-
fs.writeFileSync(path.join(mcpillDir, "resources.md"), RESOURCES_MD);
|
|
106
199
|
fs.writeFileSync(path.join(mcpillDir, "mcpill.config.json"), configJson);
|
|
107
200
|
const toolsDir = path.join(targetDir, "tools");
|
|
108
201
|
const promptsDir = path.join(targetDir, "prompts");
|
|
@@ -115,6 +208,7 @@ async function runInit(opts) {
|
|
|
115
208
|
`name: ${projectName}`
|
|
116
209
|
);
|
|
117
210
|
fs.writeFileSync(path.join(targetDir, "server.md"), serverMd);
|
|
211
|
+
fs.writeFileSync(path.join(targetDir, "PILL.md"), makePillMd(projectName));
|
|
118
212
|
const pkgJson = JSON.stringify(
|
|
119
213
|
{
|
|
120
214
|
name: projectName,
|
|
@@ -126,15 +220,13 @@ async function runInit(opts) {
|
|
|
126
220
|
2
|
|
127
221
|
);
|
|
128
222
|
fs.writeFileSync(path.join(targetDir, "package.json"), pkgJson);
|
|
129
|
-
console.log(
|
|
130
|
-
console.log("\u2713 .
|
|
131
|
-
console.log("\u2713 .mcpill/resources.md");
|
|
132
|
-
console.log("\u2713 .mcpill/mcpill.config.json");
|
|
223
|
+
console.log('\u2713 PILL.md \u2190 describe your server, then tell Claude: "Build this PILL.md"');
|
|
224
|
+
console.log("\u2713 server.md \u2190 or edit source files directly");
|
|
133
225
|
console.log("\u2713 tools/echo.md");
|
|
134
226
|
console.log("\u2713 prompts/greeting.md");
|
|
135
|
-
console.log("\u2713 server.md");
|
|
136
227
|
console.log("\u2713 package.json");
|
|
137
|
-
console.log("
|
|
228
|
+
console.log("");
|
|
229
|
+
console.log("When ready: mcpill compile && mcpill run");
|
|
138
230
|
}
|
|
139
231
|
|
|
140
232
|
// src/commands/run.ts
|
package/package.json
CHANGED
package/src/commands/init.ts
CHANGED
|
@@ -1,47 +1,141 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
2
|
import path from "path";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
name: "read_file",
|
|
9
|
-
description: "Read the contents of a file",
|
|
10
|
-
schema: {
|
|
11
|
-
path: z.string().describe("Path to the file to read"),
|
|
12
|
-
},
|
|
13
|
-
handler: async ({ path: filePath }) => {
|
|
14
|
-
return { content: \`Contents of \${filePath}\` };
|
|
15
|
-
},
|
|
16
|
-
},
|
|
17
|
-
];
|
|
18
|
-
`;
|
|
4
|
+
function makePillMd(projectName: string): string {
|
|
5
|
+
return `<!-- ═══════════════════════════════════════════════════════════════
|
|
6
|
+
FOR THE AGENT — read this before doing anything else
|
|
7
|
+
═══════════════════════════════════════════════════════════════
|
|
19
8
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
9
|
+
You are building an mcpill MCP server from this document.
|
|
10
|
+
|
|
11
|
+
STEPS:
|
|
12
|
+
|
|
13
|
+
1. PARSE the sections below:
|
|
14
|
+
- ## Server → server name, description, transport (+ port if http)
|
|
15
|
+
- ## Tool: <name> → one tool per section (repeatable)
|
|
16
|
+
- ## Resource: <name> → static resource (optional, repeatable)
|
|
17
|
+
- ## Prompt: <name> → prompt template (optional, repeatable)
|
|
18
|
+
|
|
19
|
+
2. CREATE a directory named after the server. Generate inside it:
|
|
20
|
+
|
|
21
|
+
server.md
|
|
22
|
+
─────────
|
|
23
|
+
## Config
|
|
24
|
+
name: {name}
|
|
25
|
+
transport: {transport}
|
|
26
|
+
port: {port} ← only if transport is http
|
|
27
|
+
|
|
28
|
+
## Resources
|
|
29
|
+
uri: {uri}
|
|
30
|
+
name: {resource-name}
|
|
31
|
+
---
|
|
32
|
+
{content}
|
|
33
|
+
← omit ## Resources entirely if none specified
|
|
34
|
+
← separate multiple resources with a blank line + --- + blank line
|
|
35
|
+
|
|
36
|
+
tools/{tool-name}.md (one file per ## Tool section)
|
|
37
|
+
─────────────────────
|
|
38
|
+
# {tool-name}
|
|
39
|
+
|
|
40
|
+
{description}
|
|
41
|
+
|
|
42
|
+
## Parameters
|
|
43
|
+
|
|
44
|
+
- {param} ({type}): {description}
|
|
45
|
+
|
|
46
|
+
## Handler
|
|
47
|
+
|
|
48
|
+
\`\`\`js
|
|
49
|
+
async ({ {param} }) => {
|
|
50
|
+
// real implementation — not a stub
|
|
51
|
+
return { content: [{ type: "text", text: {result} }] };
|
|
52
|
+
}
|
|
53
|
+
\`\`\`
|
|
54
|
+
|
|
55
|
+
prompts/{prompt-name}.md (one file per ## Prompt section)
|
|
56
|
+
─────────────────────────
|
|
57
|
+
# {prompt-name}
|
|
58
|
+
|
|
59
|
+
{description}
|
|
60
|
+
|
|
61
|
+
## Args
|
|
62
|
+
|
|
63
|
+
- {arg} ({type}): {description}
|
|
64
|
+
|
|
65
|
+
## Message
|
|
66
|
+
|
|
67
|
+
> user: {message with {{arg}} placeholders}
|
|
68
|
+
← omit ## Args if the prompt takes no arguments
|
|
69
|
+
|
|
70
|
+
3. TRANSLATE each tool's \`behavior\` field into a working JS async handler.
|
|
71
|
+
- Implement the described logic fully — no stubs, no TODOs.
|
|
72
|
+
- Handler is self-contained: no top-level imports.
|
|
73
|
+
- For file I/O or network calls: use dynamic import inside the handler.
|
|
74
|
+
- Return shape must be: { content: [{ type: "text", text: string }] }
|
|
75
|
+
- Allowed parameter types: string | number | boolean. Default unknown types to string.
|
|
76
|
+
|
|
77
|
+
4. RUN \`mcpill compile\` (or \`mcpill compile --dir {server-name}\`).
|
|
78
|
+
|
|
79
|
+
5. REPORT what was generated and show the user the next commands:
|
|
80
|
+
mcpill validate
|
|
81
|
+
mcpill run
|
|
82
|
+
mcpill pack / mcpill publish
|
|
83
|
+
|
|
84
|
+
EDGE CASES:
|
|
85
|
+
- transport http without port → default to 3333
|
|
86
|
+
- prompt message without role prefix → wrap as \`> user: {message}\`
|
|
87
|
+
- server name with spaces → convert to kebab-case for directory and name field
|
|
88
|
+
════════════════════════════════════════════════════════════════ -->
|
|
89
|
+
|
|
90
|
+
# Pill: ${projectName}
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Server
|
|
95
|
+
|
|
96
|
+
name: ${projectName}
|
|
97
|
+
description:
|
|
98
|
+
transport: stdio
|
|
39
99
|
|
|
40
|
-
const RESOURCES_MD = `uri: config://app
|
|
41
|
-
name: App Config
|
|
42
100
|
---
|
|
43
|
-
|
|
101
|
+
|
|
102
|
+
## Tool: echo
|
|
103
|
+
|
|
104
|
+
description: Echo a message back to the caller.
|
|
105
|
+
inputs:
|
|
106
|
+
- message (string): The message to echo.
|
|
107
|
+
output: The same message, echoed back as text.
|
|
108
|
+
behavior: |
|
|
109
|
+
Return the message input unchanged.
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## Tool: greet
|
|
114
|
+
|
|
115
|
+
description: Generate a personalised greeting.
|
|
116
|
+
inputs:
|
|
117
|
+
- name (string): The name of the person to greet.
|
|
118
|
+
output: A greeting string addressed to the given name.
|
|
119
|
+
behavior: |
|
|
120
|
+
Return "Hello, {name}!" as a text response.
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
## Next Steps
|
|
125
|
+
|
|
126
|
+
Fill in your server above (replace or extend the example tools), then tell Claude:
|
|
127
|
+
|
|
128
|
+
> "Build this PILL.md"
|
|
129
|
+
|
|
130
|
+
After the source files are generated:
|
|
131
|
+
|
|
132
|
+
- [ ] \`mcpill compile\`
|
|
133
|
+
- [ ] \`mcpill validate\`
|
|
134
|
+
- [ ] \`mcpill run\`
|
|
135
|
+
- [ ] \`mcpill pack\`
|
|
136
|
+
- [ ] \`mcpill publish\`
|
|
44
137
|
`;
|
|
138
|
+
}
|
|
45
139
|
|
|
46
140
|
// Embedded content of src/templates/server.md — tsup does not copy non-TS assets,
|
|
47
141
|
// so the template is inlined here. Keep in sync with src/templates/server.md.
|
|
@@ -103,9 +197,6 @@ export async function runInit(opts: { dir?: string }): Promise<void> {
|
|
|
103
197
|
);
|
|
104
198
|
|
|
105
199
|
fs.mkdirSync(mcpillDir, { recursive: true });
|
|
106
|
-
fs.writeFileSync(path.join(mcpillDir, "tools.js"), TOOLS_JS);
|
|
107
|
-
fs.writeFileSync(path.join(mcpillDir, "prompts.json"), PROMPTS_JSON);
|
|
108
|
-
fs.writeFileSync(path.join(mcpillDir, "resources.md"), RESOURCES_MD);
|
|
109
200
|
fs.writeFileSync(path.join(mcpillDir, "mcpill.config.json"), configJson);
|
|
110
201
|
|
|
111
202
|
const toolsDir = path.join(targetDir, "tools");
|
|
@@ -120,6 +211,7 @@ export async function runInit(opts: { dir?: string }): Promise<void> {
|
|
|
120
211
|
`name: ${projectName}`,
|
|
121
212
|
);
|
|
122
213
|
fs.writeFileSync(path.join(targetDir, "server.md"), serverMd);
|
|
214
|
+
fs.writeFileSync(path.join(targetDir, "PILL.md"), makePillMd(projectName));
|
|
123
215
|
|
|
124
216
|
const pkgJson = JSON.stringify(
|
|
125
217
|
{
|
|
@@ -133,13 +225,11 @@ export async function runInit(opts: { dir?: string }): Promise<void> {
|
|
|
133
225
|
);
|
|
134
226
|
fs.writeFileSync(path.join(targetDir, "package.json"), pkgJson);
|
|
135
227
|
|
|
136
|
-
console.log("✓ .
|
|
137
|
-
console.log("✓ .
|
|
138
|
-
console.log("✓ .mcpill/resources.md");
|
|
139
|
-
console.log("✓ .mcpill/mcpill.config.json");
|
|
228
|
+
console.log("✓ PILL.md ← describe your server, then tell Claude: \"Build this PILL.md\"");
|
|
229
|
+
console.log("✓ server.md ← or edit source files directly");
|
|
140
230
|
console.log("✓ tools/echo.md");
|
|
141
231
|
console.log("✓ prompts/greeting.md");
|
|
142
|
-
console.log("✓ server.md");
|
|
143
232
|
console.log("✓ package.json");
|
|
144
|
-
console.log("
|
|
233
|
+
console.log("");
|
|
234
|
+
console.log("When ready: mcpill compile && mcpill run");
|
|
145
235
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
Create a new flowdeck card. The deck is `.flowdeck/` — columns are folders, cards are `TODO.md` files.
|
|
2
|
-
|
|
3
|
-
Arguments: $ARGUMENTS
|
|
4
|
-
|
|
5
|
-
Steps:
|
|
6
|
-
1. Determine the column name from the arguments (e.g. "auth", "payments/checkout", or infer from context).
|
|
7
|
-
2. If `.flowdeck/<column>/` doesn't exist, create it.
|
|
8
|
-
3. Create `.flowdeck/<column>/TODO.md` with a title heading, brief description, and `## BOT` / `## HUMAN` sections. Add any tasks from the arguments to the relevant section.
|
|
9
|
-
4. Commit: `git add -A && git commit -m "deck: add <column> card"`.
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
Append a task, idea, or note to an existing flowdeck card. The deck is `.flowdeck/` — columns are folders, cards are `TODO.md` files.
|
|
2
|
-
|
|
3
|
-
Arguments: $ARGUMENTS
|
|
4
|
-
|
|
5
|
-
Steps:
|
|
6
|
-
1. Identify which card to append to from the arguments or from context (e.g. which column is most relevant).
|
|
7
|
-
2. Read the card's current content.
|
|
8
|
-
3. Append to the appropriate section: `## BOT` for tasks Claude should do, `## HUMAN` for tasks the human should do, or `#### COMMENTS` for notes/ideas.
|
|
9
|
-
- If the task is a question (ends with `?`), use `flowdeck append <column> "<question>"` — the CLI will place it under `## HUMAN` with an answer placeholder.
|
|
10
|
-
4. Commit: `git add -A && git commit -m "deck: append to <column> card"`.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
Play a single flowdeck card.
|
|
2
|
-
|
|
3
|
-
The card slug is: $ARGUMENTS
|
|
4
|
-
|
|
5
|
-
The card is at `.flowdeck/<slug>/TODO.md`.
|
|
6
|
-
|
|
7
|
-
1. Read the card.
|
|
8
|
-
2. Complete every unchecked `- [ ]` item under `## BOT` — read files, edit code, run commands as needed.
|
|
9
|
-
3. Mark each done `- [x]` with a one-line note indented with `>`.
|
|
10
|
-
4. If something needs the human, add `- [ ]` items under `## HUMAN`.
|
|
11
|
-
5. Commit: `git add -A && git commit -m "deck: <short description>"`.
|
|
12
|
-
6. Check if any project documents (README, AGENT.md, architecture notes, changelogs) need updating based on the changes you made. If so, update them and commit: `git add -A && git commit -m "docs: <short description>"`.
|
|
13
|
-
|
|
14
|
-
Do not scan or read any other TODO.md files.
|
package/.claude/commands/turn.md
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
You are playing a full turn in this flowdeck project.
|
|
2
|
-
|
|
3
|
-
Read `.flowdeck/AGENT.md` for project context (if it exists).
|
|
4
|
-
|
|
5
|
-
Walk `.flowdeck/` and collect every `TODO.md` that has at least one unchecked `- [ ]` item under `## BOT`. These are your hand. If there are no open cards, say so and stop.
|
|
6
|
-
|
|
7
|
-
## Assess the hand first
|
|
8
|
-
|
|
9
|
-
Before executing, read all cards and state your plan (a few lines):
|
|
10
|
-
|
|
11
|
-
1. **Prioritize** — decide play order. Most blocking or highest-leverage first.
|
|
12
|
-
2. **Discard** — identify cards that are duplicated or obsolete. For each, move unchecked BOT items to a `## DISCARDED` section with a one-line reason. Do not delete the card file.
|
|
13
|
-
3. **Combine** — identify cards with complementary tasks that are more efficient to execute together. Note the combination and work them in a single pass.
|
|
14
|
-
|
|
15
|
-
## Execute
|
|
16
|
-
|
|
17
|
-
For each card (or combined set), in your chosen order:
|
|
18
|
-
1. Complete every unchecked `- [ ]` item under `## BOT`
|
|
19
|
-
2. Mark each `- [x]` with a one-line note indented with `>`
|
|
20
|
-
3. If something needs the human, add `- [ ]` items under `## HUMAN`
|
|
21
|
-
4. Commit: `git add -A && git commit -m "deck: <short description>"`
|
|
22
|
-
|
|
23
|
-
## After the hand
|
|
24
|
-
|
|
25
|
-
Once all cards are played, do a holistic documentation pass:
|
|
26
|
-
- Check if any project docs (README, architecture notes, changelogs, cross-card insights) need updating based on changes made this turn — update what's out of date, leave the rest untouched
|
|
27
|
-
- Check if `.flowdeck/AGENT.md` needs updating based on what you learned — update it if so
|
|
28
|
-
- Final commit (only if anything changed): `git add -A && git commit -m "docs: post-turn"`
|
package/.claude/settings.json
DELETED