@askqa/mcp 1.0.4 → 1.0.6

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.
@@ -0,0 +1,4 @@
1
+ {
2
+ "name": "askqa",
3
+ "description": "AskQA skills — set up notifications and monitoring for your websites"
4
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@askqa/mcp",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "MCP server for AskQA — monitor websites with automated tests by chatting with AI",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -21,7 +21,9 @@
21
21
  },
22
22
  "files": [
23
23
  "server.js",
24
- "README.md"
24
+ "README.md",
25
+ ".claude-plugin",
26
+ "skills"
25
27
  ],
26
28
  "dependencies": {
27
29
  "@modelcontextprotocol/sdk": "^1.0.0",
package/server.js CHANGED
@@ -637,17 +637,26 @@ server.registerTool(
637
637
  server.registerTool(
638
638
  "add_notification_channel",
639
639
  {
640
- description: "Add a notification channel to receive alerts when scheduled tests fail. Currently supports Telegram. Notifications are sent from @AskQA_Notifications_bot. To get a Telegram chat ID: open https://t.me/userinfobot and press Start it replies with your ID.",
640
+ description: "Add a notification channel to receive alerts when scheduled tests fail. Supports email, Telegram, and Slack. For Telegram, get a chat ID from https://t.me/userinfobot. For Slack, create an Incoming Webhook in your Slack workspace settings.",
641
641
  inputSchema: {
642
- channel_type: z.enum(["telegram"]).describe("The notification channel type"),
643
- chat_id: z.string().describe("Telegram chat ID. Get it from https://t.me/userinfobot (open the link, press Start, it replies with your ID)."),
642
+ channel_type: z.enum(["email", "telegram", "slack"]).describe("The notification channel type"),
643
+ email_address: z.string().optional().describe("Email address for email channels (required when channel_type is email)"),
644
+ chat_id: z.string().optional().describe("Telegram chat ID (required when channel_type is telegram). Get it from https://t.me/userinfobot."),
645
+ webhook_url: z.string().optional().describe("Slack incoming webhook URL (required when channel_type is slack). Create one at https://api.slack.com/messaging/webhooks."),
644
646
  },
645
647
  },
646
- async ({ channel_type, chat_id }) => {
648
+ async ({ channel_type, email_address, chat_id, webhook_url }) => {
647
649
  try {
648
650
  const config = {};
649
651
  if (channel_type === "telegram") {
652
+ if (!chat_id) return { content: [{ type: "text", text: "Error: chat_id is required for telegram channels." }], isError: true };
650
653
  config.chat_id = chat_id;
654
+ } else if (channel_type === "email") {
655
+ if (!email_address) return { content: [{ type: "text", text: "Error: email_address is required for email channels." }], isError: true };
656
+ config.email_address = email_address;
657
+ } else if (channel_type === "slack") {
658
+ if (!webhook_url) return { content: [{ type: "text", text: "Error: webhook_url is required for slack channels." }], isError: true };
659
+ config.webhook_url = webhook_url;
651
660
  }
652
661
  const channel = await apiPost("/api/notification-channels", {
653
662
  channel_type,
@@ -656,11 +665,17 @@ server.registerTool(
656
665
  const lines = [
657
666
  `Notification channel created (ID: ${channel.id})`,
658
667
  ` Type: ${channel.channel_type}`,
659
- ` Chat ID: ${channel.config.chat_id}`,
660
- ` Enabled: ${channel.enabled}`,
661
- "",
662
- "Sending a test notification to verify the channel works...",
663
- ].filter(Boolean);
668
+ ];
669
+ if (channel_type === "telegram") {
670
+ lines.push(` Chat ID: ${channel.config.chat_id}`);
671
+ } else if (channel_type === "email") {
672
+ lines.push(` Email: ${channel.config.email_address}`);
673
+ } else if (channel_type === "slack") {
674
+ lines.push(` Webhook: ${channel.config.webhook_url}`);
675
+ }
676
+ lines.push(` Enabled: ${channel.enabled}`);
677
+ lines.push("");
678
+ lines.push("Sending a test notification to verify the channel works...");
664
679
 
665
680
  // Send test notification
666
681
  try {
@@ -694,6 +709,10 @@ server.registerTool(
694
709
  lines.push(`ID: ${ch.id} | ${ch.channel_type} (${status})`);
695
710
  if (ch.channel_type === "telegram") {
696
711
  lines.push(` Chat ID: ${ch.config.chat_id}`);
712
+ } else if (ch.channel_type === "email") {
713
+ lines.push(` Email: ${ch.config.email_address}`);
714
+ } else if (ch.channel_type === "slack") {
715
+ lines.push(` Webhook: ${ch.config.webhook_url}`);
697
716
  }
698
717
  lines.push("");
699
718
  }
@@ -0,0 +1,40 @@
1
+ # Set Up Slack Notifications
2
+
3
+ Use this skill to configure Slack notifications for AskQA test failures. When a scheduled test fails, AskQA will post a message to your Slack channel with the test name, failed steps, and a link to the full results.
4
+
5
+ ## Step 1: Create a Slack Incoming Webhook
6
+
7
+ Slack requires creating a lightweight "app" to generate a webhook URL — it takes under a minute and no coding is involved. Walk the user through these steps:
8
+
9
+ 1. Go to https://api.slack.com/apps
10
+ 2. Click **Create New App** > **From scratch**
11
+ 3. Name it anything (e.g. "AskQA"), pick your workspace, click **Create App**
12
+ 4. In the left sidebar, click **Incoming Webhooks**
13
+ 5. Toggle **Activate Incoming Webhooks** to On
14
+ 6. Click **Add New Webhook to Workspace** at the bottom
15
+ 7. Choose the channel where you want failure alerts (e.g. `#qa-alerts`), click **Allow**
16
+ 8. Copy the webhook URL — it looks like `https://hooks.slack.com/services/T.../B.../xxxx`
17
+
18
+ Ask the user to paste their webhook URL before proceeding.
19
+
20
+ ## Step 2: Add the Notification Channel
21
+
22
+ Once you have the webhook URL, use the `add_notification_channel` MCP tool:
23
+
24
+ - `channel_type`: `slack`
25
+ - `webhook_url`: the URL the user provided
26
+
27
+ This will create the channel and automatically send a test message to verify it works.
28
+
29
+ ## Step 3: Confirm
30
+
31
+ After the tool succeeds, let the user know:
32
+
33
+ - A test message was sent to their Slack channel — ask them to check that it arrived
34
+ - From now on, any scheduled test that fails will post an alert to that channel
35
+ - They can manage notification channels with `list_notification_channels` and `remove_notification_channel`
36
+
37
+ If the test message didn't arrive, suggest they double-check:
38
+ - The webhook URL is correct (starts with `https://hooks.slack.com/`)
39
+ - The Slack app has permission to post to the chosen channel
40
+ - The webhook hasn't been revoked in Slack's app settings
@@ -0,0 +1,55 @@
1
+ # Monitor Shopify Add to Cart
2
+
3
+ Use this skill to set up automated monitoring for a Shopify store's add-to-cart flow. When the button breaks — due to an app update, theme change, or platform rollout — AskQA catches it within minutes and sends an alert with a screenshot.
4
+
5
+ ## Step 1: Get the store URL
6
+
7
+ Ask the user for their Shopify store URL (e.g. `https://my-store.myshopify.com` or their custom domain). The test works on any public Shopify storefront — no credentials or API keys are needed.
8
+
9
+ ## Step 2: Create the test
10
+
11
+ Use the `create_test` MCP tool with these parameters:
12
+
13
+ - `name`: something descriptive like "Shopify add to cart"
14
+ - `url`: the store URL from Step 1
15
+ - `template_id`: `cart-visible`
16
+
17
+ This template opens a real browser, finds a product on the homepage, clicks Add to Cart, and verifies the product lands in the cart — exactly how a customer would do it.
18
+
19
+ ## Step 3: Run it once to verify
20
+
21
+ Use `run_test` with the test ID returned from Step 2. Wait for the result.
22
+
23
+ If it passes: great, the test is working correctly. Proceed to Step 4.
24
+
25
+ If it fails: the most common causes on Shopify are:
26
+ - The homepage shows a banner or popup blocking the first product link — let the user know and ask if they want to try a specific product URL instead
27
+ - The store uses an unconventional theme — try passing the product page URL directly as the `url` parameter
28
+ - The add-to-cart button is genuinely broken (that's exactly what this monitor is for!)
29
+
30
+ ## Step 4: Schedule hourly monitoring
31
+
32
+ Use `schedule_test` with:
33
+
34
+ - `test_id`: the ID from Step 2
35
+ - `interval`: `hourly`
36
+
37
+ Hourly is the recommended cadence for checkout monitoring — it catches breakage within 60 minutes, well before most customers notice.
38
+
39
+ ## Step 5: Set up alerts (optional but recommended)
40
+
41
+ Ask the user how they want to be notified when the test fails. Options:
42
+
43
+ - **Email**: use `add_notification_channel` with `channel_type: email`
44
+ - **Slack**: use the `/setup-slack` skill first, then link the channel
45
+ - **Skip**: they can always check results manually with `get_test_results`
46
+
47
+ ## Step 6: Confirm
48
+
49
+ After setup, confirm:
50
+
51
+ - The test is saved and has a passing run
52
+ - A schedule is active (use `list_schedules` to show them)
53
+ - Alerts are configured if they chose that option
54
+
55
+ Let the user know: AskQA will now run this test every hour. If add-to-cart ever breaks, they'll get a notification with a screenshot of exactly where it failed.