GitHubスター
0
ユーザー評価
未評価
お気に入り
0
閲覧数
18
フォーク
0
イシュー
0
PICT MCP Server
This project provides a server that exposes the Microsoft PICT (Pairwise Independent Combinatorial Testing) tool through the Model Context Protocol (MCP). It allows AI agents and other clients to programmatically generate combinatorial test cases.
Prerequisites
Before you begin, ensure you have the following installed:
- Node.js: Version 22.x or later.
- PICT: The command-line tool from Microsoft. You can download it from the official PICT GitHub repository. Make sure the
pict
executable is available in your system'sPATH
.- On macOS, you can install it easily using Homebrew:
brew install pict
- On macOS, you can install it easily using Homebrew:
Installation
Clone the repository:
git clone https://github.com/tpoeppke/pict-mcp.git cd pict-mcp
Install dependencies:
npm install
Usage
To start the MCP server, run the following command:
npm start
The server will start on port 3000 by default and listen for MCP requests at the /mcp
endpoint.
Tool: pict_generate
The server exposes a single tool, pict_generate
, which generates a compact and effective set of test cases from a model.
Input Schema
The tool expects a JSON object with the following structure:
parameters
(Array<Object>
, required): The parameters for the model.name
(string
): The name of the parameter.values
(Array<string|number>
): The possible values for the parameter.
constraints
(Array<string>
, optional): A list of PICT-formatted constraint rules.options
(Object
, optional): PICT-specific options likeorder
orcaseSensitive
.
Example Request
{
"parameters": [
{
"name": "Type",
"values": ["Single", "Span", "Stripe", "Mirror", "RAID-5"]
},
{
"name": "Size",
"values": [10, 100, 500, 1000, 5000, 10000, 40000]
},
{
"name": "Format",
"values": ["FAT", "FAT32", "NTFS"]
}
],
"constraints": [
"IF [Type] = \"Stripe\" OR [Type] = \"RAID-5\" THEN [Size] > 1000;",
"IF [Type] = \"Mirror\" THEN [Format] = \"NTFS\";"
]
}
Output Schema
The tool returns a JSON object containing the generated test cases.
Example Response
{
"testCases": [
{
"Type": "Single",
"Size": 10,
"Format": "FAT"
},
{
"Type": "Span",
"Size": 100,
"Format": "FAT32"
},
{
"Type": "Stripe",
"Size": 5000,
"Format": "NTFS"
}
]
}
Development
This project includes scripts to help with development:
Run tests:
npm test
Check for linting errors:
npm run lint
Format code:
npm run format
License
This project is licensed under the Apache License 2.0.