pictmcp 0.1.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025-2026 Takeshi Kishi
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 ADDED
@@ -0,0 +1,42 @@
1
+ # PictMCP
2
+
3
+ Pairwise Independent Combinatorial Testings for MCP
4
+
5
+ ## 🚧 Work in Progress 🚧
6
+
7
+ > [!WARNING]
8
+ > This project is currently under active development.
9
+ > It is not yet stable and its API and features may change without notice.
10
+ >
11
+ > Use in production environments is **not recommended** at this time.
12
+
13
+ ## Install
14
+
15
+ ### Prerequisites
16
+
17
+ - [Node.js](https://nodejs.org/) (v22 or higher)
18
+ - [pnpm](https://pnpm.io/) (v10 or higher)
19
+
20
+ ### Commands
21
+
22
+ In your terminal
23
+
24
+ ```sh
25
+ git clone https://github.com/takeyaqa/PictMCP.git
26
+ cd PictMCP
27
+ pnpm install
28
+ pnpm build
29
+ ```
30
+
31
+ In your MCP client
32
+
33
+ ```json
34
+ {
35
+ "mcpServers": {
36
+ "PictMCP": {
37
+ "command": "node",
38
+ "args": ["/ABSOLUTE/PATH/TO/PARENT/FOLDER/PictMCP/dist/index.js"]
39
+ }
40
+ }
41
+ }
42
+ ```
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,48 @@
1
+ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
2
+ import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
3
+ import { z } from "zod";
4
+ import { PictRunner } from "@takeyaqa/pict-wasm";
5
+ // Create server instance
6
+ const server = new McpServer({
7
+ name: "PictMCP",
8
+ version: "0.1.0",
9
+ });
10
+ // Register pict tools
11
+ server.registerTool("generate-test-cases", {
12
+ description: "Generates test cases using pairwise combination algorithm",
13
+ inputSchema: {
14
+ parameters: z
15
+ .object({ name: z.string(), values: z.string() })
16
+ .array()
17
+ .describe("Parameters for the test case generation"),
18
+ constraints: z
19
+ .string()
20
+ .optional()
21
+ .describe("Constraints for the test case generation"),
22
+ },
23
+ }, async ({ parameters, constraints }) => {
24
+ const pictRunner = new PictRunner();
25
+ await pictRunner.init();
26
+ const output = pictRunner.run(parameters, { constraintsText: constraints });
27
+ const formattedOutput = output.body.map((row) => row.map((cell) => cell.trim()).join(", "));
28
+ const formattedHeader = output.header.map((cell) => cell.trim()).join(", ");
29
+ const formattedBody = formattedOutput.join("\n");
30
+ const formattedOutputText = `Header: ${formattedHeader}\nBody:\n${formattedBody}`;
31
+ return {
32
+ content: [
33
+ {
34
+ type: "text",
35
+ text: formattedOutputText,
36
+ },
37
+ ],
38
+ };
39
+ });
40
+ async function main() {
41
+ const transport = new StdioServerTransport();
42
+ await server.connect(transport);
43
+ console.error("PictMCP Server running on stdio");
44
+ }
45
+ main().catch((error) => {
46
+ console.error("Fatal error in main():", error);
47
+ process.exit(1);
48
+ });
package/package.json ADDED
@@ -0,0 +1,60 @@
1
+ {
2
+ "name": "pictmcp",
3
+ "mcpName": "io.github.takeyaqa/PictMCP",
4
+ "version": "0.1.0",
5
+ "description": "Pairwise Testing for the AI",
6
+ "keywords": [],
7
+ "homepage": "https://github.com/takeyaqa/PictMCP#readme",
8
+ "bugs": {
9
+ "url": "https://github.com/takeyaqa/PictMCP/issues"
10
+ },
11
+ "license": "MIT",
12
+ "author": "Takeshi Kishi",
13
+ "files": [
14
+ "dist"
15
+ ],
16
+ "type": "module",
17
+ "bin": {
18
+ "pictmcp": "./dist/index.js"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/takeyaqa/PictMCP.git"
23
+ },
24
+ "dependencies": {
25
+ "@modelcontextprotocol/sdk": "^1.25.2",
26
+ "@takeyaqa/pict-wasm": "3.7.4-wasm.11",
27
+ "zod": "^4.3.5"
28
+ },
29
+ "devDependencies": {
30
+ "@eslint/js": "^9.39.2",
31
+ "@tsconfig/node24": "^24.0.4",
32
+ "@types/node": "^25.0.9",
33
+ "eslint": "^9.39.2",
34
+ "eslint-config-prettier": "^10.1.8",
35
+ "globals": "^17.0.0",
36
+ "prettier": "^3.8.0",
37
+ "typescript": "~5.9.3",
38
+ "typescript-eslint": "^8.53.0"
39
+ },
40
+ "devEngines": {
41
+ "runtime": {
42
+ "name": "node",
43
+ "version": ">=24 <25"
44
+ },
45
+ "packageManager": [
46
+ {
47
+ "name": "pnpm",
48
+ "version": ">=10 <11"
49
+ }
50
+ ]
51
+ },
52
+ "scripts": {
53
+ "build": "tsc && chmod 755 dist/index.js",
54
+ "clean": "rm -rf dist",
55
+ "typecheck": "tsc --noEmit",
56
+ "lint": "eslint .",
57
+ "format": "prettier --check .",
58
+ "test": "echo \"Error: no test specified\" && exit 1"
59
+ }
60
+ }