@makerkit/prd-mcp 0.0.0 → 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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@makerkit/prd-mcp",
3
- "version": "0.0.0",
3
+ "version": "0.0.1",
4
4
  "description": "MCP server for structured PRDs in .prds/. Lets Claude Code, Codex, OpenCode and other agents read and update PRDs and stories.",
5
5
  "keywords": [
6
6
  "ai-agents",
@@ -20,25 +20,8 @@
20
20
  "makerkit-prd-mcp": "./bin.mjs"
21
21
  },
22
22
  "type": "module",
23
- "publishConfig": {
24
- "access": "public",
25
- "directory": "dist"
26
- },
27
- "scripts": {
28
- "build": "tsdown && node ../../scripts/prepare-dist.mjs",
29
- "typecheck": "tsc --noEmit -p tsconfig.json",
30
- "test": "vitest run"
31
- },
32
23
  "dependencies": {
33
- "@makerkit/prd": "workspace:^",
24
+ "@makerkit/prd": "^0.0.1",
34
25
  "@modelcontextprotocol/sdk": "^1.32.0"
35
- },
36
- "devDependencies": {
37
- "@types/node": "catalog:",
38
- "tsdown": "catalog:",
39
- "typescript": "catalog:",
40
- "vite": "catalog:",
41
- "vitest": "catalog:",
42
- "zod": "catalog:"
43
26
  }
44
27
  }
