From 0b9a6875b7776ef10f597cde5f0acc10a3eb2170 Mon Sep 17 00:00:00 2001 From: Herve Labas Date: Thu, 10 Sep 2026 18:37:19 +0200 Subject: [PATCH] fix: request Checkly MCP OAuth scopes --- .mcp.json | 19 ++++++++++++++++++- test/plugin-config.test.ts | 28 ++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 test/plugin-config.test.ts diff --git a/.mcp.json b/.mcp.json index bd3cfb6..9ca8f0d 100644 --- a/.mcp.json +++ b/.mcp.json @@ -2,7 +2,24 @@ "mcpServers": { "checkly": { "type": "http", - "url": "https://api.checklyhq.com/mcp" + "url": "https://api.checklyhq.com/mcp", + "scopes": [ + "checkly:account:read", + "checkly:account:invite", + "checkly:checks:read", + "checkly:checks:write", + "checkly:checks:run", + "checkly:incidents:read", + "checkly:incidents:write", + "checkly:environment-variables:read", + "checkly:environment-variables:write", + "checkly:status-pages:read", + "checkly:rca:read", + "checkly:rca:run", + "checkly:test-sessions:read", + "checkly:assets:read", + "checkly:usage:read" + ] } } } diff --git a/test/plugin-config.test.ts b/test/plugin-config.test.ts new file mode 100644 index 0000000..70f27f3 --- /dev/null +++ b/test/plugin-config.test.ts @@ -0,0 +1,28 @@ +import { strict as assert } from "node:assert"; +import { readFile } from "node:fs/promises"; +import { join } from "node:path"; +import { test } from "node:test"; + +const EXPECTED_CHECKLY_SCOPES = [ + "checkly:account:read", + "checkly:account:invite", + "checkly:checks:read", + "checkly:checks:write", + "checkly:checks:run", + "checkly:incidents:read", + "checkly:incidents:write", + "checkly:environment-variables:read", + "checkly:environment-variables:write", + "checkly:status-pages:read", + "checkly:rca:read", + "checkly:rca:run", + "checkly:test-sessions:read", + "checkly:assets:read", + "checkly:usage:read", +]; + +test("Checkly MCP requests every supported OAuth scope", async () => { + const config = JSON.parse(await readFile(join(import.meta.dirname, "..", ".mcp.json"), "utf8")); + + assert.deepEqual(config.mcpServers.checkly.scopes, EXPECTED_CHECKLY_SCOPES); +});