testchimp-mcp-client 0.0.2 → 0.0.3
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/README.md +4 -0
- package/dist/index.js +47 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -17,6 +17,10 @@ MCP (Model Context Protocol) server for [TestChimp](https://testchimp.io). Expos
|
|
|
17
17
|
- **`create_test_scenario`** — POST `/api/mcp/create_test_scenario` (`platformFilePath` under `plans/scenarios/...`, `title`, `userStoryOrdinalId`).
|
|
18
18
|
- **`update_user_story`** — POST `/api/mcp/update_user_story` (full markdown `content` with `id: US-...` in frontmatter).
|
|
19
19
|
- **`update_test_scenario`** — POST `/api/mcp/update_test_scenario` (full markdown `content` with `id: TS-...` and `story: US-...` in frontmatter).
|
|
20
|
+
- **`get_eaas_config`** — POST `/api/mcp/get_eaas_config` (BunnyShell YAML path and project name; token excluded; `{}` when unconfigured).
|
|
21
|
+
- **`provision_ephemeral_environment`** — POST `/api/mcp/provision_ephemeral_environment` (optional `branchName`).
|
|
22
|
+
- **`get_ephemeral_environment_status`** — POST `/api/mcp/get_ephemeral_environment_status` (`bnsEnvironmentId`).
|
|
23
|
+
- **`destroy_ephemeral_environment`** — POST `/api/mcp/destroy_ephemeral_environment` (`bnsEnvironmentId`).
|
|
20
24
|
|
|
21
25
|
## Cursor
|
|
22
26
|
|
package/dist/index.js
CHANGED
|
@@ -74,6 +74,15 @@ const updatePlanMarkdownInput = z.object({
|
|
|
74
74
|
/** Full markdown including YAML frontmatter and body (as written under the repo plans root). */
|
|
75
75
|
content: z.string().min(1),
|
|
76
76
|
});
|
|
77
|
+
const emptyInput = z.object({});
|
|
78
|
+
const provisionEphemeralInput = z.object({
|
|
79
|
+
/** Git branch to deploy; omit to use the repo default branch. */
|
|
80
|
+
branchName: z.string().optional(),
|
|
81
|
+
});
|
|
82
|
+
const bnsEnvironmentIdInput = z.object({
|
|
83
|
+
/** BunnyShell environment id returned from provision_ephemeral_environment. */
|
|
84
|
+
bnsEnvironmentId: z.string().min(1),
|
|
85
|
+
});
|
|
77
86
|
function textResult(json) {
|
|
78
87
|
return {
|
|
79
88
|
content: [{ type: "text", text: json }],
|
|
@@ -183,6 +192,44 @@ async function main() {
|
|
|
183
192
|
const json = await postMcp("/api/mcp/update_test_scenario", { content: args.content });
|
|
184
193
|
return textResult(json);
|
|
185
194
|
});
|
|
195
|
+
server.registerTool("get_eaas_config", {
|
|
196
|
+
description: "Return the project's BunnyShell (Environment-as-a-Service) settings: ymlRepoPath and bunnyshellProjectName. " +
|
|
197
|
+
"Secrets (API token) are never returned. Response is {} when EaaS is not configured or has no public fields.",
|
|
198
|
+
inputSchema: emptyInput,
|
|
199
|
+
}, async () => {
|
|
200
|
+
const json = await postMcp("/api/mcp/get_eaas_config", {});
|
|
201
|
+
return textResult(json);
|
|
202
|
+
});
|
|
203
|
+
server.registerTool("provision_ephemeral_environment", {
|
|
204
|
+
description: "Create a BunnyShell ephemeral environment for the TestChimp project from the configured Git repo + YAML path. " +
|
|
205
|
+
"Requires BunnyShell + GitHub integration in project settings. Poll with get_ephemeral_environment_status using bnsEnvironmentId.",
|
|
206
|
+
inputSchema: provisionEphemeralInput,
|
|
207
|
+
}, async (args) => {
|
|
208
|
+
const body = {};
|
|
209
|
+
if (args.branchName != null && args.branchName.trim() !== "") {
|
|
210
|
+
body.branchName = args.branchName.trim();
|
|
211
|
+
}
|
|
212
|
+
const json = await postMcp("/api/mcp/provision_ephemeral_environment", body);
|
|
213
|
+
return textResult(json);
|
|
214
|
+
});
|
|
215
|
+
server.registerTool("get_ephemeral_environment_status", {
|
|
216
|
+
description: "Poll BunnyShell for environment status and definition. When deployed, environmentSpec may contain URLs/components JSON.",
|
|
217
|
+
inputSchema: bnsEnvironmentIdInput,
|
|
218
|
+
}, async (args) => {
|
|
219
|
+
const json = await postMcp("/api/mcp/get_ephemeral_environment_status", {
|
|
220
|
+
bnsEnvironmentId: args.bnsEnvironmentId,
|
|
221
|
+
});
|
|
222
|
+
return textResult(json);
|
|
223
|
+
});
|
|
224
|
+
server.registerTool("destroy_ephemeral_environment", {
|
|
225
|
+
description: "Delete a BunnyShell environment created for this project (bnsEnvironmentId from provision).",
|
|
226
|
+
inputSchema: bnsEnvironmentIdInput,
|
|
227
|
+
}, async (args) => {
|
|
228
|
+
const json = await postMcp("/api/mcp/destroy_ephemeral_environment", {
|
|
229
|
+
bnsEnvironmentId: args.bnsEnvironmentId,
|
|
230
|
+
});
|
|
231
|
+
return textResult(json);
|
|
232
|
+
});
|
|
186
233
|
const transport = new StdioServerTransport();
|
|
187
234
|
await server.connect(transport);
|
|
188
235
|
}
|