Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion third_party/vanta/.cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vanta",
"displayName": "Vanta",
"version": "1.1.0",
"version": "1.1.1",
"minClientVersions": {
"cursor": "3.13.0"
},
Expand Down Expand Up @@ -32,6 +32,7 @@
],
"variables": {
"type": "object",
"required": ["VANTA_MCP_HOST"],
"properties": {
"VANTA_MCP_HOST": {
"type": "string",
Expand Down
4 changes: 4 additions & 0 deletions third_party/vanta/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this plugin will be documented here.

## 1.1.1

- Require `VANTA_MCP_HOST` so the server URL cannot be saved with the region left unsubstituted.

## 1.1.0

- Replaced the three regional servers with one `vanta` server at `https://${VANTA_MCP_HOST}/mcp`, so a user sees one Vanta connection instead of three.
Expand Down
33 changes: 33 additions & 0 deletions third_party/vanta/mcp-url.test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import assert from "node:assert/strict";
import { readFileSync } from "node:fs";
import { dirname, join } from "node:path";
import { test } from "node:test";
import { fileURLToPath } from "node:url";

const root = dirname(fileURLToPath(import.meta.url));

test("the Vanta server URL host is a required setup value", () => {
const plugin = JSON.parse(
readFileSync(join(root, ".cursor-plugin/plugin.json"), "utf8")
);
const mcp = JSON.parse(readFileSync(join(root, "mcp.json"), "utf8"));
const url = mcp.mcpServers.vanta.url;
const required = new Set(plugin.variables.required ?? []);
const used = [...url.matchAll(/\$\{([A-Za-z_][A-Za-z0-9_]*)\}/g)].map(
(match) => match[1]
);

assert.deepEqual(used, ["VANTA_MCP_HOST"]);
assert.equal(url, "https://${VANTA_MCP_HOST}/mcp");
for (const name of used) {
assert.ok(
required.has(name),
`${name} is interpolated into the server URL but is not required, so an install can save a URL Cursor cannot resolve`
);
}
assert.deepEqual(plugin.variables.properties.VANTA_MCP_HOST.enum, [
"mcp.vanta.com",
"mcp.eu.vanta.com",
"mcp.aus.vanta.com",
]);
});
Loading