@makerkit/prd-mcp 0.0.0-stage → 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 +33 -2
- package/bin.mjs +44 -0
- package/package.json +25 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2023-present Makerkit
|
|
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
CHANGED
|
@@ -1,3 +1,34 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @makerkit/prd-mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An MCP server for the structured PRDs in `.prds/` (format and rules: [`@makerkit/prd`](../prd)). It lets coding agents read and update PRDs and stories, follow the story workflow, and leave hand-off logs for the next story.
|
|
4
|
+
|
|
5
|
+
## Use with an agent
|
|
6
|
+
|
|
7
|
+
Claude Code:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
claude mcp add prd -- npx -y @makerkit/prd-mcp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Any MCP client (stdio):
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"mcpServers": {
|
|
18
|
+
"prd": { "command": "npx", "args": ["-y", "@makerkit/prd-mcp"] }
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Options
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
makerkit-prd-mcp [--root <dir>] [--check <script>]...
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
- `--root`: project directory (default: current directory). PRDs live in `<root>/.prds`.
|
|
30
|
+
- `--check`: a `package.json` script that must pass before a story can be marked completed. Repeat for several. Default: `typecheck` and `lint` (scripts the project does not have are skipped).
|
|
31
|
+
|
|
32
|
+
## License
|
|
33
|
+
|
|
34
|
+
MIT
|
package/bin.mjs
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
|
+
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
|
+
import { createPrdService } from "@makerkit/prd";
|
|
5
|
+
import { registerPRDTools } from "@makerkit/prd/mcp";
|
|
6
|
+
import { createNodePrdDeps, createScriptVerifier } from "@makerkit/prd/node";
|
|
7
|
+
import { readFileSync } from "node:fs";
|
|
8
|
+
import { resolve } from "node:path";
|
|
9
|
+
import { parseArgs } from "node:util";
|
|
10
|
+
//#region src/bin.ts
|
|
11
|
+
const HELP = `Usage: makerkit-prd-mcp [--root <dir>] [--check <script>]...
|
|
12
|
+
|
|
13
|
+
Serves the PRDs in <dir>/.prds over MCP (stdio).
|
|
14
|
+
|
|
15
|
+
--root Project directory. Defaults to the current directory.
|
|
16
|
+
--check package.json script that must pass before a story is completed.
|
|
17
|
+
Repeat for several. Defaults to typecheck and lint.
|
|
18
|
+
`;
|
|
19
|
+
const { values } = parseArgs({ options: {
|
|
20
|
+
root: { type: "string" },
|
|
21
|
+
check: {
|
|
22
|
+
type: "string",
|
|
23
|
+
multiple: true
|
|
24
|
+
},
|
|
25
|
+
help: {
|
|
26
|
+
type: "boolean",
|
|
27
|
+
short: "h"
|
|
28
|
+
}
|
|
29
|
+
} });
|
|
30
|
+
if (values.help) {
|
|
31
|
+
process.stdout.write(HELP);
|
|
32
|
+
process.exit(0);
|
|
33
|
+
}
|
|
34
|
+
const root = resolve(values.root ?? process.cwd());
|
|
35
|
+
const deps = createNodePrdDeps(root, { verifyCompletion: createScriptVerifier(root, values.check) });
|
|
36
|
+
const { version } = JSON.parse(readFileSync(new URL("./package.json", import.meta.url), "utf8"));
|
|
37
|
+
const server = new McpServer({
|
|
38
|
+
name: "makerkit-prd",
|
|
39
|
+
version
|
|
40
|
+
});
|
|
41
|
+
registerPRDTools(server, createPrdService(deps));
|
|
42
|
+
await server.connect(new StdioServerTransport());
|
|
43
|
+
//#endregion
|
|
44
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@makerkit/prd-mcp",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "MCP server for structured PRDs in .prds/. Lets Claude Code, Codex, OpenCode and other agents read and update PRDs and stories.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"ai-agents",
|
|
7
|
+
"claude-code",
|
|
8
|
+
"codex",
|
|
9
|
+
"mcp",
|
|
10
|
+
"opencode",
|
|
11
|
+
"prd"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "https://github.com/makerkit/makerkit",
|
|
17
|
+
"directory": "packages/prd-mcp"
|
|
18
|
+
},
|
|
19
|
+
"bin": {
|
|
20
|
+
"makerkit-prd-mcp": "./bin.mjs"
|
|
21
|
+
},
|
|
22
|
+
"type": "module",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@makerkit/prd": "^0.0.1",
|
|
25
|
+
"@modelcontextprotocol/sdk": "^1.32.0"
|
|
26
|
+
}
|
|
27
|
+
}
|