@@ -1,11 +0,0 @@
1
- $ tsdown && node ../../scripts/prepare-dist.mjs
2
- ℹ tsdown v0.23.0 powered by rolldown v1.2.13
3
- ℹ config file: /Users/giancarlo/Code/makerkit/packages/prd-mcp/tsdown.config.mts
4
- ℹ entry: src/bin.ts
5
- ℹ tsconfig: tsconfig.json
6
- ℹ Build start
7
- ℹ Cleaning 4 files
8
- ℹ Granting execute permission to dist/bin.mjs
9
- ℹ dist/bin.mjs 1.50 kB │ gzip: 0.74 kB
10
- ℹ 1 files, total: 1.50 kB
11
- ✔ Build complete in 12ms
@@ -1,11 +0,0 @@
1
- $ vitest run
2
-
3
-  RUN  v5.0.4 /Users/giancarlo/Code/makerkit/packages/prd-mcp
4
-
5
- ✓ src/bin.test.ts (3 tests) 328ms
6
-
7
-  Test Files  1 passed (1)
8
-  Tests  3 passed (3)
9
-  Start at  23:31:32
10
-  Duration  480ms (tests 78%, import 19%, transform 3%)
11
-
@@ -1 +0,0 @@
1
- $ tsc --noEmit -p tsconfig.json
package/dist/README.md DELETED
@@ -1,34 +0,0 @@
1
- # @makerkit/prd-mcp
2
-
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/dist/package.json DELETED
@@ -1,27 +0,0 @@
1
- {
2
- "name": "@makerkit/prd-mcp",
3
- "version": "0.0.0",
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.0",
25
- "@modelcontextprotocol/sdk": "^1.32.0"
26
- }
27
- }
package/src/bin.test.ts DELETED
@@ -1,99 +0,0 @@
1
- import { Client } from '@modelcontextprotocol/sdk/client/index.js';
2
- import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
3
- import { afterEach, describe, expect, it } from 'vitest';
4
-
5
- import { mkdtemp, readFile, rm } from 'node:fs/promises';
6
- import { tmpdir } from 'node:os';
7
- import { join } from 'node:path';
8
- import { fileURLToPath } from 'node:url';
9
-
10
- // Runs the built command, so this checks what npm users will execute.
11
- const BIN = fileURLToPath(new URL('../dist/bin.mjs', import.meta.url));
12
-
13
- const cleanups: Array<() => Promise<void>> = [];
14
-
15
- afterEach(async () => {
16
- await Promise.all(cleanups.splice(0).map((cleanup) => cleanup()));
17
- });
18
-
19
- async function connect() {
20
- const root = await mkdtemp(join(tmpdir(), 'makerkit-prd-mcp-'));
21
- const client = new Client({ name: 'test', version: '1.0.0' });
22
-
23
- await client.connect(
24
- new StdioClientTransport({
25
- command: process.execPath,
26
- args: [BIN, '--root', root],
27
- }),
28
- );
29
-
30
- cleanups.push(async () => {
31
- await client.close();
32
- await rm(root, { recursive: true, force: true });
33
- });
34
-
35
- return { client, root };
36
- }
37
-
38
- describe('makerkit-prd-mcp', () => {
39
- it('serves the PRD tools and prompts', async () => {
40
- const { client } = await connect();
41
-
42
- const { tools } = await client.listTools();
43
- const { prompts } = await client.listPrompts();
44
-
45
- expect(tools).toHaveLength(31);
46
- expect(tools.map((tool) => tool.name)).toEqual(
47
- expect.arrayContaining([
48
- 'add_attachment',
49
- 'create_prd',
50
- 'get_next_story',
51
- 'update_prd_section',
52
- ]),
53
- );
54
- expect(prompts.map((prompt) => prompt.name).sort()).toEqual([
55
- 'implement_story',
56
- 'review_story',
57
- 'shape_prd',
58
- ]);
59
- });
60
-
61
- it('writes PRDs into <root>/.prds', async () => {
62
- const { client, root } = await connect();
63
-
64
- const result = await client.callTool({
65
- name: 'create_prd',
66
- arguments: {
67
- title: 'Simple CRM',
68
- overview: 'Contacts and deals',
69
- problemStatement: 'Spreadsheets lose context',
70
- marketOpportunity: 'Internal tool',
71
- targetUsers: ['Founder'],
72
- solutionDescription: 'Contacts, deals and a pipeline',
73
- keyFeatures: ['Contacts'],
74
- successMetrics: ['Every deal has a next step'],
75
- },
76
- });
77
-
78
- expect(result.isError).toBeFalsy();
79
-
80
- const { filename } = result.structuredContent as { filename: string };
81
- const prd = JSON.parse(
82
- await readFile(join(root, '.prds', filename), 'utf8'),
83
- );
84
-
85
- expect(prd.introduction.title).toBe('Simple CRM');
86
- });
87
-
88
- it('returns tool errors instead of crashing', async () => {
89
- const { client } = await connect();
90
-
91
- const result = await client.callTool({
92
- name: 'get_prd',
93
- arguments: { filename: 'missing.json' },
94
- });
95
-
96
- expect(result.isError).toBe(true);
97
- expect(JSON.stringify(result.content)).toContain('not found');
98
- });
99
- });
package/src/bin.ts DELETED
@@ -1,49 +0,0 @@
1
- #!/usr/bin/env node
2
- import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
- import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
-
5
- import { createPrdService } from '@makerkit/prd';
6
- import { registerPRDTools } from '@makerkit/prd/mcp';
7
- import { createNodePrdDeps, createScriptVerifier } from '@makerkit/prd/node';
8
-
9
- import { readFileSync } from 'node:fs';
10
- import { resolve } from 'node:path';
11
- import { parseArgs } from 'node:util';
12
-
13
- const HELP = `Usage: makerkit-prd-mcp [--root <dir>] [--check <script>]...
14
-
15
- Serves the PRDs in <dir>/.prds over MCP (stdio).
16
-
17
- --root Project directory. Defaults to the current directory.
18
- --check package.json script that must pass before a story is completed.
19
- Repeat for several. Defaults to typecheck and lint.
20
- `;
21
-
22
- const { values } = parseArgs({
23
- options: {
24
- root: { type: 'string' },
25
- check: { type: 'string', multiple: true },
26
- help: { type: 'boolean', short: 'h' },
27
- },
28
- });
29
-
30
- if (values.help) {
31
- process.stdout.write(HELP);
32
- process.exit(0);
33
- }
34
-
35
- const root = resolve(values.root ?? process.cwd());
36
-
37
- const deps = createNodePrdDeps(root, {
38
- verifyCompletion: createScriptVerifier(root, values.check),
39
- });
40
-
41
- const { version } = JSON.parse(
42
- readFileSync(new URL('./package.json', import.meta.url), 'utf8'),
43
- ) as { version: string };
44
-
45
- const server = new McpServer({ name: 'makerkit-prd', version });
46
-
47
- registerPRDTools(server, createPrdService(deps));
48
-
49
- await server.connect(new StdioServerTransport());
package/tsconfig.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "strict": true,
5
- "target": "es2022",
6
- "lib": ["es2022"],
7
- "types": ["node", "vitest/globals"]
8
- },
9
- "include": ["src/**/*.ts", "*.mts"]
10
- }
package/tsdown.config.mts DELETED
@@ -1,11 +0,0 @@
1
- import { defineConfig } from 'tsdown';
2
-
3
- export default defineConfig({
4
- entry: { bin: 'src/bin.ts' },
5
- outDir: 'dist',
6
- platform: 'node',
7
- format: 'esm',
8
- dts: false,
9
- clean: true,
10
- outExtensions: () => ({ js: '.mjs' }),
11
- });
package/vitest.config.mts DELETED
@@ -1,8 +0,0 @@
1
- import { defineConfig } from 'vitest/config';
2
-
3
- export default defineConfig({
4
- test: {
5
- include: ['src/**/*.test.ts'],
6
- testTimeout: 20_000,
7
- },
8
- });
File without changes
File without changes