Skip to content

A self-improving RLM agent for coding workflows and long-running autonomous tasks.

Rust

mcp service catalog and oauth engine (#2330)

ktb6ac5d014d99
diff --git a/biome.json b/biome.json
index 5fc3aa3ba5..b3876c550a 100644
--- a/biome.json
+++ b/biome.json
@@ -37,6 +37,7 @@
"!**/node_modules/**/*",
"!**/test-sessions.ts",
"!**/models.generated.ts",
+ "!**/catalog.data.generated.ts",
"!packages/mom/data/**/*",
"!!**/node_modules",
"!.worktrees",
diff --git a/package-lock.json b/package-lock.json
index df9d1072e6..7685f86752 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -1063,6 +1063,18 @@
}
}
},
+ "node_modules/@hono/node-server": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.1.tgz",
+ "integrity": "sha512-ELuehkj5VCBdgEw9zs+ivkKwyzzUCSQuE96YmiPvn1ECBoZCczbFXJLeEGMTYjphP6gydh4pHMqEYPVMYUVgQg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=20"
+ },
+ "peerDependencies": {
+ "hono": "^4"
+ }
+ },
"node_modules/@jridgewell/sourcemap-codec": {
"version": "1.5.5",
"resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz",
@@ -1258,6 +1270,105 @@
"zod-to-json-schema": "^3.25.0"
}
},
+ "node_modules/@modelcontextprotocol/sdk": {
+ "version": "1.30.0",
+ "resolved": "https://registry.npmjs.org/@modelcontextprotocol/sdk/-/sdk-1.30.0.tgz",
+ "integrity": "sha512-xKd8OIzlqNzcqcNumGAa6g+PW2kjD5vrpcKOnfldAUPP3j7lnqMPwlTXQm8gF+UwH72z0lqaRbjr9hqGz0eITA==",
+ "license": "MIT",
+ "dependencies": {
+ "@hono/node-server": "^1.19.9 || ^2.0.5",
+ "ajv": "^8.17.1",
+ "ajv-formats": "^3.0.1",
+ "content-type": "^1.0.5",
+ "cors": "^2.8.5",
+ "cross-spawn": "^7.0.5",
+ "eventsource": "^3.0.2",
+ "eventsource-parser": "^3.0.0",
+ "express": "^5.2.1",
+ "express-rate-limit": "^8.2.1",
+ "hono": "^4.11.4",
+ "jose": "^6.1.3",
+ "json-schema-typed": "^8.0.2",
+ "pkce-challenge": "^5.0.0",
+ "raw-body": "^3.0.0",
+ "zod": "^3.25 || ^4.0",
+ "zod-to-json-schema": "^3.25.1"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "peerDependencies": {
+ "@cfworker/json-schema": "^4.1.1",
+ "zod": "^3.25 || ^4.0"
+ },
+ "peerDependenciesMeta": {
+ "@cfworker/json-schema": {
+ "optional": true
+ },
+ "zod": {
+ "optional": false
+ }
+ }
+ },
+ "node_modules/@modelcontextprotocol/sdk/node_modules/cross-spawn": {
+ "version": "7.0.6",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
+ "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
+ "license": "MIT",
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@modelcontextprotocol/sdk/node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@modelcontextprotocol/sdk/node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "license": "MIT",
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@modelcontextprotocol/sdk/node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@modelcontextprotocol/sdk/node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "license": "ISC",
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
"node_modules/@napi-rs/wasm-runtime": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/@napi-rs/wasm-runtime/-/wasm-runtime-1.2.0.tgz",
@@ -2464,6 +2575,19 @@
"addons/*"
]
},
+ "node_modules/accepts": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/accepts/-/accepts-2.0.0.tgz",
+ "integrity": "sha512-5cvg6CtKwfgdmVqY1WIiXKc3Q1bkRqGLi+2W/6ao+6Y7gu/RCwRuAhGEzh5B4KlszSuTLgZYuqFqo5bImjNKng==",
+ "license": "MIT",
+ "dependencies": {
+ "mime-types": "^3.0.0",
+ "negotiator": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/agent-base": {
"version": "7.1.4",
"license": "MIT",
@@ -2471,6 +2595,39 @@
"node": ">= 14"
}
},
+ "node_modules/ajv": {
+ "version": "8.20.0",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.20.0.tgz",
+ "integrity": "sha512-Thbli+OlOj+iMPYFBVBfJ3OmCAnaSyNn4M1vz9T6Gka5Jt9ba/HIR56joy65tY6kx/FCF5VXNB819Y7/GUrBGA==",
+ "license": "MIT",
+ "dependencies": {
+ "fast-deep-equal": "^3.1.3",
+ "fast-uri": "^3.0.1",
+ "json-schema-traverse": "^1.0.0",
+ "require-from-string": "^2.0.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/ajv-formats": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz",
+ "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==",
+ "license": "MIT",
+ "dependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependencies": {
+ "ajv": "^8.0.0"
+ },
+ "peerDependenciesMeta": {
+ "ajv": {
+ "optional": true
+ }
+ }
+ },
"node_modules/ansi-regex": {
"version": "6.2.2",
"license": "MIT",
@@ -2567,6 +2724,43 @@
"readable-stream": "^3.4.0"
}
},
+ "node_modules/body-parser": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-2.3.0.tgz",
+ "integrity": "sha512-2cGmJupaNgg+QUwVLAucDuWuoMZ6EX9iHDRswZ5lsNYEmwPaRknMPCLZz07yTzVq/83p4o/wzbDZbBrTvGGTIw==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "^3.1.2",
+ "content-type": "^2.0.0",
+ "debug": "^4.4.3",
+ "http-errors": "^2.0.1",
+ "iconv-lite": "^0.7.2",
+ "on-finished": "^2.4.1",
+ "qs": "^6.15.2",
+ "raw-body": "^3.0.2",
+ "type-is": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/body-parser/node_modules/content-type": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
+ "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
"node_modules/bowser": {
"version": "2.14.1",
"resolved": "https://registry.npmjs.org/bowser/-/bowser-2.14.1.tgz",
@@ -2630,6 +2824,44 @@
"version": "1.0.1",
"license": "BSD-3-Clause"
},
+ "node_modules/bytes": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
+ "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
+ "node_modules/call-bind-apply-helpers": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.2.tgz",
+ "integrity": "sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/call-bound": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.4.tgz",
+ "integrity": "sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "get-intrinsic": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/canvas": {
"version": "3.2.3",
"dev": true,
@@ -2866,6 +3098,28 @@
"node": ">=12"
}
},
+ "node_modules/content-disposition": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-1.1.0.tgz",
+ "integrity": "sha512-5jRCH9Z/+DRP7rkvY83B+yGIGX96OYdJmzngqnw2SBSxqCFPd0w2km3s5iawpGX8krnwSGmF0FW5Nhr0Hfai3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/content-type": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz",
+ "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
"node_modules/convert-source-map": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
@@ -2873,6 +3127,41 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/cookie": {
+ "version": "0.7.2",
+ "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.7.2.tgz",
+ "integrity": "sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/cookie-signature": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.2.2.tgz",
+ "integrity": "sha512-D76uU73ulSXrD1UXF4KE2TMxVVwhsnCgfAyTg9k8P6KGZjlXKrOLe4dJQKI3Bxi5wjesZoFXJWElNWBjPZMbhg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=6.6.0"
+ }
+ },
+ "node_modules/cors": {
+ "version": "2.8.6",
+ "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.6.tgz",
+ "integrity": "sha512-tJtZBBHA6vjIAaF6EnIaq6laBBP9aq/Y3ouVJjEfoHbRBcHBAHYcMh/w8LDrk2PvIMMq8gmopa5D4V8RmbrxGw==",
+ "license": "MIT",
+ "dependencies": {
+ "object-assign": "^4",
+ "vary": "^1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
"node_modules/cross-spawn": {
"version": "6.0.6",
"dev": true,
@@ -2952,6 +3241,15 @@
"node": ">= 14"
}
},
+ "node_modules/depd": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz",
+ "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/detect-libc": {
"version": "2.1.2",
"dev": true,
@@ -2969,6 +3267,20 @@
"node": ">=0.3.1"
}
},
+ "node_modules/dunder-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.1.tgz",
+ "integrity": "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "gopd": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/ecdsa-sig-formatter": {
"version": "1.0.11",
"license": "Apache-2.0",
@@ -2976,10 +3288,25 @@
"safe-buffer": "^5.0.1"
}
},
+ "node_modules/ee-first": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
+ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==",
+ "license": "MIT"
+ },
"node_modules/emoji-regex": {
"version": "8.0.0",
"license": "MIT"
},
+ "node_modules/encodeurl": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-2.0.0.tgz",
+ "integrity": "sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/end-of-stream": {
"version": "1.4.5",
"license": "MIT",
@@ -2987,9 +3314,17 @@
"once": "^1.4.0"
}
},
+ "node_modules/es-define-property": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz",
+ "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/es-errors": {
"version": "1.3.0",
- "dev": true,
"license": "MIT",
"engines": {
"node": ">= 0.4"
@@ -3002,6 +3337,18 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/es-object-atoms": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.1.2.tgz",
+ "integrity": "sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/esbuild": {
"version": "0.28.1",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.28.1.tgz",
@@ -3009,7 +3356,6 @@
"dev": true,
"hasInstallScript": true,
"license": "MIT",
- "peer": true,
"bin": {
"esbuild": "bin/esbuild"
},
@@ -3052,6 +3398,12 @@
"node": ">=6"
}
},
+ "node_modules/escape-html": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz",
+ "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==",
+ "license": "MIT"
+ },
"node_modules/escodegen": {
"version": "2.1.0",
"license": "BSD-2-Clause",
@@ -3106,6 +3458,36 @@
"node": ">=0.10.0"
}
},
+ "node_modules/etag": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz",
+ "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/eventsource": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/eventsource/-/eventsource-3.0.7.tgz",
+ "integrity": "sha512-CRT1WTyuQoD771GW56XEZFQ/ZoSfWid1alKGDYMmkt2yl8UXrVR4pspqWNEcqKvVIzg6PAltWjxcSSPrboA4iA==",
+ "license": "MIT",
+ "dependencies": {
+ "eventsource-parser": "^3.0.1"
+ },
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
+ "node_modules/eventsource-parser": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/eventsource-parser/-/eventsource-parser-3.1.1.tgz",
+ "integrity": "sha512-EKN1vKAMcZ8MlYMpaNuxN6R9yakzH6uajHcHVTqWJzvu5pWw9DyhbP35HH8MVBQ+dZjAfDxk+A8NiR9KWaXiyQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18.0.0"
+ }
+ },
"node_modules/execa": {
"version": "1.0.0",
"dev": true,
@@ -3150,6 +3532,68 @@
"node": ">=12.0.0"
}
},
+ "node_modules/express": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/express/-/express-5.2.1.tgz",
+ "integrity": "sha512-hIS4idWWai69NezIdRt2xFVofaF4j+6INOpJlVOLDO8zXGpUVEVzIYk12UUi2JzjEzWL3IOAxcTubgz9Po0yXw==",
+ "license": "MIT",
+ "dependencies": {
+ "accepts": "^2.0.0",
+ "body-parser": "^2.2.1",
+ "content-disposition": "^1.0.0",
+ "content-type": "^1.0.5",
+ "cookie": "^0.7.1",
+ "cookie-signature": "^1.2.1",
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "finalhandler": "^2.1.0",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.0",
+ "merge-descriptors": "^2.0.0",
+ "mime-types": "^3.0.0",
+ "on-finished": "^2.4.1",
+ "once": "^1.4.0",
+ "parseurl": "^1.3.3",
+ "proxy-addr": "^2.0.7",
+ "qs": "^6.14.0",
+ "range-parser": "^1.2.1",
+ "router": "^2.2.0",
+ "send": "^1.1.0",
+ "serve-static": "^2.2.0",
+ "statuses": "^2.0.1",
+ "type-is": "^2.0.1",
+ "vary": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/express-rate-limit": {
+ "version": "8.7.0",
+ "resolved": "https://registry.npmjs.org/express-rate-limit/-/express-rate-limit-8.7.0.tgz",
+ "integrity": "sha512-hOwV7WOxXfjRpAM1DSJWZDXx3GhplwD8IfwuwvogD8i1Qnkgosw/H45s4ZnFAUHDAhPjlY9hLBvJhKmGMyY26g==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.3",
+ "ip-address": "^10.2.0"
+ },
+ "engines": {
+ "node": ">= 16"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/express-rate-limit"
+ },
+ "peerDependencies": {
+ "express": ">= 4.11"
+ }
+ },
"node_modules/extend": {
"version": "3.0.2",
"license": "MIT"
@@ -3172,6 +3616,12 @@
"@types/yauzl": "^2.9.1"
}
},
+ "node_modules/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "license": "MIT"
+ },
"node_modules/fast-glob": {
"version": "3.3.3",
"dev": true,
@@ -3187,10 +3637,26 @@
"node": ">=8.6.0"
}
},
- "node_modules/fastq": {
- "version": "1.20.1",
- "dev": true,
- "license": "ISC",
+ "node_modules/fast-uri": {
+ "version": "3.1.7",
+ "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.1.7.tgz",
+ "integrity": "sha512-dOvZVzjdZdz7phd9v6jCbwxrBW3fK6n8Rc0CtdmM4bumzMnxywBYhuph6J819RRw/ku+rLbelwfMunktuzVVHg==",
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/fastify"
+ },
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/fastify"
+ }
+ ],
+ "license": "BSD-3-Clause"
+ },
+ "node_modules/fastq": {
+ "version": "1.20.1",
+ "dev": true,
+ "license": "ISC",
"dependencies": {
"reusify": "^1.0.4"
}
@@ -3250,6 +3716,27 @@
"node": ">=8"
}
},
+ "node_modules/finalhandler": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-2.1.1.tgz",
+ "integrity": "sha512-S8KoZgRZN+a5rNwqTxlZZePjT/4cnm0ROV70LedRHZ0p8u9fRID0hJUZQpkKLzro8LfmC8sx23bY6tVNxv8pQA==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "on-finished": "^2.4.1",
+ "parseurl": "^1.3.3",
+ "statuses": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 18.0.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
"node_modules/formdata-polyfill": {
"version": "4.0.10",
"license": "MIT",
@@ -3260,6 +3747,24 @@
"node": ">=12.20.0"
}
},
+ "node_modules/forwarded": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz",
+ "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ }
+ },
+ "node_modules/fresh": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/fresh/-/fresh-2.0.0.tgz",
+ "integrity": "sha512-Rx/WycZ60HOaqLKAi6cHRKKI7zxWbJ31MhntmtwMoaTeF7XFH9hhBp8vITaMidfljRQ6eYWCKkaTK+ykVJHP2A==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/fs-constants": {
"version": "1.0.0",
"dev": true,
@@ -3282,7 +3787,6 @@
},
"node_modules/function-bind": {
"version": "1.1.2",
- "dev": true,
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/ljharb"
@@ -3331,6 +3835,43 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
+ "node_modules/get-intrinsic": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.3.0.tgz",
+ "integrity": "sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bind-apply-helpers": "^1.0.2",
+ "es-define-property": "^1.0.1",
+ "es-errors": "^1.3.0",
+ "es-object-atoms": "^1.1.1",
+ "function-bind": "^1.1.2",
+ "get-proto": "^1.0.1",
+ "gopd": "^1.2.0",
+ "has-symbols": "^1.1.0",
+ "hasown": "^2.0.2",
+ "math-intrinsics": "^1.1.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/get-proto/-/get-proto-1.0.1.tgz",
+ "integrity": "sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==",
+ "license": "MIT",
+ "dependencies": {
+ "dunder-proto": "^1.0.1",
+ "es-object-atoms": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
"node_modules/get-stream": {
"version": "5.2.0",
"license": "MIT",
@@ -3416,6 +3957,18 @@
"node": ">=14"
}
},
+ "node_modules/gopd": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz",
+ "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/graceful-fs": {
"version": "4.2.11",
"license": "ISC"
@@ -3436,9 +3989,20 @@
"node": ">=8"
}
},
+ "node_modules/has-symbols": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz",
+ "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/hasown": {
"version": "2.0.3",
- "dev": true,
"license": "MIT",
"dependencies": {
"function-bind": "^1.1.2"
@@ -3454,6 +4018,15 @@
"node": "*"
}
},
+ "node_modules/hono": {
+ "version": "4.13.7",
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.7.tgz",
+ "integrity": "sha512-c8/gF9ac8Y78/agExVocyLevgR+JlpNB444Py0FSX8pJoPdYUfUzRcXtYEYGwt6l19qIlVZPN5Mfsw9jFShmQQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16.9.0"
+ }
+ },
"node_modules/hosted-git-info": {
"version": "9.0.3",
"license": "ISC",
@@ -3464,6 +4037,26 @@
"node": "^20.17.0 || >=22.9.0"
}
},
+ "node_modules/http-errors": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
+ "integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
+ "license": "MIT",
+ "dependencies": {
+ "depd": "~2.0.0",
+ "inherits": "~2.0.4",
+ "setprototypeof": "~1.2.0",
+ "statuses": "~2.0.2",
+ "toidentifier": "~1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
"node_modules/http-proxy-agent": {
"version": "7.0.2",
"license": "MIT",
@@ -3500,6 +4093,22 @@
"url": "https://github.com/sponsors/typicode"
}
},
+ "node_modules/iconv-lite": {
+ "version": "0.7.3",
+ "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.7.3.tgz",
+ "integrity": "sha512-IKXpvIzjnC9XTAUbVBcMfGS0EPaIXtW6v+zr+RRp+hqULEpo0owZax6wyRwPOJbWbzjYspQwusTsfVr0ifh4uQ==",
+ "license": "MIT",
+ "dependencies": {
+ "safer-buffer": ">= 2.1.2 < 3.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
"node_modules/ieee754": {
"version": "1.2.1",
"funding": [
@@ -3527,7 +4136,6 @@
},
"node_modules/inherits": {
"version": "2.0.4",
- "dev": true,
"license": "ISC"
},
"node_modules/ini": {
@@ -3552,6 +4160,15 @@
"node": ">= 12"
}
},
+ "node_modules/ipaddr.js": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz",
+ "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
"node_modules/is-core-module": {
"version": "2.16.2",
"dev": true,
@@ -3600,6 +4217,12 @@
"node": ">=0.12.0"
}
},
+ "node_modules/is-promise": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-4.0.0.tgz",
+ "integrity": "sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==",
+ "license": "MIT"
+ },
"node_modules/is-stream": {
"version": "1.1.0",
"dev": true,
@@ -3610,17 +4233,24 @@
},
"node_modules/isexe": {
"version": "2.0.0",
- "dev": true,
"license": "ISC"
},
"node_modules/jiti": {
"version": "2.7.0",
"license": "MIT",
- "peer": true,
"bin": {
"jiti": "lib/jiti-cli.mjs"
}
},
+ "node_modules/jose": {
+ "version": "6.2.11",
+ "resolved": "https://registry.npmjs.org/jose/-/jose-6.2.11.tgz",
+ "integrity": "sha512-A5NPn7g8EAzGU3IzRs+Yiq8K5n3ypYS75M5+KKiVHdUexfpWK1kP4ZMq7QnTGDoMj6TJ1dtcEJjW60yZDXS4hg==",
+ "license": "MIT",
+ "funding": {
+ "url": "https://github.com/sponsors/panva"
+ }
+ },
"node_modules/json-bigint": {
"version": "1.0.0",
"license": "MIT",
@@ -3639,6 +4269,18 @@
"node": ">=16"
}
},
+ "node_modules/json-schema-traverse": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz",
+ "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==",
+ "license": "MIT"
+ },
+ "node_modules/json-schema-typed": {
+ "version": "8.0.2",
+ "resolved": "https://registry.npmjs.org/json-schema-typed/-/json-schema-typed-8.0.2.tgz",
+ "integrity": "sha512-fQhoXdcvc3V28x7C7BMs4P5+kNlgUURe2jmUT1T//oBRMDrqy1QPelJimwZGo7Hg9VPV3EQV5Bnq4hbFy2vetA==",
+ "license": "BSD-2-Clause"
+ },
"node_modules/jwa": {
"version": "2.0.1",
"license": "MIT",
@@ -3961,6 +4603,40 @@
"node": ">= 20"
}
},
+ "node_modules/math-intrinsics": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.1.0.tgz",
+ "integrity": "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/media-typer": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-1.1.1.tgz",
+ "integrity": "sha512-yz3xRaG20c6/BOzvYoDaGtPmGscs7YivItZEEqe6GbwNfHuxu9YNmvnEkMzKldAGY4/80pRcQRZSEnhquk9XuQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/merge-descriptors": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-2.0.0.tgz",
+ "integrity": "sha512-Snk314V5ayFLhp3fkUREub6WtjBfPdCPY1Ln8/8munuLuiYhsABgBVWsozAG+MWMbVEvcdcpbi9R7ww22l9Q3g==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
"node_modules/merge2": {
"version": "1.4.1",
"dev": true,
@@ -4083,6 +4759,35 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/negotiator": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-1.1.0.tgz",
+ "integrity": "sha512-NMPBRMJgiQHjbd8phG3Vebdx4kZ1H121rbl5IkMqeOsahptB9BKo/d7oJ3zTXqTgagn2bWlNSXkh0QUGM31RYg==",
+ "license": "MIT",
+ "dependencies": {
+ "content-type": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/negotiator/node_modules/content-type": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
+ "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
"node_modules/netmask": {
"version": "2.1.1",
"license": "MIT",
@@ -4172,6 +4877,18 @@
"node": ">=0.10.0"
}
},
+ "node_modules/object-inspect": {
+ "version": "1.13.4",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.4.tgz",
+ "integrity": "sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/obug": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/obug/-/obug-2.1.2.tgz",
@@ -4186,6 +4903,18 @@
"node": ">=12.20.0"
}
},
+ "node_modules/on-finished": {
+ "version": "2.4.1",
+ "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz",
+ "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==",
+ "license": "MIT",
+ "dependencies": {
+ "ee-first": "1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/once": {
"version": "1.4.0",
"license": "ISC",
@@ -4285,6 +5014,15 @@
"version": "6.0.1",
"license": "MIT"
},
+ "node_modules/parseurl": {
+ "version": "1.3.3",
+ "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz",
+ "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/partial-json": {
"version": "0.1.7",
"license": "MIT"
@@ -4316,6 +5054,16 @@
"url": "https://github.com/sponsors/isaacs"
}
},
+ "node_modules/path-to-regexp": {
+ "version": "8.4.2",
+ "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-8.4.2.tgz",
+ "integrity": "sha512-qRcuIdP69NPm4qbACK+aDogI5CBDMi1jKe0ry5rSQJz8JVLsC7jV8XpiJjGRLLol3N+R5ihGYcrPLTno6pAdBA==",
+ "license": "MIT",
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
"node_modules/pathe": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz",
@@ -4361,6 +5109,15 @@
"url": "https://github.com/sponsors/jonschlinkert"
}
},
+ "node_modules/pkce-challenge": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/pkce-challenge/-/pkce-challenge-5.0.1.tgz",
+ "integrity": "sha512-wQ0b/W4Fr01qtpHlqSqspcj3EhBvimsdh0KlHhH8HRZnMsEa0ea2fTULOXOS9ccQr3om+GcGRk4e+isrZWV8qQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=16.20.0"
+ }
+ },
"node_modules/postcss": {
"version": "8.5.25",
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.25.tgz",
@@ -4454,6 +5211,19 @@
"node": ">=12.0.0"
}
},
+ "node_modules/proxy-addr": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz",
+ "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==",
+ "license": "MIT",
+ "dependencies": {
+ "forwarded": "0.2.0",
+ "ipaddr.js": "1.9.1"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
"node_modules/proxy-agent": {
"version": "6.5.0",
"license": "MIT",
@@ -4490,6 +5260,22 @@
"once": "^1.3.1"
}
},
+ "node_modules/qs": {
+ "version": "6.16.0",
+ "resolved": "https://registry.npmjs.org/qs/-/qs-6.16.0.tgz",
+ "integrity": "sha512-h6fhOIaRrID2CbEY2fqs+7t+UXZo+MLAnU5gRIq85uFtdiUPCdsApMlHhXogKVM4HM2DVbIjGNTTYH2OcmP1vA==",
+ "license": "BSD-3-Clause",
+ "dependencies": {
+ "es-define-property": "^1.0.1",
+ "side-channel": "^1.1.1"
+ },
+ "engines": {
+ "node": ">=0.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/queue-microtask": {
"version": "1.2.3",
"dev": true,
@@ -4509,6 +5295,34 @@
],
"license": "MIT"
},
+ "node_modules/range-parser": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.3.0.tgz",
+ "integrity": "sha512-hek2mFQpPuI4E1BBKrSto+BU3e3x4xuarsbiwr3+lf7p44juvFMV0XFWQAP3xUyqXA4RrXLIoaSUGbSt056ZMw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.6"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/raw-body": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-3.0.2.tgz",
+ "integrity": "sha512-K5zQjDllxWkf7Z5xJdV0/B0WTNqx6vxG70zJE4N0kBs4LovmEYWJzQGxC9bS9RAKu3bgM40lrd5zoLJ12MQ5BA==",
+ "license": "MIT",
+ "dependencies": {
+ "bytes": "~3.1.2",
+ "http-errors": "~2.0.1",
+ "iconv-lite": "~0.7.0",
+ "unpipe": "~1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.10"
+ }
+ },
"node_modules/rc": {
"version": "1.2.8",
"dev": true,
@@ -4553,6 +5367,15 @@
"node": ">=0.10.0"
}
},
+ "node_modules/require-from-string": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz",
+ "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
"node_modules/resolve": {
"version": "1.22.12",
"dev": true,
@@ -4623,6 +5446,22 @@
"@rolldown/binding-win32-x64-msvc": "1.1.5"
}
},
+ "node_modules/router": {
+ "version": "2.2.0",
+ "resolved": "https://registry.npmjs.org/router/-/router-2.2.0.tgz",
+ "integrity": "sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.0",
+ "depd": "^2.0.0",
+ "is-promise": "^4.0.0",
+ "parseurl": "^1.3.3",
+ "path-to-regexp": "^8.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ }
+ },
"node_modules/run-parallel": {
"version": "1.2.0",
"dev": true,
@@ -4671,6 +5510,12 @@
],
"license": "MIT"
},
+ "node_modules/safer-buffer": {
+ "version": "2.1.2",
+ "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
+ "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==",
+ "license": "MIT"
+ },
"node_modules/semver": {
"version": "7.8.5",
"resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz",
@@ -4684,6 +5529,57 @@
"node": ">=10"
}
},
+ "node_modules/send": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/send/-/send-1.2.1.tgz",
+ "integrity": "sha512-1gnZf7DFcoIcajTjTwjwuDjzuz4PPcY2StKPlsGAQ1+YH20IRVrBaXSWmdjowTJ6u8Rc01PoYOGHXfP1mYcZNQ==",
+ "license": "MIT",
+ "dependencies": {
+ "debug": "^4.4.3",
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "etag": "^1.8.1",
+ "fresh": "^2.0.0",
+ "http-errors": "^2.0.1",
+ "mime-types": "^3.0.2",
+ "ms": "^2.1.3",
+ "on-finished": "^2.4.1",
+ "range-parser": "^1.2.1",
+ "statuses": "^2.0.2"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/serve-static": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-2.2.1.tgz",
+ "integrity": "sha512-xRXBn0pPqQTVQiC8wyQrKs2MOlX24zQ0POGaj0kultvoOCstBQM5yvOhAVSUwOMjQtTvsPWoNCHfPGwaaQJhTw==",
+ "license": "MIT",
+ "dependencies": {
+ "encodeurl": "^2.0.0",
+ "escape-html": "^1.0.3",
+ "parseurl": "^1.3.3",
+ "send": "^1.2.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/setprototypeof": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz",
+ "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==",
+ "license": "ISC"
+ },
"node_modules/shebang-command": {
"version": "1.2.0",
"dev": true,
@@ -4747,6 +5643,78 @@
"node": ">=18"
}
},
+ "node_modules/side-channel": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.1.tgz",
+ "integrity": "sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.4",
+ "side-channel-list": "^1.0.1",
+ "side-channel-map": "^1.0.1",
+ "side-channel-weakmap": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-list": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.1.tgz",
+ "integrity": "sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==",
+ "license": "MIT",
+ "dependencies": {
+ "es-errors": "^1.3.0",
+ "object-inspect": "^1.13.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-map": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz",
+ "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel-weakmap": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz",
+ "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==",
+ "license": "MIT",
+ "dependencies": {
+ "call-bound": "^1.0.2",
+ "es-errors": "^1.3.0",
+ "get-intrinsic": "^1.2.5",
+ "object-inspect": "^1.13.3",
+ "side-channel-map": "^1.0.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
"node_modules/siginfo": {
"version": "2.0.0",
"dev": true,
@@ -4854,6 +5822,15 @@
"dev": true,
"license": "MIT"
},
+ "node_modules/statuses": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
+ "integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/std-env": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/std-env/-/std-env-4.1.0.tgz",
@@ -5065,7 +6042,6 @@
"integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==",
"dev": true,
"license": "MIT",
- "peer": true,
"engines": {
"node": ">=12"
},
@@ -5094,6 +6070,15 @@
"node": ">=8.0"
}
},
+ "node_modules/toidentifier": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
+ "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=0.6"
+ }
+ },
"node_modules/token-types": {
"version": "6.1.2",
"license": "MIT",
@@ -5132,7 +6117,6 @@
"integrity": "sha512-GQHnkIfxyx1wYCOS/wonik5MVRZU9hi1TEZmzGZSCJB1y9YgoZ8H6itNE/u4suE+yLmOzuE4E5S4TZ/ZX2wcWQ==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"esbuild": "~0.28.0"
},
@@ -5157,6 +6141,37 @@
"node": "*"
}
},
+ "node_modules/type-is": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/type-is/-/type-is-2.1.0.tgz",
+ "integrity": "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA==",
+ "license": "MIT",
+ "dependencies": {
+ "content-type": "^2.0.0",
+ "media-typer": "^1.1.0",
+ "mime-types": "^3.0.0"
+ },
+ "engines": {
+ "node": ">= 18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
+ "node_modules/type-is/node_modules/content-type": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/content-type/-/content-type-2.1.0.tgz",
+ "integrity": "sha512-mj7UPXE0jaqaOsukNZRUEfEi2AcL7C/vwmwcHV0O97eO1E1pxBZuyjlZrx5seTaNBg1U6+o35wpa35Qfcc+7ag==",
+ "license": "MIT",
+ "engines": {
+ "node": ">=18"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/express"
+ }
+ },
"node_modules/typebox": {
"version": "1.3.10",
"resolved": "https://registry.npmjs.org/typebox/-/typebox-1.3.10.tgz",
@@ -5221,6 +6236,15 @@
"version": "6.21.0",
"license": "MIT"
},
+ "node_modules/unpipe": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz",
+ "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/util-deprecate": {
"version": "1.0.2",
"dev": true,
@@ -5237,13 +6261,21 @@
"uuid": "dist-node/bin/uuid"
}
},
+ "node_modules/vary": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
+ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.8"
+ }
+ },
"node_modules/vite": {
"version": "8.1.5",
"resolved": "https://registry.npmjs.org/vite/-/vite-8.1.5.tgz",
"integrity": "sha512-7ULLwsCdYx/nRyrpiEwvqb5TFHrMVZyBt+rg/OAXT7rgj/z+DtTDyKFeLAdDkubDVDKD8jOsndmy7m55XcfUsw==",
"dev": true,
"license": "MIT",
- "peer": true,
"dependencies": {
"lightningcss": "^1.32.0",
"picomatch": "^4.0.5",
@@ -5534,7 +6566,6 @@
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.9.0.tgz",
"integrity": "sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==",
"license": "ISC",
- "peer": true,
"bin": {
"yaml": "bin.mjs"
},
@@ -5583,7 +6614,6 @@
"resolved": "https://registry.npmjs.org/zod/-/zod-3.25.76.tgz",
"integrity": "sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==",
"license": "MIT",
- "peer": true,
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
@@ -5638,6 +6668,7 @@
"@aws-sdk/client-bedrock-runtime": "^3.1095.0",
"@google/genai": "^1.40.0",
"@mistralai/mistralai": "^2.2.0",
+ "@modelcontextprotocol/sdk": "^1.30.0",
"chalk": "^5.6.2",
"openai": "6.47.0",
"partial-json": "^0.1.7",
@@ -5685,6 +6716,7 @@
"@earendil-works/pi-agent-core": "^0.9.5",
"@earendil-works/pi-ai": "^0.9.5",
"@earendil-works/pi-tui": "^0.9.5",
+ "@modelcontextprotocol/sdk": "^1.30.0",
"@silvia-odwyer/photon-node": "^0.3.4",
"chalk": "^5.5.0",
"cli-highlight": "^2.1.11",
diff --git a/packages/ai/.changes/drop-unused-user-provenance-export.md b/packages/ai/.changes/drop-unused-user-provenance-export.md
new file mode 100644
index 0000000000..b167144ff7
--- /dev/null
+++ b/packages/ai/.changes/drop-unused-user-provenance-export.md
@@ -0,0 +1 @@
+- Removed the unused `userProvenance` authoring helper from the public mcp exports.
diff --git a/packages/ai/.changes/eng-6108-catalog-auth-method-honesty.md b/packages/ai/.changes/eng-6108-catalog-auth-method-honesty.md
new file mode 100644
index 0000000000..131cd283c0
--- /dev/null
+++ b/packages/ai/.changes/eng-6108-catalog-auth-method-honesty.md
@@ -0,0 +1,2 @@
+- Closed a catalog honesty gap found in live testing: Hugging Face `/mcp` login failed at connect ("no compatible client authentication method (advertised: client_secret_basic, client_secret_post)") because readiness classified providers one-click without ever checking the advertised `token_endpoint_auth_methods_supported`. The engine's fail-closed client-auth decision is now the single source of truth: `decideClientAuthMethod` is exported from `packages/ai/src/mcp/oauth.ts` (the runtime `negotiateAuthMethod` refactors onto it) and the importer runs the same decision through `tokenAuthMethodsSupportPublicClient` / `tokenAuthMethodsSupportConfiguredClient`, so classification and the connect-time gate can never diverge (ENG-6108).
+- 14 in-catalog entries with DCR evidence but confidential-only token auth methods demoted honestly from `oauth-ready` to the user-setup OAuth path — `requires your own OAuth app` reason, `registered-client` requirement, client-id/client-secret setup fields (airwallex, airwallex-sandbox, atlan, gitlab, hugging-face, legalzoom, lusha, miro, monday-com, planetscale, supabase, vercel, windsor-ai, zoominfo): the user registers their OWN app with the provider, which is zero-app compliant self-serve — a demotion, never an exclusion; readiness counts move 71→57 oauth-ready and 53→67 user-setup with the 124 total and zero restricted/unknown invariants intact. Entries whose advertised methods serve not even a configured secret-bearing client (e.g. mTLS-only) keep failing closed as today, omitted auth-method lists stay oauth-ready per the engine's public-client spec default, and the audit script docs now mark `tokenAuthMethods` as required engine-compatibility capture for future audits (ENG-6108).
diff --git a/packages/ai/.changes/eng-6108-catalog-final-cut.md b/packages/ai/.changes/eng-6108-catalog-final-cut.md
new file mode 100644
index 0000000000..35e07892f2
--- /dev/null
+++ b/packages/ai/.changes/eng-6108-catalog-final-cut.md
@@ -0,0 +1,2 @@
+- Cut the shipped MCP service catalog to one-click DCR or user token/key only (2026-09-15 product decision): the 49 entries that are neither — the 14 registered-client entries whose authorization servers accept only secret-bearing client auth (Airwallex and its sandbox, Atlan, GitLab, Hugging Face, LegalZoom, Lusha, Miro, monday.com, PlanetScale, Supabase, Vercel, Windsor.ai, ZoomInfo), the 32 local-runtime stdio adapters (AWS/Azure/GCP toolchain proxies, Firebase, Firestore, BigQuery, Cloud SQL, Spanner, Dataproc, Pinecone, Discord, Telegram, Semgrep, Terraform, Zscaler, …) and the 3 url-only tenant templates (ActiveCampaign, JFrog, Pigment) — are excluded via the documented `excludedServers` list in `mcp-catalog/overrides.json`, one entry per upstream record (64 keys, both upstream sides of the merged providers), each with a per-entry reason citing the decision and the specific evidence; the catalog now ships 75 entries — 57 one-click dynamic-client-registration (oauth-ready) and 18 user token/key (user-setup) connectors, with zero prime-restricted/unknown and zero stdio adapters (ENG-6108).
+- The importer enforces the final cut structurally: a user-setup entry whose requirement is not token/key-shaped — bearer-token/api-key credentials, a tenant config carrying a genuine non-url field, or a legacy-transport entry that still collects a token/key — fails the import with a curation prompt, so a registered-client demotion, a local-runtime adapter or a url-only tenant template can never silently re-derive into the catalog; the auth-methods honesty machinery (decideClientAuthMethod parity, confidential-only demotion, tokenAuthMethods capture) stays active for the survivors, and the pinned source snapshots and audit evidence stay committed as history (ENG-6108).
diff --git a/packages/ai/.changes/eng-6108-catalog-single-credential-cut.md b/packages/ai/.changes/eng-6108-catalog-single-credential-cut.md
new file mode 100644
index 0000000000..e7c528a14a
--- /dev/null
+++ b/packages/ai/.changes/eng-6108-catalog-single-credential-cut.md
@@ -0,0 +1,3 @@
+- Single-credential cut (2026-09-16, ENG-6108 Bugbot findings): the generic MCP runtime sends exactly one `Authorization: Bearer` per connection, so the shipped paste-a-key class now collects exactly ONE credential. GitHub's two setup fields (GITHUB_PAT_TOKEN, GITHUB_PERSONAL_ACCESS_TOKEN) are curated as ALTERNATIVE NAMES for one personal access token via a shared `credentialSet` ("github-pat") in `mcp-catalog/overrides.json` — the paste flow prompts once, stores the value under the first alternative's id — and the genuinely distinct named-header pairs that one bearer can never authenticate (Datadog's DD_API_KEY + DD_APPLICATION_KEY, Cloudinary MediaFlows' cld-api-key + cld-secret) are excluded via the documented `excludedServers` list, each with a reason citing the named-header evidence. The catalog now ships 68 entries: 57 one-click dynamic-client-registration (oauth-ready) and 11 paste-a-token (user-setup) connectors (ENG-6108).
+- The importer enforces the single-credential cut structurally: a shipped requires-setup entry that collects more than one distinct required credential fails the import with an actionable curation message (mark alternative names with a shared `setupFields` `credentialSet`, or exclude the entry with a documented reason), so an unmarked multi-credential entry can never silently re-derive; a test pins the guard by lifting the Datadog and Cloudinary exclusions and asserting the import throws (ENG-6108).
+- Every surviving setup reason is honest single-credential copy: one line, "paste a …" naming the one credential the user actually supplies; the Datadog/Cloudinary multi-key reasons are gone with their entries, and GitHub's reason names the two alternative names for the same token instead of listing two requirements (ENG-6108).
diff --git a/packages/ai/.changes/eng-6108-catalog-token-only-cut.md b/packages/ai/.changes/eng-6108-catalog-token-only-cut.md
new file mode 100644
index 0000000000..8a63ab5d47
--- /dev/null
+++ b/packages/ai/.changes/eng-6108-catalog-token-only-cut.md
@@ -0,0 +1,3 @@
+- Cut the shipped MCP service catalog to one-click DCR connectors or a simple paste-an-API-key/token service (2026-09-16 product decision, from live picker testing: "things like cockroachdb cloud still need mcp/ 'requires provider credentials supplied as headers'? i told you to remove all that stuff?"): the 5 remaining survivors that were neither — the 3 tenant configs (CockroachDB Cloud's per-cluster `mcp-cluster-id` header, Dynatrace's `${DT_ENVIRONMENT}` instance URL, Sourcegraph's `${SOURCEGRAPH_ENDPOINT}` instance URL), the 1 legacy-SSE endpoint the generic runtime cannot connect to at all (PayPal Sandbox) and the 1 api-key entry that shipped zero setup fields, so the user had nothing to paste (Render, whose upstream config carries only a Claude-specific OAuth client id Prime must not reuse) — are excluded via the documented `excludedServers` list in `mcp-catalog/overrides.json`, each with a per-entry reason citing the decision and the entry's own evidence; all shipped entries are plain streamable-http endpoints with zero templates, zero SSE and zero stdio adapters (ENG-6108; the follow-up single-credential cut below narrows the shipped counts further).
+- The importer enforces the token-only cut structurally: a user-setup entry ships only when its requirement is literally `bearer-token` or `api-key` AND it collects at least one bearer-token/api-key field, so a tenant config, an unsupported transport or a key/token entry with nothing to paste can never silently re-derive; an entry the readiness pass never classified now fails closed too, instead of slipping past every shipping guard (ENG-6108).
+- Rewrote all 13 surviving setup reasons as picker copy for a human: one line, starting with "paste", naming the entry's real setup field. "requires provider credentials supplied as headers" becomes an honest "paste …" line naming what to paste; "requires an auth token supplied via environment variable" becomes "paste your Zoom Chat access token (ZOOM_CHAT_MCP_ACCESS_TOKEN)" and friends; GitHub no longer stutters the same clause twice ("paste a GitHub personal access token (GITHUB_PAT_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN)"); Zoom Meetings drops the upstream placeholder note that never changed what the user does — the placeholder client id stays in the pinned fixture as evidence. A test pins the shape: single line, <= 100 chars, no repeated clause, no "upstream", and every reason names a field the entry actually collects (ENG-6108).
diff --git a/packages/ai/.changes/eng-6108-mcp-catalog-entry-type.md b/packages/ai/.changes/eng-6108-mcp-catalog-entry-type.md
new file mode 100644
index 0000000000..8145f170f9
--- /dev/null
+++ b/packages/ai/.changes/eng-6108-mcp-catalog-entry-type.md
@@ -0,0 +1 @@
+- Removed the unused public McpCatalogEntry type alias; use McpServiceEntry instead (ENG-6108).
diff --git a/packages/ai/.changes/eng-6108-mcp-service-catalog.md b/packages/ai/.changes/eng-6108-mcp-service-catalog.md
new file mode 100644
index 0000000000..b19f0796c0
--- /dev/null
+++ b/packages/ai/.changes/eng-6108-mcp-service-catalog.md
@@ -0,0 +1,2 @@
+- Added a merged MCP service catalog (OpenAI + Claude upstreams, deduplicated with provenance) as the single JSON source for service integrations, exposed through `listServiceCatalog`/`getServiceCatalogEntry`/`searchServiceCatalog` and a deterministic offline importer with curated overrides.
+- Added local JSON service sources: a validated, bounded loader for user-authored services that cannot claim vendor trust, shadow built-ins, or carry credentials.
diff --git a/packages/ai/.changes/eng-6108-pr2256-catalog-audit.md b/packages/ai/.changes/eng-6108-pr2256-catalog-audit.md
new file mode 100644
index 0000000000..6eef350071
--- /dev/null
+++ b/packages/ai/.changes/eng-6108-pr2256-catalog-audit.md
@@ -0,0 +1,2 @@
+- Added a reproducible read-only public metadata audit of all remote catalog endpoints (committed evidence snapshot with pinned-DNS bounded fetches) and merged it into the catalog: observational `auth.metadata` evidence blocks, informational `setup.readiness`/`setup.requirement` classification, documented per-path `auth.alternatives`, and typed setup-field kinds. Placeholder-only OAuth blockers were cleared with evidence (Airtable, Shopify stay Connect-attemptable) while genuine documented requirements stay hard; ready entries are never downgraded by missing evidence.
+- Reclassified the Figma catalog entry from `oauth-ready` to `prime-restricted` (`registered-client`, pre-registered app client required): its advertised dynamic-client-registration endpoint returns HTTP 403 for anonymous registrations, live-verified during dogfooding and recorded as live evidence in the audit store, so `auth.metadata.dynamicClientRegistration` flips to an explicit `false` with the gated finding in the metadata note.
diff --git a/packages/ai/.changes/eng-6108-zero-app-catalog-cut.md b/packages/ai/.changes/eng-6108-zero-app-catalog-cut.md
new file mode 100644
index 0000000000..d8814af76e
--- /dev/null
+++ b/packages/ai/.changes/eng-6108-zero-app-catalog-cut.md
@@ -0,0 +1,2 @@
+- Cut the shipped MCP service catalog to zero-app self-serve only (2026-09-14 product decision: Prime maintains no provider OAuth apps): the 16 providers that require a provider-registered OAuth client (Figma, Slack, Gmail, Google Calendar, Google Drive, MongoDB Atlas) or whose self-serve path stayed honestly unknown (Shopify, HubSpot, LogRocket, Mapbox Docs, Adobe for Creativity, Spotify Confidence, SumUp, Synthflow) are excluded via the documented `excludedServers` list in `mcp-catalog/overrides.json` with one entry per upstream record and a per-entry reason citing the decision; the catalog now ships 124 entries — 71 dynamic-client-registration (oauth-ready) and 53 user-token/key (user-setup) connectors (ENG-6108).
+- The importer now enforces the zero-app cut structurally: an entry that still classifies prime-restricted or unknown fails the import with a curation prompt (exclude with a documented reason, or curate readiness with evidence), so a provider-client gate or an unverified self-serve path can never ship silently; the gated-DCR honesty machinery (advertisedRegistrationGated, explicit-false metadata semantics) is kept and now unit-tested directly, the pinned source snapshots and audit evidence stay committed as history, and the audit script retires — never drops — live registration-attempt evidence for servers that leave the audit target set (ENG-6108).
diff --git a/packages/ai/mcp-catalog/README.md b/packages/ai/mcp-catalog/README.md
new file mode 100644
index 0000000000..fa225ce28d
--- /dev/null
+++ b/packages/ai/mcp-catalog/README.md
@@ -0,0 +1,268 @@
+# MCP service catalog sources
+
+This directory holds the inputs for the MCP service catalog shipped at
+`packages/ai/src/mcp/catalog.json`:
+
+- `sources/openai-plugins.json` — pinned snapshot of the 25 remote
+ account/SaaS/cloud service MCP configs in OpenAI's public plugins catalog
+ (`openai/plugins` @ `1dc195897af4161d039b80d8471ec0a10c9bbc89`).
+- `sources/claude-plugins-official.json` — pinned snapshot of the 118 verified
+ bundled service plugins (86 direct remote services, 32 stdio SaaS adapters)
+ in Anthropic's public catalog (`anthropics/claude-plugins-official` @
+ `3deb821cb71ccfaaf2ffa9935e977df314ce5cd5`, resolved to each provider
+ repository at its marketplace-pinned commit).
+- `overrides.json` — Prime-curated adjustments (id/label/service renames,
+ verification and client-registration knowledge, documented exclusions).
+ Review data only: it can never add OAuth client ids or secrets.
+- `import-report.json` — generated merge report (counts, merges, exclusions).
+
+## Import rules
+
+`npx tsx packages/ai/scripts/import-mcp-catalog.ts` (run from the repo root)
+rebuilds the catalog offline and deterministically:
+
+- Each upstream server config becomes a record. Remote streamable HTTP servers
+ are grouped by a reviewed endpoint key (lowercased host, trailing slash and
+ `utm_*` params dropped) — the same Notion endpoint declared by both upstreams
+ is one entry with both provenances. Distinct endpoints (Atlassian v1/v2, Vanta
+ regions, Zoom product surfaces) stay distinct entries grouped by a `service`
+ brand id; products like Gmail and Google Drive are never merged.
+- Upstream OAuth client identities are stripped from the output. Placeholder
+ client ids/secrets (`<GMAIL_PUBLIC_CLIENT_ID>` …), Claude-specific client
+ identities and provider-branded client ids (OpenAI's and Slack's Slack app
+ ids) classify an entry as `requires-setup`; none ever reach `catalog.json`.
+- Hosted-only OpenAI app ids are never imported. Loopback endpoints, local
+ stdio utilities inside remote plugins, and Claude-app-scoped endpoint
+ variants are excluded with reasons recorded in the import report.
+- Tenant-URL configs (`${JFROG_URL}/mcp`, `{your-mcp-id}`, …) become
+ `http-template` entries with setup fields instead of fabricated endpoints.
+ Templates whose variables all have upstream defaults resolve to those
+ defaults (logfire/postman/AWS DevOps). Since the 2026-09-16 token-only cut
+ no unresolved template ships — a tenant URL is not a key paste.
+- No upstream scope lists are imported (`reviewedScopes` stays unset); the
+ host requests provider-advertised scopes at discovery and owns minimum-scope
+ policy.
+- stdio SaaS adapters (the Claude catalog's 32) are recorded in the pinned
+ fixtures with their commands; since the 2026-09-15 final cut none of them
+ ships (see below). A legacy SSE transport is recorded and flagged the same
+ way; since the 2026-09-16 token-only cut it does not ship either, because
+ the generic runtime cannot connect to it at all.
+- Zero-app shipping policy (2026-09-14 product decision): Prime maintains ZERO
+ provider OAuth apps, so the catalog ships only self-serve connectors —
+ dynamic client registration (readiness `oauth-ready`) or user-supplied
+ tokens/keys (`user-setup`). The 16 providers that require a
+ provider-registered OAuth client (Figma, Slack, Gmail, Google Calendar,
+ Google Drive, MongoDB Atlas) or whose self-serve path stayed honestly
+ unknown (Shopify, HubSpot, LogRocket, Mapbox Docs, Adobe for Creativity,
+ Spotify Confidence, SumUp, Synthflow) are excluded via the documented
+ `excludedServers` list — one entry per upstream record, each with a
+ per-entry reason citing the decision — and the importer refuses to emit a
+ `prime-restricted` or `unknown` entry at all, so an unverified provider can
+ never ship silently. The pinned source snapshots and the audit evidence for
+ excluded endpoints stay committed as history.
+- Final catalog cut (2026-09-15 product decision: the catalog ships one-click
+ DCR or user token/key only): beyond the zero-app classes, a `user-setup`
+ entry ships only when its requirement is token/key-shaped — bearer-token /
+ api-key credentials, a tenant config carrying a genuine non-url field (a
+ token or per-instance value), or a legacy-transport entry that still
+ collects a token/key. The 49 entries that are not (the 14
+ registered-client entries whose authorization servers accept only
+ secret-bearing client auth — Airwallex, Atlan, GitLab, Hugging Face,
+ LegalZoom, Lusha, Miro, monday.com, PlanetScale, Supabase, Vercel,
+ Windsor.ai, ZoomInfo and the Airwallex sandbox; the 32 local-runtime
+ stdio adapters; and the 3 url-only tenant templates — ActiveCampaign,
+ JFrog, Pigment) are excluded via the documented `excludedServers` list —
+ one entry per upstream record (64 keys), each with a per-entry reason
+ citing the decision and the specific evidence — and the importer refuses
+ to emit any other requirement shape, so a registered-client demotion, a
+ local-runtime adapter or a url-only template can never silently re-derive
+ into the catalog. The demotion/auth-methods honesty machinery that derives
+ these requirements stays active for the survivors; the pinned source
+ snapshots and audit evidence stay committed as history.
+- Token-only catalog cut (2026-09-16 product decision, Kevin live-testing the
+ picker: "things like cockroachdb cloud still need mcp/ 'requires provider
+ credentials supplied as headers'? i told you to remove all that stuff?"): a
+ `user-setup` entry now ships only when its requirement is literally
+ `bearer-token` or `api-key` AND it collects at least one bearer-token/api-key
+ field — a service the user connects by pasting a key or token. The 5
+ remaining survivors that were not are excluded with per-entry reasons: the 3
+ tenant configs (CockroachDB Cloud's per-cluster `mcp-cluster-id` header,
+ Dynatrace's and Sourcegraph's instance URLs), the 1 legacy-SSE endpoint the
+ runtime cannot connect to at all (PayPal Sandbox) and the 1 api-key promise
+ with zero setup fields (Render, whose upstream config carries only a
+ Claude-specific OAuth client id Prime must not reuse). The importer refuses
+ any other user-setup shape, refuses a key/token entry with nothing to paste,
+ and refuses an entry the readiness pass never classified — so none of these
+ can silently re-derive. The result is 70 entries: 57 `oauth-ready` + 13
+ `user-setup`, all plain streamable-http endpoints.
+- Everything except the pre-existing `linear`/`notion` integrations ships
+ `verification: "unverified"`. Import success is never a readiness claim.
+
+The committed `catalog.json` must always equal the importer output; the
+regression test in `packages/ai/test/mcp-catalog.test.ts` rebuilds it from
+these fixtures and fails on drift.
+
+## Read-only public metadata audit
+
+`audit/metadata-audit.json` is a committed, reproducible snapshot of public
+OAuth metadata for the remote endpoints (102 http + 1 sse at capture time,
+including the endpoints later removed by the 2026-09-14 zero-app cut and the
+2026-09-15 final cut — the excluded endpoints' results stay committed as
+evidence), captured by
+`audit/audit-provider-metadata.ts`. Re-runs audit the current catalog target
+set and retire, never delete, registration-attempt evidence for servers that
+left it:
+
+- public unauthenticated GETs only — no Authorization headers, no cookies, no
+ registration POSTs, no OAuth or browser flows, no MCP tool calls, no stored
+ credentials, no writes; redirects are recorded, never followed;
+- bounded per request (10s timeout, 256 KiB body, global concurrency 6) and
+ issued through an undici dispatcher whose DNS lookup validates that every
+ resolved address is public and returns only those validated addresses for the
+ connection (no re-resolution race; TLS hostname validation retained);
+- every fetched URL — including metadata-supplied destinations — must be https
+ with a literal public address;
+- all RFC 9728 locations are probed per endpoint (WWW-Authenticate
+ `resource_metadata` pointer, pathful and origin-level well-known), so
+ providers that serve different bodies per location (Notion, Slack) keep raw
+ evidence of which document serves where;
+- the engine selection is mirrored exactly: a `resource_metadata` pointer is
+ followed alone and any failure fails closed (no well-known fall-through);
+ absent a pointer the pathful well-known is tried, then the origin-level root
+ location (SDK parity — a 4xx at one location is not proof the other is
+ absent); a candidate is selectable only when its document matches the
+ endpoint audience under the engine's component comparison and carries
+ authorization servers, mirroring the engine's own validation. Fail-closed
+ states carry an honest `selectionNote` (pointer failure, served-but-invalid
+ document, non-4xx/non-JSON well-known response). The all-4xx state is NOT a
+ failure: the engine falls back to origin-level authorization-server
+ discovery there, so no note is recorded and the captured AS evidence
+ (issuer = endpoint origin, mirroring the same fallback) decides readiness.
+- `authorizationServer.registrationAttempt` blocks are the one sanctioned
+ supplement to the GET-derived results: live registration evidence recorded
+ from real engine login attempts — the audit script itself never POSTs
+ registration endpoints — each carrying explicit provenance and preserved
+ verbatim across re-runs (Figma: its advertised DCR endpoint returned HTTP
+ 403 to the engine's anonymous registration during dogfooding, 2026-09-13).
+ Blocks for servers that later left the audit target set — e.g. Figma after
+ the zero-app catalog cut — are carried forward verbatim in the top-level
+ `retiredRegistrationAttempts` array, so live evidence is history and a
+ re-run can never silently drop it.
+
+The importer merges this evidence into `catalog.json` offline and
+deterministically:
+
+- `auth.metadata` is observational evidence only (status, issuer/resource,
+ PKCE, DCR/CIMD flags, PRM and AS scope lists, token auth methods, source
+ URLs, capture date). It is never a live credential authority and never a
+ Connect gate. Omitted fields mean "not advertised", never "unsupported";
+ an explicit `dynamicClientRegistration: false` means the endpoint IS
+ advertised but its live anonymous registration was rejected (gated), so the
+ engine's standard no-credentials flow fails. `tokenAuthMethods` is
+ ENGINE-COMPATIBILITY evidence: classification runs the engine's own shared
+ client-auth decision (`decideClientAuthMethod` in `packages/ai/src/mcp/oauth.ts`)
+ over the captured list, so the shipped readiness can never diverge from the
+ connect-time gate.
+- `setup.readiness` (`oauth-ready` / `user-setup` / `prime-restricted` /
+ `unknown`) is informational-only; `setup.status` stays the only hard lever.
+ `oauth-ready` requires the engine's audience rule (component comparison:
+ exact canonical endpoint or exact origin, root-slash normalized) plus
+ dynamic-client-registration evidence — a CIMD flag alone is never sufficient
+ (no Prime-controlled identity document is deployed) — plus the engine's
+ client-auth compatibility gate: the standard no-credentials flow logs in as
+ a PUBLIC client, so the captured token auth methods must include `none` or
+ be omitted (the engine applies the public-client spec default). A coherent
+ DCR entry whose authorization server advertises ONLY secret-bearing methods
+ (live evidence: Hugging Face — `client_secret_basic`, `client_secret_post`)
+ fails the engine's gate at connect time and demotes honestly to the
+ `user-setup` OAuth path with client-id/client-secret setup fields
+ (`requirement: registered-client`, reason "requires your own OAuth app"):
+ the user registers their OWN app with the provider, which is zero-app
+ compliant self-serve — a demotion, never an exclusion. Entries whose
+ advertised methods serve not even a configured secret-bearing client (e.g.
+ mTLS-only) stay honestly `unknown`. A served document that fails the
+ engine's audience or structure validation fails closed (no origin-AS
+ fallback) and keeps the entry honestly `unknown` with the fail-closed reason
+ in the metadata note; an endpoint with no valid protected-resource document
+ anywhere follows the engine's origin-level authorization-server fallback, so
+ captured AS evidence still decides. An advertised registration endpoint
+ whose live anonymous registration was rejected (gated DCR, e.g. Figma's
+ HTTP 403) can never be `oauth-ready`: the entry classifies like DCR-less
+ providers. Since the 2026-09-14 zero-app cut the `prime-restricted` and
+ `unknown` classes do not ship at all — the importer refuses to emit them,
+ and providers that classify there are excluded with documented reasons
+ instead (Figma was the live gated-DCR case: pre-registered,
+ `registered-client`, then cut; its live evidence stays in the audit store).
+- Placeholder/branded-client-only blockers were cleared with evidence where
+ the provider supports self-serve OAuth (Airtable stays Connect-attemptable);
+ genuine documented requirements stay hard for kept providers — API keys and
+ bearer tokens only (GitHub PAT, Zoom, PagerDuty, Sonatype, AWS DevOps,
+ Datadog, Cloudinary MediaFlows). Every shipped `setup.reason` is picker
+ copy for a human: one line, starting with "paste", naming the entry's real
+ setup field ("paste your Datadog API key and application key (DD_API_KEY,
+ DD_APPLICATION_KEY)") — never importer diagnostics ("requires an auth token
+ supplied via environment variable"), never a repeated clause, and never an
+ upstream-config note that does not change what the user must do (the
+ placeholder client ids stay in the pinned fixtures as evidence). Provider-client requirements
+ (Google, Slack, MongoDB), honest unknowns (Shopify, HubSpot, LogRocket, …),
+ the user-own-app OAuth path (GitLab, Miro, Supabase, …), local-runtime stdio
+ adapters, url-only tenant templates, token-bearing tenant config (Dynatrace,
+ Sourcegraph), per-instance values (CockroachDB cluster id), the
+ legacy-transport sandbox entry (PayPal Sandbox) and the field-less api-key
+ entry (Render) no longer ship: the 2026-09-14 zero-app cut, the 2026-09-15
+ final cut and the 2026-09-16 token-only cut excluded those providers with
+ per-entry reasons.
+- `auth.alternatives` records documented per-path alternatives with their own
+ readiness (Airtable PAT, GitHub standard OAuth).
+- Ready entries are never downgraded by unavailable audit evidence, and
+ unknown is never treated as proof of a restriction.
+
+Local user sources cannot self-assert any of this: `setup.readiness`,
+`auth.alternatives` and `auth.metadata` are Prime audit assessments and are
+rejected from local files with visible errors (`setup.requirement` stays
+allowed as honest self-description of the user's own service).
+
+## Local user sources
+
+Users can author their own services without a Prime release or a public PR.
+The loader (`loadLocalServiceCatalog` from `@earendil-works/pi-ai/mcp`) reads a
+single JSON file — proposed settings wiring: `~/.prime/agent/mcp-services.json`
+(host-owned) — and enforces the same contract as the bundled catalog:
+
+- version 1, at most 256 KiB and 50 entries;
+- full structural validation per entry (see `packages/ai/src/mcp/catalog.ts`);
+- provenance may only claim source `user` — vendor or Prime trust cannot be
+ asserted by a local file;
+- ids colliding with bundled catalog entries are refused (no silent shadowing
+ or rebinding of built-ins), as are duplicate ids within the file;
+- literal loopback/private/link-local/unspecified endpoints are rejected
+ (structural literal-address checks only — DNS/redirect/rebinding policy is
+ enforced at request time by the host, not here);
+- no execution, no network, and no credentials: OAuth client ids/secrets never
+ belong in the file; Prime stores credentials separately when connecting.
+
+A complete authoring example: `examples/local-services.example.json`.
+
+## Refreshing the snapshot
+
+The fixtures are committed so imports need no network and no local research
+directories. Interim refresh path (manual): re-read the pinned public upstreams
+(read-only HTTP, no plugin execution, no auth) at their pinned revisions — the
+marketplace catalog plus each plugin's `.mcp.json`/`plugin.json`, honoring each
+loader's conventions (Codex legacy plugins auto-discover a root `.mcp.json`
+when the manifest omits `mcpServers`; Claude uses `.mcp.json` plus
+manifest-wired config) — update the two fixture files and the pinned commits
+in their headers, then re-run the importer and review the `catalog.json` diff.
+Fixture entries carry the pinned raw URLs they were derived from.
+
+Remaining item (honest limitation, not yet implemented): a scripted upstream
+resolver — an automated fetch mode that regenerates the fixtures from the
+pinned public refs end to end. The manual procedure above is an interim
+maintainer path and does NOT satisfy that scripted-resolver part of the plan;
+it is recorded as future work rather than claimed as done.
+
+Scope note: only remote account/SaaS/cloud service configs and stdio SaaS
+adapters are in scope. Docs-only/search-only tools, local utilities, LSPs,
+workflows, conditional/unresolved upstream entries, and hosted app-ID-only
+mappings are excluded upstream by the fixture scope (counts are recorded in
+the fixture headers for reconciliation).
diff --git a/packages/ai/mcp-catalog/audit/audit-provider-metadata.ts b/packages/ai/mcp-catalog/audit/audit-provider-metadata.ts
new file mode 100644
index 0000000000..71defa09be
--- /dev/null
+++ b/packages/ai/mcp-catalog/audit/audit-provider-metadata.ts
@@ -0,0 +1,784 @@
+#!/usr/bin/env node
+/**
+ * READ-ONLY public metadata audit for the MCP service catalog (ENG-6108 PR2256).
+ *
+ * For every remote catalog endpoint (streamable HTTP + SSE) this script fetches
+ * the same public, unauthenticated metadata the runtime OAuth discovery reads:
+ * the MCP endpoint probe (WWW-Authenticate resource_metadata), the RFC 9728
+ * protected-resource metadata, and the authorization-server metadata
+ * (oauth-authorization-server / openid-configuration). It records DCR, CIMD,
+ * PKCE, scopes and client-auth support per endpoint.
+ *
+ * tokenAuthMethods is ENGINE-COMPATIBILITY evidence, and future audits MUST
+ * keep capturing it verbatim: the importer's readiness classification runs the
+ * engine's own client-auth decision (packages/ai/src/mcp/oauth.ts
+ * decideClientAuthMethod, shared via tokenAuthMethodsSupportPublicClient /
+ * tokenAuthMethodsSupportConfiguredClient) over the captured list. A list that
+ * omits the field, or includes "none", keeps the standard no-credentials flow
+ * one-click (oauth-ready); a list with ONLY secret-bearing methods (e.g.
+ * Hugging Face: client_secret_basic, client_secret_post) fails the engine's
+ * gate at connect time and demotes the entry honestly to the user-setup OAuth
+ * path (the user's own registered app) — never a silent oauth-ready claim. A
+ * future audit that drops this field would silently re-classify such
+ * providers as one-click, so it stays a required capture.
+ *
+ * HARD LINES: no Authorization headers, no cookies, no registration POST, no
+ * OAuth or browser flow, no MCP tool calls, no stored credentials, no writes.
+ * A successful metadata GET is NEVER proof that live OAuth works; audit results
+ * are never labeled metadata-reviewed or live-verified. Bounded per request:
+ * timeout, body size and global concurrency; redirects are recorded, never
+ * followed. Every request goes through an undici Agent whose connect.lookup
+ * resolves the hostname, validates that ALL addresses are public, and returns
+ * only those validated addresses for the actual connection (TLS hostname
+ * validation retained) — validated addresses are pinned per request, so there
+ * is no re-resolution race. https + literal-address pre-flight checks run on
+ * every fetched URL (including metadata-supplied destinations); the
+ * dispatcher lookup is the authoritative guard.
+ *
+ * Network is permitted ONLY here (manual run). Project tests stay offline and
+ * never invoke this file. Run from the repo root:
+ * npx tsx packages/ai/mcp-catalog/audit/audit-provider-metadata.ts
+ * Results are written to packages/ai/mcp-catalog/audit/metadata-audit.json and
+ * consumed offline by the importer.
+ */
+
+import type { LookupAddress } from "node:dns";
+import * as dns from "node:dns/promises";
+import * as fs from "node:fs";
+import * as path from "node:path";
+import { fileURLToPath } from "node:url";
+import { Agent, fetch as undiciFetch } from "undici";
+import { isLiteralPrivateOrLoopbackHost } from "../../src/mcp/url-checks.js";
+
+const USER_AGENT = "PrimeAgent-CatalogAudit/1.0 (ENG-6108 PR2256; read-only metadata audit)";
+const REQUEST_TIMEOUT_MS = 10_000;
+const MAX_BODY_BYTES = 256 * 1024;
+const CONCURRENCY = 6;
+const SCOPES_CAP = 30;
+const AUTH_METHODS_CAP = 12;
+
+// ---------------------------------------------------------------------------
+// Pure helpers (offline-testable; the test file imports only these)
+// ---------------------------------------------------------------------------
+
+export interface PrmEvidence {
+ resource?: string;
+ authorizationServers?: string[];
+ /** scopes_supported from the protected-resource document — the engine's login-relevant scope list (reviewed/config > PRM > omit). */
+ protectedResourceScopes?: string[];
+ httpStatus?: number;
+ contentType?: string;
+ error?: string;
+}
+
+export interface AsEvidence {
+ issuer?: string;
+ authorizationEndpoint?: string;
+ tokenEndpoint?: string;
+ registrationEndpoint?: string;
+ /** true only when code_challenge_methods_supported advertises S256; absent field = list omitted (engine sends S256 by default). */
+ pkceS256?: boolean;
+ clientIdMetadataDocument?: boolean;
+ /** scopes_supported from the AS document — observational only; NEVER fed to the requested scopes (reviewed/config > PRM > omit). */
+ authorizationServerScopes?: string[];
+ /**
+ * token_endpoint_auth_methods_supported; absent field = omitted (engine
+ * applies spec defaults). ENGINE-COMPATIBILITY evidence: the importer runs
+ * the engine's shared client-auth decision (decideClientAuthMethod in
+ * packages/ai/src/mcp/oauth.ts) over this captured list — a list without
+ * "none" (public clients) fails the engine's standard no-credentials flow
+ * at connect time and demotes the entry to the user-setup OAuth path.
+ */
+ tokenAuthMethods?: string[];
+ httpStatus?: number;
+ contentType?: string;
+ error?: string;
+}
+
+export interface PrmAttempt {
+ sourceUrl: string;
+ /** How this location was chosen: header pointer, pathful well-known, or origin-level well-known (evidence only). */
+ kind: "header" | "pathful" | "origin";
+ /** "available" = a JSON protected-resource document was served here. */
+ status: "available" | "unavailable";
+ /**
+ * Raw exact-string comparison of the document's resource against the
+ * endpoint URL as recorded in the audit targets. The engine's actual rule
+ * (`metadata.resource === canonicalResource(endpoint)`) is applied by the
+ * importer when classifying; raw strings are kept here so evidence stays
+ * interpretation-free.
+ */
+ audienceMatches?: boolean;
+ evidence?: PrmEvidence;
+ httpStatus?: number;
+ error?: string;
+}
+
+/**
+ * Live registration-attempt evidence preserved in the committed snapshot. The
+ * audit itself never POSTs registration endpoints (read-only GETs only), so a
+ * block here is recorded from a real engine login attempt, carries explicit
+ * provenance, and is carried forward verbatim when the audit is re-run.
+ */
+export interface RegistrationAttemptEvidence {
+ /** How the attempt was observed, quoted honestly (e.g. live dogfooding login). */
+ provenance: string;
+ /** ISO date of the attempt. */
+ date: string;
+ /** HTTP method of the attempt. */
+ method: string;
+ /** The registration endpoint the attempt targeted. */
+ url: string;
+ /** HTTP status the attempt received. */
+ httpStatus: number;
+ /** Engine error, quoted verbatim when available. */
+ error?: string;
+ /** What the attempt establishes. */
+ finding?: string;
+ /** Public corroboration (reports, metadata-only probes). */
+ corroboration?: string[];
+}
+
+/**
+ * A retired live-attempt block: registration evidence for a server that left
+ * the audit target set (e.g. a catalog cut). Carried forward verbatim on
+ * re-runs so live evidence is never silently lost; evidence/history only.
+ */
+export interface RetiredRegistrationAttempt {
+ server: string;
+ endpoint: string;
+ registrationAttempt: RegistrationAttemptEvidence;
+}
+
+export interface AuditResult {
+ server: string;
+ endpoint: string;
+ probe: { url: string; httpStatus?: number; resourceMetadataHeader?: string; error?: string };
+ /**
+ * ALL RFC 9728 locations probed, in priority order: the WWW-Authenticate
+ * resource_metadata pointer, the pathful well-known
+ * (`/.well-known/oauth-protected-resource{path}`) and the origin-level
+ * well-known (`/.well-known/oauth-protected-resource`). Some providers
+ * (e.g. Notion) serve DIFFERENT bodies per location — origin-level
+ * documents may declare an origin resource while pathful documents match
+ * the endpoint audience — so evidence records which body serves where.
+ */
+ protectedResource: {
+ attempts: PrmAttempt[];
+ engineVisible: "available" | "unavailable";
+ /** The attempt the current engine runtime follows (header pointer, else pathful well-known, else the origin-level root well-known). */
+ engineSelectedSourceUrl?: string;
+ /** Why the engine's PRM discovery fails closed, when it does (mirrors oauth.ts semantics). */
+ selectionNote?: string;
+ };
+ authorizationServer: {
+ issuer?: string;
+ sourceUrls: string[];
+ status: "available" | "unavailable";
+ evidence?: AsEvidence;
+ /** Live (non-audit) registration-attempt evidence preserved from the committed snapshot. */
+ registrationAttempt?: RegistrationAttemptEvidence;
+ };
+ note?: string;
+}
+
+/** RFC 9728 well-known location for the protected-resource metadata (mirrors oauth.ts). */
+export function protectedResourceUrl(endpoint: string): string {
+ const url = new URL(endpoint);
+ const resourcePath = url.pathname === "/" ? "" : url.pathname;
+ return `${url.origin}/.well-known/oauth-protected-resource${resourcePath}${url.search}`;
+}
+
+/** The engine's canonicalResource rule: bare origins collapse, paths and searches stay. */
+export function canonicalResource(url: string): string {
+ const parsed = new URL(url);
+ if (parsed.pathname === "/" && !parsed.search) return parsed.origin;
+ return `${parsed.origin}${parsed.pathname}${parsed.search}`;
+}
+
+/**
+ * The engine's audience rule (component comparison): a protected-resource
+ * document's resource must match the exact canonical endpoint, or be the
+ * endpoint origin itself (root path, no search, same origin).
+ */
+export function audienceMatchesEngineRule(resource: string | undefined, endpoint: string): boolean {
+ if (!resource) return false;
+ // Mirror the engine's component comparison exactly (oauth.ts
+ // resourceAudienceMode): the declared resource is either the exact endpoint
+ // (same origin, path, and search — never a string compare) or the
+ // endpoint's bare origin. A malformed resource the ENGINE would reject is
+ // not an audience match here either — it must not abort the audit run.
+ let parsedResource: URL;
+ let parsedEndpoint: URL;
+ try {
+ parsedResource = new URL(resource);
+ parsedEndpoint = new URL(endpoint);
+ } catch {
+ return false;
+ }
+ if (parsedResource.protocol !== "https:" || parsedEndpoint.protocol !== "https:") return false;
+ const sameOrigin = parsedResource.origin === parsedEndpoint.origin;
+ const exact = sameOrigin && parsedResource.pathname === parsedEndpoint.pathname && parsedResource.search === parsedEndpoint.search;
+ const originLevel =
+ sameOrigin && (parsedResource.pathname === "/" || parsedResource.pathname === "") && !parsedResource.search;
+ return exact || originLevel;
+}
+
+/** Authorization-server metadata candidates (mirrors oauth.ts authorizationServerMetadataUrls). */
+export function authorizationServerUrls(issuer: string): string[] {
+ const url = new URL(issuer);
+ const issuerPath = url.pathname === "/" ? "" : url.pathname.replace(/\/$/, "");
+ return [
+ new URL(`/.well-known/oauth-authorization-server${issuerPath}`, url.origin).toString(),
+ new URL(`${issuerPath}/.well-known/openid-configuration`, url.origin).toString(),
+ ];
+}
+
+/** Parses the WWW-Authenticate resource_metadata hint (mirrors oauth.ts). */
+export function parseResourceMetadataHeader(value: string | null): string | undefined {
+ const match = value?.match(/(?:^|[,\s])resource_metadata\s*=\s*"((?:[^"\\]|\\.)*)"/i);
+ return match ? match[1].replace(/\\(.)/g, "$1") : undefined;
+}
+
+/** Structural safety gate for every URL this audit fetches. */
+export function isFetchableUrl(url: string): boolean {
+ try {
+ const parsed = new URL(url);
+ return parsed.protocol === "https:" && !parsed.username && !parsed.password && !isLiteralPrivateOrLoopbackHost(parsed.hostname);
+ } catch {
+ return false;
+ }
+}
+
+/**
+ * DNS guard for every fetch, including metadata-supplied destinations: a
+ * hostname that resolves (wholly or partly) to a literal private/loopback/
+ * link-local/ULA address is refused before any HTTP request is made. Literal
+ * URL checks alone do not stop DNS-to-private rebinding, so both layers run.
+ *
+ * Every request is issued through an undici Agent whose connect.lookup is the
+ * authoritative guard: it resolves each hostname, validates that ALL resolved
+ * addresses are public (literal loopback/private/link-local/ULA refused), and
+ * returns ONLY those validated addresses for the actual connection — undici
+ * connects to the validated addresses, so there is no re-resolution race and no
+ * unpinned connect. TLS hostname validation (SNI + certificate verification
+ * against the original URL hostname) is retained by the dispatcher. The
+ * pre-flight checks in boundedJson/probeEndpoint are advisory fast paths that
+ * produce evidence findings; the dispatcher lookup refuses any private
+ * destination regardless.
+ */
+/** Pinned fetch signature: same call shape as global fetch (string URL). */
+export type PinnedFetch = (url: string, init: RequestInit) => Promise<Response>;
+
+/** Pinned fetch: undici Agent dispatcher that only connects to validated public addresses. */
+export function createPinnedFetch(): PinnedFetch {
+ const agent = new Agent({
+ connect: {
+ lookup: (hostname: string, _options: unknown, callback: (error: Error | null, address: string | LookupAddress[]) => void) => {
+ dns
+ .lookup(hostname, { all: true })
+ .then((addresses) => {
+ if (addresses.length === 0) {
+ callback(new Error(`dns: ${hostname} has no addresses`), "");
+ return;
+ }
+ for (const { address } of addresses) {
+ if (isLiteralPrivateOrLoopbackHost(address) || isLiteralPrivateOrLoopbackHost(`[${address}]`)) {
+ callback(new Error(`dns: ${hostname} resolves to private address ${address}`), "");
+ return;
+ }
+ }
+ callback(
+ null,
+ addresses.map((entry) => ({ address: entry.address, family: entry.family })),
+ );
+ })
+ .catch((error: Error) => callback(error, ""));
+ },
+ },
+ });
+ return (url: string, init: RequestInit) =>
+ undiciFetch(url, { ...init, dispatcher: agent } as unknown as Parameters<typeof undiciFetch>[1]) as unknown as Promise<Response>;
+}
+
+let pinnedFetch: PinnedFetch | undefined;
+function fetchPinned(): PinnedFetch {
+ pinnedFetch ??= createPinnedFetch();
+ return pinnedFetch;
+}
+
+/** Advisory pre-flight DNS check (evidence findings); the dispatcher lookup stays authoritative. */
+export async function assertPublicDns(url: string): Promise<string | undefined> {
+ const hostname = new URL(url).hostname.replace(/^\[|\]$/g, "");
+ if (/^\d+\.\d+\.\d+\.\d+$/.test(hostname) || hostname.includes(":")) return undefined; // literal IPs are handled by isFetchableUrl
+ const dns = await import("node:dns/promises");
+ try {
+ const addresses = await dns.lookup(hostname, { all: true });
+ if (addresses.length === 0) return "dns: no addresses";
+ for (const { address } of addresses) {
+ if (isLiteralPrivateOrLoopbackHost(address) || isLiteralPrivateOrLoopbackHost(`[${address}]`)) {
+ return `dns: ${hostname} resolves to private address ${address}`;
+ }
+ }
+ return undefined;
+ } catch (error) {
+ return `dns: lookup failed (${(error as Error & { code?: string }).code ?? "error"})`;
+ }
+}
+
+/** Extracts the recorded protected-resource evidence fields from a PRM document. */
+export function extractPrm(json: unknown): PrmEvidence {
+ const record = json as Record<string, unknown>;
+ const evidence: PrmEvidence = {};
+ if (typeof record.resource === "string") evidence.resource = record.resource;
+ if (Array.isArray(record.authorization_servers)) {
+ evidence.authorizationServers = record.authorization_servers.filter(
+ (server): server is string => typeof server === "string",
+ );
+ }
+ if (Array.isArray(record.scopes_supported)) {
+ evidence.protectedResourceScopes = record.scopes_supported
+ .filter((scope): scope is string => typeof scope === "string")
+ .slice(0, SCOPES_CAP);
+ }
+ return evidence;
+}
+
+/** Extracts the recorded authorization-server evidence fields from an AS document. */
+export function extractAs(json: unknown): AsEvidence {
+ const record = json as Record<string, unknown>;
+ const evidence: AsEvidence = {};
+ if (typeof record.issuer === "string") evidence.issuer = record.issuer;
+ if (typeof record.authorization_endpoint === "string") evidence.authorizationEndpoint = record.authorization_endpoint;
+ if (typeof record.token_endpoint === "string") evidence.tokenEndpoint = record.token_endpoint;
+ if (typeof record.registration_endpoint === "string") evidence.registrationEndpoint = record.registration_endpoint;
+ // Omitted lists stay ABSENT (engine applies spec defaults: S256 sent when PKCE
+ // metadata is absent; client_secret_basic assumed when auth methods are
+ // absent). Present-but-lacking lists are recorded as real values (e.g. false).
+ if (Array.isArray(record.code_challenge_methods_supported)) {
+ evidence.pkceS256 = record.code_challenge_methods_supported.includes("S256");
+ }
+ if (record.client_id_metadata_document_supported === true) evidence.clientIdMetadataDocument = true;
+ if (Array.isArray(record.scopes_supported)) {
+ evidence.authorizationServerScopes = record.scopes_supported
+ .filter((scope): scope is string => typeof scope === "string")
+ .slice(0, SCOPES_CAP);
+ }
+ if (Array.isArray(record.token_endpoint_auth_methods_supported)) {
+ evidence.tokenAuthMethods = record.token_endpoint_auth_methods_supported
+ .filter((method): method is string => typeof method === "string")
+ .slice(0, AUTH_METHODS_CAP);
+ }
+ return evidence;
+}
+
+// ---------------------------------------------------------------------------
+// Bounded network fetches (manual run only; never called from tests)
+// ---------------------------------------------------------------------------
+
+function classifyError(error: unknown): string {
+ if (error instanceof Error) {
+ if (error.name === "TimeoutError" || error.name === "AbortError") return "timeout";
+ if (/redirect/i.test(error.message)) return "redirect";
+ if (/fetch failed/i.test(error.message)) return "network";
+ return "error";
+ }
+ return "error";
+}
+
+async function boundedJson(
+ url: string,
+): Promise<{ httpStatus: number; contentType?: string; json?: unknown; error?: string }> {
+ if (!isFetchableUrl(url)) {
+ return { httpStatus: 0, error: "url rejected (must be https, public literal address)" };
+ }
+ const dnsError = await assertPublicDns(url);
+ if (dnsError) {
+ return { httpStatus: 0, error: dnsError };
+ }
+ try {
+ const response = await fetchPinned()(url, {
+ redirect: "error",
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
+ headers: { "user-agent": USER_AGENT, accept: "application/json" },
+ });
+ // Some servers duplicate the header value ("application/json, application/json");
+ // take the first media-type token.
+ const contentType = response.headers
+ .get("content-type")
+ ?.split(";")[0]
+ ?.split(",")[0]
+ ?.trim()
+ .toLowerCase();
+ if (!response.ok) {
+ await response.body?.cancel().catch(() => {});
+ return { httpStatus: response.status, contentType };
+ }
+ if (contentType !== "application/json") {
+ await response.body?.cancel().catch(() => {});
+ return { httpStatus: response.status, contentType, error: `content-type ${contentType ?? "none"} (expected application/json)` };
+ }
+ // Bounded body read: never trust Content-Length; cap at MAX_BODY_BYTES.
+ const reader = response.body?.getReader();
+ if (!reader) return { httpStatus: response.status, contentType, error: "no response body" };
+ const chunks: Uint8Array[] = [];
+ let total = 0;
+ for (;;) {
+ const { done, value } = await reader.read();
+ if (done) break;
+ total += value.byteLength;
+ if (total > MAX_BODY_BYTES) {
+ await reader.cancel().catch(() => {});
+ return { httpStatus: response.status, contentType, error: `body exceeds ${MAX_BODY_BYTES} bytes` };
+ }
+ chunks.push(value);
+ }
+ const text = Buffer.concat(chunks).toString("utf8");
+ try {
+ return { httpStatus: response.status, contentType, json: JSON.parse(text) };
+ } catch {
+ return { httpStatus: response.status, contentType, error: "invalid JSON body" };
+ }
+ } catch (error) {
+ return { httpStatus: 0, error: classifyError(error) };
+ }
+}
+
+/** Unauthenticated probe of the MCP endpoint: only the WWW-Authenticate hint is read; the body is cancelled. */
+async function probeEndpoint(endpoint: string): Promise<AuditResult["probe"]> {
+ const result: AuditResult["probe"] = { url: endpoint };
+ try {
+ const dnsError = await assertPublicDns(endpoint);
+ if (dnsError) {
+ result.error = dnsError;
+ return result;
+ }
+ const response = await fetchPinned()(endpoint, {
+ redirect: "error",
+ signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS),
+ headers: { "user-agent": USER_AGENT, accept: "application/json" },
+ });
+ result.httpStatus = response.status;
+ result.resourceMetadataHeader = parseResourceMetadataHeader(response.headers.get("www-authenticate"));
+ await response.body?.cancel().catch(() => {});
+ } catch (error) {
+ result.error = classifyError(error);
+ }
+ return result;
+}
+
+/**
+ * Mirrors the engine's tryProtectedResourceMetadata selection exactly:
+ * - a WWW-Authenticate resource_metadata pointer is followed alone — any
+ * failure (fetch, 4xx/5xx, non-JSON, missing resource, audience mismatch,
+ * missing authorization_servers) FAILS CLOSED, no well-known fall-through;
+ * - absent a pointer, the pathful well-known is tried first, then the
+ * origin-level root well-known (SDK parity: a 4xx at one location is not
+ * proof the other is absent); non-4xx failures and invalid documents fail
+ * closed instead of falling through.
+ * A candidate is selectable only when it serves a valid document whose
+ * resource matches the endpoint audience (component comparison) and whose
+ * authorization_servers is non-empty — exactly the engine's resourceMetadata
+ * validation.
+ */
+function engineSelectProtectedResource(
+ attempts: PrmAttempt[],
+ endpoint: string,
+ hasPath: boolean,
+ hasHeader: boolean,
+): PrmAttempt | undefined {
+ const attemptByKind = (kind: PrmAttempt["kind"]) => attempts.find((attempt) => attempt.kind === kind);
+ const valid = (attempt: PrmAttempt): boolean =>
+ attempt.status === "available" &&
+ audienceMatchesEngineRule(attempt.evidence?.resource, endpoint) &&
+ (attempt.evidence?.authorizationServers?.length ?? 0) > 0;
+ if (hasHeader) {
+ const header = attemptByKind("header");
+ return header && valid(header) ? header : undefined;
+ }
+ const enginePath: PrmAttempt["kind"][] = hasPath ? ["pathful", "origin"] : ["pathful"];
+ for (const kind of enginePath) {
+ const attempt = attemptByKind(kind);
+ if (!attempt) continue;
+ if (valid(attempt)) return attempt;
+ const is4xx = attempt.httpStatus !== undefined && attempt.httpStatus >= 400 && attempt.httpStatus < 500;
+ if (!is4xx) return undefined;
+ }
+ return undefined;
+}
+
+/**
+ * Honest, bounded reason for a FAIL-CLOSED PRM discovery (mirrors oauth.ts:
+ * a followed pointer fails on any error; a well-known candidate continues only
+ * on exactly 4xx, so 5xx/fetch errors and served-but-invalid documents throw).
+ * The all-4xx case is NOT a failure — the engine falls back to origin-level
+ * authorization-server discovery — and gets no note.
+ */
+function engineSelectionNote(
+ attempts: PrmAttempt[],
+ endpoint: string,
+ hasPath: boolean,
+ hasHeader: boolean,
+): string | undefined {
+ const attemptByKind = (kind: PrmAttempt["kind"]) => attempts.find((attempt) => attempt.kind === kind);
+ const served = (attempt: PrmAttempt | undefined): boolean => !!attempt && attempt.status === "available";
+ if (hasHeader) {
+ const header = attemptByKind("header");
+ return served(header)
+ ? "the header-pointed document fails the engine's protected-resource validation; PRM discovery fails closed with no well-known fall-through"
+ : "the WWW-Authenticate resource_metadata pointer could not be fetched; PRM discovery fails closed with no well-known fall-through";
+ }
+ const pathful = attemptByKind("pathful");
+ const origin = attemptByKind("origin");
+ if (served(pathful)) {
+ return "the pathful protected-resource document fails the engine's audience/structure validation; PRM discovery fails closed before the origin-level location";
+ }
+ if (served(origin)) {
+ return "the origin-level protected-resource document fails the engine's audience/structure validation; PRM discovery fails closed";
+ }
+ // The engine continues ONLY on exactly-4xx attempts. Network errors (no
+ // status), 5xx responses and 2xx/3xx non-JSON bodies all make jsonMetadata
+ // throw — fail closed, no origin-AS fallback.
+ const throwsInsteadOfContinuing = [pathful, origin].filter(
+ (attempt): attempt is PrmAttempt =>
+ !!attempt &&
+ attempt.status !== "available" &&
+ (attempt.httpStatus === undefined || attempt.httpStatus < 400 || attempt.httpStatus >= 500),
+ );
+ if (throwsInsteadOfContinuing.length > 0) {
+ return "a well-known protected-resource location failed with a non-4xx response or non-JSON document; PRM discovery fails closed (the engine only continues on 4xx)";
+ }
+ // All tried well-known candidates are exactly 4xx: the engine falls back to
+ // origin-level authorization-server discovery — not a failure, no note.
+ return undefined;
+}
+
+async function auditEndpoint(server: string, endpoint: string): Promise<AuditResult> {
+ const probe = await probeEndpoint(endpoint);
+ // Metadata-supplied destinations (header hint, PRM authorization_servers) are
+ // only followed when they pass the same https + literal-public + DNS checks.
+ const endpointUrl = new URL(endpoint);
+ const origin = endpointUrl.origin;
+ const hasPath = endpointUrl.pathname !== "/" && endpointUrl.pathname !== "";
+ const headerUrl =
+ probe.resourceMetadataHeader && isFetchableUrl(probe.resourceMetadataHeader)
+ ? probe.resourceMetadataHeader
+ : undefined;
+ const pathfulUrl = protectedResourceUrl(endpoint);
+ const originUrl = `${origin}/.well-known/oauth-protected-resource`;
+ // Evidence locations are all recorded (which body serves where), while the
+ // selection mirrors the engine runtime exactly (fail-closed rules above).
+ const candidates: Array<{ url: string; kind: "header" | "pathful" | "origin" }> = [];
+ if (headerUrl) candidates.push({ url: headerUrl, kind: "header" });
+ candidates.push({ url: pathfulUrl, kind: "pathful" });
+ if (hasPath) candidates.push({ url: originUrl, kind: "origin" });
+ const attempts: PrmAttempt[] = [];
+ const seen = new Set<string>();
+ for (const candidate of candidates) {
+ if (seen.has(candidate.url)) continue;
+ seen.add(candidate.url);
+ const fetchResult = await boundedJson(candidate.url);
+ const evidence = fetchResult.json ? extractPrm(fetchResult.json) : undefined;
+ const attempt: PrmAttempt = {
+ sourceUrl: candidate.url,
+ kind: candidate.kind,
+ status: fetchResult.json ? "available" : "unavailable",
+ ...(evidence
+ ? { evidence }
+ : { httpStatus: fetchResult.httpStatus, error: fetchResult.error ?? `http ${fetchResult.httpStatus}` }),
+ };
+ if (evidence?.resource !== undefined) attempt.audienceMatches = evidence.resource === endpoint;
+ attempts.push(attempt);
+ }
+ const selected = engineSelectProtectedResource(attempts, endpoint, hasPath, headerUrl !== undefined);
+ const protectedResource: AuditResult["protectedResource"] = {
+ attempts,
+ engineVisible: selected ? "available" : "unavailable",
+ ...(selected
+ ? { engineSelectedSourceUrl: selected.sourceUrl }
+ : (() => {
+ const note = engineSelectionNote(attempts, endpoint, hasPath, headerUrl !== undefined);
+ return note ? { selectionNote: note } : {};
+ })()),
+ };
+
+ // The engine uses authorization_servers[0] of the SELECTED PRM document,
+ // exactly as advertised, and never origin-falls-back once a valid PRM was
+ // selected (discover() in oauth.ts). An unfetchable first issuer is
+ // therefore an honest AS-unavailable outcome — auditing a later server the
+ // engine would never use would classify against the wrong authorization server.
+ const advertisedIssuer = selected?.evidence?.authorizationServers?.[0];
+ const issuer = advertisedIssuer ?? new URL(endpoint).origin;
+ // Mirror the engine's fail-closed validation: a malformed issuer string the
+ // engine would reject during protected-resource validation is an honest
+ // AS-unavailable outcome here — never a crash of the whole audit run.
+ if (advertisedIssuer !== undefined && !isFetchableUrl(advertisedIssuer)) {
+ return {
+ server,
+ endpoint,
+ probe,
+ protectedResource,
+ authorizationServer: {
+ sourceUrls: [],
+ status: "unavailable",
+ evidence: {
+ error: `engine rejects the protected-resource document: authorization_servers[0] is not a valid https url (${advertisedIssuer})`,
+ },
+ },
+ };
+ }
+ const asCandidates = authorizationServerUrls(issuer);
+ const authorizationServer: AuditResult["authorizationServer"] = {
+ sourceUrls: asCandidates,
+ status: "unavailable",
+ };
+ for (const candidate of asCandidates) {
+ const asFetch = await boundedJson(candidate);
+ if (asFetch.json) {
+ authorizationServer.status = "available";
+ authorizationServer.issuer = issuer;
+ authorizationServer.evidence = extractAs(asFetch.json);
+ break;
+ }
+ }
+ if (authorizationServer.status === "unavailable" && !authorizationServer.evidence) {
+ const first = await boundedJson(asCandidates[0]);
+ authorizationServer.evidence = {
+ httpStatus: first.httpStatus,
+ contentType: first.contentType,
+ error: first.error ?? `http ${first.httpStatus}`,
+ };
+ }
+ return { server, endpoint, probe, protectedResource, authorizationServer };
+}
+
+// ---------------------------------------------------------------------------
+// Runner
+// ---------------------------------------------------------------------------
+
+interface CatalogEntryShape {
+ server: string;
+ url: string;
+ transport: { type: string };
+}
+
+async function main(): Promise<void> {
+ const scriptDir = path.dirname(fileURLToPath(import.meta.url));
+ const catalogPath = path.resolve(scriptDir, "../../src/mcp/catalog.json");
+ const catalog = JSON.parse(fs.readFileSync(catalogPath, "utf8")) as { entries: CatalogEntryShape[] };
+ const targets = catalog.entries
+ .filter((entry) => entry.transport.type === "http" || entry.transport.type === "sse")
+ .map((entry) => ({ server: entry.server, endpoint: entry.url }))
+ .sort((a, b) => a.server.localeCompare(b.server));
+
+ const results: AuditResult[] = [];
+ let cursor = 0;
+ async function worker(): Promise<void> {
+ for (;;) {
+ const index = cursor++;
+ if (index >= targets.length) return;
+ const target = targets[index];
+ const result = await auditEndpoint(target.server, target.endpoint);
+ results.push(result);
+ const as = result.authorizationServer;
+ console.log(
+ `[${results.length}/${targets.length}] ${result.server}: PRM ${result.protectedResource.engineVisible}` +
+ ` | AS ${as.status}` +
+ ` | DCR ${as.evidence?.registrationEndpoint ? "yes" : "no"}` +
+ ` | CIMD ${as.evidence?.clientIdMetadataDocument ? "yes" : "no"}`,
+ );
+ }
+ }
+ await Promise.all(Array.from({ length: CONCURRENCY }, () => worker()));
+ results.sort((a, b) => a.server.localeCompare(b.server));
+
+ // Live registration-attempt evidence — recorded from real engine login
+ // attempts, never from this read-only script (it never POSTs registration
+ // endpoints) — is committed alongside the GET results and must survive
+ // re-runs: carry the blocks forward verbatim for servers still audited, and
+ // RETIRE them (same top-level evidence array, verbatim, with the recorded
+ // endpoint for context) when a server leaves the audit target set — e.g. a
+ // catalog cut like the 2026-09-14 zero-app decision. Live evidence is
+ // history; a shrinking target list must never silently delete it. A server
+ // that returns to the targets un-retires its preserved block.
+ const outPath = path.resolve(scriptDir, "metadata-audit.json");
+ let preservedRegistrationAttempts = 0;
+ const retiredRegistrationAttempts: RetiredRegistrationAttempt[] = [];
+ if (fs.existsSync(outPath)) {
+ const committed = JSON.parse(fs.readFileSync(outPath, "utf8")) as {
+ results?: AuditResult[];
+ retiredRegistrationAttempts?: RetiredRegistrationAttempt[];
+ };
+ const previous = new Map<string, RetiredRegistrationAttempt>();
+ for (const result of committed.results ?? []) {
+ const attempt = result.authorizationServer?.registrationAttempt;
+ if (attempt) {
+ previous.set(result.server, {
+ server: result.server,
+ endpoint: result.endpoint,
+ registrationAttempt: attempt,
+ });
+ }
+ }
+ const previouslyRetired = new Map(
+ (committed.retiredRegistrationAttempts ?? []).map((retired) => [retired.server, retired]),
+ );
+ for (const result of results) {
+ const entry = previous.get(result.server);
+ if (entry) {
+ result.authorizationServer.registrationAttempt = entry.registrationAttempt;
+ preservedRegistrationAttempts += 1;
+ previous.delete(result.server);
+ }
+ previouslyRetired.delete(result.server);
+ }
+ for (const entry of previous.values()) retiredRegistrationAttempts.push(entry);
+ for (const entry of previouslyRetired.values()) retiredRegistrationAttempts.push(entry);
+ retiredRegistrationAttempts.sort((a, b) => a.server.localeCompare(b.server));
+ }
+
+ const counts = {
+ audited: results.length,
+ asAvailable: results.filter((result) => result.authorizationServer.status === "available").length,
+ prmEngineVisible: results.filter((result) => result.protectedResource.engineVisible === "available").length,
+ prmAudienceMismatch: results.filter(
+ (result) =>
+ result.protectedResource.engineVisible === "available" &&
+ !result.protectedResource.attempts.some(
+ (attempt) => attempt.status === "available" && attempt.audienceMatches,
+ ),
+ ).length,
+ asUnavailable: results.filter((result) => result.authorizationServer.status === "unavailable").length,
+ dcr: results.filter((result) => result.authorizationServer.evidence?.registrationEndpoint).length,
+ cimd: results.filter((result) => result.authorizationServer.evidence?.clientIdMetadataDocument).length,
+ pkceS256: results.filter((result) => result.authorizationServer.evidence?.pkceS256).length,
+ };
+
+ const output = {
+ $comment:
+ "READ-ONLY public metadata audit snapshot (unauthenticated GETs of RFC 9728 / AS / OIDC documents). A valid metadata GET is never proof that live OAuth works; results are never labeled metadata-reviewed or live-verified. Generated by audit-provider-metadata.ts; an input to the offline importer; do not hand-edit results. One sanctioned supplement: per-server authorizationServer.registrationAttempt blocks hold live registration evidence from real engine login attempts (the read-only audit itself never POSTs registration endpoints); each carries explicit provenance and is preserved verbatim when the audit is re-run, and blocks for servers that later left the audit target set (e.g. the 2026-09-14 zero-app catalog cut) are retired into retiredRegistrationAttempts verbatim — live evidence is history and is never dropped by a re-run.",
+ fetchedAt: new Date().toISOString().slice(0, 10),
+ method:
+ "per endpoint: unauthenticated MCP endpoint probe (WWW-Authenticate resource_metadata), RFC 9728 protected-resource metadata, authorization-server metadata (oauth-authorization-server / openid-configuration candidates)",
+ bounds: {
+ requestTimeoutMs: REQUEST_TIMEOUT_MS,
+ maxBodyBytes: MAX_BODY_BYTES,
+ concurrency: CONCURRENCY,
+ redirects: "recorded, never followed",
+ auth: "none (no Authorization headers, no cookies)",
+ dns: "pinned per request: undici Agent connect.lookup resolves, validates all addresses public and returns only those addresses for the connect (TLS hostname validation retained); pre-flight checks advisory",
+ },
+ userAgent: USER_AGENT,
+ counts,
+ results,
+ retiredRegistrationAttempts,
+ };
+ fs.writeFileSync(outPath, `${JSON.stringify(output, null, "\t")}\n`);
+ console.log(
+ `wrote ${outPath}: ${counts.audited} audited, AS available ${counts.asAvailable}, unavailable ${counts.asUnavailable}, DCR ${counts.dcr}, CIMD ${counts.cimd}, PKCE S256 ${counts.pkceS256}, live registration attempts preserved ${preservedRegistrationAttempts}, retired ${retiredRegistrationAttempts.length}`,
+ );
+}
+
+if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
+ await main();
+}
diff --git a/packages/ai/mcp-catalog/audit/metadata-audit.json b/packages/ai/mcp-catalog/audit/metadata-audit.json
new file mode 100644
index 0000000000..0dc0d98e30
--- /dev/null
+++ b/packages/ai/mcp-catalog/audit/metadata-audit.json
@@ -0,0 +1,7513 @@
+{
+ "$comment": "READ-ONLY public metadata audit snapshot (unauthenticated GETs of RFC 9728 / AS / OIDC documents). A valid metadata GET is never proof that live OAuth works; results are never labeled metadata-reviewed or live-verified. Generated by audit-provider-metadata.ts; an input to the offline importer; do not hand-edit results. One sanctioned supplement: per-server authorizationServer.registrationAttempt blocks hold live registration evidence from real engine login attempts (the read-only audit itself never POSTs registration endpoints); each carries explicit provenance and is preserved verbatim when the audit is re-run.",
+ "fetchedAt": "2026-09-12",
+ "method": "per endpoint: unauthenticated MCP endpoint probe (WWW-Authenticate resource_metadata), RFC 9728 protected-resource metadata, authorization-server metadata (oauth-authorization-server / openid-configuration candidates)",
+ "bounds": {
+ "requestTimeoutMs": 10000,
+ "maxBodyBytes": 262144,
+ "concurrency": 6,
+ "redirects": "recorded, never followed",
+ "auth": "none (no Authorization headers, no cookies)",
+ "dns": "pinned per request: undici Agent connect.lookup resolves, validates all addresses public and returns only those addresses for the connect (TLS hostname validation retained); pre-flight checks advisory"
+ },
+ "userAgent": "PrimeAgent-CatalogAudit/1.0 (ENG-6108 PR2256; read-only metadata audit)",
+ "counts": {
+ "audited": 103,
+ "asAvailable": 97,
+ "prmEngineVisible": 93,
+ "prmAudienceMismatch": 15,
+ "asUnavailable": 6,
+ "dcr": 78,
+ "cimd": 25,
+ "pkceS256": 97
+ },
+ "results": [
+ {
+ "server": "adobe-for-creativity",
+ "endpoint": "https://adobe-creativity.adobe.io/mcp",
+ "probe": {
+ "url": "https://adobe-creativity.adobe.io/mcp",
+ "httpStatus": 403
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://adobe-creativity.adobe.io/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 403,
+ "error": "http 403"
+ },
+ {
+ "sourceUrl": "https://adobe-creativity.adobe.io/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 403,
+ "error": "http 403"
+ }
+ ],
+ "engineVisible": "unavailable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://adobe-creativity.adobe.io/.well-known/oauth-authorization-server",
+ "https://adobe-creativity.adobe.io/.well-known/openid-configuration"
+ ],
+ "status": "unavailable",
+ "evidence": {
+ "httpStatus": 403,
+ "error": "http 403"
+ }
+ }
+ },
+ {
+ "server": "airtable",
+ "endpoint": "https://mcp.airtable.com/mcp",
+ "probe": {
+ "url": "https://mcp.airtable.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.airtable.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.airtable.com",
+ "authorizationServers": [
+ "https://airtable.com/oauth2/v1"
+ ],
+ "protectedResourceScopes": [
+ "data.records:read",
+ "data.records:write",
+ "schema.bases:read",
+ "schema.bases:write",
+ "data.recordComments:read",
+ "data.recordComments:write",
+ "workspacesAndBases:read"
+ ]
+ },
+ "audienceMatches": false
+ },
+ {
+ "sourceUrl": "https://mcp.airtable.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.airtable.com",
+ "authorizationServers": [
+ "https://airtable.com/oauth2/v1"
+ ],
+ "protectedResourceScopes": [
+ "data.records:read",
+ "data.records:write",
+ "schema.bases:read",
+ "schema.bases:write",
+ "data.recordComments:read",
+ "data.recordComments:write",
+ "workspacesAndBases:read"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.airtable.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://airtable.com/.well-known/oauth-authorization-server/oauth2/v1",
+ "https://airtable.com/oauth2/v1/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://airtable.com/oauth2/v1",
+ "evidence": {
+ "issuer": "https://airtable.com/oauth2/v1",
+ "authorizationEndpoint": "https://airtable.com/oauth2/v1/authorize",
+ "tokenEndpoint": "https://airtable.com/oauth2/v1/token",
+ "registrationEndpoint": "https://airtable.com/oauth2/v1/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "data.records:read",
+ "data.records:write",
+ "schema.bases:read",
+ "schema.bases:write",
+ "data.recordComments:read",
+ "data.recordComments:write",
+ "workspacesAndBases:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "airwallex",
+ "endpoint": "https://mcp.airwallex.com/mcp",
+ "probe": {
+ "url": "https://mcp.airwallex.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.airwallex.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.airwallex.com/mcp",
+ "authorizationServers": [
+ "https://mcp.airwallex.com/mcp"
+ ],
+ "protectedResourceScopes": [
+ "r:awx_action:balances_view",
+ "r:awx_action:contact_management_view",
+ "r:awx_action:conversions_view",
+ "r:awx_action:global_accounts_view",
+ "r:awx_action:issuing_cardholders_view",
+ "r:awx_action:issuing_cards_view",
+ "r:awx_action:issuing_transactions_view",
+ "r:awx_action:pa_view",
+ "r:awx_action:payment_links_view",
+ "r:awx_action:settings.account_details_view",
+ "r:awx_action:transfers_view",
+ "r:org_action:billing.customer_view",
+ "r:org_action:billing.discount_view",
+ "r:org_action:billing.invoice_view",
+ "r:org_action:billing.payment_source_view",
+ "r:org_action:billing.price_view",
+ "r:org_action:billing.product_view",
+ "r:org_action:billing.subscription_view",
+ "r:org_action:billing.transaction_view",
+ "r:org_action:billing.usage_metering_view",
+ "r:org_action:expense_management.expense:api_view",
+ "r:org_action:spend.bills:api_view",
+ "r:org_action:spend.vendors:api_view",
+ "w:awx_action:contact_management_edit",
+ "w:awx_action:devx.feedback_write",
+ "w:awx_action:issuing_cardholders_edit",
+ "w:awx_action:issuing_cards_edit",
+ "w:awx_action:payment_links_edit",
+ "w:org_action:billing.customer_edit",
+ "w:org_action:billing.discount_edit"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.airwallex.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.airwallex.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.airwallex.com/.well-known/oauth-authorization-server/mcp",
+ "https://mcp.airwallex.com/mcp/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.airwallex.com/mcp",
+ "evidence": {
+ "issuer": "https://mcp.airwallex.com/mcp",
+ "authorizationEndpoint": "https://mcp.airwallex.com/mcp/authorize",
+ "tokenEndpoint": "https://mcp.airwallex.com/mcp/token",
+ "registrationEndpoint": "https://mcp.airwallex.com/mcp/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "r:awx_action:balances_view",
+ "r:awx_action:contact_management_view",
+ "r:awx_action:conversions_view",
+ "r:awx_action:global_accounts_view",
+ "r:awx_action:issuing_cardholders_view",
+ "r:awx_action:issuing_cards_view",
+ "r:awx_action:issuing_transactions_view",
+ "r:awx_action:pa_view",
+ "r:awx_action:payment_links_view",
+ "r:awx_action:settings.account_details_view",
+ "r:awx_action:transfers_view",
+ "r:org_action:billing.customer_view",
+ "r:org_action:billing.discount_view",
+ "r:org_action:billing.invoice_view",
+ "r:org_action:billing.payment_source_view",
+ "r:org_action:billing.price_view",
+ "r:org_action:billing.product_view",
+ "r:org_action:billing.subscription_view",
+ "r:org_action:billing.transaction_view",
+ "r:org_action:billing.usage_metering_view",
+ "r:org_action:expense_management.expense:api_view",
+ "r:org_action:spend.bills:api_view",
+ "r:org_action:spend.vendors:api_view",
+ "w:awx_action:contact_management_edit",
+ "w:awx_action:devx.feedback_write",
+ "w:awx_action:issuing_cardholders_edit",
+ "w:awx_action:issuing_cards_edit",
+ "w:awx_action:payment_links_edit",
+ "w:org_action:billing.customer_edit",
+ "w:org_action:billing.discount_edit"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "airwallex-sandbox",
+ "endpoint": "https://mcp.sandbox.airwallex.com/developer",
+ "probe": {
+ "url": "https://mcp.sandbox.airwallex.com/developer",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.sandbox.airwallex.com/.well-known/oauth-protected-resource/developer",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.sandbox.airwallex.com/developer",
+ "authorizationServers": [
+ "https://mcp.sandbox.airwallex.com/developer"
+ ],
+ "protectedResourceScopes": [
+ "r:awx_action:balances_view",
+ "r:awx_action:contact_management_view",
+ "r:awx_action:conversions_view",
+ "r:awx_action:deposits_view",
+ "r:awx_action:direct_debits_view",
+ "r:awx_action:global_accounts_view",
+ "r:awx_action:issuing_cardholders_view",
+ "r:awx_action:issuing_cards_view",
+ "r:awx_action:issuing_transactions_view",
+ "r:awx_action:linked_accounts_view",
+ "r:awx_action:pa_view",
+ "r:awx_action:payment_dispute_view",
+ "r:awx_action:payment_links_view",
+ "r:awx_action:settings.account_details_view",
+ "r:awx_action:transfers_view",
+ "r:org_action:billing.customer_view",
+ "r:org_action:billing.discount_view",
+ "r:org_action:billing.invoice_view",
+ "r:org_action:billing.payment_source_view",
+ "r:org_action:billing.price_view",
+ "r:org_action:billing.product_view",
+ "r:org_action:billing.subscription_view",
+ "r:org_action:billing.transaction_view",
+ "r:org_action:billing.usage_metering_view",
+ "r:org_action:expense_management.expense:api_view",
+ "r:org_action:spend.bills:api_view",
+ "r:org_action:spend.vendors:api_view",
+ "w:awx_action:contact_management_edit",
+ "w:awx_action:conversions_edit",
+ "w:awx_action:deposits_create"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.sandbox.airwallex.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.sandbox.airwallex.com/.well-known/oauth-protected-resource/developer"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.sandbox.airwallex.com/.well-known/oauth-authorization-server/developer",
+ "https://mcp.sandbox.airwallex.com/developer/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.sandbox.airwallex.com/developer",
+ "evidence": {
+ "issuer": "https://mcp.sandbox.airwallex.com/developer",
+ "authorizationEndpoint": "https://mcp.sandbox.airwallex.com/developer/authorize",
+ "tokenEndpoint": "https://mcp.sandbox.airwallex.com/developer/token",
+ "registrationEndpoint": "https://mcp.sandbox.airwallex.com/developer/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "r:awx_action:balances_view",
+ "r:awx_action:contact_management_view",
+ "r:awx_action:conversions_view",
+ "r:awx_action:deposits_view",
+ "r:awx_action:direct_debits_view",
+ "r:awx_action:global_accounts_view",
+ "r:awx_action:issuing_cardholders_view",
+ "r:awx_action:issuing_cards_view",
+ "r:awx_action:issuing_transactions_view",
+ "r:awx_action:linked_accounts_view",
+ "r:awx_action:pa_view",
+ "r:awx_action:payment_dispute_view",
+ "r:awx_action:payment_links_view",
+ "r:awx_action:settings.account_details_view",
+ "r:awx_action:transfers_view",
+ "r:org_action:billing.customer_view",
+ "r:org_action:billing.discount_view",
+ "r:org_action:billing.invoice_view",
+ "r:org_action:billing.payment_source_view",
+ "r:org_action:billing.price_view",
+ "r:org_action:billing.product_view",
+ "r:org_action:billing.subscription_view",
+ "r:org_action:billing.transaction_view",
+ "r:org_action:billing.usage_metering_view",
+ "r:org_action:expense_management.expense:api_view",
+ "r:org_action:spend.bills:api_view",
+ "r:org_action:spend.vendors:api_view",
+ "w:awx_action:contact_management_edit",
+ "w:awx_action:conversions_edit",
+ "w:awx_action:deposits_create"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "aiven",
+ "endpoint": "https://mcp.aiven.live/mcp",
+ "probe": {
+ "url": "https://mcp.aiven.live/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.aiven.live/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.aiven.live/mcp",
+ "authorizationServers": [
+ "https://api.aiven.io"
+ ],
+ "protectedResourceScopes": [
+ "projects",
+ "services",
+ "accounts:read"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.aiven.live/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.aiven.live/mcp",
+ "authorizationServers": [
+ "https://api.aiven.io"
+ ],
+ "protectedResourceScopes": [
+ "projects",
+ "services",
+ "accounts:read"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.aiven.live/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://api.aiven.io/.well-known/oauth-authorization-server",
+ "https://api.aiven.io/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://api.aiven.io",
+ "evidence": {
+ "issuer": "https://api.aiven.io",
+ "authorizationEndpoint": "https://console.aiven.io/oauth2/authorize",
+ "tokenEndpoint": "https://api.aiven.io/v1/oauth2/token",
+ "registrationEndpoint": "https://api.aiven.io/v1/oauth2/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "projects",
+ "services",
+ "accounts:read"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "amplitude",
+ "endpoint": "https://mcp.amplitude.com/mcp",
+ "probe": {
+ "url": "https://mcp.amplitude.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.amplitude.com/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.amplitude.com/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.amplitude.com",
+ "authorizationServers": [
+ "https://mcp.amplitude.com"
+ ],
+ "protectedResourceScopes": [
+ "mcp:read",
+ "mcp:write"
+ ]
+ },
+ "audienceMatches": false
+ },
+ {
+ "sourceUrl": "https://mcp.amplitude.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.amplitude.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.amplitude.com/.well-known/oauth-authorization-server",
+ "https://mcp.amplitude.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.amplitude.com",
+ "evidence": {
+ "issuer": "https://mcp.amplitude.com",
+ "authorizationEndpoint": "https://mcp.amplitude.com/authorize",
+ "tokenEndpoint": "https://mcp.amplitude.com/token",
+ "registrationEndpoint": "https://mcp.amplitude.com/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "mcp:read",
+ "mcp:write",
+ "offline_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "apollo",
+ "endpoint": "https://mcp.apollo.io/mcp",
+ "probe": {
+ "url": "https://mcp.apollo.io/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.apollo.io/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.apollo.io/mcp",
+ "authorizationServers": [
+ "https://mcp.apollo.io"
+ ],
+ "protectedResourceScopes": [
+ "read_user_profile",
+ "app_scopes",
+ "people_bulk_match",
+ "organizations_bulk_enrich",
+ "organizations_enrich",
+ "people_match",
+ "webhook_result_read",
+ "mixed_people_api_search",
+ "organizations_job_posting",
+ "mixed_companies_search",
+ "organizations_search",
+ "contact_write",
+ "contact_update",
+ "contacts_search",
+ "contact_read",
+ "account_write",
+ "account_update",
+ "context_center_read",
+ "context_center_write",
+ "emailer_campaigns_search",
+ "emailer_campaigns_create",
+ "emailer_campaigns_update",
+ "emailer_campaigns_approve",
+ "emailer_campaigns_add_contact_ids",
+ "emailer_campaigns_remove_or_stop_contact_ids",
+ "emailer_schedules_list",
+ "emailer_messages_search",
+ "emailer_messages_create",
+ "emailer_messages_send_now",
+ "emailer_messages_email_send_status"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.apollo.io/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.apollo.io/mcp",
+ "authorizationServers": [
+ "https://mcp.apollo.io"
+ ],
+ "protectedResourceScopes": [
+ "read_user_profile",
+ "app_scopes",
+ "people_bulk_match",
+ "organizations_bulk_enrich",
+ "organizations_enrich",
+ "people_match",
+ "webhook_result_read",
+ "mixed_people_api_search",
+ "organizations_job_posting",
+ "mixed_companies_search",
+ "organizations_search",
+ "contact_write",
+ "contact_update",
+ "contacts_search",
+ "contact_read",
+ "account_write",
+ "account_update",
+ "context_center_read",
+ "context_center_write",
+ "emailer_campaigns_search",
+ "emailer_campaigns_create",
+ "emailer_campaigns_update",
+ "emailer_campaigns_approve",
+ "emailer_campaigns_add_contact_ids",
+ "emailer_campaigns_remove_or_stop_contact_ids",
+ "emailer_schedules_list",
+ "emailer_messages_search",
+ "emailer_messages_create",
+ "emailer_messages_send_now",
+ "emailer_messages_email_send_status"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.apollo.io/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.apollo.io/.well-known/oauth-authorization-server",
+ "https://mcp.apollo.io/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.apollo.io",
+ "evidence": {
+ "issuer": "https://mcp.apollo.io",
+ "authorizationEndpoint": "https://mcp.apollo.io/mcp/oauth_metadata/redirect_to_authorize",
+ "tokenEndpoint": "https://mcp.apollo.io/api/v1/oauth/token",
+ "registrationEndpoint": "https://mcp.apollo.io/api/v1/oauth/applications/register_oauth_client",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "read_user_profile",
+ "app_scopes",
+ "people_bulk_match",
+ "organizations_bulk_enrich",
+ "organizations_enrich",
+ "people_match",
+ "webhook_result_read",
+ "mixed_people_api_search",
+ "organizations_job_posting",
+ "mixed_companies_search",
+ "organizations_search",
+ "contact_write",
+ "contact_update",
+ "contacts_search",
+ "contact_read",
+ "account_write",
+ "account_update",
+ "context_center_read",
+ "context_center_write",
+ "emailer_campaigns_search",
+ "emailer_campaigns_create",
+ "emailer_campaigns_update",
+ "emailer_campaigns_approve",
+ "emailer_campaigns_add_contact_ids",
+ "emailer_campaigns_remove_or_stop_contact_ids",
+ "emailer_schedules_list",
+ "emailer_messages_search",
+ "emailer_messages_create",
+ "emailer_messages_send_now",
+ "emailer_messages_email_send_status"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "appwrite",
+ "endpoint": "https://mcp.appwrite.io/",
+ "probe": {
+ "url": "https://mcp.appwrite.io/",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.appwrite.io/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.appwrite.io/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.appwrite.io/",
+ "authorizationServers": [
+ "https://fra.cloud.appwrite.io/v1/oauth2/console"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "phone",
+ "all",
+ "project:all",
+ "organization:all",
+ "project:project.read",
+ "project:project.write",
+ "project:keys.read",
+ "project:keys.write",
+ "project:platforms.read",
+ "project:platforms.write",
+ "project:mocks.read",
+ "project:mocks.write",
+ "project:project.policies.read",
+ "project:project.policies.write",
+ "project:project.oauth2.read",
+ "project:project.oauth2.write",
+ "project:templates.read",
+ "project:templates.write",
+ "project:stages.read",
+ "project:stages.write",
+ "project:users.read",
+ "project:users.write",
+ "project:sessions.read",
+ "project:sessions.write",
+ "project:teams.read",
+ "project:teams.write",
+ "project:databases.read"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.appwrite.io/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://fra.cloud.appwrite.io/.well-known/oauth-authorization-server/v1/oauth2/console",
+ "https://fra.cloud.appwrite.io/v1/oauth2/console/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://fra.cloud.appwrite.io/v1/oauth2/console",
+ "evidence": {
+ "issuer": "https://fra.cloud.appwrite.io/v1/oauth2/console",
+ "authorizationEndpoint": "https://fra.cloud.appwrite.io/v1/oauth2/console/authorize",
+ "tokenEndpoint": "https://fra.cloud.appwrite.io/v1/oauth2/console/token",
+ "registrationEndpoint": "https://fra.cloud.appwrite.io/v1/oauth2/console/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "phone",
+ "all",
+ "project:all",
+ "organization:all",
+ "project:project.read",
+ "project:project.write",
+ "project:keys.read",
+ "project:keys.write",
+ "project:platforms.read",
+ "project:platforms.write",
+ "project:mocks.read",
+ "project:mocks.write",
+ "project:policies.read",
+ "project:policies.write",
+ "project:project.policies.read",
+ "project:project.policies.write",
+ "project:project.oauth2.read",
+ "project:project.oauth2.write",
+ "project:templates.read",
+ "project:templates.write",
+ "project:stages.read",
+ "project:stages.write",
+ "project:users.read",
+ "project:users.write",
+ "project:sessions.read",
+ "project:sessions.write",
+ "project:teams.read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "atlan",
+ "endpoint": "https://mcp.atlan.com/mcp",
+ "probe": {
+ "url": "https://mcp.atlan.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.atlan.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.atlan.com/mcp",
+ "authorizationServers": [
+ "https://mcp.atlan.com"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.atlan.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.atlan.com",
+ "authorizationServers": [
+ "https://mcp.atlan.com"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.atlan.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.atlan.com/.well-known/oauth-authorization-server",
+ "https://mcp.atlan.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.atlan.com",
+ "evidence": {
+ "issuer": "https://mcp.atlan.com",
+ "authorizationEndpoint": "https://mcp.atlan.com/oauth/authorize",
+ "tokenEndpoint": "https://mcp.atlan.com/oauth/token",
+ "registrationEndpoint": "https://mcp.atlan.com/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "atlassian",
+ "endpoint": "https://mcp.atlassian.com/v2/mcp",
+ "probe": {
+ "url": "https://mcp.atlassian.com/v2/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.atlassian.com/.well-known/oauth-protected-resource/v2/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.atlassian.com/.well-known/oauth-protected-resource/v2/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.atlassian.com/v2/mcp",
+ "authorizationServers": [
+ "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3"
+ ],
+ "protectedResourceScopes": [
+ "read:me",
+ "read:account",
+ "offline_access",
+ "email",
+ "read:jira:agent-interface",
+ "write:jira:agent-interface",
+ "search:jira:agent-interface",
+ "delete:jira:agent-interface",
+ "manage:jira:agent-interface",
+ "read:confluence:agent-interface",
+ "write:confluence:agent-interface",
+ "search:confluence:agent-interface",
+ "search:rovo:agent-interface",
+ "search:code:agent-interface",
+ "read:all:twg",
+ "write:all:twg",
+ "read:goals:agent-interface",
+ "write:goals:agent-interface",
+ "read:projects:agent-interface",
+ "write:projects:agent-interface",
+ "read:bitbucket:agent-interface",
+ "write:bitbucket:agent-interface",
+ "read:loom:agent-interface",
+ "write:loom:agent-interface",
+ "read:talent:agent-interface",
+ "write:talent:agent-interface",
+ "read:teams:agent-interface",
+ "write:teams:agent-interface",
+ "read:artifacts:agent-interface",
+ "write:artifacts:agent-interface"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.atlassian.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.atlassian.com/.well-known/oauth-protected-resource/v2/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://auth.atlassian.com/.well-known/oauth-authorization-server/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "evidence": {
+ "issuer": "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "authorizationEndpoint": "https://auth.atlassian.com/authorize",
+ "tokenEndpoint": "https://auth.atlassian.com/oauth/token",
+ "registrationEndpoint": "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3/dcr/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt"
+ ]
+ }
+ }
+ },
+ {
+ "server": "atlassian-rovo",
+ "endpoint": "https://mcp.atlassian.com/v1/mcp/authv2",
+ "probe": {
+ "url": "https://mcp.atlassian.com/v1/mcp/authv2",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.atlassian.com/.well-known/oauth-protected-resource/v1/mcp/authv2"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.atlassian.com/.well-known/oauth-protected-resource/v1/mcp/authv2",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.atlassian.com/v1/mcp/authv2",
+ "authorizationServers": [
+ "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3"
+ ],
+ "protectedResourceScopes": [
+ "read:me",
+ "read:account",
+ "offline_access",
+ "email",
+ "read:jira-work",
+ "write:jira-work",
+ "search:confluence",
+ "read:confluence-user",
+ "read:page:confluence",
+ "write:page:confluence",
+ "read:comment:confluence",
+ "write:comment:confluence",
+ "read:space:confluence",
+ "read:hierarchical-content:confluence",
+ "write:component:compass",
+ "read:component:compass",
+ "read:scorecard:compass",
+ "write:scorecard:compass",
+ "read:event:compass",
+ "read:metric:compass",
+ "read:all:twg",
+ "write:all:twg"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.atlassian.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.atlassian.com/.well-known/oauth-protected-resource/v1/mcp/authv2"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://auth.atlassian.com/.well-known/oauth-authorization-server/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "evidence": {
+ "issuer": "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "authorizationEndpoint": "https://auth.atlassian.com/authorize",
+ "tokenEndpoint": "https://auth.atlassian.com/oauth/token",
+ "registrationEndpoint": "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3/dcr/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt"
+ ]
+ }
+ }
+ },
+ {
+ "server": "aws-devops-agent",
+ "endpoint": "https://connect.aidevops.us-east-1.api.aws/mcp",
+ "probe": {
+ "url": "https://connect.aidevops.us-east-1.api.aws/mcp",
+ "httpStatus": 401
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://connect.aidevops.us-east-1.api.aws/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://connect.aidevops.us-east-1.api.aws/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "unavailable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://connect.aidevops.us-east-1.api.aws/.well-known/oauth-authorization-server",
+ "https://connect.aidevops.us-east-1.api.aws/.well-known/openid-configuration"
+ ],
+ "status": "unavailable",
+ "evidence": {
+ "httpStatus": 404,
+ "contentType": "application/json",
+ "error": "http 404"
+ }
+ }
+ },
+ {
+ "server": "canva",
+ "endpoint": "https://mcp.canva.com/mcp",
+ "probe": {
+ "url": "https://mcp.canva.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.canva.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.canva.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.canva.com/mcp",
+ "authorizationServers": [
+ "https://mcp.canva.com"
+ ],
+ "protectedResourceScopes": [
+ "profile:read",
+ "design:meta:read",
+ "design:content:write",
+ "design:content:read",
+ "folder:read",
+ "folder:write",
+ "brandtemplate:content:read",
+ "brandtemplate:meta:read",
+ "brandtemplate:content:write",
+ "comment:write",
+ "comment:read",
+ "asset:read",
+ "asset:write",
+ "brandkit:read",
+ "help:answers:read",
+ "help:answers:write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.canva.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.canva.com",
+ "authorizationServers": [
+ "https://mcp.canva.com"
+ ],
+ "protectedResourceScopes": [
+ "profile:read",
+ "design:meta:read",
+ "design:content:write",
+ "design:content:read",
+ "folder:read",
+ "folder:write",
+ "brandtemplate:content:read",
+ "brandtemplate:meta:read",
+ "brandtemplate:content:write",
+ "comment:write",
+ "comment:read",
+ "asset:read",
+ "asset:write",
+ "brandkit:read",
+ "help:answers:read",
+ "help:answers:write"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.canva.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.canva.com/.well-known/oauth-authorization-server",
+ "https://mcp.canva.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.canva.com",
+ "evidence": {
+ "issuer": "https://mcp.canva.com",
+ "authorizationEndpoint": "https://mcp.canva.com/authorize",
+ "tokenEndpoint": "https://mcp.canva.com/token",
+ "registrationEndpoint": "https://mcp.canva.com/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "catalyst-by-zoho",
+ "endpoint": "https://catalyst.zohomcp.com/mcp/message",
+ "probe": {
+ "url": "https://catalyst.zohomcp.com/mcp/message",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://catalyst.zohomcp.com/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://catalyst.zohomcp.com/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://catalyst.zohomcp.com/mcp/message",
+ "authorizationServers": [
+ "https://catalyst.zohomcp.com"
+ ],
+ "protectedResourceScopes": [
+ "ZohoCatalyst.fullaccess.ALL",
+ "ZohoCatalyst.functions.execute.CUSTOM",
+ "QuickML.projects.READ",
+ "QuickML.pipelines.READ",
+ "QuickML.pipelines.CREATE",
+ "QuickML.pipelines.UPDATE",
+ "QuickML.pipelines.DELETE",
+ "QuickML.datasets.READ",
+ "QuickML.datasets.UPDATE",
+ "QuickML.datasets.DELETE",
+ "QuickML.datasets.CREATE",
+ "QuickML.models.READ",
+ "QuickML.models.UPDATE",
+ "QuickML.models.DELETE",
+ "QuickML.endpoints.CREATE",
+ "QuickML.endpoints.READ",
+ "QuickML.endpoints.UPDATE",
+ "QuickML.endpoints.DELETE",
+ "QuickML.deployment.READ",
+ "QuickML.rag.READ",
+ "QuickML.rag.CREATE",
+ "QuickML.rag.DELETE",
+ "ZohoCatalyst.Slate.app.READ",
+ "ZohoCatalyst.Slate.app.CREATE",
+ "ZohoCatalyst.automationtesting.execute",
+ "ZohoCatalyst.circuits.execute",
+ "ZohoMCP.tool.execute"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://catalyst.zohomcp.com/.well-known/oauth-protected-resource/mcp/message",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://catalyst.zohomcp.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://catalyst.zohomcp.com/.well-known/oauth-authorization-server",
+ "https://catalyst.zohomcp.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://catalyst.zohomcp.com",
+ "evidence": {
+ "issuer": "https://catalyst.zohomcp.com",
+ "authorizationEndpoint": "https://mcp.zoho.com/mcp-client/a46e2921ab2faad22da25ad009b2e75c/zservices/oauth",
+ "tokenEndpoint": "https://mcp.zoho.com/baas/mcp/v1/oauth/a46e2921ab2faad22da25ad009b2e75c/zservices/token",
+ "registrationEndpoint": "https://mcp.zoho.com/baas/mcp/v1/oauth/a46e2921ab2faad22da25ad009b2e75c/zservices/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "ZohoCatalyst.fullaccess.ALL",
+ "ZohoCatalyst.functions.execute.CUSTOM",
+ "QuickML.projects.READ",
+ "QuickML.pipelines.READ",
+ "QuickML.pipelines.CREATE",
+ "QuickML.pipelines.UPDATE",
+ "QuickML.pipelines.DELETE",
+ "QuickML.datasets.READ",
+ "QuickML.datasets.UPDATE",
+ "QuickML.datasets.DELETE",
+ "QuickML.datasets.CREATE",
+ "QuickML.models.READ",
+ "QuickML.models.UPDATE",
+ "QuickML.models.DELETE",
+ "QuickML.endpoints.CREATE",
+ "QuickML.endpoints.READ",
+ "QuickML.endpoints.UPDATE",
+ "QuickML.endpoints.DELETE",
+ "QuickML.deployment.READ",
+ "QuickML.rag.READ",
+ "QuickML.rag.CREATE",
+ "QuickML.rag.DELETE",
+ "ZohoCatalyst.Slate.app.READ",
+ "ZohoCatalyst.Slate.app.CREATE",
+ "ZohoCatalyst.automationtesting.execute",
+ "ZohoCatalyst.circuits.execute",
+ "ZohoMCP.tool.execute"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "circleback",
+ "endpoint": "https://circleback.ai/api/mcp",
+ "probe": {
+ "url": "https://circleback.ai/api/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://circleback.ai/.well-known/oauth-protected-resource/api/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://circleback.ai/.well-known/oauth-protected-resource/api/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://circleback.ai/api/mcp",
+ "authorizationServers": [
+ "https://circleback.ai"
+ ],
+ "protectedResourceScopes": [
+ "user"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://circleback.ai/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://circleback.ai/api/mcp",
+ "authorizationServers": [
+ "https://circleback.ai"
+ ],
+ "protectedResourceScopes": [
+ "user"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://circleback.ai/.well-known/oauth-protected-resource/api/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://circleback.ai/.well-known/oauth-authorization-server",
+ "https://circleback.ai/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://circleback.ai",
+ "evidence": {
+ "issuer": "https://circleback.ai",
+ "authorizationEndpoint": "https://circleback.ai/api/oauth/authorize",
+ "tokenEndpoint": "https://circleback.ai/api/oauth/access-token",
+ "registrationEndpoint": "https://circleback.ai/api/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "user"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "clickhouse",
+ "endpoint": "https://mcp.clickhouse.cloud/mcp",
+ "probe": {
+ "url": "https://mcp.clickhouse.cloud/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.clickhouse.cloud/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.clickhouse.cloud/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.clickhouse.cloud/mcp",
+ "authorizationServers": [
+ "https://mcp.clickhouse.cloud"
+ ],
+ "protectedResourceScopes": [
+ "mcp:access",
+ "openid",
+ "profile",
+ "email"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.clickhouse.cloud/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.clickhouse.cloud",
+ "authorizationServers": [
+ "https://mcp.clickhouse.cloud"
+ ],
+ "protectedResourceScopes": [
+ "mcp:access",
+ "clickstack:access",
+ "openid",
+ "profile",
+ "email"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.clickhouse.cloud/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.clickhouse.cloud/.well-known/oauth-authorization-server",
+ "https://mcp.clickhouse.cloud/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.clickhouse.cloud",
+ "evidence": {
+ "issuer": "https://mcp.clickhouse.cloud",
+ "authorizationEndpoint": "https://mcp.clickhouse.cloud/authorize",
+ "tokenEndpoint": "https://mcp.clickhouse.cloud/token",
+ "registrationEndpoint": "https://mcp.clickhouse.cloud/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "mcp:access",
+ "clickstack:access",
+ "openid",
+ "profile",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "clickup",
+ "endpoint": "https://mcp.clickup.com/mcp",
+ "probe": {
+ "url": "https://mcp.clickup.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.clickup.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.clickup.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.clickup.com/mcp",
+ "authorizationServers": [
+ "https://mcp.clickup.com"
+ ],
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.clickup.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.clickup.com",
+ "authorizationServers": [
+ "https://mcp.clickup.com"
+ ],
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.clickup.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.clickup.com/.well-known/oauth-authorization-server",
+ "https://mcp.clickup.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.clickup.com",
+ "evidence": {
+ "issuer": "https://mcp.clickup.com",
+ "authorizationEndpoint": "https://mcp.clickup.com/oauth/authorize",
+ "tokenEndpoint": "https://mcp.clickup.com/oauth/token",
+ "registrationEndpoint": "https://mcp.clickup.com/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "read",
+ "write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "cloudflare-api",
+ "endpoint": "https://mcp.cloudflare.com/mcp",
+ "probe": {
+ "url": "https://mcp.cloudflare.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.cloudflare.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.cloudflare.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.cloudflare.com/mcp",
+ "authorizationServers": [
+ "https://mcp.cloudflare.com"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.cloudflare.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.cloudflare.com/mcp",
+ "authorizationServers": [
+ "https://mcp.cloudflare.com"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.cloudflare.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.cloudflare.com/.well-known/oauth-authorization-server",
+ "https://mcp.cloudflare.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.cloudflare.com",
+ "evidence": {
+ "issuer": "https://mcp.cloudflare.com",
+ "authorizationEndpoint": "https://mcp.cloudflare.com/authorize",
+ "tokenEndpoint": "https://mcp.cloudflare.com/token",
+ "registrationEndpoint": "https://mcp.cloudflare.com/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "cloudinary-analysis",
+ "endpoint": "https://analysis.mcp.cloudinary.com/mcp",
+ "probe": {
+ "url": "https://analysis.mcp.cloudinary.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://analysis.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://analysis.mcp.cloudinary.com/mcp",
+ "authorizationServers": [
+ "https://analysis.mcp.cloudinary.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "media_analysis",
+ "query_analysis_tasks"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://analysis.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://analysis.mcp.cloudinary.com",
+ "authorizationServers": [
+ "https://analysis.mcp.cloudinary.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "media_analysis",
+ "query_analysis_tasks"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://analysis.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://analysis.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://analysis.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://analysis.mcp.cloudinary.com",
+ "evidence": {
+ "issuer": "https://analysis.mcp.cloudinary.com",
+ "authorizationEndpoint": "https://analysis.mcp.cloudinary.com/authorize",
+ "tokenEndpoint": "https://analysis.mcp.cloudinary.com/token",
+ "registrationEndpoint": "https://analysis.mcp.cloudinary.com/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "media_analysis",
+ "query_analysis_tasks"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "cloudinary-asset-mgmt",
+ "endpoint": "https://asset-management.mcp.cloudinary.com/mcp",
+ "probe": {
+ "url": "https://asset-management.mcp.cloudinary.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://asset-management.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://asset-management.mcp.cloudinary.com/mcp",
+ "authorizationServers": [
+ "https://asset-management.mcp.cloudinary.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload",
+ "media_generation"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://asset-management.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://asset-management.mcp.cloudinary.com",
+ "authorizationServers": [
+ "https://asset-management.mcp.cloudinary.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload",
+ "media_generation"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://asset-management.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://asset-management.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://asset-management.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://asset-management.mcp.cloudinary.com",
+ "evidence": {
+ "issuer": "https://asset-management.mcp.cloudinary.com",
+ "authorizationEndpoint": "https://asset-management.mcp.cloudinary.com/authorize",
+ "tokenEndpoint": "https://asset-management.mcp.cloudinary.com/token",
+ "registrationEndpoint": "https://asset-management.mcp.cloudinary.com/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload",
+ "media_generation"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "cloudinary-env-config",
+ "endpoint": "https://environment-config.mcp.cloudinary.com/mcp",
+ "probe": {
+ "url": "https://environment-config.mcp.cloudinary.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://environment-config.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://environment-config.mcp.cloudinary.com/mcp",
+ "authorizationServers": [
+ "https://environment-config.mcp.cloudinary.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://environment-config.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://environment-config.mcp.cloudinary.com",
+ "authorizationServers": [
+ "https://environment-config.mcp.cloudinary.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://environment-config.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://environment-config.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://environment-config.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://environment-config.mcp.cloudinary.com",
+ "evidence": {
+ "issuer": "https://environment-config.mcp.cloudinary.com",
+ "authorizationEndpoint": "https://environment-config.mcp.cloudinary.com/authorize",
+ "tokenEndpoint": "https://environment-config.mcp.cloudinary.com/token",
+ "registrationEndpoint": "https://environment-config.mcp.cloudinary.com/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "cloudinary-mediaflows",
+ "endpoint": "https://mediaflows.mcp.cloudinary.com/v2/mcp",
+ "probe": {
+ "url": "https://mediaflows.mcp.cloudinary.com/v2/mcp",
+ "httpStatus": 401
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mediaflows.mcp.cloudinary.com/.well-known/oauth-protected-resource/v2/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mediaflows.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "unavailable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mediaflows.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://mediaflows.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "status": "unavailable",
+ "evidence": {
+ "httpStatus": 404,
+ "contentType": "application/json",
+ "error": "http 404"
+ }
+ }
+ },
+ {
+ "server": "cloudinary-smd",
+ "endpoint": "https://structured-metadata.mcp.cloudinary.com/mcp",
+ "probe": {
+ "url": "https://structured-metadata.mcp.cloudinary.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://structured-metadata.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://structured-metadata.mcp.cloudinary.com/mcp",
+ "authorizationServers": [
+ "https://structured-metadata.mcp.cloudinary.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://structured-metadata.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://structured-metadata.mcp.cloudinary.com",
+ "authorizationServers": [
+ "https://structured-metadata.mcp.cloudinary.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://structured-metadata.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://structured-metadata.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://structured-metadata.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://structured-metadata.mcp.cloudinary.com",
+ "evidence": {
+ "issuer": "https://structured-metadata.mcp.cloudinary.com",
+ "authorizationEndpoint": "https://structured-metadata.mcp.cloudinary.com/authorize",
+ "tokenEndpoint": "https://structured-metadata.mcp.cloudinary.com/token",
+ "registrationEndpoint": "https://structured-metadata.mcp.cloudinary.com/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "cockroachdb",
+ "endpoint": "https://cockroachlabs.cloud/mcp",
+ "probe": {
+ "url": "https://cockroachlabs.cloud/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://cockroachlabs.cloud/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://cockroachlabs.cloud/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://cockroachlabs.cloud/mcp",
+ "authorizationServers": [
+ "https://cockroachlabs.cloud/mcp"
+ ],
+ "protectedResourceScopes": [
+ "mcp:read",
+ "mcp:write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://cockroachlabs.cloud/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 200,
+ "error": "content-type text/html (expected application/json)"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://cockroachlabs.cloud/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://cockroachlabs.cloud/.well-known/oauth-authorization-server/mcp",
+ "https://cockroachlabs.cloud/mcp/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://cockroachlabs.cloud/mcp",
+ "evidence": {
+ "issuer": "https://cockroachlabs.cloud/mcp",
+ "authorizationEndpoint": "https://cockroachlabs.cloud/mcp/oauth/authorize",
+ "tokenEndpoint": "https://cockroachlabs.cloud/mcp/oauth/token",
+ "registrationEndpoint": "https://cockroachlabs.cloud/mcp/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "mcp:read",
+ "mcp:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "codspeed",
+ "endpoint": "https://mcp.codspeed.io/mcp",
+ "probe": {
+ "url": "https://mcp.codspeed.io/mcp",
+ "httpStatus": 404
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.codspeed.io/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp.codspeed.io/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.codspeed.io/mcp",
+ "authorizationServers": [
+ "https://api.codspeed.io"
+ ],
+ "protectedResourceScopes": []
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.codspeed.io/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://api.codspeed.io/.well-known/oauth-authorization-server",
+ "https://api.codspeed.io/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://api.codspeed.io",
+ "evidence": {
+ "issuer": "https://api.codspeed.io",
+ "authorizationEndpoint": "https://app.codspeed.io/auth/oauth",
+ "tokenEndpoint": "https://api.codspeed.io/oauth/token",
+ "registrationEndpoint": "https://api.codspeed.io/oauth/register",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "confidence-docs",
+ "endpoint": "https://mcp.confidence.dev/mcp/docs",
+ "probe": {
+ "url": "https://mcp.confidence.dev/mcp/docs",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.confidence.dev/.well-known/oauth-protected-resource/mcp/docs",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp.confidence.dev/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.confidence.dev/mcp",
+ "authorizationServers": [
+ "https://mcp.confidence.dev"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "flags:read"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "unavailable",
+ "selectionNote": "the origin-level protected-resource document fails the engine's audience/structure validation; PRM discovery fails closed"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.confidence.dev/.well-known/oauth-authorization-server",
+ "https://mcp.confidence.dev/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.confidence.dev",
+ "evidence": {
+ "issuer": "https://mcp.confidence.dev",
+ "authorizationEndpoint": "https://mcp.confidence.dev/authorize",
+ "tokenEndpoint": "https://mcp.confidence.dev/token",
+ "registrationEndpoint": "https://mcp.confidence.dev/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "confidence-flags",
+ "endpoint": "https://mcp.confidence.dev/mcp/flags",
+ "probe": {
+ "url": "https://mcp.confidence.dev/mcp/flags",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "http://mcp.confidence.dev/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.confidence.dev/.well-known/oauth-protected-resource/mcp/flags",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp.confidence.dev/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.confidence.dev/mcp",
+ "authorizationServers": [
+ "https://mcp.confidence.dev"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "flags:read"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "unavailable",
+ "selectionNote": "the origin-level protected-resource document fails the engine's audience/structure validation; PRM discovery fails closed"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.confidence.dev/.well-known/oauth-authorization-server",
+ "https://mcp.confidence.dev/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.confidence.dev",
+ "evidence": {
+ "issuer": "https://mcp.confidence.dev",
+ "authorizationEndpoint": "https://mcp.confidence.dev/authorize",
+ "tokenEndpoint": "https://mcp.confidence.dev/token",
+ "registrationEndpoint": "https://mcp.confidence.dev/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "datadog",
+ "endpoint": "https://mcp.datadoghq.com/v1/mcp",
+ "probe": {
+ "url": "https://mcp.datadoghq.com/v1/mcp",
+ "httpStatus": 401
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.datadoghq.com/.well-known/oauth-protected-resource/v1/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.datadoghq.com/v1/mcp",
+ "authorizationServers": [
+ "https://mcp.datadoghq.com/v1/mcp"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.datadoghq.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.datadoghq.com",
+ "authorizationServers": [
+ "https://mcp.datadoghq.com/v1/mcp"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.datadoghq.com/.well-known/oauth-protected-resource/v1/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.datadoghq.com/.well-known/oauth-authorization-server/v1/mcp",
+ "https://mcp.datadoghq.com/v1/mcp/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.datadoghq.com/v1/mcp",
+ "evidence": {
+ "issuer": "https://mcp.datadoghq.com/v1/mcp",
+ "authorizationEndpoint": "https://app.datadoghq.com/oauth2/v1/authorize",
+ "tokenEndpoint": "https://app.datadoghq.com/api/v2/oauth2/token",
+ "registrationEndpoint": "https://app.datadoghq.com/api/v2/oauth2/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "mcp_all"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "dropbox",
+ "endpoint": "https://mcp.dropbox.com/mcp",
+ "probe": {
+ "url": "https://mcp.dropbox.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.dropbox.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.dropbox.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.dropbox.com/mcp",
+ "authorizationServers": [
+ "https://www.dropbox.com"
+ ],
+ "protectedResourceScopes": [
+ "account_info.read",
+ "file_requests.read",
+ "file_requests.write",
+ "files.content.read",
+ "files.content.write",
+ "files.metadata.read",
+ "sharing.read",
+ "sharing.write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.dropbox.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 429,
+ "error": "http 429"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.dropbox.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://www.dropbox.com/.well-known/oauth-authorization-server",
+ "https://www.dropbox.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://www.dropbox.com",
+ "evidence": {
+ "issuer": "https://www.dropbox.com",
+ "authorizationEndpoint": "https://www.dropbox.com/oauth2/authorize",
+ "tokenEndpoint": "https://api.dropboxapi.com/oauth2/token",
+ "registrationEndpoint": "https://www.dropbox.com/oauth2/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "account_info.read",
+ "contacts.read",
+ "contacts.write",
+ "files.metadata.read",
+ "files.content.read",
+ "files.content.write",
+ "files.permanent_delete",
+ "files.metadata.write",
+ "sharing.read",
+ "sharing.write",
+ "file_requests.read",
+ "file_requests.write",
+ "openid",
+ "profile",
+ "email",
+ "account_info.write",
+ "backup.read",
+ "backup.write",
+ "dash/content.read",
+ "dash/content.write",
+ "team_info.read",
+ "team_info.write",
+ "sessions.list",
+ "sessions.modify",
+ "members.read",
+ "members.write",
+ "members.delete",
+ "groups.read",
+ "groups.write",
+ "events.read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "expo",
+ "endpoint": "https://mcp.expo.dev/mcp",
+ "probe": {
+ "url": "https://mcp.expo.dev/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.expo.dev/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.expo.dev/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.expo.dev/mcp",
+ "authorizationServers": [
+ "https://mcp.expo.dev"
+ ],
+ "protectedResourceScopes": [
+ "mcp:access"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.expo.dev/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.expo.dev/mcp",
+ "authorizationServers": [
+ "https://mcp.expo.dev"
+ ],
+ "protectedResourceScopes": [
+ "mcp:access"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.expo.dev/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.expo.dev/.well-known/oauth-authorization-server",
+ "https://mcp.expo.dev/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.expo.dev",
+ "evidence": {
+ "issuer": "https://mcp.expo.dev",
+ "authorizationEndpoint": "https://mcp.expo.dev/oauth/authorize",
+ "tokenEndpoint": "https://mcp.expo.dev/oauth/token",
+ "registrationEndpoint": "https://mcp.expo.dev/oauth/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "mcp:access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "private_key_jwt",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "figma",
+ "endpoint": "https://mcp.figma.com/mcp",
+ "probe": {
+ "url": "https://mcp.figma.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.figma.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.figma.com/mcp",
+ "authorizationServers": [
+ "https://api.figma.com"
+ ],
+ "protectedResourceScopes": [
+ "mcp:connect"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.figma.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.figma.com/mcp",
+ "authorizationServers": [
+ "https://api.figma.com"
+ ],
+ "protectedResourceScopes": [
+ "mcp:connect"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.figma.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://api.figma.com/.well-known/oauth-authorization-server",
+ "https://api.figma.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://api.figma.com",
+ "evidence": {
+ "issuer": "https://api.figma.com",
+ "authorizationEndpoint": "https://www.figma.com/oauth/mcp",
+ "tokenEndpoint": "https://api.figma.com/v1/oauth/token",
+ "registrationEndpoint": "https://api.figma.com/v1/oauth/mcp/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "mcp:connect"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post"
+ ]
+ },
+ "registrationAttempt": {
+ "provenance": "live engine login attempt during dogfooding (real user, /mcp login figma at PR #2256 head 8e77f0cc1) — recorded as committed evidence; the read-only audit itself never POSTs registration endpoints",
+ "date": "2026-09-13",
+ "method": "POST",
+ "url": "https://api.figma.com/v1/oauth/mcp/register",
+ "httpStatus": 403,
+ "error": "Dynamic client registration at https://api.figma.com/v1/oauth/mcp/register failed (HTTP 403)",
+ "finding": "the advertised registration endpoint rejects anonymous dynamic client registration (HTTP 403), so the engine's standard no-credentials flow fails and a Figma-authorized pre-registered app client is required; whether self-registered Figma apps can obtain mcp:connect is publicly unresolved",
+ "corroboration": [
+ "a public metadata-only GET of the same endpoint returned 404 {\"status\":404,\"err\":\"Not found\"} (2026-09-13) while the AS metadata still advertises it",
+ "public reports document the same 403 Forbidden for anonymous DCR requests: Figma forum threads (\"Remote MCP server OAuth client registration issue\", \"How to Access MCP OAuth Scope (mcp:connect)?\", \"Cannot connect MCP to Kilo Code\"), the figma/mcp-server-guide repository issue #1191, and a Microsoft developer-community report"
+ ]
+ }
+ }
+ },
+ {
+ "server": "fullstory",
+ "endpoint": "https://api.fullstory.com/mcp/fullstory",
+ "probe": {
+ "url": "https://api.fullstory.com/mcp/fullstory",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://api.fullstory.com/.well-known/oauth-protected-resource/mcp/fullstory"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://api.fullstory.com/.well-known/oauth-protected-resource/mcp/fullstory",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://api.fullstory.com/mcp/fullstory",
+ "authorizationServers": [
+ "https://auth.fullstory.com"
+ ],
+ "protectedResourceScopes": [
+ "playback:read",
+ "search:read",
+ "search.metadata:read",
+ "sessions:read",
+ "metrics:read",
+ "metrics.funnel:read",
+ "metrics.page:read",
+ "library.objects:read",
+ "playback.spec:read",
+ "playback.page.definitions:read",
+ "specs.mappings:read",
+ "settings.own:read",
+ "settings.own:write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://api.fullstory.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 0,
+ "error": "network"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://api.fullstory.com/.well-known/oauth-protected-resource/mcp/fullstory"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://auth.fullstory.com/.well-known/oauth-authorization-server",
+ "https://auth.fullstory.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://auth.fullstory.com",
+ "evidence": {
+ "issuer": "https://auth.fullstory.com",
+ "authorizationEndpoint": "https://auth.fullstory.com/oauth/authorize",
+ "tokenEndpoint": "https://auth.fullstory.com/oauth/token",
+ "registrationEndpoint": "https://auth.fullstory.com/oauth/register",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "gc-ai",
+ "endpoint": "https://app.gc.ai/api/mcp",
+ "probe": {
+ "url": "https://app.gc.ai/api/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://app.gc.ai/.well-known/oauth-protected-resource/api/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://app.gc.ai/api/mcp",
+ "authorizationServers": [
+ "https://app.gc.ai/"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://app.gc.ai/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://app.gc.ai/api/mcp",
+ "authorizationServers": [
+ "https://app.gc.ai/"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://app.gc.ai/.well-known/oauth-protected-resource/api/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://app.gc.ai/.well-known/oauth-authorization-server",
+ "https://app.gc.ai/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://app.gc.ai/",
+ "evidence": {
+ "issuer": "https://app.gc.ai/",
+ "authorizationEndpoint": "https://app.gc.ai/api/mcp/oauth/authorize",
+ "tokenEndpoint": "https://app.gc.ai/api/mcp/oauth/token",
+ "registrationEndpoint": "https://app.gc.ai/api/mcp/oauth/register",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "github",
+ "endpoint": "https://api.githubcopilot.com/mcp/",
+ "probe": {
+ "url": "https://api.githubcopilot.com/mcp/",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://api.githubcopilot.com/.well-known/oauth-protected-resource/mcp/"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://api.githubcopilot.com/.well-known/oauth-protected-resource/mcp/",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://api.githubcopilot.com/mcp/",
+ "authorizationServers": [
+ "https://github.com/login/oauth"
+ ],
+ "protectedResourceScopes": [
+ "repo",
+ "read:org",
+ "read:user",
+ "user:email",
+ "read:packages",
+ "write:packages",
+ "read:project",
+ "project",
+ "gist",
+ "notifications"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://api.githubcopilot.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://api.githubcopilot.com/.well-known/oauth-protected-resource/mcp/"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://github.com/.well-known/oauth-authorization-server/login/oauth",
+ "https://github.com/login/oauth/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://github.com/login/oauth",
+ "evidence": {
+ "issuer": "https://github.com/login/oauth",
+ "authorizationEndpoint": "https://github.com/login/oauth/authorize",
+ "tokenEndpoint": "https://github.com/login/oauth/access_token",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "offline_access"
+ ]
+ }
+ }
+ },
+ {
+ "server": "gitlab",
+ "endpoint": "https://gitlab.com/api/v4/mcp",
+ "probe": {
+ "url": "https://gitlab.com/api/v4/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://gitlab.com/.well-known/oauth-protected-resource/api/v4/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://gitlab.com/.well-known/oauth-protected-resource/api/v4/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://gitlab.com/api/v4/mcp",
+ "authorizationServers": [
+ "https://gitlab.com"
+ ],
+ "protectedResourceScopes": [
+ "mcp"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://gitlab.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://gitlab.com/api/v4/mcp",
+ "authorizationServers": [
+ "https://gitlab.com"
+ ],
+ "protectedResourceScopes": [
+ "mcp"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://gitlab.com/.well-known/oauth-protected-resource/api/v4/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://gitlab.com/.well-known/oauth-authorization-server",
+ "https://gitlab.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://gitlab.com",
+ "evidence": {
+ "issuer": "https://gitlab.com",
+ "authorizationEndpoint": "https://gitlab.com/oauth/authorize",
+ "tokenEndpoint": "https://gitlab.com/oauth/token",
+ "registrationEndpoint": "https://gitlab.com/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "api",
+ "read_api",
+ "read_user",
+ "create_runner",
+ "manage_runner",
+ "k8s_proxy",
+ "self_rotate",
+ "mcp",
+ "mcp_orbit",
+ "read_repository",
+ "write_repository",
+ "read_registry",
+ "write_registry",
+ "read_virtual_registry",
+ "write_virtual_registry",
+ "read_observability",
+ "write_observability",
+ "ai_features",
+ "sudo",
+ "admin_mode",
+ "read_service_ping",
+ "openid",
+ "profile",
+ "email",
+ "ai_workflows",
+ "user:*"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "gmail",
+ "endpoint": "https://gmailmcp.googleapis.com/mcp/v1",
+ "probe": {
+ "url": "https://gmailmcp.googleapis.com/mcp/v1",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://gmailmcp.googleapis.com/.well-known/oauth-protected-resource/mcp/v1",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://gmailmcp.googleapis.com/mcp/v1",
+ "authorizationServers": [
+ "https://accounts.google.com/"
+ ],
+ "protectedResourceScopes": [
+ "https://mail.google.com/",
+ "https://www.googleapis.com/auth/gmail.modify",
+ "https://www.googleapis.com/auth/gmail.compose",
+ "https://www.googleapis.com/auth/gmail.readonly",
+ "https://www.googleapis.com/auth/gmail.metadata"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://gmailmcp.googleapis.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://gmailmcp.googleapis.com/.well-known/oauth-protected-resource/mcp/v1"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://accounts.google.com/.well-known/oauth-authorization-server",
+ "https://accounts.google.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://accounts.google.com/",
+ "evidence": {
+ "issuer": "https://accounts.google.com",
+ "authorizationEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
+ "tokenEndpoint": "https://oauth2.googleapis.com/token",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "google-calendar",
+ "endpoint": "https://calendarmcp.googleapis.com/mcp/v1",
+ "probe": {
+ "url": "https://calendarmcp.googleapis.com/mcp/v1",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://calendarmcp.googleapis.com/.well-known/oauth-protected-resource/mcp/v1",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://calendarmcp.googleapis.com/mcp/v1",
+ "authorizationServers": [
+ "https://accounts.google.com/"
+ ],
+ "protectedResourceScopes": [
+ "https://www.googleapis.com/auth/calendar",
+ "https://www.googleapis.com/auth/calendar.acls",
+ "https://www.googleapis.com/auth/calendar.calendarlist",
+ "https://www.googleapis.com/auth/calendar.calendarlist.readonly",
+ "https://www.googleapis.com/auth/calendar.calendars",
+ "https://www.googleapis.com/auth/calendar.calendars.readonly",
+ "https://www.googleapis.com/auth/calendar.events",
+ "https://www.googleapis.com/auth/calendar.events.freebusy",
+ "https://www.googleapis.com/auth/calendar.events.readonly",
+ "https://www.googleapis.com/auth/calendar.freebusy",
+ "https://www.googleapis.com/auth/calendar.readonly",
+ "https://www.googleapis.com/auth/calendar.settings.readonly"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://calendarmcp.googleapis.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://calendarmcp.googleapis.com/.well-known/oauth-protected-resource/mcp/v1"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://accounts.google.com/.well-known/oauth-authorization-server",
+ "https://accounts.google.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://accounts.google.com/",
+ "evidence": {
+ "issuer": "https://accounts.google.com",
+ "authorizationEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
+ "tokenEndpoint": "https://oauth2.googleapis.com/token",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "google-drive",
+ "endpoint": "https://drivemcp.googleapis.com/mcp/v1",
+ "probe": {
+ "url": "https://drivemcp.googleapis.com/mcp/v1",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://drivemcp.googleapis.com/.well-known/oauth-protected-resource/mcp/v1",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://drivemcp.googleapis.com/mcp/v1",
+ "authorizationServers": [
+ "https://accounts.google.com/"
+ ],
+ "protectedResourceScopes": [
+ "https://www.googleapis.com/auth/drive",
+ "https://www.googleapis.com/auth/drive.readonly",
+ "https://www.googleapis.com/auth/drive.file"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://drivemcp.googleapis.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://drivemcp.googleapis.com/.well-known/oauth-protected-resource/mcp/v1"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://accounts.google.com/.well-known/oauth-authorization-server",
+ "https://accounts.google.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://accounts.google.com/",
+ "evidence": {
+ "issuer": "https://accounts.google.com",
+ "authorizationEndpoint": "https://accounts.google.com/o/oauth2/v2/auth",
+ "tokenEndpoint": "https://oauth2.googleapis.com/token",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "grafana-cloud",
+ "endpoint": "https://mcp.grafana.com/mcp",
+ "probe": {
+ "url": "https://mcp.grafana.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.grafana.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.grafana.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.grafana.com/mcp",
+ "authorizationServers": [
+ "https://mcp.grafana.com/mcp"
+ ],
+ "protectedResourceScopes": [
+ "grafana:read",
+ "grafana:query",
+ "grafana:write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.grafana.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.grafana.com/mcp",
+ "authorizationServers": [
+ "https://mcp.grafana.com/mcp"
+ ],
+ "protectedResourceScopes": [
+ "grafana:read",
+ "grafana:query",
+ "grafana:write"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.grafana.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.grafana.com/.well-known/oauth-authorization-server/mcp",
+ "https://mcp.grafana.com/mcp/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.grafana.com/mcp",
+ "evidence": {
+ "issuer": "https://mcp.grafana.com/mcp",
+ "authorizationEndpoint": "https://mcp.grafana.com/mcp/oauth/authorize",
+ "tokenEndpoint": "https://mcp.grafana.com/mcp/oauth/token",
+ "registrationEndpoint": "https://mcp.grafana.com/mcp/oauth/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "grafana:read",
+ "grafana:query",
+ "grafana:write"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "granola",
+ "endpoint": "https://mcp.granola.ai/mcp",
+ "probe": {
+ "url": "https://mcp.granola.ai/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.granola.ai/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.granola.ai/mcp",
+ "authorizationServers": [
+ "https://mcp-auth.granola.ai"
+ ],
+ "protectedResourceScopes": [
+ "mcp"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.granola.ai/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.granola.ai/mcp",
+ "authorizationServers": [
+ "https://mcp-auth.granola.ai"
+ ],
+ "protectedResourceScopes": [
+ "mcp"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.granola.ai/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp-auth.granola.ai/.well-known/oauth-authorization-server",
+ "https://mcp-auth.granola.ai/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp-auth.granola.ai",
+ "evidence": {
+ "issuer": "https://mcp-auth.granola.ai",
+ "authorizationEndpoint": "https://mcp-auth.granola.ai/oauth2/authorize",
+ "tokenEndpoint": "https://mcp-auth.granola.ai/oauth2/token",
+ "registrationEndpoint": "https://mcp-auth.granola.ai/oauth2/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "email",
+ "offline_access",
+ "openid",
+ "profile"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt"
+ ]
+ }
+ }
+ },
+ {
+ "server": "greptile",
+ "endpoint": "https://api.greptile.com/mcp",
+ "probe": {
+ "url": "https://api.greptile.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://api.greptile.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://api.greptile.com/mcp",
+ "authorizationServers": [
+ "https://auth.greptile.com"
+ ],
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://api.greptile.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://api.greptile.com/mcp",
+ "authorizationServers": [
+ "https://auth.greptile.com"
+ ],
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://api.greptile.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://auth.greptile.com/.well-known/oauth-authorization-server",
+ "https://auth.greptile.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://auth.greptile.com",
+ "evidence": {
+ "issuer": "https://auth.greptile.com",
+ "authorizationEndpoint": "https://auth.greptile.com/oauth2/auth",
+ "tokenEndpoint": "https://auth.greptile.com/oauth2/token",
+ "registrationEndpoint": "https://auth.greptile.com/oauth2/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "offline_access",
+ "offline",
+ "openid",
+ "read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "higgsfield",
+ "endpoint": "https://mcp.higgsfield.ai/mcp",
+ "probe": {
+ "url": "https://mcp.higgsfield.ai/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.higgsfield.ai/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.higgsfield.ai/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.higgsfield.ai/mcp",
+ "authorizationServers": [
+ "https://clerk.higgsfield.ai",
+ "https://fnf-device-auth.higgsfield.ai"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "email",
+ "offline_access"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.higgsfield.ai/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.higgsfield.ai/mcp",
+ "authorizationServers": [
+ "https://clerk.higgsfield.ai",
+ "https://fnf-device-auth.higgsfield.ai"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "email",
+ "offline_access"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.higgsfield.ai/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://clerk.higgsfield.ai/.well-known/oauth-authorization-server",
+ "https://clerk.higgsfield.ai/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://clerk.higgsfield.ai",
+ "evidence": {
+ "issuer": "https://clerk.higgsfield.ai",
+ "authorizationEndpoint": "https://clerk.higgsfield.ai/oauth/authorize",
+ "tokenEndpoint": "https://clerk.higgsfield.ai/oauth/token",
+ "registrationEndpoint": "https://clerk.higgsfield.ai/oauth/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "public_metadata",
+ "private_metadata",
+ "offline_access",
+ "user:org:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "none",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "honeycomb",
+ "endpoint": "https://mcp.honeycomb.io/mcp",
+ "probe": {
+ "url": "https://mcp.honeycomb.io/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.honeycomb.io/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.honeycomb.io/mcp",
+ "authorizationServers": [
+ "https://ui.honeycomb.io"
+ ],
+ "protectedResourceScopes": [
+ "mcp:read",
+ "mcp:write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.honeycomb.io/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.honeycomb.io/mcp",
+ "authorizationServers": [
+ "https://ui.honeycomb.io"
+ ],
+ "protectedResourceScopes": [
+ "mcp:read",
+ "mcp:write"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.honeycomb.io/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://ui.honeycomb.io/.well-known/oauth-authorization-server",
+ "https://ui.honeycomb.io/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://ui.honeycomb.io",
+ "evidence": {
+ "issuer": "https://ui.honeycomb.io",
+ "authorizationEndpoint": "https://ui.honeycomb.io/oauth/authorize",
+ "tokenEndpoint": "https://ui.honeycomb.io/oauth/token",
+ "registrationEndpoint": "https://ui.honeycomb.io/oauth/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "mcp:read",
+ "mcp:write"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "hostinger",
+ "endpoint": "https://mcp.hostinger.com",
+ "probe": {
+ "url": "https://mcp.hostinger.com",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.hostinger.com/.well-known/oauth-protected-resource",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.hostinger.com",
+ "authorizationServers": [
+ "https://auth.hostinger.com"
+ ],
+ "protectedResourceScopes": [
+ "mcp:use"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.hostinger.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://auth.hostinger.com/.well-known/oauth-authorization-server",
+ "https://auth.hostinger.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://auth.hostinger.com",
+ "evidence": {
+ "issuer": "https://auth.hostinger.com",
+ "authorizationEndpoint": "https://auth.hostinger.com/api/external/v1/oauth-server/authorize",
+ "tokenEndpoint": "https://auth.hostinger.com/api/external/v1/oauth-server/token",
+ "registrationEndpoint": "https://auth.hostinger.com/api/external/v1/oauth-server/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "hubspot",
+ "endpoint": "https://mcp.hubspot.com/anthropic",
+ "probe": {
+ "url": "https://mcp.hubspot.com/anthropic",
+ "httpStatus": 406
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.hubspot.com/.well-known/oauth-protected-resource/anthropic",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.hubspot.com",
+ "authorizationServers": [
+ "https://mcp.hubspot.com"
+ ],
+ "protectedResourceScopes": []
+ },
+ "audienceMatches": false
+ },
+ {
+ "sourceUrl": "https://mcp.hubspot.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.hubspot.com",
+ "authorizationServers": [
+ "https://mcp.hubspot.com"
+ ],
+ "protectedResourceScopes": []
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.hubspot.com/.well-known/oauth-protected-resource/anthropic"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.hubspot.com/.well-known/oauth-authorization-server",
+ "https://mcp.hubspot.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.hubspot.com",
+ "evidence": {
+ "issuer": "https://mcp.hubspot.com",
+ "authorizationEndpoint": "https://mcp.hubspot.com/oauth/authorize/user",
+ "tokenEndpoint": "https://mcp.hubspot.com/oauth/v3/token",
+ "pkceS256": true,
+ "authorizationServerScopes": [],
+ "tokenAuthMethods": [
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "huggingface-skills",
+ "endpoint": "https://huggingface.co/mcp?login",
+ "probe": {
+ "url": "https://huggingface.co/mcp?login",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://huggingface.co/.well-known/oauth-protected-resource/mcp?login",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://huggingface.co/mcp?login",
+ "authorizationServers": [
+ "https://huggingface.co"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "read-mcp",
+ "read-repos",
+ "jobs",
+ "contribute-repos",
+ "inference-api"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://huggingface.co/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://huggingface.co/mcp",
+ "authorizationServers": [
+ "https://huggingface.co"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "read-mcp",
+ "read-repos",
+ "jobs",
+ "contribute-repos",
+ "inference-api"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://huggingface.co/.well-known/oauth-protected-resource/mcp?login"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://huggingface.co/.well-known/oauth-authorization-server",
+ "https://huggingface.co/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://huggingface.co",
+ "evidence": {
+ "issuer": "https://huggingface.co",
+ "authorizationEndpoint": "https://huggingface.co/oauth/authorize",
+ "tokenEndpoint": "https://huggingface.co/oauth/token",
+ "registrationEndpoint": "https://huggingface.co/oauth/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "hunter",
+ "endpoint": "https://mcp.hunter.io/mcp",
+ "probe": {
+ "url": "https://mcp.hunter.io/mcp",
+ "httpStatus": 401
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.hunter.io/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp.hunter.io/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.hunter.io",
+ "authorizationServers": [
+ "https://hunter.io"
+ ],
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.hunter.io/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://hunter.io/.well-known/oauth-authorization-server",
+ "https://hunter.io/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://hunter.io",
+ "evidence": {
+ "issuer": "https://hunter.io",
+ "authorizationEndpoint": "https://hunter.io/oauth/authorize",
+ "tokenEndpoint": "https://hunter.io/oauth/token",
+ "registrationEndpoint": "https://hunter.io/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "read",
+ "write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "intercom",
+ "endpoint": "https://mcp.intercom.com/mcp",
+ "probe": {
+ "url": "https://mcp.intercom.com/mcp",
+ "httpStatus": 401
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.intercom.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp.intercom.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "unavailable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.intercom.com/.well-known/oauth-authorization-server",
+ "https://mcp.intercom.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.intercom.com",
+ "evidence": {
+ "issuer": "https://mcp.intercom.com",
+ "authorizationEndpoint": "https://mcp.intercom.com/authorize",
+ "tokenEndpoint": "https://mcp.intercom.com/token",
+ "registrationEndpoint": "https://mcp.intercom.com/register",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "legalzoom",
+ "endpoint": "https://www.legalzoom.com/mcp/claude/v1",
+ "probe": {
+ "url": "https://www.legalzoom.com/mcp/claude/v1",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://www.legalzoom.com/.well-known/oauth-protected-resource/mcp/claude/v1"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://www.legalzoom.com/.well-known/oauth-protected-resource/mcp/claude/v1",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://www.legalzoom.com/mcp/claude/v1",
+ "authorizationServers": [
+ "https://auth.apigw.legalzoom.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://www.legalzoom.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://www.legalzoom.com",
+ "authorizationServers": [
+ "https://auth.apigw.legalzoom.com"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://www.legalzoom.com/.well-known/oauth-protected-resource/mcp/claude/v1"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://auth.apigw.legalzoom.com/.well-known/oauth-authorization-server",
+ "https://auth.apigw.legalzoom.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://auth.apigw.legalzoom.com",
+ "evidence": {
+ "issuer": "https://auth.legalzoom.com/",
+ "authorizationEndpoint": "https://authorization-service.apps.prd.aws-01.legalzoom.com/oauth2/authorize",
+ "tokenEndpoint": "https://authorization-service.apps.prd.aws-01.legalzoom.com/oauth2/token",
+ "registrationEndpoint": "https://auth.apigw.legalzoom.com/oauth2/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "legalzoom_mcp"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "client_secret_jwt",
+ "private_key_jwt",
+ "tls_client_auth",
+ "self_signed_tls_client_auth"
+ ]
+ }
+ }
+ },
+ {
+ "server": "linear",
+ "endpoint": "https://mcp.linear.app/mcp",
+ "probe": {
+ "url": "https://mcp.linear.app/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.linear.app/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.linear.app/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.linear.app/mcp",
+ "authorizationServers": [
+ "https://mcp.linear.app"
+ ],
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.linear.app/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.linear.app/mcp",
+ "authorizationServers": [
+ "https://mcp.linear.app"
+ ],
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.linear.app/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.linear.app/.well-known/oauth-authorization-server",
+ "https://mcp.linear.app/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.linear.app",
+ "evidence": {
+ "issuer": "https://mcp.linear.app",
+ "authorizationEndpoint": "https://mcp.linear.app/authorize",
+ "tokenEndpoint": "https://mcp.linear.app/token",
+ "registrationEndpoint": "https://mcp.linear.app/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "read",
+ "write",
+ "openid",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "logfire",
+ "endpoint": "https://logfire-us.pydantic.dev/mcp",
+ "probe": {
+ "url": "https://logfire-us.pydantic.dev/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://logfire-us.pydantic.dev/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://logfire-us.pydantic.dev/mcp",
+ "authorizationServers": [
+ "https://logfire-us.pydantic.dev"
+ ],
+ "protectedResourceScopes": [
+ "organization:create_project",
+ "organization:read_channel",
+ "organization:write_channel",
+ "project:read",
+ "project:read_alert",
+ "project:read_dashboard",
+ "project:read_variables",
+ "project:trigger_workflow",
+ "project:write",
+ "project:write_alert",
+ "project:write_dashboard",
+ "project:write_token",
+ "project:write_variables"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://logfire-us.pydantic.dev/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://logfire-us.pydantic.dev",
+ "authorizationServers": [
+ "https://logfire-us.pydantic.dev"
+ ],
+ "protectedResourceScopes": [
+ "email",
+ "openid",
+ "organization:create_api_key",
+ "organization:create_project",
+ "organization:read",
+ "organization:read_api_key",
+ "organization:read_channel",
+ "organization:read_invitation",
+ "organization:read_member",
+ "organization:read_trust_policy",
+ "organization:write",
+ "organization:write_api_key",
+ "organization:write_channel",
+ "organization:write_invitation",
+ "organization:write_member",
+ "organization:write_trust_policy",
+ "profile",
+ "project:read",
+ "project:read_alert",
+ "project:read_api_key",
+ "project:read_dashboard",
+ "project:read_datasets",
+ "project:read_token",
+ "project:read_variables",
+ "project:trigger_workflow",
+ "project:write",
+ "project:write_alert",
+ "project:write_api_key",
+ "project:write_dashboard",
+ "project:write_datasets"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://logfire-us.pydantic.dev/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://logfire-us.pydantic.dev/.well-known/oauth-authorization-server",
+ "https://logfire-us.pydantic.dev/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://logfire-us.pydantic.dev",
+ "evidence": {
+ "issuer": "https://logfire-us.pydantic.dev",
+ "authorizationEndpoint": "https://logfire-us.pydantic.dev/api/oauth/authorize",
+ "tokenEndpoint": "https://logfire-us.pydantic.dev/api/oauth/token",
+ "registrationEndpoint": "https://logfire-us.pydantic.dev/api/oauth/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "instance:admin",
+ "instance:billing",
+ "organization:admin",
+ "organization:read",
+ "organization:write",
+ "organization:create_project",
+ "organization:read_member",
+ "organization:write_member",
+ "organization:read_channel",
+ "organization:write_channel",
+ "organization:create_api_key",
+ "organization:read_api_key",
+ "organization:write_api_key",
+ "organization:read_invitation",
+ "organization:write_invitation",
+ "project:read",
+ "project:write",
+ "project:write_token",
+ "project:read_token",
+ "project:read_dashboard",
+ "project:write_dashboard",
+ "project:trigger_workflow",
+ "project:read_alert",
+ "project:write_alert",
+ "project:read_datasets",
+ "project:write_datasets",
+ "project:read_variables",
+ "project:write_variables",
+ "project:read_external_variables",
+ "project:gateway_proxy"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "logrocket",
+ "endpoint": "https://mcp.logrocket.com/mcp?toolsets=all",
+ "probe": {
+ "url": "https://mcp.logrocket.com/mcp?toolsets=all",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.logrocket.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.logrocket.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.logrocket.com/mcp",
+ "authorizationServers": [
+ "https://mcp.logrocket.com"
+ ]
+ },
+ "audienceMatches": false
+ },
+ {
+ "sourceUrl": "https://mcp.logrocket.com/.well-known/oauth-protected-resource/mcp?toolsets=all",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.logrocket.com/mcp",
+ "authorizationServers": [
+ "https://mcp.logrocket.com"
+ ]
+ },
+ "audienceMatches": false
+ },
+ {
+ "sourceUrl": "https://mcp.logrocket.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.logrocket.com/mcp",
+ "authorizationServers": [
+ "https://mcp.logrocket.com"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "unavailable",
+ "selectionNote": "the header-pointed document fails the engine's protected-resource validation; PRM discovery fails closed with no well-known fall-through"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.logrocket.com/.well-known/oauth-authorization-server",
+ "https://mcp.logrocket.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.logrocket.com",
+ "evidence": {
+ "issuer": "https://mcp.logrocket.com",
+ "authorizationEndpoint": "https://mcp.logrocket.com/oauth/authorize",
+ "tokenEndpoint": "https://mcp.logrocket.com/oauth/token",
+ "registrationEndpoint": "https://mcp.logrocket.com/oauth/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "lovable",
+ "endpoint": "https://mcp.lovable.dev/?src=cc-plugin",
+ "probe": {
+ "url": "https://mcp.lovable.dev/?src=cc-plugin",
+ "httpStatus": 200
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.lovable.dev/.well-known/oauth-protected-resource?src=cc-plugin",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.lovable.dev",
+ "authorizationServers": [
+ "https://lovable.dev/oauth"
+ ],
+ "protectedResourceScopes": [
+ "offline",
+ "projects:read",
+ "projects:write",
+ "workspaces:read",
+ "workspaces:write"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.lovable.dev/.well-known/oauth-protected-resource?src=cc-plugin"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://lovable.dev/.well-known/oauth-authorization-server/oauth",
+ "https://lovable.dev/oauth/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://lovable.dev/oauth",
+ "evidence": {
+ "issuer": "https://lovable.dev/oauth",
+ "authorizationEndpoint": "https://lovable.dev/oauth/authorize",
+ "tokenEndpoint": "https://lovable.dev/oauth/token",
+ "registrationEndpoint": "https://lovable.dev/oauth/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "offline",
+ "openid",
+ "email",
+ "profile",
+ "projects:create",
+ "projects:read",
+ "projects:write",
+ "workspaces:create",
+ "workspaces:read",
+ "workspaces:write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "lusha",
+ "endpoint": "https://mcp.lusha.com/mcp/claude",
+ "probe": {
+ "url": "https://mcp.lusha.com/mcp/claude",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.lusha.com/.well-known/oauth-protected-resource/mcp/claude"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.lusha.com/.well-known/oauth-protected-resource/mcp/claude",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.lusha.com/mcp/claude",
+ "authorizationServers": [
+ "https://auth.lusha.com"
+ ],
+ "protectedResourceScopes": [
+ "mcp"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.lusha.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.lusha.com",
+ "authorizationServers": [
+ "https://auth.lusha.com"
+ ],
+ "protectedResourceScopes": [
+ "mcp"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.lusha.com/.well-known/oauth-protected-resource/mcp/claude"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://auth.lusha.com/.well-known/oauth-authorization-server",
+ "https://auth.lusha.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://auth.lusha.com",
+ "evidence": {
+ "issuer": "https://auth.lusha.com",
+ "authorizationEndpoint": "https://auth.lusha.com/oauth-ui/authorize",
+ "tokenEndpoint": "https://auth.lusha.com/oauth/token",
+ "registrationEndpoint": "https://auth.lusha.com/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "mcp",
+ "api_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "mapbox",
+ "endpoint": "https://mcp.mapbox.com/mcp",
+ "probe": {
+ "url": "https://mcp.mapbox.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.mapbox.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.mapbox.com/mcp",
+ "authorizationServers": [
+ "https://mcp.mapbox.com"
+ ],
+ "protectedResourceScopes": [
+ "styles:tiles",
+ "styles:read",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.mapbox.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.mapbox.com",
+ "authorizationServers": [
+ "https://mcp.mapbox.com"
+ ],
+ "protectedResourceScopes": [
+ "styles:tiles",
+ "styles:read",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.mapbox.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.mapbox.com/.well-known/oauth-authorization-server",
+ "https://mcp.mapbox.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.mapbox.com",
+ "evidence": {
+ "issuer": "https://mcp.mapbox.com",
+ "authorizationEndpoint": "https://api.mapbox.com/oauth/2.1/authorize",
+ "tokenEndpoint": "https://mcp.mapbox.com/oauth/token",
+ "registrationEndpoint": "https://api.mapbox.com/oauth/register?scope=styles%3Atiles%20styles%3Aread%20fonts%3Aread%20datasets%3Aread%20tokens%3Aread",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "styles:tiles",
+ "styles:read",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "mapbox-devkit",
+ "endpoint": "https://mcp-devkit.mapbox.com/mcp",
+ "probe": {
+ "url": "https://mcp-devkit.mapbox.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp-devkit.mapbox.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp-devkit.mapbox.com/mcp",
+ "authorizationServers": [
+ "https://mcp-devkit.mapbox.com"
+ ],
+ "protectedResourceScopes": [
+ "styles:tiles",
+ "styles:read",
+ "styles:write",
+ "styles:list",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read",
+ "tilesets:read",
+ "user-feedback:read"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp-devkit.mapbox.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp-devkit.mapbox.com",
+ "authorizationServers": [
+ "https://mcp-devkit.mapbox.com"
+ ],
+ "protectedResourceScopes": [
+ "styles:tiles",
+ "styles:read",
+ "styles:write",
+ "styles:list",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read",
+ "tilesets:read",
+ "user-feedback:read"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp-devkit.mapbox.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp-devkit.mapbox.com/.well-known/oauth-authorization-server",
+ "https://mcp-devkit.mapbox.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp-devkit.mapbox.com",
+ "evidence": {
+ "issuer": "https://mcp-devkit.mapbox.com",
+ "authorizationEndpoint": "https://api.mapbox.com/oauth/2.1/authorize",
+ "tokenEndpoint": "https://mcp-devkit.mapbox.com/oauth/token",
+ "registrationEndpoint": "https://api.mapbox.com/oauth/register?scope=styles%3Atiles%20styles%3Aread%20styles%3Awrite%20styles%3Alist%20fonts%3Aread%20datasets%3Aread%20tokens%3Aread%20tilesets%3Aread%20user-feedback%3Aread",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "styles:tiles",
+ "styles:read",
+ "styles:write",
+ "styles:list",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read",
+ "tilesets:read",
+ "user-feedback:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "mapbox-docs",
+ "endpoint": "https://mcp-docs.mapbox.com/mcp",
+ "probe": {
+ "url": "https://mcp-docs.mapbox.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp-docs.mapbox.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp-docs.mapbox.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "unavailable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp-docs.mapbox.com/.well-known/oauth-authorization-server",
+ "https://mcp-docs.mapbox.com/.well-known/openid-configuration"
+ ],
+ "status": "unavailable",
+ "evidence": {
+ "httpStatus": 404,
+ "contentType": "application/json",
+ "error": "http 404"
+ }
+ }
+ },
+ {
+ "server": "mercadopago",
+ "endpoint": "https://mcp.mercadopago.com/mcp",
+ "probe": {
+ "url": "https://mcp.mercadopago.com/mcp",
+ "httpStatus": 401
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.mercadopago.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.mercadopago.com/mcp",
+ "authorizationServers": [
+ "https://mcp.mercadopago.com/mcp"
+ ],
+ "protectedResourceScopes": [
+ "offline_access",
+ "write",
+ "read"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.mercadopago.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.mercadopago.com",
+ "authorizationServers": [
+ "https://mcp.mercadopago.com"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.mercadopago.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.mercadopago.com/.well-known/oauth-authorization-server/mcp",
+ "https://mcp.mercadopago.com/mcp/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.mercadopago.com/mcp",
+ "evidence": {
+ "issuer": "https://mcp.mercadopago.com/mcp",
+ "authorizationEndpoint": "https://auth.mercadopago.com/mcp/authorization",
+ "tokenEndpoint": "https://mcp.mercadopago.com/oauth/token",
+ "registrationEndpoint": "https://mcp.mercadopago.com/oauth/register/mcp",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "offline_access",
+ "write",
+ "read"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "miro",
+ "endpoint": "https://mcp.miro.com/",
+ "probe": {
+ "url": "https://mcp.miro.com/",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.miro.com/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.miro.com/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.miro.com/",
+ "authorizationServers": [
+ "https://mcp.miro.com/"
+ ],
+ "protectedResourceScopes": [
+ "boards:read",
+ "boards:write",
+ "openid",
+ "email"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.miro.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.miro.com/.well-known/oauth-authorization-server",
+ "https://mcp.miro.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.miro.com/",
+ "evidence": {
+ "issuer": "https://mcp.miro.com/",
+ "authorizationEndpoint": "https://mcp.miro.com/authorize",
+ "tokenEndpoint": "https://mcp.miro.com/token",
+ "registrationEndpoint": "https://mcp.miro.com/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "boards:read",
+ "boards:write",
+ "openid",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "monday-com",
+ "endpoint": "https://mcp.monday.com/mcp",
+ "probe": {
+ "url": "https://mcp.monday.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.monday.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.monday.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.monday.com/mcp",
+ "authorizationServers": [
+ "https://auth.monday.com/mcp"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.monday.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.monday.com/mcp",
+ "authorizationServers": [
+ "https://auth.monday.com/mcp"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.monday.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://auth.monday.com/.well-known/oauth-authorization-server/mcp",
+ "https://auth.monday.com/mcp/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://auth.monday.com/mcp",
+ "evidence": {
+ "issuer": "https://auth.monday.com/mcp",
+ "authorizationEndpoint": "https://auth.monday.com/oauth2/authorize",
+ "tokenEndpoint": "https://auth.monday.com/oauth_ms/oauth/token",
+ "registrationEndpoint": "https://auth.monday.com/oauth_ms/oauth/register",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "mongodb-atlas",
+ "endpoint": "https://mcp.mongodb.com/",
+ "probe": {
+ "url": "https://mcp.mongodb.com/",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.mongodb.com/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.mongodb.com/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.mongodb.com",
+ "authorizationServers": [
+ "https://authorize.mongodb.com"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.mongodb.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://authorize.mongodb.com/.well-known/oauth-authorization-server",
+ "https://authorize.mongodb.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://authorize.mongodb.com",
+ "evidence": {
+ "issuer": "https://authorize.mongodb.com",
+ "authorizationEndpoint": "https://cloud.mongodb.com/oauth/authorize",
+ "tokenEndpoint": "https://authorize.mongodb.com/tokens",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post",
+ "private_key_jwt"
+ ]
+ }
+ }
+ },
+ {
+ "server": "neon",
+ "endpoint": "https://mcp.neon.tech/mcp",
+ "probe": {
+ "url": "https://mcp.neon.tech/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.neon.tech/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.neon.tech/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.neon.tech/mcp",
+ "authorizationServers": [
+ "https://mcp.neon.tech"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.neon.tech/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.neon.tech",
+ "authorizationServers": [
+ "https://mcp.neon.tech"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.neon.tech/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.neon.tech/.well-known/oauth-authorization-server",
+ "https://mcp.neon.tech/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.neon.tech",
+ "evidence": {
+ "issuer": "https://mcp.neon.tech",
+ "authorizationEndpoint": "https://mcp.neon.tech/api/authorize",
+ "tokenEndpoint": "https://mcp.neon.tech/api/token",
+ "registrationEndpoint": "https://mcp.neon.tech/api/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "read",
+ "write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "netlify",
+ "endpoint": "https://netlify-mcp.netlify.app/mcp",
+ "probe": {
+ "url": "https://netlify-mcp.netlify.app/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://netlify-mcp.netlify.app/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://netlify-mcp.netlify.app/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://netlify-mcp.netlify.app/mcp",
+ "authorizationServers": [
+ "https://netlify-mcp.netlify.app/"
+ ],
+ "protectedResourceScopes": [
+ "offline_access",
+ "read",
+ "write",
+ "claudeai"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://netlify-mcp.netlify.app/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://netlify-mcp.netlify.app/mcp",
+ "authorizationServers": [
+ "https://netlify-mcp.netlify.app/"
+ ],
+ "protectedResourceScopes": [
+ "offline_access",
+ "read",
+ "write",
+ "claudeai"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://netlify-mcp.netlify.app/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://netlify-mcp.netlify.app/.well-known/oauth-authorization-server",
+ "https://netlify-mcp.netlify.app/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://netlify-mcp.netlify.app/",
+ "evidence": {
+ "issuer": "https://netlify-mcp.netlify.app/",
+ "authorizationEndpoint": "https://netlify-mcp.netlify.app/oauth-server/auth",
+ "tokenEndpoint": "https://netlify-mcp.netlify.app/oauth-server/token",
+ "registrationEndpoint": "https://netlify-mcp.netlify.app/oauth-server/reg",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "offline_access",
+ "read",
+ "write",
+ "claudeai"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "newrelic",
+ "endpoint": "https://mcp.newrelic.com/mcp/",
+ "probe": {
+ "url": "https://mcp.newrelic.com/mcp/",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.newrelic.com/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.newrelic.com/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.newrelic.com/mcp/",
+ "authorizationServers": [
+ "https://oauth2.service.newrelic.com"
+ ],
+ "protectedResourceScopes": [
+ "observability:read",
+ "offline",
+ "offline_access"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.newrelic.com/.well-known/oauth-protected-resource/mcp/",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.newrelic.com/mcp/",
+ "authorizationServers": [
+ "https://oauth2.service.newrelic.com"
+ ],
+ "protectedResourceScopes": [
+ "observability:read",
+ "offline",
+ "offline_access"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.newrelic.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://oauth2.service.newrelic.com/.well-known/oauth-authorization-server",
+ "https://oauth2.service.newrelic.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://oauth2.service.newrelic.com",
+ "evidence": {
+ "issuer": "https://oauth2.service.newrelic.com",
+ "authorizationEndpoint": "https://oauth2.service.newrelic.com/oauth2/auth",
+ "tokenEndpoint": "https://oauth2.service.newrelic.com/oauth2/token",
+ "registrationEndpoint": "https://dcr.service.newrelic.com/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "offline_access",
+ "offline",
+ "openid",
+ "observability:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "notion",
+ "endpoint": "https://mcp.notion.com/mcp",
+ "probe": {
+ "url": "https://mcp.notion.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.notion.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.notion.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.notion.com/mcp",
+ "authorizationServers": [
+ "https://mcp.notion.com"
+ ],
+ "protectedResourceScopes": [
+ "default"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.notion.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.notion.com",
+ "authorizationServers": [
+ "https://mcp.notion.com"
+ ],
+ "protectedResourceScopes": [
+ "default"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.notion.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.notion.com/.well-known/oauth-authorization-server",
+ "https://mcp.notion.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.notion.com",
+ "evidence": {
+ "issuer": "https://mcp.notion.com",
+ "authorizationEndpoint": "https://mcp.notion.com/authorize",
+ "tokenEndpoint": "https://mcp.notion.com/token",
+ "registrationEndpoint": "https://mcp.notion.com/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "default"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "pagerduty",
+ "endpoint": "https://mcp.pagerduty.com/mcp",
+ "probe": {
+ "url": "https://mcp.pagerduty.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.pagerduty.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.pagerduty.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.pagerduty.com/mcp",
+ "authorizationServers": [
+ "https://mcp.pagerduty.com/"
+ ],
+ "protectedResourceScopes": [
+ "incidents.read",
+ "extension_schemas.read",
+ "subscribers.write",
+ "users:sessions.write",
+ "recommendations.write",
+ "recommendations.read",
+ "none",
+ "users:contact_methods.read",
+ "users.write",
+ "templates.read",
+ "incident_types.read",
+ "jira_cloud_rules.read",
+ "workflow_integrations:connections.write",
+ "session_configurations.write",
+ "addons.write",
+ "oncalls.read",
+ "standards.write",
+ "users:contact_methods.write",
+ "users.read",
+ "incident_workflows.write",
+ "notifications.read",
+ "workflow_integrations:connections.read",
+ "copilot:chat.write",
+ "write",
+ "incident_types.write",
+ "contextual_data.write",
+ "event_orchestrations.read",
+ "read",
+ "webhook_subscriptions.write",
+ "openid"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.pagerduty.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.pagerduty.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.pagerduty.com/.well-known/oauth-authorization-server",
+ "https://mcp.pagerduty.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.pagerduty.com/",
+ "evidence": {
+ "issuer": "https://app.pagerduty.com/global/oauth/anonymous",
+ "authorizationEndpoint": "https://app.pagerduty.com/global/oauth/authorize",
+ "tokenEndpoint": "https://app.pagerduty.com/global/oauth/token",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "incidents.read",
+ "extension_schemas.read",
+ "subscribers.write",
+ "users:sessions.write",
+ "recommendations.write",
+ "recommendations.read",
+ "none",
+ "users:contact_methods.read",
+ "users.write",
+ "templates.read",
+ "incident_types.read",
+ "jira_cloud_rules.read",
+ "workflow_integrations:connections.write",
+ "session_configurations.write",
+ "addons.write",
+ "oncalls.read",
+ "standards.write",
+ "users:contact_methods.write",
+ "users.read",
+ "incident_workflows.write",
+ "notifications.read",
+ "workflow_integrations:connections.read",
+ "copilot:chat.write",
+ "write",
+ "incident_types.write",
+ "contextual_data.write",
+ "event_orchestrations.read",
+ "read",
+ "webhook_subscriptions.write",
+ "openid"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "paypal-sandbox",
+ "endpoint": "https://mcp.sandbox.paypal.com/sse",
+ "probe": {
+ "url": "https://mcp.sandbox.paypal.com/sse",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.sandbox.paypal.com/.well-known/oauth-protected-resource/sse"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.sandbox.paypal.com/.well-known/oauth-protected-resource/sse",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.sandbox.paypal.com/sse",
+ "authorizationServers": [
+ "https://mcp.sandbox.paypal.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "email",
+ "profile"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.sandbox.paypal.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.sandbox.paypal.com",
+ "authorizationServers": [
+ "https://mcp.sandbox.paypal.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "email",
+ "profile"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.sandbox.paypal.com/.well-known/oauth-protected-resource/sse"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.sandbox.paypal.com/.well-known/oauth-authorization-server",
+ "https://mcp.sandbox.paypal.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.sandbox.paypal.com",
+ "evidence": {
+ "issuer": "https://mcp.sandbox.paypal.com",
+ "authorizationEndpoint": "https://mcp.sandbox.paypal.com/authorize",
+ "tokenEndpoint": "https://mcp.sandbox.paypal.com/token",
+ "registrationEndpoint": "https://mcp.sandbox.paypal.com/register",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "planetscale",
+ "endpoint": "https://mcp.pscale.dev/mcp/planetscale",
+ "probe": {
+ "url": "https://mcp.pscale.dev/mcp/planetscale",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.pscale.dev/.well-known/oauth-protected-resource/mcp/planetscale",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.pscale.dev/mcp/planetscale",
+ "authorizationServers": [
+ "https://api.planetscale.com"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.pscale.dev/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.pscale.dev/.well-known/oauth-protected-resource/mcp/planetscale"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://api.planetscale.com/.well-known/oauth-authorization-server",
+ "https://api.planetscale.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://api.planetscale.com",
+ "evidence": {
+ "issuer": "https://api.planetscale.com",
+ "authorizationEndpoint": "https://app.planetscale.com/oauth/authorize",
+ "tokenEndpoint": "https://auth.planetscale.com/oauth/token",
+ "registrationEndpoint": "https://auth.planetscale.com/oauth/registration",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "read_databases",
+ "read_user",
+ "read_organization",
+ "read_organizations",
+ "email",
+ "openid",
+ "profile",
+ "write_databases",
+ "write_user",
+ "write_organization",
+ "branch:delete_backups",
+ "branch:delete_branch",
+ "branch:manage_passwords",
+ "branch:manage_read_only_passwords",
+ "branch:read_backups",
+ "branch:read_branch",
+ "branch:restore_backups",
+ "branch:write_backups",
+ "branch:write_branch",
+ "database:approve_deploy_requests",
+ "database:delete_backups",
+ "database:delete_branches",
+ "database:delete_database",
+ "database:delete_members",
+ "database:delete_production_branch_backups",
+ "database:delete_production_branches",
+ "database:demote_branches",
+ "database:deploy_deploy_requests",
+ "database:manage_passwords",
+ "database:manage_production_branch_passwords"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "posthog",
+ "endpoint": "https://mcp.posthog.com/mcp",
+ "probe": {
+ "url": "https://mcp.posthog.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.posthog.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.posthog.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.posthog.com/mcp",
+ "authorizationServers": [
+ "https://oauth.posthog.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "introspection",
+ "action:read",
+ "action:write",
+ "access_control:read",
+ "account:read",
+ "account:write",
+ "activity_log:read",
+ "alert:read",
+ "alert:write",
+ "annotation:read",
+ "annotation:write",
+ "approvals:read",
+ "approvals:write",
+ "batch_export:read",
+ "batch_export:write",
+ "billing:read",
+ "business_knowledge:read",
+ "business_knowledge:write",
+ "canvas:read",
+ "canvas:write",
+ "cohort:read",
+ "cohort:write",
+ "comment:read",
+ "comment:write",
+ "conversation:read",
+ "customer_analytics:read",
+ "customer_analytics:write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.posthog.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.posthog.com",
+ "authorizationServers": [
+ "https://oauth.posthog.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "introspection",
+ "action:read",
+ "action:write",
+ "access_control:read",
+ "account:read",
+ "account:write",
+ "activity_log:read",
+ "alert:read",
+ "alert:write",
+ "annotation:read",
+ "annotation:write",
+ "approvals:read",
+ "approvals:write",
+ "batch_export:read",
+ "batch_export:write",
+ "billing:read",
+ "business_knowledge:read",
+ "business_knowledge:write",
+ "canvas:read",
+ "canvas:write",
+ "cohort:read",
+ "cohort:write",
+ "comment:read",
+ "comment:write",
+ "conversation:read",
+ "customer_analytics:read",
+ "customer_analytics:write"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.posthog.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://oauth.posthog.com/.well-known/oauth-authorization-server",
+ "https://oauth.posthog.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://oauth.posthog.com",
+ "evidence": {
+ "issuer": "https://oauth.posthog.com",
+ "authorizationEndpoint": "https://oauth.posthog.com/oauth/authorize/",
+ "tokenEndpoint": "https://oauth.posthog.com/oauth/token/",
+ "registrationEndpoint": "https://oauth.posthog.com/oauth/register/",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "introspection",
+ "action:read",
+ "action:write",
+ "access_control:read",
+ "access_control:write",
+ "account:read",
+ "account:write",
+ "activity_log:read",
+ "activity_log:write",
+ "alert:read",
+ "alert:write",
+ "annotation:read",
+ "annotation:write",
+ "approvals:read",
+ "approvals:write",
+ "autoresearch:read",
+ "autoresearch:write",
+ "batch_export:read",
+ "batch_export:write",
+ "batch_import:read",
+ "batch_import:write",
+ "billing:read",
+ "billing:write",
+ "business_knowledge:read",
+ "business_knowledge:write",
+ "canvas:read",
+ "canvas:write"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "private_key_jwt"
+ ]
+ }
+ }
+ },
+ {
+ "server": "postman",
+ "endpoint": "https://mcp.postman.com/mcp",
+ "probe": {
+ "url": "https://mcp.postman.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.postman.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.postman.com/mcp",
+ "authorizationServers": [
+ "https://mcp.postman.com"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.postman.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.postman.com",
+ "authorizationServers": [
+ "https://mcp.postman.com"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.postman.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.postman.com/.well-known/oauth-authorization-server",
+ "https://mcp.postman.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.postman.com",
+ "evidence": {
+ "issuer": "https://mcp.postman.com",
+ "authorizationEndpoint": "https://mcp.postman.com/authorize",
+ "tokenEndpoint": "https://mcp.postman.com/token",
+ "registrationEndpoint": "https://mcp.postman.com/register",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "prisma",
+ "endpoint": "https://mcp.prisma.io/mcp",
+ "probe": {
+ "url": "https://mcp.prisma.io/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.prisma.io/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.prisma.io/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.prisma.io/mcp",
+ "authorizationServers": [
+ "https://auth.prisma.io"
+ ],
+ "protectedResourceScopes": [
+ "workspace:admin",
+ "offline_access"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.prisma.io/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.prisma.io/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://auth.prisma.io/.well-known/oauth-authorization-server",
+ "https://auth.prisma.io/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://auth.prisma.io",
+ "evidence": {
+ "issuer": "https://auth.prisma.io",
+ "authorizationEndpoint": "https://auth.prisma.io/authorize",
+ "tokenEndpoint": "https://auth.prisma.io/token",
+ "registrationEndpoint": "https://auth.prisma.io/register",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "railway",
+ "endpoint": "https://mcp.railway.com",
+ "probe": {
+ "url": "https://mcp.railway.com",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.railway.com/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.railway.com/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.railway.com",
+ "authorizationServers": [
+ "https://backboard.railway.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "workspace:member"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.railway.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://backboard.railway.com/.well-known/oauth-authorization-server",
+ "https://backboard.railway.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://backboard.railway.com",
+ "evidence": {
+ "issuer": "https://backboard.railway.com",
+ "authorizationEndpoint": "https://backboard.railway.com/oauth/auth?resource=https%3A%2F%2Fbackboard.railway.com",
+ "tokenEndpoint": "https://backboard.railway.com/oauth/token",
+ "registrationEndpoint": "https://backboard.railway.com/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "workspace:member"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none",
+ "private_key_jwt"
+ ]
+ }
+ }
+ },
+ {
+ "server": "render",
+ "endpoint": "https://mcp.render.com/mcp",
+ "probe": {
+ "url": "https://mcp.render.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.render.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.render.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.render.com/mcp",
+ "authorizationServers": [
+ "https://api.render.com"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.render.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.render.com/mcp",
+ "authorizationServers": [
+ "https://api.render.com"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.render.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://api.render.com/.well-known/oauth-authorization-server",
+ "https://api.render.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://api.render.com",
+ "evidence": {
+ "issuer": "https://api.render.com",
+ "authorizationEndpoint": "https://api.render.com/v1/oauth/authorize",
+ "tokenEndpoint": "https://api.render.com/v1/oauth/token",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "resend",
+ "endpoint": "https://mcp.resend.com/mcp",
+ "probe": {
+ "url": "https://mcp.resend.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.resend.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp.resend.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.resend.com",
+ "authorizationServers": [
+ "https://api.resend.com"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.resend.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://api.resend.com/.well-known/oauth-authorization-server",
+ "https://api.resend.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://api.resend.com",
+ "evidence": {
+ "issuer": "https://api.resend.com",
+ "authorizationEndpoint": "https://api.resend.com/oauth/authorize",
+ "tokenEndpoint": "https://api.resend.com/oauth/token",
+ "registrationEndpoint": "https://api.resend.com/oauth/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "full_access",
+ "emails:send"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "revenuecat",
+ "endpoint": "https://mcp.revenuecat.ai/mcp",
+ "probe": {
+ "url": "https://mcp.revenuecat.ai/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.revenuecat.ai/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp.revenuecat.ai/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.revenuecat.ai/mcp",
+ "authorizationServers": [
+ "https://mcp.revenuecat.ai"
+ ],
+ "protectedResourceScopes": [
+ "*:*:read",
+ "*:*:read_write"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.revenuecat.ai/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.revenuecat.ai/.well-known/oauth-authorization-server",
+ "https://mcp.revenuecat.ai/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.revenuecat.ai",
+ "evidence": {
+ "issuer": "https://mcp.revenuecat.ai",
+ "authorizationEndpoint": "https://api.revenuecat.com/oauth2/authorize",
+ "tokenEndpoint": "https://api.revenuecat.com/oauth2/token",
+ "registrationEndpoint": "https://api.revenuecat.com/oauth2/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "*:*:read",
+ "*:*:read_write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "rootly",
+ "endpoint": "https://mcp.rootly.com/mcp",
+ "probe": {
+ "url": "https://mcp.rootly.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.rootly.com/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.rootly.com/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.rootly.com",
+ "authorizationServers": [
+ "https://rootly.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "all"
+ ]
+ },
+ "audienceMatches": false
+ },
+ {
+ "sourceUrl": "https://mcp.rootly.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.rootly.com",
+ "authorizationServers": [
+ "https://rootly.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "all"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.rootly.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://rootly.com/.well-known/oauth-authorization-server",
+ "https://rootly.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://rootly.com",
+ "evidence": {
+ "issuer": "https://rootly.com",
+ "authorizationEndpoint": "https://rootly.com/oauth/authorize",
+ "tokenEndpoint": "https://rootly.com/oauth/token",
+ "registrationEndpoint": "https://rootly.com/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "profile",
+ "email",
+ "all",
+ "ir.all",
+ "oc.all",
+ "ir.incidents:read",
+ "ir.incidents:write",
+ "ir.services:read",
+ "ir.services:write",
+ "ir.environments:read",
+ "ir.environments:write",
+ "ir.functionalities:read",
+ "ir.functionalities:write",
+ "ir.severities:read",
+ "ir.severities:write",
+ "ir.incident_types:read",
+ "ir.incident_types:write",
+ "ir.incident_roles:read",
+ "ir.incident_roles:write",
+ "ir.workflows:read",
+ "ir.workflows:write",
+ "ir.catalogs:read",
+ "ir.catalogs:write",
+ "ir.groups:read",
+ "ir.groups:write",
+ "ir.playbooks:read",
+ "ir.playbooks:write",
+ "ir.retrospectives:read",
+ "ir.retrospectives:write",
+ "ir.status_pages:read"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "sanity",
+ "endpoint": "https://mcp.sanity.io",
+ "probe": {
+ "url": "https://mcp.sanity.io",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.sanity.io/.well-known/oauth-protected-resource",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.sanity.io",
+ "authorizationServers": [
+ "https://mcp.sanity.io"
+ ],
+ "protectedResourceScopes": [
+ "global"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.sanity.io/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.sanity.io/.well-known/oauth-authorization-server",
+ "https://mcp.sanity.io/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.sanity.io",
+ "evidence": {
+ "issuer": "https://mcp.sanity.io",
+ "authorizationEndpoint": "https://mcp.sanity.io/authorize",
+ "tokenEndpoint": "https://mcp.sanity.io/token",
+ "registrationEndpoint": "https://mcp.sanity.io/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "global"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "sentry",
+ "endpoint": "https://mcp.sentry.dev/mcp",
+ "probe": {
+ "url": "https://mcp.sentry.dev/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.sentry.dev/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.sentry.dev/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.sentry.dev/mcp",
+ "authorizationServers": [
+ "https://mcp.sentry.dev"
+ ],
+ "protectedResourceScopes": [
+ "org:read",
+ "project:write",
+ "team:write",
+ "event:write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.sentry.dev/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.sentry.dev/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.sentry.dev/.well-known/oauth-authorization-server",
+ "https://mcp.sentry.dev/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.sentry.dev",
+ "evidence": {
+ "issuer": "https://mcp.sentry.dev",
+ "authorizationEndpoint": "https://mcp.sentry.dev/oauth/authorize",
+ "tokenEndpoint": "https://mcp.sentry.dev/oauth/token",
+ "registrationEndpoint": "https://mcp.sentry.dev/oauth/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "org:read",
+ "project:write",
+ "team:write",
+ "event:write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "shippo",
+ "endpoint": "https://mcp.shippo.com",
+ "probe": {
+ "url": "https://mcp.shippo.com",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.shippo.com/.well-known/oauth-protected-resource",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.shippo.com",
+ "authorizationServers": [
+ "https://goshippo.com"
+ ],
+ "protectedResourceScopes": [
+ "*"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.shippo.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://goshippo.com/.well-known/oauth-authorization-server",
+ "https://goshippo.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://goshippo.com",
+ "evidence": {
+ "issuer": "https://goshippo.com",
+ "authorizationEndpoint": "https://goshippo.com/oauth/authorize",
+ "tokenEndpoint": "https://goshippo.com/oauth/access_token",
+ "registrationEndpoint": "https://goshippo.com/oauth/clients",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "*"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "shopify",
+ "endpoint": "https://setup.shopify.com/mcp",
+ "probe": {
+ "url": "https://setup.shopify.com/mcp",
+ "httpStatus": 403
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://setup.shopify.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://setup.shopify.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://setup.shopify.com/mcp",
+ "authorizationServers": [
+ "https://setup.shopify.com/auth"
+ ],
+ "protectedResourceScopes": [
+ "read_all_orders",
+ "read_analytics",
+ "read_apps",
+ "read_companies",
+ "read_legal_policies",
+ "read_reports",
+ "write_checkout_branding_settings",
+ "write_checkouts",
+ "write_collective.access",
+ "write_content",
+ "write_customers",
+ "write_digital_products_product",
+ "write_discounts",
+ "write_draft_orders",
+ "write_files",
+ "write_fulfillments",
+ "write_inventory",
+ "write_locales",
+ "write_locations",
+ "write_marketing_events",
+ "write_markets",
+ "write_merchant_managed_fulfillment_orders",
+ "write_metaobject_definitions",
+ "write_metaobjects",
+ "write_online_store_navigation",
+ "write_order_edits",
+ "write_orders",
+ "write_price_rules",
+ "write_products",
+ "write_publications"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://setup.shopify.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://setup.shopify.com/.well-known/oauth-authorization-server/auth",
+ "https://setup.shopify.com/auth/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://setup.shopify.com/auth",
+ "evidence": {
+ "issuer": "https://setup.shopify.com/auth",
+ "authorizationEndpoint": "https://setup.shopify.com/oauth/authorize",
+ "tokenEndpoint": "https://setup.shopify.com/oauth/token",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "read_all_orders",
+ "read_analytics",
+ "read_apps",
+ "read_companies",
+ "read_legal_policies",
+ "read_reports",
+ "write_checkout_branding_settings",
+ "write_checkouts",
+ "write_collective.access",
+ "write_content",
+ "write_customers",
+ "write_digital_products_product",
+ "write_discounts",
+ "write_draft_orders",
+ "write_files",
+ "write_fulfillments",
+ "write_inventory",
+ "write_locales",
+ "write_locations",
+ "write_marketing_events",
+ "write_markets",
+ "write_merchant_managed_fulfillment_orders",
+ "write_metaobject_definitions",
+ "write_metaobjects",
+ "write_online_store_navigation",
+ "write_order_edits",
+ "write_orders",
+ "write_price_rules",
+ "write_products",
+ "write_publications"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "slack",
+ "endpoint": "https://mcp.slack.com/mcp",
+ "probe": {
+ "url": "https://mcp.slack.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.slack.com/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.slack.com/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.slack.com",
+ "authorizationServers": [
+ "https://mcp.slack.com"
+ ],
+ "protectedResourceScopes": [
+ "canvases:read",
+ "canvases:write",
+ "channels:history",
+ "channels:read",
+ "channels:write",
+ "chat:write",
+ "emoji:read",
+ "files:read",
+ "files:write",
+ "groups:history",
+ "groups:read",
+ "groups:write",
+ "im:history",
+ "im:read",
+ "im:write",
+ "lists:read",
+ "lists:write",
+ "mpim:history",
+ "mpim:read",
+ "mpim:write",
+ "reactions:read",
+ "reactions:write",
+ "search:read.files",
+ "search:read.im",
+ "search:read.mpim",
+ "search:read.private",
+ "search:read.public",
+ "search:read.users",
+ "users:read",
+ "users:read.email"
+ ]
+ },
+ "audienceMatches": false
+ },
+ {
+ "sourceUrl": "https://mcp.slack.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 0,
+ "error": "network"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.slack.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.slack.com/.well-known/oauth-authorization-server",
+ "https://mcp.slack.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.slack.com",
+ "evidence": {
+ "issuer": "https://mcp.slack.com",
+ "authorizationEndpoint": "https://slack.com/oauth/v2_user/authorize",
+ "tokenEndpoint": "https://slack.com/api/oauth.v2.user.access",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "canvases:read",
+ "canvases:write",
+ "channels:history",
+ "channels:read",
+ "channels:write",
+ "chat:write",
+ "emoji:read",
+ "files:read",
+ "files:write",
+ "groups:history",
+ "groups:read",
+ "groups:write",
+ "im:history",
+ "im:read",
+ "im:write",
+ "lists:read",
+ "lists:write",
+ "mpim:history",
+ "mpim:read",
+ "mpim:write",
+ "reactions:read",
+ "reactions:write",
+ "search:read.files",
+ "search:read.im",
+ "search:read.mpim",
+ "search:read.private",
+ "search:read.public",
+ "search:read.users",
+ "users:read",
+ "users:read.email"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "sonatype-guide",
+ "endpoint": "https://mcp.guide.sonatype.com/mcp",
+ "probe": {
+ "url": "https://mcp.guide.sonatype.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.guide.sonatype.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp.guide.sonatype.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "unavailable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.guide.sonatype.com/.well-known/oauth-authorization-server",
+ "https://mcp.guide.sonatype.com/.well-known/openid-configuration"
+ ],
+ "status": "unavailable",
+ "evidence": {
+ "httpStatus": 404,
+ "contentType": "application/json",
+ "error": "http 404"
+ }
+ }
+ },
+ {
+ "server": "stripe",
+ "endpoint": "https://mcp.stripe.com",
+ "probe": {
+ "url": "https://mcp.stripe.com",
+ "httpStatus": 401
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.stripe.com/.well-known/oauth-protected-resource",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.stripe.com",
+ "authorizationServers": [
+ "https://access.stripe.com/mcp"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.stripe.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://access.stripe.com/.well-known/oauth-authorization-server/mcp",
+ "https://access.stripe.com/mcp/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://access.stripe.com/mcp",
+ "evidence": {
+ "issuer": "https://access.stripe.com/mcp",
+ "authorizationEndpoint": "https://access.stripe.com/mcp/oauth2/authorize",
+ "tokenEndpoint": "https://access.stripe.com/mcp/oauth2/token",
+ "registrationEndpoint": "https://access.stripe.com/mcp/oauth2/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "mcp"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "sumup",
+ "endpoint": "https://mcp.sumup.com/mcp",
+ "probe": {
+ "url": "https://mcp.sumup.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.sumup.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.sumup.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.sumup.com/mcp",
+ "authorizationServers": [
+ "https://auth.sumup.com"
+ ],
+ "protectedResourceScopes": [
+ "offline_access",
+ "email"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.sumup.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.sumup.com/mcp",
+ "authorizationServers": [
+ "https://auth.sumup.com"
+ ],
+ "protectedResourceScopes": [
+ "offline_access",
+ "email"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.sumup.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://auth.sumup.com/.well-known/oauth-authorization-server",
+ "https://auth.sumup.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://auth.sumup.com",
+ "evidence": {
+ "issuer": "https://auth.sumup.com/",
+ "authorizationEndpoint": "https://auth.sumup.com/oauth2/auth",
+ "tokenEndpoint": "https://auth.sumup.com/oauth2/token",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "offline_access",
+ "members.read",
+ "members.write",
+ "merchants.read",
+ "merchants.write",
+ "roles.read",
+ "roles.write",
+ "checkouts.read",
+ "checkouts.write",
+ "customers.read",
+ "customers.write",
+ "api_keys.read",
+ "api_keys.write",
+ "receipts.read",
+ "refunds.write",
+ "transactions.read",
+ "payouts.read",
+ "readers.read",
+ "readers.write",
+ "sales.read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "private_key_jwt",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "supabase",
+ "endpoint": "https://mcp.supabase.com/mcp",
+ "probe": {
+ "url": "https://mcp.supabase.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.supabase.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.supabase.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.supabase.com/mcp",
+ "authorizationServers": [
+ "https://api.supabase.com"
+ ],
+ "protectedResourceScopes": [
+ "organizations:read",
+ "projects:read",
+ "projects:write",
+ "database:write",
+ "database:read",
+ "analytics:read",
+ "secrets:read",
+ "edge_functions:read",
+ "edge_functions:write",
+ "environment:read",
+ "environment:write",
+ "storage:read",
+ "storage:write"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.supabase.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.supabase.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://api.supabase.com/.well-known/oauth-authorization-server",
+ "https://api.supabase.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://api.supabase.com",
+ "evidence": {
+ "issuer": "https://api.supabase.com",
+ "authorizationEndpoint": "https://api.supabase.com/v1/oauth/authorize",
+ "tokenEndpoint": "https://api.supabase.com/v1/oauth/token",
+ "registrationEndpoint": "https://api.supabase.com/platform/oauth/apps/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "analytics:read",
+ "analytics:write",
+ "analytics_config:read",
+ "analytics_config:write",
+ "auth:read",
+ "auth:write",
+ "database:read",
+ "database:write",
+ "domains:read",
+ "domains:write",
+ "edge_functions:read",
+ "edge_functions:write",
+ "environment:read",
+ "environment:write",
+ "organizations:read",
+ "organizations:write",
+ "projects:read",
+ "projects:write",
+ "rest:read",
+ "rest:write",
+ "secrets:read",
+ "secrets:write",
+ "storage:read",
+ "storage:write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post"
+ ]
+ }
+ }
+ },
+ {
+ "server": "synthflow",
+ "endpoint": "https://mcp.synthflow.ai/mcp",
+ "probe": {
+ "url": "https://mcp.synthflow.ai/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.synthflow.ai/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.synthflow.ai/mcp",
+ "authorizationServers": [
+ "https://kind-prelude-27.authkit.app"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.synthflow.ai/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.synthflow.ai/mcp",
+ "authorizationServers": [
+ "https://kind-prelude-27.authkit.app"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.synthflow.ai/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://kind-prelude-27.authkit.app/.well-known/oauth-authorization-server",
+ "https://kind-prelude-27.authkit.app/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://kind-prelude-27.authkit.app",
+ "evidence": {
+ "issuer": "https://kind-prelude-27.authkit.app",
+ "authorizationEndpoint": "https://kind-prelude-27.authkit.app/oauth2/authorize",
+ "tokenEndpoint": "https://kind-prelude-27.authkit.app/oauth2/token",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "email",
+ "offline_access",
+ "openid",
+ "profile"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "synthflow-docs",
+ "endpoint": "https://docs.synthflow.ai/_mcp/server",
+ "probe": {
+ "url": "https://docs.synthflow.ai/_mcp/server",
+ "httpStatus": 200
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://docs.synthflow.ai/.well-known/oauth-protected-resource/_mcp/server",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://docs.synthflow.ai/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "unavailable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://docs.synthflow.ai/.well-known/oauth-authorization-server",
+ "https://docs.synthflow.ai/.well-known/openid-configuration"
+ ],
+ "status": "unavailable",
+ "evidence": {
+ "httpStatus": 404,
+ "contentType": "text/html",
+ "error": "http 404"
+ }
+ }
+ },
+ {
+ "server": "valtown",
+ "endpoint": "https://api.val.town/v3/mcp",
+ "probe": {
+ "url": "https://api.val.town/v3/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://api.val.town/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://api.val.town/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://api.val.town/v3/mcp",
+ "authorizationServers": [
+ "https://www.val.town/oauth"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "project_rw",
+ "user_r",
+ "blob_rw",
+ "email_rw",
+ "sqlite_rw",
+ "telemetry_r"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://api.val.town/.well-known/oauth-protected-resource/v3/mcp",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://api.val.town/v3/mcp",
+ "authorizationServers": [
+ "https://www.val.town/oauth"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "project_rw",
+ "user_r",
+ "blob_rw",
+ "email_rw",
+ "sqlite_rw",
+ "telemetry_r"
+ ]
+ },
+ "audienceMatches": true
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://api.val.town/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://www.val.town/.well-known/oauth-authorization-server/oauth",
+ "https://www.val.town/oauth/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://www.val.town/oauth",
+ "evidence": {
+ "issuer": "https://www.val.town/oauth",
+ "authorizationEndpoint": "https://www.val.town/oauth/auth",
+ "tokenEndpoint": "https://www.val.town/oauth/token",
+ "registrationEndpoint": "https://www.val.town/oauth/reg",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "offline_access",
+ "project_rw",
+ "user_r",
+ "user_rw",
+ "blob_rw",
+ "email_rw",
+ "sqlite_rw",
+ "telemetry_r",
+ "telemetry_rw",
+ "val_r",
+ "val_rw",
+ "profile",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "vanta",
+ "endpoint": "https://mcp.vanta.com/mcp",
+ "probe": {
+ "url": "https://mcp.vanta.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.vanta.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp.vanta.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.vanta.com",
+ "authorizationServers": [
+ "https://api.vanta.com/mcp"
+ ],
+ "protectedResourceScopes": [
+ "mcp-api.all:write"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.vanta.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://api.vanta.com/.well-known/oauth-authorization-server/mcp",
+ "https://api.vanta.com/mcp/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://api.vanta.com/mcp",
+ "evidence": {
+ "issuer": "https://api.vanta.com/mcp",
+ "authorizationEndpoint": "https://api.vanta.com/oauth/authorize",
+ "tokenEndpoint": "https://api.vanta.com/oauth/token",
+ "registrationEndpoint": "https://api.vanta.com/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "mcp-api.all:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "vanta-aus",
+ "endpoint": "https://mcp.aus.vanta.com/mcp",
+ "probe": {
+ "url": "https://mcp.aus.vanta.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.aus.vanta.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp.aus.vanta.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.aus.vanta.com",
+ "authorizationServers": [
+ "https://api.vanta.com/mcp"
+ ],
+ "protectedResourceScopes": [
+ "mcp-api.all:write"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.aus.vanta.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://api.vanta.com/.well-known/oauth-authorization-server/mcp",
+ "https://api.vanta.com/mcp/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://api.vanta.com/mcp",
+ "evidence": {
+ "issuer": "https://api.vanta.com/mcp",
+ "authorizationEndpoint": "https://api.vanta.com/oauth/authorize",
+ "tokenEndpoint": "https://api.vanta.com/oauth/token",
+ "registrationEndpoint": "https://api.vanta.com/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "mcp-api.all:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "vanta-eu",
+ "endpoint": "https://mcp.eu.vanta.com/mcp",
+ "probe": {
+ "url": "https://mcp.eu.vanta.com/mcp",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.eu.vanta.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ },
+ {
+ "sourceUrl": "https://mcp.eu.vanta.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.eu.vanta.com",
+ "authorizationServers": [
+ "https://api.vanta.com/mcp"
+ ],
+ "protectedResourceScopes": [
+ "mcp-api.all:write"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.eu.vanta.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://api.vanta.com/.well-known/oauth-authorization-server/mcp",
+ "https://api.vanta.com/mcp/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://api.vanta.com/mcp",
+ "evidence": {
+ "issuer": "https://api.vanta.com/mcp",
+ "authorizationEndpoint": "https://api.vanta.com/oauth/authorize",
+ "tokenEndpoint": "https://api.vanta.com/oauth/token",
+ "registrationEndpoint": "https://api.vanta.com/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "mcp-api.all:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "vercel",
+ "endpoint": "https://mcp.vercel.com",
+ "probe": {
+ "url": "https://mcp.vercel.com",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.vercel.com/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.vercel.com/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.vercel.com/",
+ "authorizationServers": [
+ "https://vercel.com"
+ ],
+ "protectedResourceScopes": [
+ "openid"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.vercel.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://vercel.com/.well-known/oauth-authorization-server",
+ "https://vercel.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://vercel.com",
+ "evidence": {
+ "issuer": "https://vercel.com",
+ "authorizationEndpoint": "https://vercel.com/oauth/authorize",
+ "tokenEndpoint": "https://api.vercel.com/login/oauth/token",
+ "registrationEndpoint": "https://api.vercel.com/login/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "email",
+ "profile",
+ "offline_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "client_secret_jwt",
+ "private_key_jwt"
+ ]
+ }
+ }
+ },
+ {
+ "server": "windsor-ai",
+ "endpoint": "https://mcp.windsor.ai",
+ "probe": {
+ "url": "https://mcp.windsor.ai",
+ "httpStatus": 200
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.windsor.ai/.well-known/oauth-protected-resource",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.windsor.ai/",
+ "authorizationServers": [
+ "https://mcp.windsor.ai/"
+ ],
+ "protectedResourceScopes": [
+ "create",
+ "delete",
+ "offline_access"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.windsor.ai/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.windsor.ai/.well-known/oauth-authorization-server",
+ "https://mcp.windsor.ai/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.windsor.ai/",
+ "evidence": {
+ "issuer": "https://mcp.windsor.ai/",
+ "authorizationEndpoint": "https://mcp.windsor.ai/authorize",
+ "tokenEndpoint": "https://mcp.windsor.ai/token",
+ "registrationEndpoint": "https://mcp.windsor.ai/register",
+ "pkceS256": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "create",
+ "delete",
+ "offline_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "wix",
+ "endpoint": "https://mcp.wix.com/mcp",
+ "probe": {
+ "url": "https://mcp.wix.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.wix.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.wix.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.wix.com/mcp",
+ "authorizationServers": [
+ "https://mcp.wix.com"
+ ],
+ "protectedResourceScopes": [
+ "offline_access"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.wix.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.wix.com",
+ "authorizationServers": [
+ "https://mcp.wix.com"
+ ],
+ "protectedResourceScopes": [
+ "offline_access"
+ ]
+ },
+ "audienceMatches": false
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.wix.com/.well-known/oauth-protected-resource/mcp"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.wix.com/.well-known/oauth-authorization-server",
+ "https://mcp.wix.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.wix.com",
+ "evidence": {
+ "issuer": "https://mcp.wix.com",
+ "authorizationEndpoint": "https://mcp.wix.com/authorize",
+ "tokenEndpoint": "https://mcp.wix.com/token",
+ "registrationEndpoint": "https://mcp.wix.com/register",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ]
+ }
+ }
+ },
+ {
+ "server": "zapier",
+ "endpoint": "https://mcp.zapier.com/api/v1/connect",
+ "probe": {
+ "url": "https://mcp.zapier.com/api/v1/connect",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.zapier.com/.well-known/oauth-protected-resource/api/v1/connect"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.zapier.com/.well-known/oauth-protected-resource/api/v1/connect",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.zapier.com/api/v1/connect",
+ "authorizationServers": [
+ "https://mcp.zapier.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.zapier.com/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.zapier.com/.well-known/oauth-protected-resource/api/v1/connect"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.zapier.com/.well-known/oauth-authorization-server",
+ "https://mcp.zapier.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.zapier.com",
+ "evidence": {
+ "issuer": "https://mcp.zapier.com",
+ "authorizationEndpoint": "https://mcp.zapier.com/oauth/authorize",
+ "tokenEndpoint": "https://mcp.zapier.com/api/v1/oauth/token",
+ "registrationEndpoint": "https://mcp.zapier.com/api/v1/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "zoom",
+ "endpoint": "https://mcp.zoom.us/mcp/zoom/streamable",
+ "probe": {
+ "url": "https://mcp.zoom.us/mcp/zoom/streamable",
+ "httpStatus": 405
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/zoom/streamable",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.zoom.us/mcp/zoom/streamable",
+ "authorizationServers": [
+ "https://zoom.us"
+ ],
+ "protectedResourceScopes": [
+ "docs:update:collaborator",
+ "docs:write:collaborator",
+ "docs:read:list_file_collaborators",
+ "docs:delete:collaborator",
+ "my_notes:read:content",
+ "meeting:write:meeting",
+ "meeting:read:search",
+ "meeting:update:meeting",
+ "cloud_recording:read:list_user_recordings",
+ "docs:write:import",
+ "cloud_recording:read:content",
+ "docs:read:export",
+ "hub:write:content",
+ "meeting:update:in_meeting_controls",
+ "agentic_search:read:search",
+ "hub:read:content",
+ "meeting:delete:meeting",
+ "meeting:read:assets",
+ "agentic_search:read:ask"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/zoom/streamable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://zoom.us",
+ "evidence": {
+ "issuer": "https://zoom.us",
+ "authorizationEndpoint": "https://zoom.us/oauth/authorize",
+ "tokenEndpoint": "https://zoom.us/oauth/token",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "zoom-canvas",
+ "endpoint": "https://mcp.zoom.us/mcp/canvas/streamable",
+ "probe": {
+ "url": "https://mcp.zoom.us/mcp/canvas/streamable",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/canvas/streamable"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/canvas/streamable",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.zoom.us/mcp/canvas/streamable",
+ "authorizationServers": [
+ "https://zoom.us"
+ ],
+ "protectedResourceScopes": [
+ "docs:update:file",
+ "docs:read:export",
+ "docs:update:content",
+ "canvas:read:data_table",
+ "docs:delete:file",
+ "docs:write:file",
+ "docs:update:collaborator",
+ "canvas:write:data_table",
+ "docs:delete:collaborator",
+ "docs:read:general_access",
+ "canvas:delete:data_table",
+ "docs:write:collaborator",
+ "docs:write:content",
+ "canvas:update:data_table",
+ "canvas:write:file_search",
+ "hub:write:move",
+ "docs:delete:content",
+ "docs:write:import",
+ "docs:read:file",
+ "docs:read:list_children",
+ "docs:read:list_file_collaborators",
+ "docs:update:file_owner",
+ "docs:update:general_access"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/canvas/streamable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://zoom.us",
+ "evidence": {
+ "issuer": "https://zoom.us",
+ "authorizationEndpoint": "https://zoom.us/oauth/authorize",
+ "tokenEndpoint": "https://zoom.us/oauth/token",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "zoom-chat",
+ "endpoint": "https://mcp.zoom.us/mcp/chat/streamable",
+ "probe": {
+ "url": "https://mcp.zoom.us/mcp/chat/streamable",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/chat/streamable"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/chat/streamable",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.zoom.us/mcp/chat/streamable",
+ "authorizationServers": [
+ "https://zoom.us"
+ ],
+ "protectedResourceScopes": [
+ "team_chat:read:list_user_messages",
+ "team_chat:update:user_message",
+ "team_chat:read:list_user_sessions",
+ "team_chat:write:contact_information",
+ "team_chat:update:user_channel",
+ "chat_channel:read",
+ "chat_channel:write",
+ "team_chat:read:channel",
+ "team_chat:read:list_contacts",
+ "team_chat:write:members",
+ "team_chat:write:user_message",
+ "team_chat:read:list_user_channels",
+ "team_chat:read:list_members",
+ "team_chat:write:user_channel",
+ "team_chat:update:channel_member_role",
+ "team_chat:read:list_user_files"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/chat/streamable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://zoom.us",
+ "evidence": {
+ "issuer": "https://zoom.us",
+ "authorizationEndpoint": "https://zoom.us/oauth/authorize",
+ "tokenEndpoint": "https://zoom.us/oauth/token",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "zoom-meetings",
+ "endpoint": "https://mcp.zoom.us/mcp/meeting/streamable",
+ "probe": {
+ "url": "https://mcp.zoom.us/mcp/meeting/streamable",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://zoom.us/.well-known/oauth-protected-resource/mcp/meeting/streamable"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://zoom.us/.well-known/oauth-protected-resource/mcp/meeting/streamable",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.zoom.us/mcp/meeting/streamable",
+ "authorizationServers": [
+ "https://zoom.us"
+ ],
+ "protectedResourceScopes": [
+ "meeting:write:meeting",
+ "meeting:read:search",
+ "meeting:delete:meeting",
+ "meeting:update:in_meeting_controls",
+ "meeting:update:meeting",
+ "meeting:read:assets",
+ "cloud_recording:read:list_user_recordings",
+ "cloud_recording:read:content"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/meeting/streamable",
+ "kind": "pathful",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.zoom.us/mcp/meeting/streamable",
+ "authorizationServers": [
+ "https://zoom.us"
+ ],
+ "protectedResourceScopes": [
+ "meeting:write:meeting",
+ "meeting:read:search",
+ "meeting:delete:meeting",
+ "meeting:update:in_meeting_controls",
+ "meeting:update:meeting",
+ "meeting:read:assets",
+ "cloud_recording:read:list_user_recordings",
+ "cloud_recording:read:content"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://zoom.us/.well-known/oauth-protected-resource/mcp/meeting/streamable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://zoom.us",
+ "evidence": {
+ "issuer": "https://zoom.us",
+ "authorizationEndpoint": "https://zoom.us/oauth/authorize",
+ "tokenEndpoint": "https://zoom.us/oauth/token",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "zoom-revenue-accelerator",
+ "endpoint": "https://mcp.zoom.us/mcp/revenue_accelerator/streamable",
+ "probe": {
+ "url": "https://mcp.zoom.us/mcp/revenue_accelerator/streamable",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/revenue_accelerator/streamable"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/revenue_accelerator/streamable",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.zoom.us/mcp/revenue_accelerator/streamable",
+ "authorizationServers": [
+ "https://zoom.us"
+ ],
+ "protectedResourceScopes": [
+ "zra:read:conversation_analysis",
+ "zra:read:list_conversations",
+ "zra:read:list_deal_activities",
+ "zra:read:deal",
+ "zra:read:list_conversation_comments",
+ "zra:read:crm_customer_contact",
+ "zra:read:indicator",
+ "zra:read:conversations",
+ "zra:read:team",
+ "zra:read:conversation_scorecards",
+ "zra:read:user",
+ "zra:read:list_deals"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/revenue_accelerator/streamable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://zoom.us",
+ "evidence": {
+ "issuer": "https://zoom.us",
+ "authorizationEndpoint": "https://zoom.us/oauth/authorize",
+ "tokenEndpoint": "https://zoom.us/oauth/token",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "zoom-tasks",
+ "endpoint": "https://mcp.zoom.us/mcp/tasks/streamable",
+ "probe": {
+ "url": "https://mcp.zoom.us/mcp/tasks/streamable",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/tasks/streamable"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/tasks/streamable",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.zoom.us/mcp/tasks/streamable",
+ "authorizationServers": [
+ "https://zoom.us"
+ ],
+ "protectedResourceScopes": [
+ "tasks:read:list_tasks",
+ "tasks:update:task",
+ "tasks:delete:comment",
+ "tasks:write:task",
+ "tasks:write:assignees",
+ "tasks:write:collaborators",
+ "tasks:write:comment",
+ "tasks:read:comments",
+ "tasks:read:task",
+ "tasks:delete:assignees",
+ "tasks:delete:trash_task",
+ "tasks:delete:collaborator",
+ "tasks:read:list_collaborators",
+ "tasks:read:assignees"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/tasks/streamable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://zoom.us",
+ "evidence": {
+ "issuer": "https://zoom.us",
+ "authorizationEndpoint": "https://zoom.us/oauth/authorize",
+ "tokenEndpoint": "https://zoom.us/oauth/token",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "zoom-whiteboard",
+ "endpoint": "https://mcp.zoom.us/mcp/whiteboard/streamable",
+ "probe": {
+ "url": "https://mcp.zoom.us/mcp/whiteboard/streamable",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/whiteboard/streamable"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/whiteboard/streamable",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.zoom.us/mcp/whiteboard/streamable",
+ "authorizationServers": [
+ "https://zoom.us"
+ ],
+ "protectedResourceScopes": [
+ "whiteboard:delete:whiteboard",
+ "whiteboard:write:collaborator",
+ "whiteboard:update:collaborator",
+ "whiteboard:read:list_collaborators",
+ "whiteboard:update:whiteboard",
+ "whiteboard:write:content",
+ "whiteboard:read:list_whiteboards",
+ "whiteboard:read:whiteboard",
+ "whiteboard:write:whiteboard",
+ "whiteboard:read:content",
+ "whiteboard:delete:content",
+ "whiteboard:delete:collaborator"
+ ]
+ },
+ "audienceMatches": true
+ },
+ {
+ "sourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "kind": "origin",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/whiteboard/streamable"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://zoom.us",
+ "evidence": {
+ "issuer": "https://zoom.us",
+ "authorizationEndpoint": "https://zoom.us/oauth/authorize",
+ "tokenEndpoint": "https://zoom.us/oauth/token",
+ "pkceS256": true,
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ]
+ }
+ }
+ },
+ {
+ "server": "zoominfo",
+ "endpoint": "https://mcp.zoominfo.com/mcp",
+ "probe": {
+ "url": "https://mcp.zoominfo.com/mcp",
+ "httpStatus": 401,
+ "resourceMetadataHeader": "https://mcp.zoominfo.com/.well-known/oauth-protected-resource"
+ },
+ "protectedResource": {
+ "attempts": [
+ {
+ "sourceUrl": "https://mcp.zoominfo.com/.well-known/oauth-protected-resource",
+ "kind": "header",
+ "status": "available",
+ "evidence": {
+ "resource": "https://mcp.zoominfo.com",
+ "authorizationServers": [
+ "https://mcp.zoominfo.com"
+ ],
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "zi_api",
+ "email",
+ "offline_access",
+ "zi_mcp",
+ "api:data:mcp"
+ ]
+ },
+ "audienceMatches": false
+ },
+ {
+ "sourceUrl": "https://mcp.zoominfo.com/.well-known/oauth-protected-resource/mcp",
+ "kind": "pathful",
+ "status": "unavailable",
+ "httpStatus": 404,
+ "error": "http 404"
+ }
+ ],
+ "engineVisible": "available",
+ "engineSelectedSourceUrl": "https://mcp.zoominfo.com/.well-known/oauth-protected-resource"
+ },
+ "authorizationServer": {
+ "sourceUrls": [
+ "https://mcp.zoominfo.com/.well-known/oauth-authorization-server",
+ "https://mcp.zoominfo.com/.well-known/openid-configuration"
+ ],
+ "status": "available",
+ "issuer": "https://mcp.zoominfo.com",
+ "evidence": {
+ "issuer": "https://okta-login.zoominfo.com/oauth2/default",
+ "authorizationEndpoint": "https://mcp.zoominfo.com/oauth/authorize",
+ "tokenEndpoint": "https://okta-login.zoominfo.com/oauth2/default/v1/token",
+ "registrationEndpoint": "https://mcp.zoominfo.com/oauth/register",
+ "pkceS256": true,
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "zi_api",
+ "email",
+ "offline_access",
+ "zi_mcp",
+ "api:data:mcp"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post"
+ ]
+ }
+ }
+ }
+ ]
+}
diff --git a/packages/ai/mcp-catalog/examples/local-services.example.json b/packages/ai/mcp-catalog/examples/local-services.example.json
new file mode 100644
index 0000000000..85838becb1
--- /dev/null
+++ b/packages/ai/mcp-catalog/examples/local-services.example.json
@@ -0,0 +1,86 @@
+{
+ "$comment": "Example local MCP service source. Copy to ~/.prime/agent/mcp-services.json (path set by the host wiring) and edit. Rules: version must be 1; entries use the same schema as the bundled catalog; provenance may only claim source \"user\"; ids must not collide with bundled catalog entries; no OAuth client ids or secrets ever belong in this file — credentials are stored separately by Prime when you connect.",
+ "version": 1,
+ "entries": [
+ {
+ "server": "acme-docs",
+ "service": "acme-docs",
+ "label": "Acme Docs",
+ "url": "https://mcp.docs.acme.example.com/mcp",
+ "description": "Acme's internal documentation MCP server.",
+ "aliases": [
+ "acme",
+ "acme documentation"
+ ],
+ "publisher": "Acme",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.docs.acme.example.com/mcp"
+ },
+ "auth": {
+ "strategy": "oauth",
+ "clientRegistration": "unknown"
+ },
+ "setup": {
+ "status": "ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "user",
+ "note": "added locally by me"
+ }
+ ],
+ "homepage": "https://acme.example.com"
+ },
+ {
+ "server": "acme-metrics",
+ "service": "acme-metrics",
+ "label": "Acme Metrics",
+ "url": "",
+ "description": "Company metrics gateway; the endpoint is per-tenant.",
+ "aliases": [
+ "acme metrics"
+ ],
+ "transport": {
+ "type": "http-template",
+ "template": "https://${ACME_METRICS_HOST}/mcp",
+ "variables": [
+ {
+ "name": "ACME_METRICS_HOST",
+ "description": "Your Acme metrics instance host"
+ }
+ ]
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown"
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "provide your instance host and API token",
+ "fields": [
+ {
+ "id": "ACME_METRICS_TOKEN",
+ "label": "ACME_METRICS_TOKEN",
+ "description": "Environment variable ACME_METRICS_TOKEN",
+ "required": true
+ }
+ ]
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "user",
+ "note": "added locally by me"
+ }
+ ]
+ }
+ ]
+}
diff --git a/packages/ai/mcp-catalog/import-report.json b/packages/ai/mcp-catalog/import-report.json
new file mode 100644
index 0000000000..e5da38ef60
--- /dev/null
+++ b/packages/ai/mcp-catalog/import-report.json
@@ -0,0 +1,556 @@
+{
+ "sources": {
+ "openai-plugins": {
+ "plugins": 25,
+ "remoteServers": 15,
+ "stdioServers": 0,
+ "excluded": 10
+ },
+ "claude-plugins-official": {
+ "plugins": 118,
+ "remoteServers": 67,
+ "stdioServers": 0,
+ "excluded": 85
+ }
+ },
+ "merged": [
+ {
+ "server": "airtable",
+ "sources": [
+ "openai-plugins",
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.airtable.com/mcp"
+ ]
+ },
+ {
+ "server": "canva",
+ "sources": [
+ "openai-plugins",
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.canva.com/mcp"
+ ]
+ },
+ {
+ "server": "cloudflare-api",
+ "sources": [
+ "openai-plugins",
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.cloudflare.com/mcp"
+ ]
+ },
+ {
+ "server": "github",
+ "sources": [
+ "openai-plugins",
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://api.githubcopilot.com/mcp/"
+ ]
+ },
+ {
+ "server": "linear",
+ "sources": [
+ "openai-plugins",
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.linear.app/mcp"
+ ]
+ },
+ {
+ "server": "notion",
+ "sources": [
+ "openai-plugins",
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.notion.com/mcp"
+ ]
+ },
+ {
+ "server": "posthog",
+ "sources": [
+ "openai-plugins",
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.posthog.com/mcp"
+ ]
+ },
+ {
+ "server": "sentry",
+ "sources": [
+ "openai-plugins",
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.sentry.dev/mcp",
+ "https://mcp.sentry.dev/mcp?utm_source=plugin"
+ ]
+ },
+ {
+ "server": "stripe",
+ "sources": [
+ "openai-plugins",
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.stripe.com"
+ ]
+ },
+ {
+ "server": "zoom-meetings",
+ "sources": [
+ "openai-plugins",
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.zoom.us/mcp/meeting/streamable"
+ ]
+ },
+ {
+ "server": "revenuecat",
+ "sources": [
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.revenuecat.ai/mcp"
+ ]
+ },
+ {
+ "server": "vanta",
+ "sources": [
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.vanta.com/mcp"
+ ]
+ },
+ {
+ "server": "vanta-eu",
+ "sources": [
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.eu.vanta.com/mcp"
+ ]
+ },
+ {
+ "server": "vanta-aus",
+ "sources": [
+ "claude-plugins-official"
+ ],
+ "urls": [
+ "https://mcp.aus.vanta.com/mcp"
+ ]
+ }
+ ],
+ "excluded": [
+ {
+ "key": "claude-plugins-official/activecampaign/activecampaign",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): ActiveCampaign is a tenant-URL endpoint (template `${user_config.server_url}`)—its only setup input is the instance URL, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/adobe-for-creativity/Adobe for creativity",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): no authorization-server metadata is reachable for the endpoint (well-known responses were 403) and no dynamic client registration is advertised, so no self-serve OAuth path could be verified (readiness stayed unknown)"
+ },
+ {
+ "key": "claude-plugins-official/aikido/aikido-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Aikido is a local stdio adapter (`npx -y @aikidosec/[email protected]`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/airwallex-agentos/airwallex-agentos",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Airwallex needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/airwallex-agentos/airwallex-dev",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Airwallex (Sandbox) needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/airwallex-dev/airwallex-dev",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Airwallex (Sandbox) needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/alloydb/alloydb-postgres",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AlloyDB is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt alloydb-postgres --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/amazon-location-service/aws-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Amazon Location Service is a local stdio adapter (`uvx mcp-proxy-for-aws@latest https://aws-mcp.us-east-1.api.aws/mcp`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/atlan/atlan",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Atlan needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/aws-amplify/aws-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AWS Amplify is a local stdio adapter (`uvx mcp-proxy-for-aws@latest https://aws-mcp.us-east-1.api.aws/mcp`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/aws-core/aws-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AWS Core is a local stdio adapter (`uvx mcp-proxy-for-aws-cli@latest https://aws-mcp.us-east-1.api.aws/mcp --skip-auth --metadata INSTALL_SOURCE=agent-toolkit-core`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/aws-data-analytics/aws-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AWS Data Analytics is a local stdio adapter (`uvx mcp-proxy-for-aws-cli@latest https://aws-mcp.us-east-1.api.aws/mcp --skip-auth --metadata INSTALL_SOURCE=agent-toolkit-data-analytics`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/aws-serverless/aws-serverless-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AWS Serverless is a local stdio adapter (`uvx awslabs.aws-serverless-mcp-server@latest --allow-write`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/aws-transform/aws-transform-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AWS Transform is a local stdio adapter (`uvx awslabs.aws-transform-mcp-server@latest`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/azure/azure",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Microsoft Azure is a local stdio adapter (`npx -y @azure/mcp@latest server start`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/bigquery-data-analytics/bigquery",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): BigQuery is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt bigquery --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/cloud-sql-mysql/cloud-sql-mysql",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Cloud SQL for MySQL is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt cloud-sql-mysql --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/cloud-sql-postgresql/cloud-sql-postgres",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Cloud SQL for PostgreSQL is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt cloud-sql-postgres --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/cloud-sql-sqlserver/cloud-sql-mssql",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Cloud SQL for SQL Server is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt cloud-sql-mssql --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/cloudinary/cloudinary-mediaflows",
+ "reason": "single-credential catalog cut (2026-09-16 product decision, Bugbot findings \"extra pasted credentials never sent\" / \"GitHub alternative tokens both required\": the generic runtime sends exactly ONE Authorization: Bearer per connection, so the shipped paste class collects exactly ONE credential, with multiple fields allowed only as curated alternative names for it): Cloudinary MediaFlows authenticates with the NAMED HEADER pair cld-api-key/cld-secret (upstream cloudinary-devs/cloudinary-plugin manifest at 86be534: `https://mediaflows.mcp.cloudinary.com/v2/mcp` with headers cld-cloud-name, cld-api-key, cld-secret), which a single bearer cannot represent—a complete paste of the key and secret cannot authenticate through the generic runtime, so the entry ships cut rather than mislabeled as pasteable"
+ },
+ {
+ "key": "claude-plugins-official/cockroachdb/cockroachdb-cloud",
+ "reason": "token-only catalog cut (2026-09-16 product decision: the catalog ships one-click DCR connectors and simple paste-an-API-key/token services only — Kevin, live testing: \"things like cockroachdb cloud still need mcp/ 'requires provider credentials supplied as headers'? i told you to remove all that stuff?\"): CockroachDB Cloud is a tenant config, not a key paste—its only setup input is the per-cluster header `mcp-cluster-id: ${COCKROACHDB_CLUSTER_ID}` (requirement `tenant`, one `env-var` field, no api-key/token field at all), and it shipped the scary derived reason `requires provider credentials supplied as headers` that Kevin named in the callout above"
+ },
+ {
+ "key": "claude-plugins-official/cockroachdb/cockroachdb-toolbox",
+ "reason": "local stdio utility inside a remote-service plugin; outside the remote service lane"
+ },
+ {
+ "key": "claude-plugins-official/cockroachdb/cockroachdb-toolbox-http",
+ "reason": "loopback/private endpoint; local server, not a remote service"
+ },
+ {
+ "key": "claude-plugins-official/confidence/confidence-docs",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): the served origin-level protected-resource document fails the engine's audience/structure validation (PRM discovery fails closed), so no self-serve OAuth path could be verified (readiness stayed unknown)"
+ },
+ {
+ "key": "claude-plugins-official/confidence/confidence-flags",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): the served origin-level protected-resource document fails the engine's audience/structure validation (PRM discovery fails closed), so no self-serve OAuth path could be verified (readiness stayed unknown)"
+ },
+ {
+ "key": "claude-plugins-official/convex/convex",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Convex is a local stdio adapter (`npx -y convex@latest mcp start`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/alloydb-postgres",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)—each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/bigquery",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)—each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/bigtable",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)—each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/cloud-sql-postgresql",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)—each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/cloud-storage",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)—each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/dataproc",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)—each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/knowledge_catalog",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)—each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/notebook",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)—each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/spanner",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)—each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/visualization",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)—each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/datadog/mcp",
+ "reason": "single-credential catalog cut (2026-09-16 product decision, Bugbot findings \"extra pasted credentials never sent\" / \"GitHub alternative tokens both required\": the generic runtime sends exactly ONE Authorization: Bearer per connection, so the shipped paste class collects exactly ONE credential, with multiple fields allowed only as curated alternative names for it): the Claude-side record of the same Datadog endpoint excluded via openai-plugins/datadog/datadog—its manifest authenticates with the NAMED HEADER pair DD_API_KEY/DD_APPLICATION_KEY plus the X-Datadog-MCP-Toolsets setting and its URL is the `${DD_MCP_DOMAIN}` template, which a single bearer and a concrete endpoint cannot represent"
+ },
+ {
+ "key": "claude-plugins-official/dataproc/dataproc",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Dataproc is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt dataproc --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/deploy-on-aws/awsiac",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Deploy on AWS is a local stdio adapter pack (`uvx awslabs.aws-iac-mcp-server@latest`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/deploy-on-aws/awsknowledge",
+ "reason": "docs-only server per upstream plugin notes; the AWS IaC stdio adapter is recorded for the plugin"
+ },
+ {
+ "key": "claude-plugins-official/deploy-on-aws/awspricing",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Deploy on AWS is a local stdio adapter pack (`uvx awslabs.aws-iac-mcp-server@latest`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/discord/discord",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Discord is a local stdio adapter (`bun run --cwd ${CLAUDE_PLUGIN_ROOT} --shell=bun --silent start`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/dominodatalab/domino_server",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Domino Data Lab is a local stdio adapter (`uv --directory $/mnt/code/.claude/mcp-servers/domino_mcp_server run domino_mcp_server.py`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/dropbox/claude_app_mcp",
+ "reason": "Claude-app-specific endpoint variant; the official Dropbox endpoint is imported from the openai catalog"
+ },
+ {
+ "key": "claude-plugins-official/dynatrace/dynatrace",
+ "reason": "token-only catalog cut (2026-09-16 product decision: the catalog ships one-click DCR connectors and simple paste-an-API-key/token services only — Kevin, live testing: \"things like cockroachdb cloud still need mcp/ 'requires provider credentials supplied as headers'? i told you to remove all that stuff?\"): Dynatrace is a tenant-instance endpoint (requirement `tenant`, template `${DT_ENVIRONMENT}/platform-reserved/mcp-gateway/v0.1/servers/dynatrace-mcp/mcp` with `Authorization: Bearer ${DT_PLATFORM_TOKEN}`)—the user must first look up the tenant environment URL and paste it next to the token, so it is not a paste-an-API-key service"
+ },
+ {
+ "key": "claude-plugins-official/figma/figma",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): the Claude-side record of the same Figma endpoint excluded via openai-plugins/figma/figma — Figma requires a provider-authorized pre-registered app client (its advertised dynamic client registration is 403-gated for anonymous registrations, live-verified 2026-09-13; evidence kept in the committed audit store)"
+ },
+ {
+ "key": "claude-plugins-official/firebase/firebase",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Firebase is a local stdio adapter (`npx -y firebase-tools@latest mcp`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/firestore-native/firestore",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Firestore is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt firestore --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/gitkraken/gitkraken",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): GitKraken is a local stdio adapter (`npx -y @gitkraken/gk mcp --plugin --host=claude`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/gitlab/gitlab",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): GitLab needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/google-cloud-storage/cloud-storage",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Cloud Storage is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt cloud-storage --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/hubspot-sales/hubspot",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): no dynamic client registration is advertised and no self-serve OAuth path could be verified, so readiness stayed honestly unknown"
+ },
+ {
+ "key": "claude-plugins-official/huggingface-skills/huggingface-skills",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Hugging Face needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/jfrog/jfrog",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): JFrog is a tenant-URL endpoint (template `${JFROG_URL}/mcp`)—its only setup input is the instance URL, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/knowledge-catalog/dataplex",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Knowledge Catalog is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt dataplex --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/legalzoom/legalzoom",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): LegalZoom needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post, client_secret_jwt, private_key_jwt, tls_client_auth, self_signed_tls_client_auth), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair; the endpoint path is scoped to the Claude connector catalog, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/logrocket/logrocket",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): the header-pointed protected-resource document fails the engine's protected-resource validation (its resource keeps the path but drops the query string, so the engine fails closed with no well-known fall-through), so no self-serve OAuth path could be verified"
+ },
+ {
+ "key": "claude-plugins-official/looker/looker",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Looker is a local stdio adapter pack (`npx -y @toolbox-sdk/[email protected] --prebuilt looker --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/looker/looker-dev",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Looker is a local stdio adapter pack (`npx -y @toolbox-sdk/[email protected] --prebuilt looker --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/lusha/lusha",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Lusha needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair; the endpoint path is scoped to the Claude connector catalog, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/mapbox/mapbox-docs",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): no authorization-server metadata is reachable for the docs endpoint (well-known responses were 404) and no dynamic client registration is advertised, so no self-serve OAuth path could be verified (readiness stayed unknown)"
+ },
+ {
+ "key": "claude-plugins-official/miro/miro",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Miro needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/monday-crm/monday",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): monday.com needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/mongodb-atlas/mongodb-atlas",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): MongoDB's hosted MCP requires a pre-registered OAuth client for the default interactive path — no dynamic client registration is advertised and a client-id metadata document alone is not oauth-readiness (the documented service-account model is an alternative, not the audited default path)"
+ },
+ {
+ "key": "claude-plugins-official/paypal/paypal-sandbox",
+ "reason": "token-only catalog cut (2026-09-16 product decision: the catalog ships one-click DCR connectors and simple paste-an-API-key/token services only — Kevin, live testing: \"things like cockroachdb cloud still need mcp/ 'requires provider credentials supplied as headers'? i told you to remove all that stuff?\"): PayPal Sandbox is a legacy SSE endpoint (`\"type\": \"sse\", \"url\": \"https://mcp.sandbox.paypal.com/sse\"`) and the generic runtime supports streamable HTTP and stdio only, which the entry itself admitted (`legacy SSE transport; the generic runtime currently supports streamable HTTP and stdio only`)—it cannot connect at all, so shipping it as a token/key connector is dishonest"
+ },
+ {
+ "key": "claude-plugins-official/pigment/pigment",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Pigment is a tenant-URL endpoint (template `https://pigment.app/api/mcp/public/${your-mcp-id}`)—its only setup input is the instance URL, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/pinecone/pinecone",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Pinecone is a local stdio adapter (`npx -y @pinecone-database/mcp`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/planetscale/planetscale",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): PlanetScale needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/prisma/Prisma-Local",
+ "reason": "local stdio utility inside a remote-service plugin; outside the remote service lane"
+ },
+ {
+ "key": "claude-plugins-official/render/render",
+ "reason": "token-only catalog cut (2026-09-16 product decision: the catalog ships one-click DCR connectors and simple paste-an-API-key/token services only — Kevin, live testing: \"things like cockroachdb cloud still need mcp/ 'requires provider credentials supplied as headers'? i told you to remove all that stuff?\"): Render advertised requirement `api-key` but shipped ZERO setup fields—the upstream config carries only a Claude-specific OAuth client identity (`\"oauth\": {\"clientId\": \"claude\"}`) that Prime must not reuse, so the derived entry gives the user nothing to paste and cannot be connected as shipped; an api-key promise with no credential field is unusable, not a simple key paste"
+ },
+ {
+ "key": "claude-plugins-official/sagemaker-ai/aws-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Amazon SageMaker AI is a local stdio adapter (`uvx mcp-proxy-for-aws@latest https://aws-mcp.us-east-1.api.aws/mcp`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/semgrep/guardian",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Semgrep is a local stdio adapter (`<plugin root>/scripts/hook claude mcp`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/slack/slack",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): the Claude-side record of the same Slack endpoint excluded via openai-plugins/slack/slack — Slack requires a Slack-registered app client (no dynamic client registration advertised; confidential-only client auth observed)"
+ },
+ {
+ "key": "claude-plugins-official/sourcegraph/sourcegraph",
+ "reason": "token-only catalog cut (2026-09-16 product decision: the catalog ships one-click DCR connectors and simple paste-an-API-key/token services only — Kevin, live testing: \"things like cockroachdb cloud still need mcp/ 'requires provider credentials supplied as headers'? i told you to remove all that stuff?\"): Sourcegraph is a tenant-instance endpoint (requirement `tenant`, template `${SOURCEGRAPH_ENDPOINT}/.api/mcp` with `Authorization: token ${SOURCEGRAPH_ACCESS_TOKEN}`)—the user must first look up the instance URL and paste it next to the token, so it is not a paste-an-API-key service"
+ },
+ {
+ "key": "claude-plugins-official/spanner/spanner",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Spanner is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt spanner --stdio`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/sumup/sumup",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): no dynamic client registration is advertised and no self-serve OAuth path could be verified, so readiness stayed honestly unknown"
+ },
+ {
+ "key": "claude-plugins-official/supabase/supabase",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Supabase needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/synthflow/synthflow",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): a client-id metadata document is advertised but no dynamic client registration endpoint is, and CIMD alone is never oauth-readiness (no Prime-controlled identity document is deployed), so readiness stayed honestly unknown"
+ },
+ {
+ "key": "claude-plugins-official/synthflow/synthflow-docs",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): no authorization-server metadata is reachable for the docs endpoint (well-known responses were 404) and no dynamic client registration is advertised, so no self-serve OAuth path could be verified (readiness stayed unknown)"
+ },
+ {
+ "key": "claude-plugins-official/telegram/telegram",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Telegram is a local stdio adapter (`bun run --cwd ${CLAUDE_PLUGIN_ROOT} --shell=bun --silent start`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/terraform/terraform",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): HashiCorp HCP Terraform is a local stdio adapter (`docker run -i --rm -e TFE_TOKEN=${TFE_TOKEN} hashicorp/terraform-mcp-server:0.4.0`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/vercel/vercel",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Vercel needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post, client_secret_jwt, private_key_jwt), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/windsor-ai/windsor-ai",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Windsor.ai needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/zoominfo/zoominfo",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): ZoomInfo needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/zscaler/zscaler-mcp-server",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Zscaler is a local stdio adapter (`uvx --env-file ${CLAUDE_PLUGIN_ROOT}/.env [email protected]`)—it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "openai-plugins/datadog/datadog",
+ "reason": "single-credential catalog cut (2026-09-16 product decision, Bugbot findings \"extra pasted credentials never sent\" / \"GitHub alternative tokens both required\": the generic runtime sends exactly ONE Authorization: Bearer per connection, so the shipped paste class collects exactly ONE credential, with multiple fields allowed only as curated alternative names for it): Datadog's endpoint authenticates with the NAMED HEADER pair DD_API_KEY/DD_APPLICATION_KEY plus the X-Datadog-MCP-Toolsets setting (upstream datadog-labs/claude-code-plugin manifest at 195f570c: `https://mcp.datadoghq.com/v1/mcp?...` with headers DD_API_KEY, DD_APPLICATION_KEY), which a single bearer cannot represent—a complete paste of both keys cannot authenticate through the generic runtime, so the entry ships cut rather than mislabeled as pasteable"
+ },
+ {
+ "key": "openai-plugins/figma/figma",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): Figma requires a provider-authorized pre-registered app client — its advertised dynamic client registration is 403-gated for anonymous registrations (live-verified 2026-09-13 during dogfooding; the attempt is kept as evidence in the committed audit store) and its authorization server accepts confidential client auth only"
+ },
+ {
+ "key": "openai-plugins/gmail/gmail",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): Google MCP endpoints are gated behind Developer Preview terms and require Google-registered clients — no dynamic client registration is advertised (confidential-only client auth observed)"
+ },
+ {
+ "key": "openai-plugins/google-calendar/google-calendar",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): Google MCP endpoints are gated behind Developer Preview terms and require Google-registered clients — no dynamic client registration is advertised (confidential-only client auth observed)"
+ },
+ {
+ "key": "openai-plugins/google-drive/google-drive",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): Google MCP endpoints are gated behind Developer Preview terms and require Google-registered clients — no dynamic client registration is advertised (confidential-only client auth observed)"
+ },
+ {
+ "key": "openai-plugins/monday-com/monday-com",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): monday.com needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "openai-plugins/shopify/shopify",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): no dynamic client registration is advertised for the Shopify MCP endpoint and no self-serve OAuth path could be verified, so readiness stayed honestly unknown"
+ },
+ {
+ "key": "openai-plugins/slack/slack",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors — dynamic client registration or user-supplied tokens/keys): Slack requires a Slack-registered app client — no dynamic client registration is advertised and the authorization server accepts confidential client auth only, while the upstream config carries branded OAuth client ids Prime must not reuse"
+ },
+ {
+ "key": "openai-plugins/supabase/supabase",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Supabase needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "openai-plugins/vercel/vercel",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Vercel needs the user's own pre-registered confidential OAuth app—the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post, client_secret_jwt, private_key_jwt), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ }
+ ],
+ "counts": {
+ "total": 68,
+ "http": 68,
+ "httpTemplate": 0,
+ "sse": 0,
+ "stdio": 0,
+ "ready": 57,
+ "requiresSetup": 11,
+ "metadataReviewed": 2,
+ "oauthStrategy": 5,
+ "apiKeyStrategy": 10,
+ "mergedFromBothSources": 10,
+ "readinessOauthReady": 57,
+ "readinessUserSetup": 11,
+ "readinessPrimeRestricted": 0,
+ "readinessUnknown": 0,
+ "metadataAvailable": 66,
+ "metadataUnavailable": 2
+ }
+}
diff --git a/packages/ai/mcp-catalog/overrides.json b/packages/ai/mcp-catalog/overrides.json
new file mode 100644
index 0000000000..70807fc630
--- /dev/null
+++ b/packages/ai/mcp-catalog/overrides.json
@@ -0,0 +1,518 @@
+{
+ "$comment": "Prime-curated adjustments layered on the deterministic import. Keys are '<source>/<plugin>/<server>' identity triples from the pinned fixtures (stdio adapters are keyed '<source>/<plugin>'). This file is review data, never credentials: it can rename ids/labels, group brands, and mark verified/dynamic-registration knowledge, but cannot add OAuth client ids or secrets.",
+ "servers": {
+ "openai-plugins/linear/linear": {
+ "verification": "metadata-reviewed",
+ "clientRegistration": "dynamic",
+ "note": "legacy built-in integration; OAuth dynamic client registration (plus CIMD) reviewed against public provider metadata",
+ "aliases": [
+ "linear-app"
+ ],
+ "legacyBuiltin": true
+ },
+ "openai-plugins/notion/notion": {
+ "verification": "metadata-reviewed",
+ "clientRegistration": "dynamic",
+ "note": "legacy built-in integration; OAuth dynamic client registration (plus CIMD) reviewed against public provider metadata",
+ "aliases": [
+ "notion-workspace"
+ ],
+ "legacyBuiltin": true
+ },
+ "openai-plugins/zoom/zoom": {
+ "id": "zoom-meetings",
+ "label": "Zoom Meetings",
+ "setupReason": "paste your Zoom Meetings access token (ZOOM_MEETINGS_MCP_ACCESS_TOKEN)",
+ "note": "the upstream OpenAI zoom plugin targets the Zoom meetings MCP endpoint; renamed to keep the general zoom endpoint distinct"
+ },
+ "claude-plugins-official/zoom-plugin/zoom-mcp": {
+ "label": "Zoom",
+ "setupReason": "paste your Zoom access token (ZOOM_MCP_ACCESS_TOKEN)"
+ },
+ "claude-plugins-official/zoom-plugin/zoom-chat-mcp": {
+ "label": "Zoom Chat",
+ "setupReason": "paste your Zoom Chat access token (ZOOM_CHAT_MCP_ACCESS_TOKEN)"
+ },
+ "claude-plugins-official/zoom-plugin/zoom-canvas-mcp": {
+ "label": "Zoom Canvas",
+ "setupReason": "paste your Zoom Canvas access token (ZOOM_CANVAS_MCP_ACCESS_TOKEN)"
+ },
+ "claude-plugins-official/zoom-plugin/zoom-tasks-mcp": {
+ "label": "Zoom Tasks",
+ "setupReason": "paste your Zoom Tasks access token (ZOOM_TASKS_MCP_ACCESS_TOKEN)"
+ },
+ "claude-plugins-official/zoom-plugin/zoom-whiteboard-mcp": {
+ "label": "Zoom Whiteboard",
+ "setupReason": "paste your Zoom Whiteboard access token (ZOOM_WHITEBOARD_MCP_ACCESS_TOKEN)"
+ },
+ "claude-plugins-official/zoom-plugin/zoom-revenue-accelerator-mcp": {
+ "label": "Zoom Revenue Accelerator",
+ "setupReason": "paste your Zoom Revenue Accelerator access token (ZOOM_REVENUE_ACCELERATOR_MCP_ACCESS_TOKEN)"
+ },
+ "claude-plugins-official/vanta/vanta-us": {
+ "id": "vanta",
+ "label": "Vanta (US)"
+ },
+ "claude-plugins-official/vanta/vanta-eu": {
+ "label": "Vanta (EU)"
+ },
+ "claude-plugins-official/vanta/vanta-aus": {
+ "label": "Vanta (Australia)"
+ },
+ "claude-plugins-official/cloudinary/cloudinary-asset-mgmt": {
+ "label": "Cloudinary Asset Management"
+ },
+ "claude-plugins-official/cloudinary/cloudinary-env-config": {
+ "label": "Cloudinary Environment Config"
+ },
+ "claude-plugins-official/cloudinary/cloudinary-smd": {
+ "label": "Cloudinary Structured Metadata"
+ },
+ "claude-plugins-official/cloudinary/cloudinary-analysis": {
+ "label": "Cloudinary Analysis"
+ },
+ "claude-plugins-official/cloudinary/cloudinary-mediaflows": {
+ "label": "Cloudinary MediaFlows",
+ "setupReason": "paste your Cloudinary API key and API secret (cld-api-key, cld-secret)"
+ },
+ "claude-plugins-official/mapbox/mapbox": {
+ "label": "Mapbox"
+ },
+ "claude-plugins-official/mapbox/mapbox-devkit": {
+ "label": "Mapbox DevKit"
+ },
+ "claude-plugins-official/atlassian/atlassian": {
+ "label": "Atlassian"
+ },
+ "claude-plugins-official/prisma/Prisma-Remote": {
+ "id": "prisma",
+ "label": "Prisma"
+ },
+ "openai-plugins/datadog/datadog": {
+ "label": "Datadog",
+ "setupReason": "paste your Datadog API key and application key (DD_API_KEY, DD_APPLICATION_KEY)"
+ },
+ "claude-plugins-official/aws-agents-for-devsecops/aws-devops-agent": {
+ "label": "AWS Agents for DevSecOps",
+ "setupReason": "paste your AWS DevSecOps agent token (DEVOPS_AGENT_TOKEN)"
+ },
+ "claude-plugins-official/pagerduty/pagerduty": {
+ "setupReason": "paste your PagerDuty API key (PAGERDUTY_API_KEY)"
+ },
+ "claude-plugins-official/sonatype-guide/sonatype-guide": {
+ "setupReason": "paste your Sonatype Guide token (SONATYPE_GUIDE_TOKEN)"
+ },
+ "openai-plugins/airtable/airtable": {
+ "setup": "ready",
+ "note": "placeholder-only upstream OAuth blocks cleared: provider docs confirm OAuth for the Airtable MCP server and the committed audit evidence confirms a live registration endpoint",
+ "alternatives": [
+ {
+ "kind": "api-key",
+ "readiness": "user-setup",
+ "note": "Airtable also documents personal access tokens as a distinct API access path; OAuth dynamic client registration is the default route for the MCP server",
+ "sourceUrl": "https://airtable.com/developers/agents/mcp/getting-started"
+ }
+ ]
+ },
+ "openai-plugins/github/github": {
+ "setupReason": "paste a GitHub personal access token (GITHUB_PAT_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN)",
+ "setupFields": [
+ {
+ "id": "GITHUB_PAT_TOKEN",
+ "label": "GITHUB_PAT_TOKEN",
+ "description": "Environment variable GITHUB_PAT_TOKEN",
+ "required": true,
+ "kind": "bearer-token",
+ "credentialSet": "github-pat"
+ },
+ {
+ "id": "GITHUB_PERSONAL_ACCESS_TOKEN",
+ "label": "GITHUB_PERSONAL_ACCESS_TOKEN",
+ "description": "Environment variable GITHUB_PERSONAL_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token",
+ "credentialSet": "github-pat"
+ }
+ ],
+ "alternatives": [
+ {
+ "kind": "oauth",
+ "readiness": "unknown",
+ "note": "GitHub's MCP endpoint advertises standard OAuth (PKCE S256 observed) but no dynamic client registration; a Prime-controlled registered client is not established",
+ "sourceUrl": "https://github.com/login/oauth/.well-known/oauth-authorization-server"
+ }
+ ]
+ }
+ },
+ "excludedServers": [
+ {
+ "key": "claude-plugins-official/dropbox/claude_app_mcp",
+ "reason": "Claude-app-specific endpoint variant; the official Dropbox endpoint is imported from the openai catalog"
+ },
+ {
+ "key": "claude-plugins-official/deploy-on-aws/awsknowledge",
+ "reason": "docs-only server per upstream plugin notes; the AWS IaC stdio adapter is recorded for the plugin"
+ }
+,
+ {
+ "key": "openai-plugins/figma/figma",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): Figma requires a provider-authorized pre-registered app client \u2014 its advertised dynamic client registration is 403-gated for anonymous registrations (live-verified 2026-09-13 during dogfooding; the attempt is kept as evidence in the committed audit store) and its authorization server accepts confidential client auth only"
+ },
+ {
+ "key": "claude-plugins-official/figma/figma",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): the Claude-side record of the same Figma endpoint excluded via openai-plugins/figma/figma \u2014 Figma requires a provider-authorized pre-registered app client (its advertised dynamic client registration is 403-gated for anonymous registrations, live-verified 2026-09-13; evidence kept in the committed audit store)"
+ },
+ {
+ "key": "openai-plugins/slack/slack",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): Slack requires a Slack-registered app client \u2014 no dynamic client registration is advertised and the authorization server accepts confidential client auth only, while the upstream config carries branded OAuth client ids Prime must not reuse"
+ },
+ {
+ "key": "claude-plugins-official/slack/slack",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): the Claude-side record of the same Slack endpoint excluded via openai-plugins/slack/slack \u2014 Slack requires a Slack-registered app client (no dynamic client registration advertised; confidential-only client auth observed)"
+ },
+ {
+ "key": "openai-plugins/gmail/gmail",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): Google MCP endpoints are gated behind Developer Preview terms and require Google-registered clients \u2014 no dynamic client registration is advertised (confidential-only client auth observed)"
+ },
+ {
+ "key": "openai-plugins/google-calendar/google-calendar",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): Google MCP endpoints are gated behind Developer Preview terms and require Google-registered clients \u2014 no dynamic client registration is advertised (confidential-only client auth observed)"
+ },
+ {
+ "key": "openai-plugins/google-drive/google-drive",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): Google MCP endpoints are gated behind Developer Preview terms and require Google-registered clients \u2014 no dynamic client registration is advertised (confidential-only client auth observed)"
+ },
+ {
+ "key": "claude-plugins-official/mongodb-atlas/mongodb-atlas",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): MongoDB's hosted MCP requires a pre-registered OAuth client for the default interactive path \u2014 no dynamic client registration is advertised and a client-id metadata document alone is not oauth-readiness (the documented service-account model is an alternative, not the audited default path)"
+ },
+ {
+ "key": "openai-plugins/shopify/shopify",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): no dynamic client registration is advertised for the Shopify MCP endpoint and no self-serve OAuth path could be verified, so readiness stayed honestly unknown"
+ },
+ {
+ "key": "claude-plugins-official/adobe-for-creativity/Adobe for creativity",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): no authorization-server metadata is reachable for the endpoint (well-known responses were 403) and no dynamic client registration is advertised, so no self-serve OAuth path could be verified (readiness stayed unknown)"
+ },
+ {
+ "key": "claude-plugins-official/confidence/confidence-docs",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): the served origin-level protected-resource document fails the engine's audience/structure validation (PRM discovery fails closed), so no self-serve OAuth path could be verified (readiness stayed unknown)"
+ },
+ {
+ "key": "claude-plugins-official/confidence/confidence-flags",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): the served origin-level protected-resource document fails the engine's audience/structure validation (PRM discovery fails closed), so no self-serve OAuth path could be verified (readiness stayed unknown)"
+ },
+ {
+ "key": "claude-plugins-official/hubspot-sales/hubspot",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): no dynamic client registration is advertised and no self-serve OAuth path could be verified, so readiness stayed honestly unknown"
+ },
+ {
+ "key": "claude-plugins-official/logrocket/logrocket",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): the header-pointed protected-resource document fails the engine's protected-resource validation (its resource keeps the path but drops the query string, so the engine fails closed with no well-known fall-through), so no self-serve OAuth path could be verified"
+ },
+ {
+ "key": "claude-plugins-official/mapbox/mapbox-docs",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): no authorization-server metadata is reachable for the docs endpoint (well-known responses were 404) and no dynamic client registration is advertised, so no self-serve OAuth path could be verified (readiness stayed unknown)"
+ },
+ {
+ "key": "claude-plugins-official/sumup/sumup",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): no dynamic client registration is advertised and no self-serve OAuth path could be verified, so readiness stayed honestly unknown"
+ },
+ {
+ "key": "claude-plugins-official/synthflow/synthflow",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): a client-id metadata document is advertised but no dynamic client registration endpoint is, and CIMD alone is never oauth-readiness (no Prime-controlled identity document is deployed), so readiness stayed honestly unknown"
+ },
+ {
+ "key": "claude-plugins-official/synthflow/synthflow-docs",
+ "reason": "zero-app catalog cut (2026-09-14 product decision: Prime maintains no provider OAuth apps; the catalog ships only self-serve connectors \u2014 dynamic client registration or user-supplied tokens/keys): no authorization-server metadata is reachable for the docs endpoint (well-known responses were 404) and no dynamic client registration is advertised, so no self-serve OAuth path could be verified (readiness stayed unknown)"
+ },
+ {
+ "key": "claude-plugins-official/airwallex-agentos/airwallex-agentos",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Airwallex needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/airwallex-agentos/airwallex-dev",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Airwallex (Sandbox) needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/airwallex-dev/airwallex-dev",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Airwallex (Sandbox) needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/atlan/atlan",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Atlan needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/gitlab/gitlab",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): GitLab needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/huggingface-skills/huggingface-skills",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Hugging Face needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/legalzoom/legalzoom",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): LegalZoom needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post, client_secret_jwt, private_key_jwt, tls_client_auth, self_signed_tls_client_auth), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair; the endpoint path is scoped to the Claude connector catalog, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/lusha/lusha",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Lusha needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair; the endpoint path is scoped to the Claude connector catalog, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/miro/miro",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Miro needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/monday-crm/monday",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): monday.com needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "openai-plugins/monday-com/monday-com",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): monday.com needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/planetscale/planetscale",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): PlanetScale needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/supabase/supabase",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Supabase needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "openai-plugins/supabase/supabase",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Supabase needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/vercel/vercel",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Vercel needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post, client_secret_jwt, private_key_jwt), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "openai-plugins/vercel/vercel",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Vercel needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post, client_secret_jwt, private_key_jwt), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/windsor-ai/windsor-ai",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Windsor.ai needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_post, client_secret_basic), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/zoominfo/zoominfo",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): ZoomInfo needs the user's own pre-registered confidential OAuth app\u2014the authorization server accepts only secret-bearing client auth (client_secret_basic, client_secret_post), so the engine's no-credentials public-client flow fails its client-auth compatibility gate and the only self-serve path is a client-id/client-secret pair, neither one-click DCR nor a user token/api key"
+ },
+ {
+ "key": "claude-plugins-official/aikido/aikido-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Aikido is a local stdio adapter (`npx -y @aikidosec/[email protected]`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/alloydb/alloydb-postgres",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AlloyDB is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt alloydb-postgres --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/amazon-location-service/aws-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Amazon Location Service is a local stdio adapter (`uvx mcp-proxy-for-aws@latest https://aws-mcp.us-east-1.api.aws/mcp`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/aws-amplify/aws-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AWS Amplify is a local stdio adapter (`uvx mcp-proxy-for-aws@latest https://aws-mcp.us-east-1.api.aws/mcp`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/aws-core/aws-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AWS Core is a local stdio adapter (`uvx mcp-proxy-for-aws-cli@latest https://aws-mcp.us-east-1.api.aws/mcp --skip-auth --metadata INSTALL_SOURCE=agent-toolkit-core`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/aws-data-analytics/aws-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AWS Data Analytics is a local stdio adapter (`uvx mcp-proxy-for-aws-cli@latest https://aws-mcp.us-east-1.api.aws/mcp --skip-auth --metadata INSTALL_SOURCE=agent-toolkit-data-analytics`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/aws-serverless/aws-serverless-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AWS Serverless is a local stdio adapter (`uvx awslabs.aws-serverless-mcp-server@latest --allow-write`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/aws-transform/aws-transform-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): AWS Transform is a local stdio adapter (`uvx awslabs.aws-transform-mcp-server@latest`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/azure/azure",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Microsoft Azure is a local stdio adapter (`npx -y @azure/mcp@latest server start`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/bigquery-data-analytics/bigquery",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): BigQuery is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt bigquery --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/cloud-sql-mysql/cloud-sql-mysql",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Cloud SQL for MySQL is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt cloud-sql-mysql --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/cloud-sql-postgresql/cloud-sql-postgres",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Cloud SQL for PostgreSQL is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt cloud-sql-postgres --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/cloud-sql-sqlserver/cloud-sql-mssql",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Cloud SQL for SQL Server is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt cloud-sql-mssql --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/convex/convex",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Convex is a local stdio adapter (`npx -y convex@latest mcp start`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/alloydb-postgres",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)\u2014each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/bigquery",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)\u2014each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/bigtable",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)\u2014each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/cloud-sql-postgresql",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)\u2014each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/cloud-storage",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)\u2014each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/dataproc",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)\u2014each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/knowledge_catalog",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)\u2014each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/notebook",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)\u2014each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/spanner",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)\u2014each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/data-agent-kit-starter-pack/visualization",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Data Agent Kit is a local stdio adapter pack (10 bundled local servers)\u2014each runs in the user's local environment with local toolchain/credential-chain auth, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/dataproc/dataproc",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Dataproc is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt dataproc --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/deploy-on-aws/awsiac",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Deploy on AWS is a local stdio adapter pack (`uvx awslabs.aws-iac-mcp-server@latest`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/deploy-on-aws/awspricing",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Deploy on AWS is a local stdio adapter pack (`uvx awslabs.aws-iac-mcp-server@latest`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/discord/discord",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Discord is a local stdio adapter (`bun run --cwd ${CLAUDE_PLUGIN_ROOT} --shell=bun --silent start`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/dominodatalab/domino_server",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Domino Data Lab is a local stdio adapter (`uv --directory $/mnt/code/.claude/mcp-servers/domino_mcp_server run domino_mcp_server.py`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/firebase/firebase",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Firebase is a local stdio adapter (`npx -y firebase-tools@latest mcp`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/firestore-native/firestore",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Firestore is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt firestore --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/gitkraken/gitkraken",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): GitKraken is a local stdio adapter (`npx -y @gitkraken/gk mcp --plugin --host=claude`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/google-cloud-storage/cloud-storage",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Google Cloud Storage is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt cloud-storage --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/knowledge-catalog/dataplex",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Knowledge Catalog is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt dataplex --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/looker/looker",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Looker is a local stdio adapter pack (`npx -y @toolbox-sdk/[email protected] --prebuilt looker --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/looker/looker-dev",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Looker is a local stdio adapter pack (`npx -y @toolbox-sdk/[email protected] --prebuilt looker --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/pinecone/pinecone",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Pinecone is a local stdio adapter (`npx -y @pinecone-database/mcp`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/sagemaker-ai/aws-mcp",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Amazon SageMaker AI is a local stdio adapter (`uvx mcp-proxy-for-aws@latest https://aws-mcp.us-east-1.api.aws/mcp`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/semgrep/guardian",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Semgrep is a local stdio adapter (`<plugin root>/scripts/hook claude mcp`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/spanner/spanner",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Spanner is a local stdio adapter (`npx -y @toolbox-sdk/[email protected] --prebuilt spanner --stdio`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/telegram/telegram",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Telegram is a local stdio adapter (`bun run --cwd ${CLAUDE_PLUGIN_ROOT} --shell=bun --silent start`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/terraform/terraform",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): HashiCorp HCP Terraform is a local stdio adapter (`docker run -i --rm -e TFE_TOKEN=${TFE_TOKEN} hashicorp/terraform-mcp-server:0.4.0`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/zscaler/zscaler-mcp-server",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Zscaler is a local stdio adapter (`uvx --env-file ${CLAUDE_PLUGIN_ROOT}/.env [email protected]`)\u2014it runs in the user's local environment against the local toolchain/credential chain, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/activecampaign/activecampaign",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): ActiveCampaign is a tenant-URL endpoint (template `${user_config.server_url}`)\u2014its only setup input is the instance URL, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/jfrog/jfrog",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): JFrog is a tenant-URL endpoint (template `${JFROG_URL}/mcp`)\u2014its only setup input is the instance URL, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/pigment/pigment",
+ "reason": "final catalog cut (2026-09-15 product decision: the catalog ships one-click DCR or user token/key only): Pigment is a tenant-URL endpoint (template `https://pigment.app/api/mcp/public/${your-mcp-id}`)\u2014its only setup input is the instance URL, with no one-click DCR and no provider token/api key"
+ },
+ {
+ "key": "claude-plugins-official/paypal/paypal-sandbox",
+ "reason": "token-only catalog cut (2026-09-16 product decision: the catalog ships one-click DCR connectors and simple paste-an-API-key/token services only \u2014 Kevin, live testing: \"things like cockroachdb cloud still need mcp/ 'requires provider credentials supplied as headers'? i told you to remove all that stuff?\"): PayPal Sandbox is a legacy SSE endpoint (`\"type\": \"sse\", \"url\": \"https://mcp.sandbox.paypal.com/sse\"`) and the generic runtime supports streamable HTTP and stdio only, which the entry itself admitted (`legacy SSE transport; the generic runtime currently supports streamable HTTP and stdio only`)\u2014it cannot connect at all, so shipping it as a token/key connector is dishonest"
+ },
+ {
+ "key": "claude-plugins-official/cockroachdb/cockroachdb-cloud",
+ "reason": "token-only catalog cut (2026-09-16 product decision: the catalog ships one-click DCR connectors and simple paste-an-API-key/token services only \u2014 Kevin, live testing: \"things like cockroachdb cloud still need mcp/ 'requires provider credentials supplied as headers'? i told you to remove all that stuff?\"): CockroachDB Cloud is a tenant config, not a key paste\u2014its only setup input is the per-cluster header `mcp-cluster-id: ${COCKROACHDB_CLUSTER_ID}` (requirement `tenant`, one `env-var` field, no api-key/token field at all), and it shipped the scary derived reason `requires provider credentials supplied as headers` that Kevin named in the callout above"
+ },
+ {
+ "key": "claude-plugins-official/dynatrace/dynatrace",
+ "reason": "token-only catalog cut (2026-09-16 product decision: the catalog ships one-click DCR connectors and simple paste-an-API-key/token services only \u2014 Kevin, live testing: \"things like cockroachdb cloud still need mcp/ 'requires provider credentials supplied as headers'? i told you to remove all that stuff?\"): Dynatrace is a tenant-instance endpoint (requirement `tenant`, template `${DT_ENVIRONMENT}/platform-reserved/mcp-gateway/v0.1/servers/dynatrace-mcp/mcp` with `Authorization: Bearer ${DT_PLATFORM_TOKEN}`)\u2014the user must first look up the tenant environment URL and paste it next to the token, so it is not a paste-an-API-key service"
+ },
+ {
+ "key": "claude-plugins-official/sourcegraph/sourcegraph",
+ "reason": "token-only catalog cut (2026-09-16 product decision: the catalog ships one-click DCR connectors and simple paste-an-API-key/token services only \u2014 Kevin, live testing: \"things like cockroachdb cloud still need mcp/ 'requires provider credentials supplied as headers'? i told you to remove all that stuff?\"): Sourcegraph is a tenant-instance endpoint (requirement `tenant`, template `${SOURCEGRAPH_ENDPOINT}/.api/mcp` with `Authorization: token ${SOURCEGRAPH_ACCESS_TOKEN}`)\u2014the user must first look up the instance URL and paste it next to the token, so it is not a paste-an-API-key service"
+ },
+ {
+ "key": "claude-plugins-official/render/render",
+ "reason": "token-only catalog cut (2026-09-16 product decision: the catalog ships one-click DCR connectors and simple paste-an-API-key/token services only \u2014 Kevin, live testing: \"things like cockroachdb cloud still need mcp/ 'requires provider credentials supplied as headers'? i told you to remove all that stuff?\"): Render advertised requirement `api-key` but shipped ZERO setup fields\u2014the upstream config carries only a Claude-specific OAuth client identity (`\"oauth\": {\"clientId\": \"claude\"}`) that Prime must not reuse, so the derived entry gives the user nothing to paste and cannot be connected as shipped; an api-key promise with no credential field is unusable, not a simple key paste"
+ },
+ {
+ "key": "openai-plugins/datadog/datadog",
+ "reason": "single-credential catalog cut (2026-09-16 product decision, Bugbot findings \"extra pasted credentials never sent\" / \"GitHub alternative tokens both required\": the generic runtime sends exactly ONE Authorization: Bearer per connection, so the shipped paste class collects exactly ONE credential, with multiple fields allowed only as curated alternative names for it): Datadog's endpoint authenticates with the NAMED HEADER pair DD_API_KEY/DD_APPLICATION_KEY plus the X-Datadog-MCP-Toolsets setting (upstream datadog-labs/claude-code-plugin manifest at 195f570c: `https://mcp.datadoghq.com/v1/mcp?...` with headers DD_API_KEY, DD_APPLICATION_KEY), which a single bearer cannot represent\u2014a complete paste of both keys cannot authenticate through the generic runtime, so the entry ships cut rather than mislabeled as pasteable"
+ },
+ {
+ "key": "claude-plugins-official/datadog/mcp",
+ "reason": "single-credential catalog cut (2026-09-16 product decision, Bugbot findings \"extra pasted credentials never sent\" / \"GitHub alternative tokens both required\": the generic runtime sends exactly ONE Authorization: Bearer per connection, so the shipped paste class collects exactly ONE credential, with multiple fields allowed only as curated alternative names for it): the Claude-side record of the same Datadog endpoint excluded via openai-plugins/datadog/datadog\u2014its manifest authenticates with the NAMED HEADER pair DD_API_KEY/DD_APPLICATION_KEY plus the X-Datadog-MCP-Toolsets setting and its URL is the `${DD_MCP_DOMAIN}` template, which a single bearer and a concrete endpoint cannot represent"
+ },
+ {
+ "key": "claude-plugins-official/cloudinary/cloudinary-mediaflows",
+ "reason": "single-credential catalog cut (2026-09-16 product decision, Bugbot findings \"extra pasted credentials never sent\" / \"GitHub alternative tokens both required\": the generic runtime sends exactly ONE Authorization: Bearer per connection, so the shipped paste class collects exactly ONE credential, with multiple fields allowed only as curated alternative names for it): Cloudinary MediaFlows authenticates with the NAMED HEADER pair cld-api-key/cld-secret (upstream cloudinary-devs/cloudinary-plugin manifest at 86be534: `https://mediaflows.mcp.cloudinary.com/v2/mcp` with headers cld-cloud-name, cld-api-key, cld-secret), which a single bearer cannot represent\u2014a complete paste of the key and secret cannot authenticate through the generic runtime, so the entry ships cut rather than mislabeled as pasteable"
+ }
+ ]
+}
diff --git a/packages/ai/mcp-catalog/sources/claude-plugins-official.json b/packages/ai/mcp-catalog/sources/claude-plugins-official.json
new file mode 100644
index 0000000000..ba35d0fb14
--- /dev/null
+++ b/packages/ai/mcp-catalog/sources/claude-plugins-official.json
@@ -0,0 +1,3060 @@
+{
+ "$comment": "Pinned snapshot of the verified bundled service plugins in Anthropic's public claude-plugins-official catalog. Derived 2026-09-11 by resolving the marketplace at the pinned catalog commit to each provider repository/commit (read-only HTTP, no plugin code executed, no auth). Claude auto-discovers a root .mcp.json; manifest-wired non-default paths were also inspected. This file is an import input, not the shipped catalog; provider configs are preserved verbatim (including Claude-specific OAuth client references, which the importer strips) so imports stay reproducible without network access.",
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/anthropics/claude-plugins-official",
+ "catalogCommit": "3deb821cb71ccfaaf2ffa9935e977df314ce5cd5",
+ "catalogUrl": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/.claude-plugin/marketplace.json",
+ "scope": "Plugins whose bundled config is a direct remote service MCP (86) or a stdio SaaS adapter (32). Excluded upstream categories: no_declared_mcp (138), local_utility_or_self_hosted_db (19), conditional_service_adapter (6), hosted_docs_only (8), hosted_search_data_or_public_pricing (5), unresolved_service_scope (1).",
+ "counts": {
+ "plugins": 118,
+ "directRemoteService": 86,
+ "stdioServiceAdapter": 32
+ },
+ "plugins": [
+ {
+ "name": "activecampaign",
+ "category": "direct_remote_service",
+ "providers": [
+ "ActiveCampaign"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/ActiveCampaign/activecampaign-plugin.git",
+ "sha": "0ff858728bc52aee335d5475b0d4eb5f3a9589b0"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/ActiveCampaign/activecampaign-plugin/0ff858728bc52aee335d5475b0d4eb5f3a9589b0/",
+ "configUrl": "https://raw.githubusercontent.com/ActiveCampaign/activecampaign-plugin/0ff858728bc52aee335d5475b0d4eb5f3a9589b0/.mcp.json",
+ "mcpServers": {
+ "activecampaign": {
+ "type": "http",
+ "url": "${user_config.server_url}"
+ }
+ }
+ },
+ {
+ "name": "adobe-for-creativity",
+ "category": "direct_remote_service",
+ "providers": [
+ "Adobe"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/adobe/skills.git",
+ "path": "plugins/creative-cloud/adobe-for-creativity",
+ "ref": "main",
+ "sha": "1307e2c03b9cd20c49872be8cbdfda7ee9aa8c7e"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/adobe/skills/1307e2c03b9cd20c49872be8cbdfda7ee9aa8c7e/plugins/creative-cloud/adobe-for-creativity/",
+ "configUrl": "https://raw.githubusercontent.com/adobe/skills/1307e2c03b9cd20c49872be8cbdfda7ee9aa8c7e/plugins/creative-cloud/adobe-for-creativity/.mcp.json",
+ "mcpServers": {
+ "Adobe for creativity": {
+ "type": "http",
+ "url": "https://adobe-creativity.adobe.io/mcp"
+ }
+ }
+ },
+ {
+ "name": "aikido",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Aikido"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/AikidoSec/aikido-claude-plugin.git",
+ "sha": "5db259bac62bf0c3a37bfd0fee6e22cc25bdb704"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/AikidoSec/aikido-claude-plugin/5db259bac62bf0c3a37bfd0fee6e22cc25bdb704/",
+ "configUrl": "https://raw.githubusercontent.com/AikidoSec/aikido-claude-plugin/5db259bac62bf0c3a37bfd0fee6e22cc25bdb704/.mcp.json",
+ "mcpServers": {
+ "aikido-mcp": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@aikidosec/[email protected]"
+ ]
+ }
+ }
+ },
+ {
+ "name": "airtable",
+ "category": "direct_remote_service",
+ "providers": [
+ "Airtable"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/Airtable/skills.git",
+ "path": "plugins/airtable",
+ "ref": "main",
+ "sha": "812ee67f1fd3d76fb45ff8df40afaa0448602ba8"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/Airtable/skills/812ee67f1fd3d76fb45ff8df40afaa0448602ba8/plugins/airtable/",
+ "configUrl": "https://raw.githubusercontent.com/Airtable/skills/812ee67f1fd3d76fb45ff8df40afaa0448602ba8/plugins/airtable/.mcp.json",
+ "mcpServers": {
+ "airtable": {
+ "type": "http",
+ "url": "https://mcp.airtable.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "airwallex-agentos",
+ "category": "direct_remote_service",
+ "providers": [
+ "Airwallex"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/airwallex/airwallex-marketplace.git",
+ "path": "plugins/airwallex-agentos",
+ "ref": "master",
+ "sha": "d323dd68c85874f6311a1bd20184f803a96e09a9"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/airwallex/airwallex-marketplace/d323dd68c85874f6311a1bd20184f803a96e09a9/plugins/airwallex-agentos/",
+ "configUrl": "https://raw.githubusercontent.com/airwallex/airwallex-marketplace/d323dd68c85874f6311a1bd20184f803a96e09a9/plugins/airwallex-agentos/.mcp.json",
+ "mcpServers": {
+ "airwallex-dev": {
+ "type": "http",
+ "url": "https://mcp.sandbox.airwallex.com/developer"
+ },
+ "airwallex-agentos": {
+ "type": "http",
+ "url": "https://mcp.airwallex.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "airwallex-dev",
+ "category": "direct_remote_service",
+ "providers": [
+ "Airwallex"
+ ],
+ "notes": "Developer endpoint supports current docs AND sandbox API calls (pinned README); not docs-only.",
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/airwallex/airwallex-marketplace.git",
+ "path": "plugins/airwallex-dev",
+ "ref": "master",
+ "sha": "d4593e33a9e1177a44b895ca0a1d6e015215736f"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/airwallex/airwallex-marketplace/d4593e33a9e1177a44b895ca0a1d6e015215736f/plugins/airwallex-dev/",
+ "configUrl": "https://raw.githubusercontent.com/airwallex/airwallex-marketplace/d4593e33a9e1177a44b895ca0a1d6e015215736f/plugins/airwallex-dev/.mcp.json",
+ "mcpServers": {
+ "airwallex-dev": {
+ "type": "http",
+ "url": "https://mcp.sandbox.airwallex.com/developer"
+ }
+ }
+ },
+ {
+ "name": "aiven",
+ "category": "direct_remote_service",
+ "providers": [
+ "Aiven"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/aiven/aiven-ai-plugins.git",
+ "sha": "634f41d6852957cb9280e9245f2ea6f74645b4f1"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/aiven/aiven-ai-plugins/634f41d6852957cb9280e9245f2ea6f74645b4f1/",
+ "configUrl": "https://raw.githubusercontent.com/aiven/aiven-ai-plugins/634f41d6852957cb9280e9245f2ea6f74645b4f1/.mcp.json",
+ "mcpServers": {
+ "aiven": {
+ "type": "http",
+ "url": "https://mcp.aiven.live/mcp"
+ }
+ }
+ },
+ {
+ "name": "alloydb",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/alloydb.git",
+ "sha": "00ee6ce2bcf88b46da4bf298a3ad8c0ad85877c8"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/alloydb/00ee6ce2bcf88b46da4bf298a3ad8c0ad85877c8/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/alloydb/00ee6ce2bcf88b46da4bf298a3ad8c0ad85877c8/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "alloydb-postgres": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "alloydb-postgres",
+ "--stdio"
+ ],
+ "env": {
+ "ALLOYDB_POSTGRES_PROJECT": "${user_config.alloydb_postgres_project}",
+ "ALLOYDB_POSTGRES_REGION": "${user_config.alloydb_postgres_region}",
+ "ALLOYDB_POSTGRES_CLUSTER": "${user_config.alloydb_postgres_cluster}",
+ "ALLOYDB_POSTGRES_INSTANCE": "${user_config.alloydb_postgres_instance}",
+ "ALLOYDB_POSTGRES_DATABASE": "${user_config.alloydb_postgres_database}",
+ "ALLOYDB_POSTGRES_USER": "${user_config.alloydb_postgres_user}",
+ "ALLOYDB_POSTGRES_PASSWORD": "${user_config.alloydb_postgres_password}",
+ "ALLOYDB_POSTGRES_IP_TYPE": "${user_config.alloydb_postgres_ip_type}"
+ }
+ }
+ }
+ },
+ {
+ "name": "amazon-location-service",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Amazon Web Services"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/awslabs/agent-plugins.git",
+ "path": "plugins/amazon-location-service",
+ "ref": "main",
+ "sha": "9898ddc4dcf7dd23ddb939cec1b905311dc7381d"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/awslabs/agent-plugins/9898ddc4dcf7dd23ddb939cec1b905311dc7381d/plugins/amazon-location-service/",
+ "configUrl": "https://raw.githubusercontent.com/awslabs/agent-plugins/9898ddc4dcf7dd23ddb939cec1b905311dc7381d/plugins/amazon-location-service/.mcp.json",
+ "mcpServers": {
+ "aws-mcp": {
+ "args": [
+ "mcp-proxy-for-aws@latest",
+ "https://aws-mcp.us-east-1.api.aws/mcp"
+ ],
+ "command": "uvx"
+ }
+ }
+ },
+ {
+ "name": "amplitude",
+ "category": "direct_remote_service",
+ "providers": [
+ "Amplitude"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/amplitude/mcp-marketplace.git",
+ "path": "plugins/amplitude",
+ "ref": "main",
+ "sha": "96fc7d4c58bb33b4e60c334d34ad944c8a246869"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/amplitude/mcp-marketplace/96fc7d4c58bb33b4e60c334d34ad944c8a246869/plugins/amplitude/",
+ "configUrl": "https://raw.githubusercontent.com/amplitude/mcp-marketplace/96fc7d4c58bb33b4e60c334d34ad944c8a246869/plugins/amplitude/.mcp.json",
+ "mcpServers": {
+ "amplitude": {
+ "type": "http",
+ "url": "https://mcp.amplitude.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "apollo",
+ "category": "direct_remote_service",
+ "providers": [
+ "Apollo.io"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/apolloio/apollo-mcp-plugin.git",
+ "sha": "2adde980e45f421b7e9383d92870455627936bce"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/apolloio/apollo-mcp-plugin/2adde980e45f421b7e9383d92870455627936bce/",
+ "configUrl": "https://raw.githubusercontent.com/apolloio/apollo-mcp-plugin/2adde980e45f421b7e9383d92870455627936bce/.mcp.json",
+ "mcpServers": {
+ "apollo": {
+ "type": "http",
+ "url": "https://mcp.apollo.io/mcp"
+ }
+ }
+ },
+ {
+ "name": "appwrite",
+ "category": "direct_remote_service",
+ "providers": [
+ "Appwrite"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/appwrite/claude-plugin.git",
+ "sha": "ab3c90b37c95b7068f0c064dc562cf21958e8e19"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/appwrite/claude-plugin/ab3c90b37c95b7068f0c064dc562cf21958e8e19/",
+ "configUrl": "https://raw.githubusercontent.com/appwrite/claude-plugin/ab3c90b37c95b7068f0c064dc562cf21958e8e19/.mcp.json",
+ "mcpServers": {
+ "appwrite": {
+ "type": "http",
+ "url": "https://mcp.appwrite.io/"
+ }
+ }
+ },
+ {
+ "name": "atlan",
+ "category": "direct_remote_service",
+ "providers": [
+ "Atlan"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/atlanhq/agent-toolkit.git",
+ "sha": "86bb1ad27f80e189b328333d2271b360ae579f2b"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/atlanhq/agent-toolkit/86bb1ad27f80e189b328333d2271b360ae579f2b/",
+ "configUrl": "https://raw.githubusercontent.com/atlanhq/agent-toolkit/86bb1ad27f80e189b328333d2271b360ae579f2b/.mcp.json",
+ "mcpServers": {
+ "atlan": {
+ "type": "http",
+ "url": "https://mcp.atlan.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "atlassian",
+ "category": "direct_remote_service",
+ "providers": [
+ "Atlassian"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/atlassian/atlassian-mcp-server.git",
+ "sha": "7e9591607a5ae6c7e8f58c821da7af96fd1d8200"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/atlassian/atlassian-mcp-server/7e9591607a5ae6c7e8f58c821da7af96fd1d8200/",
+ "configUrl": "https://raw.githubusercontent.com/atlassian/atlassian-mcp-server/7e9591607a5ae6c7e8f58c821da7af96fd1d8200/.mcp.json",
+ "mcpServers": {
+ "atlassian": {
+ "type": "http",
+ "url": "https://mcp.atlassian.com/v2/mcp"
+ }
+ }
+ },
+ {
+ "name": "aws-agents-for-devsecops",
+ "category": "direct_remote_service",
+ "providers": [
+ "Amazon Web Services"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/aws/agent-toolkit-for-aws.git",
+ "path": "plugins/aws-agents-for-devsecops",
+ "ref": "main",
+ "sha": "68d9e8541c45afd2510662bcea69fe1e433ea9db"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/aws/agent-toolkit-for-aws/68d9e8541c45afd2510662bcea69fe1e433ea9db/plugins/aws-agents-for-devsecops/",
+ "configUrl": "https://raw.githubusercontent.com/aws/agent-toolkit-for-aws/68d9e8541c45afd2510662bcea69fe1e433ea9db/plugins/aws-agents-for-devsecops/.mcp.json",
+ "mcpServers": {
+ "aws-devops-agent": {
+ "type": "http",
+ "url": "https://connect.aidevops.${DEVOPS_AGENT_REGION:-us-east-1}.api.aws/mcp",
+ "headers": {
+ "Authorization": "Bearer ${DEVOPS_AGENT_TOKEN}"
+ },
+ "timeout": 120000
+ }
+ }
+ },
+ {
+ "name": "aws-amplify",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Amazon Web Services"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/awslabs/agent-plugins.git",
+ "path": "plugins/aws-amplify",
+ "ref": "main",
+ "sha": "c65ee436b0db77bb75d380aef6fbdc9b114edf2a"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/awslabs/agent-plugins/c65ee436b0db77bb75d380aef6fbdc9b114edf2a/plugins/aws-amplify/",
+ "configUrl": "https://raw.githubusercontent.com/awslabs/agent-plugins/c65ee436b0db77bb75d380aef6fbdc9b114edf2a/plugins/aws-amplify/.mcp.json",
+ "mcpServers": {
+ "aws-mcp": {
+ "args": [
+ "mcp-proxy-for-aws@latest",
+ "https://aws-mcp.us-east-1.api.aws/mcp"
+ ],
+ "command": "uvx"
+ }
+ }
+ },
+ {
+ "name": "aws-core",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Amazon Web Services"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/aws/agent-toolkit-for-aws.git",
+ "path": "plugins/aws-core",
+ "ref": "main",
+ "sha": "fe6cf8776cc2e9eeb782427950943b01dc0934a6"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/aws/agent-toolkit-for-aws/fe6cf8776cc2e9eeb782427950943b01dc0934a6/plugins/aws-core/",
+ "configUrl": "https://raw.githubusercontent.com/aws/agent-toolkit-for-aws/fe6cf8776cc2e9eeb782427950943b01dc0934a6/plugins/aws-core/.mcp.json",
+ "mcpServers": {
+ "aws-mcp": {
+ "command": "uvx",
+ "args": [
+ "mcp-proxy-for-aws-cli@latest",
+ "https://aws-mcp.us-east-1.api.aws/mcp",
+ "--skip-auth",
+ "--metadata",
+ "INSTALL_SOURCE=agent-toolkit-core"
+ ]
+ }
+ }
+ },
+ {
+ "name": "aws-data-analytics",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Amazon Web Services"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/aws/agent-toolkit-for-aws.git",
+ "path": "plugins/aws-data-analytics",
+ "ref": "main",
+ "sha": "08ad220e4e9bbc498821ce9360b3dcdf4813121d"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/aws/agent-toolkit-for-aws/08ad220e4e9bbc498821ce9360b3dcdf4813121d/plugins/aws-data-analytics/",
+ "configUrl": "https://raw.githubusercontent.com/aws/agent-toolkit-for-aws/08ad220e4e9bbc498821ce9360b3dcdf4813121d/plugins/aws-data-analytics/.mcp.json",
+ "mcpServers": {
+ "aws-mcp": {
+ "command": "uvx",
+ "args": [
+ "mcp-proxy-for-aws-cli@latest",
+ "https://aws-mcp.us-east-1.api.aws/mcp",
+ "--skip-auth",
+ "--metadata",
+ "INSTALL_SOURCE=agent-toolkit-data-analytics"
+ ]
+ }
+ }
+ },
+ {
+ "name": "aws-serverless",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Amazon Web Services"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/awslabs/agent-plugins.git",
+ "path": "plugins/aws-serverless",
+ "ref": "main",
+ "sha": "34afdf5005325f17d5da2d1443b87f27a53b0a20"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/awslabs/agent-plugins/34afdf5005325f17d5da2d1443b87f27a53b0a20/plugins/aws-serverless/",
+ "configUrl": "https://raw.githubusercontent.com/awslabs/agent-plugins/34afdf5005325f17d5da2d1443b87f27a53b0a20/plugins/aws-serverless/.mcp.json",
+ "mcpServers": {
+ "aws-serverless-mcp": {
+ "command": "uvx",
+ "args": [
+ "awslabs.aws-serverless-mcp-server@latest",
+ "--allow-write"
+ ],
+ "env": {
+ "FASTMCP_LOG_LEVEL": "ERROR"
+ },
+ "timeout": 120000
+ }
+ }
+ },
+ {
+ "name": "aws-transform",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Amazon Web Services"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/awslabs/agent-plugins.git",
+ "path": "plugins/aws-transform",
+ "ref": "main",
+ "sha": "adc01133bbd01433dcb2c0f98641f2b85694f92f"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/awslabs/agent-plugins/adc01133bbd01433dcb2c0f98641f2b85694f92f/plugins/aws-transform/",
+ "configUrl": "https://raw.githubusercontent.com/awslabs/agent-plugins/adc01133bbd01433dcb2c0f98641f2b85694f92f/plugins/aws-transform/.mcp.json",
+ "mcpServers": {
+ "aws-transform-mcp": {
+ "command": "uvx",
+ "args": [
+ "awslabs.aws-transform-mcp-server@latest"
+ ]
+ }
+ }
+ },
+ {
+ "name": "azure",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Microsoft Azure"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/microsoft/azure-skills.git",
+ "sha": "bc9939f8ca1ae8e3da8e6ae647e0d1d22e3a424a"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/microsoft/azure-skills/bc9939f8ca1ae8e3da8e6ae647e0d1d22e3a424a/",
+ "configUrl": "https://raw.githubusercontent.com/microsoft/azure-skills/bc9939f8ca1ae8e3da8e6ae647e0d1d22e3a424a/.mcp.json",
+ "mcpServers": {
+ "azure": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@azure/mcp@latest",
+ "server",
+ "start"
+ ]
+ }
+ }
+ },
+ {
+ "name": "bigquery-data-analytics",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/bigquery-data-analytics.git",
+ "sha": "9870fce2723360135948b039bab03bc81ed814c8"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/bigquery-data-analytics/9870fce2723360135948b039bab03bc81ed814c8/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/bigquery-data-analytics/9870fce2723360135948b039bab03bc81ed814c8/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "bigquery": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "bigquery",
+ "--stdio"
+ ],
+ "env": {
+ "BIGQUERY_PROJECT": "${user_config.bigquery_project}",
+ "BIGQUERY_LOCATION": "${user_config.bigquery_location}"
+ }
+ }
+ }
+ },
+ {
+ "name": "canva",
+ "category": "direct_remote_service",
+ "providers": [
+ "Canva"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/canva-sdks/canva-skills.git",
+ "path": "plugins/canva",
+ "ref": "main",
+ "sha": "b56291ea0a36d0a941e1478b47959be5f1771dee"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/canva-sdks/canva-skills/b56291ea0a36d0a941e1478b47959be5f1771dee/plugins/canva/",
+ "configUrl": "https://raw.githubusercontent.com/canva-sdks/canva-skills/b56291ea0a36d0a941e1478b47959be5f1771dee/plugins/canva/.mcp.json",
+ "mcpServers": {
+ "canva": {
+ "type": "http",
+ "url": "https://mcp.canva.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "catalyst-by-zoho",
+ "category": "direct_remote_service",
+ "providers": [
+ "Zoho Catalyst"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/catalystbyzoho/claude-plugin.git",
+ "sha": "9670b79d72fe4923cc845ca0414d009ef3684ccb"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/catalystbyzoho/claude-plugin/9670b79d72fe4923cc845ca0414d009ef3684ccb/",
+ "configUrl": "https://raw.githubusercontent.com/catalystbyzoho/claude-plugin/9670b79d72fe4923cc845ca0414d009ef3684ccb/.mcp.json",
+ "mcpServers": {
+ "catalyst-by-zoho": {
+ "type": "streamable-http",
+ "url": "https://catalyst.zohomcp.com/mcp/message",
+ "_note": "This is the US data center endpoint. If your Catalyst account is on a different DC (EU, IN, AU, JP, SA, CA, UAE), ask the AI assistant to help you switch — it will guide you to the correct endpoint for your region."
+ }
+ }
+ },
+ {
+ "name": "circleback",
+ "category": "direct_remote_service",
+ "providers": [
+ "Circleback"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/circlebackai/claude-code-plugin.git",
+ "sha": "a610634c95ab310accf20a0cabdf0fa7ab784fa3"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/circlebackai/claude-code-plugin/a610634c95ab310accf20a0cabdf0fa7ab784fa3/",
+ "configUrl": "https://raw.githubusercontent.com/circlebackai/claude-code-plugin/a610634c95ab310accf20a0cabdf0fa7ab784fa3/.mcp.json",
+ "mcpServers": {
+ "circleback": {
+ "type": "http",
+ "url": "https://circleback.ai/api/mcp"
+ }
+ }
+ },
+ {
+ "name": "clickhouse",
+ "category": "direct_remote_service",
+ "providers": [
+ "ClickHouse"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/ClickHouse/clickhouse-claude-code-plugin.git",
+ "sha": "988a7a39834af9c9e14ec3650365243e2cfc6882"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/ClickHouse/clickhouse-claude-code-plugin/988a7a39834af9c9e14ec3650365243e2cfc6882/",
+ "configUrl": "https://raw.githubusercontent.com/ClickHouse/clickhouse-claude-code-plugin/988a7a39834af9c9e14ec3650365243e2cfc6882/.mcp.json",
+ "mcpServers": {
+ "clickhouse": {
+ "type": "http",
+ "url": "https://mcp.clickhouse.cloud/mcp"
+ }
+ }
+ },
+ {
+ "name": "cloud-sql-mysql",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/cloud-sql-mysql.git",
+ "sha": "ed4fbfe3e0cb6770b15b2a66bd1192a684547678"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/cloud-sql-mysql/ed4fbfe3e0cb6770b15b2a66bd1192a684547678/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/cloud-sql-mysql/ed4fbfe3e0cb6770b15b2a66bd1192a684547678/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "cloud-sql-mysql": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "cloud-sql-mysql",
+ "--stdio"
+ ],
+ "env": {
+ "CLOUD_SQL_MYSQL_PROJECT": "${user_config.cloud_sql_mysql_project}",
+ "CLOUD_SQL_MYSQL_REGION": "${user_config.cloud_sql_mysql_region}",
+ "CLOUD_SQL_MYSQL_INSTANCE": "${user_config.cloud_sql_mysql_instance}",
+ "CLOUD_SQL_MYSQL_DATABASE": "${user_config.cloud_sql_mysql_database}",
+ "CLOUD_SQL_MYSQL_USER": "${user_config.cloud_sql_mysql_user}",
+ "CLOUD_SQL_MYSQL_PASSWORD": "${user_config.cloud_sql_mysql_password}",
+ "CLOUD_SQL_MYSQL_IP_TYPE": "${user_config.cloud_sql_mysql_ip_type}"
+ }
+ }
+ }
+ },
+ {
+ "name": "cloud-sql-postgresql",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/cloud-sql-postgresql.git",
+ "sha": "6191fb93757355204a5f909d41ad6c9fa2900a83"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/cloud-sql-postgresql/6191fb93757355204a5f909d41ad6c9fa2900a83/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/cloud-sql-postgresql/6191fb93757355204a5f909d41ad6c9fa2900a83/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "cloud-sql-postgres": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "cloud-sql-postgres",
+ "--stdio"
+ ],
+ "env": {
+ "CLOUD_SQL_POSTGRES_PROJECT": "${user_config.cloud_sql_postgres_project}",
+ "CLOUD_SQL_POSTGRES_REGION": "${user_config.cloud_sql_postgres_region}",
+ "CLOUD_SQL_POSTGRES_INSTANCE": "${user_config.cloud_sql_postgres_instance}",
+ "CLOUD_SQL_POSTGRES_DATABASE": "${user_config.cloud_sql_postgres_database}",
+ "CLOUD_SQL_POSTGRES_USER": "${user_config.cloud_sql_postgres_user}",
+ "CLOUD_SQL_POSTGRES_PASSWORD": "${user_config.cloud_sql_postgres_password}",
+ "CLOUD_SQL_POSTGRES_IP_TYPE": "${user_config.cloud_sql_postgres_ip_type}"
+ }
+ }
+ }
+ },
+ {
+ "name": "cloud-sql-sqlserver",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/cloud-sql-sqlserver.git",
+ "sha": "8858b0fd066f1590ab7dad70ceacb1366af86a1f"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/cloud-sql-sqlserver/8858b0fd066f1590ab7dad70ceacb1366af86a1f/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/cloud-sql-sqlserver/8858b0fd066f1590ab7dad70ceacb1366af86a1f/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "cloud-sql-mssql": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "cloud-sql-mssql",
+ "--stdio"
+ ],
+ "env": {
+ "CLOUD_SQL_MSSQL_PROJECT": "${user_config.cloud_sql_mssql_project}",
+ "CLOUD_SQL_MSSQL_REGION": "${user_config.cloud_sql_mssql_region}",
+ "CLOUD_SQL_MSSQL_INSTANCE": "${user_config.cloud_sql_mssql_instance}",
+ "CLOUD_SQL_MSSQL_DATABASE": "${user_config.cloud_sql_mssql_database}",
+ "CLOUD_SQL_MSSQL_USER": "${user_config.cloud_sql_mssql_user}",
+ "CLOUD_SQL_MSSQL_PASSWORD": "${user_config.cloud_sql_mssql_password}",
+ "CLOUD_SQL_MSSQL_IP_TYPE": "${user_config.cloud_sql_mssql_ip_type}"
+ }
+ }
+ }
+ },
+ {
+ "name": "cloudflare",
+ "category": "direct_remote_service",
+ "providers": [
+ "Cloudflare"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/cloudflare/skills.git",
+ "sha": "b052c32bab7dd493513260228a36c88294f343f1"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/cloudflare/skills/b052c32bab7dd493513260228a36c88294f343f1/",
+ "configUrl": "https://raw.githubusercontent.com/cloudflare/skills/b052c32bab7dd493513260228a36c88294f343f1/.mcp.json",
+ "mcpServers": {
+ "cloudflare": {
+ "type": "http",
+ "url": "https://mcp.cloudflare.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "cloudinary",
+ "category": "direct_remote_service",
+ "providers": [
+ "Cloudinary"
+ ],
+ "notes": "Five distinct endpoints but one plugin/provider. Declares streamable-http vocabulary; Prime compatibility not tested.",
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/cloudinary-devs/cloudinary-plugin.git",
+ "sha": "86be53409e3fb1c465cd5ff4d1dc937a2860f45c"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/cloudinary-devs/cloudinary-plugin/86be53409e3fb1c465cd5ff4d1dc937a2860f45c/",
+ "configUrl": "https://raw.githubusercontent.com/cloudinary-devs/cloudinary-plugin/86be53409e3fb1c465cd5ff4d1dc937a2860f45c/mcp.json",
+ "mcpServers": {
+ "cloudinary-asset-mgmt": {
+ "type": "streamable-http",
+ "url": "https://asset-management.mcp.cloudinary.com/mcp"
+ },
+ "cloudinary-env-config": {
+ "type": "streamable-http",
+ "url": "https://environment-config.mcp.cloudinary.com/mcp"
+ },
+ "cloudinary-smd": {
+ "type": "streamable-http",
+ "url": "https://structured-metadata.mcp.cloudinary.com/mcp"
+ },
+ "cloudinary-analysis": {
+ "type": "streamable-http",
+ "url": "https://analysis.mcp.cloudinary.com/mcp"
+ },
+ "cloudinary-mediaflows": {
+ "type": "streamable-http",
+ "url": "https://mediaflows.mcp.cloudinary.com/v2/mcp",
+ "headers": {
+ "cld-cloud-name": "cloud_name",
+ "cld-api-key": "api_key",
+ "cld-secret": "api_secret"
+ }
+ }
+ }
+ },
+ {
+ "name": "cockroachdb",
+ "category": "direct_remote_service",
+ "providers": [
+ "Cockroach Labs"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/cockroachdb/claude-plugin.git",
+ "sha": "6c96c6394a61f366e8ec1b7cec2281e97507cbff"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/cockroachdb/claude-plugin/6c96c6394a61f366e8ec1b7cec2281e97507cbff/",
+ "configUrl": "https://raw.githubusercontent.com/cockroachdb/claude-plugin/6c96c6394a61f366e8ec1b7cec2281e97507cbff/.mcp.json",
+ "mcpServers": {
+ "cockroachdb-toolbox": {
+ "command": "toolbox",
+ "args": [
+ "--config",
+ "${CLAUDE_PLUGIN_ROOT}/tools.yaml",
+ "--stdio"
+ ],
+ "env": {
+ "COCKROACHDB_HOST": "${COCKROACHDB_HOST}",
+ "COCKROACHDB_PORT": "${COCKROACHDB_PORT}",
+ "COCKROACHDB_USER": "${COCKROACHDB_USER}",
+ "COCKROACHDB_PASSWORD": "${COCKROACHDB_PASSWORD}",
+ "COCKROACHDB_DATABASE": "${COCKROACHDB_DATABASE}",
+ "COCKROACHDB_SSLMODE": "${COCKROACHDB_SSLMODE}"
+ }
+ },
+ "cockroachdb-toolbox-http": {
+ "type": "http",
+ "url": "http://127.0.0.1:5000/mcp",
+ "_comment": "SSE transport — run 'toolbox --config tools.yaml' first, then connect via this URL"
+ },
+ "cockroachdb-cloud": {
+ "type": "http",
+ "url": "https://cockroachlabs.cloud/mcp",
+ "headers": {
+ "mcp-cluster-id": "${COCKROACHDB_CLUSTER_ID}"
+ }
+ }
+ }
+ },
+ {
+ "name": "codspeed",
+ "category": "direct_remote_service",
+ "providers": [
+ "CodSpeed"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/CodSpeedHQ/codspeed.git",
+ "sha": "37eba9ed92b0f1a17cf386303446475df380af37"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/CodSpeedHQ/codspeed/37eba9ed92b0f1a17cf386303446475df380af37/",
+ "configUrl": "https://raw.githubusercontent.com/CodSpeedHQ/codspeed/37eba9ed92b0f1a17cf386303446475df380af37/.mcp.json",
+ "mcpServers": {
+ "CodSpeed": {
+ "type": "http",
+ "url": "https://mcp.codspeed.io/mcp"
+ }
+ }
+ },
+ {
+ "name": "confidence",
+ "category": "direct_remote_service",
+ "providers": [
+ "Spotify Confidence"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/spotify/confidence-ai-plugins.git",
+ "sha": "c8eb4aefefc4e095759ef0e5d1dd7e4e5ae6dae7"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/spotify/confidence-ai-plugins/c8eb4aefefc4e095759ef0e5d1dd7e4e5ae6dae7/",
+ "configUrl": "https://raw.githubusercontent.com/spotify/confidence-ai-plugins/c8eb4aefefc4e095759ef0e5d1dd7e4e5ae6dae7/.mcp.json",
+ "mcpServers": {
+ "confidence-flags": {
+ "type": "http",
+ "url": "https://mcp.confidence.dev/mcp/flags",
+ "headers": {
+ "x-confidence-mcp-consumer": "plugin"
+ }
+ },
+ "confidence-docs": {
+ "type": "http",
+ "url": "https://mcp.confidence.dev/mcp/docs",
+ "headers": {
+ "x-confidence-mcp-consumer": "plugin"
+ }
+ }
+ }
+ },
+ {
+ "name": "convex",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Convex"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/get-convex/convex-backend-skill.git",
+ "sha": "6ca54f6e2e7582812187b8a5a4783fb4dff52692"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/get-convex/convex-backend-skill/6ca54f6e2e7582812187b8a5a4783fb4dff52692/",
+ "configUrl": "https://raw.githubusercontent.com/get-convex/convex-backend-skill/6ca54f6e2e7582812187b8a5a4783fb4dff52692/.mcp.json",
+ "mcpServers": {
+ "convex": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "convex@latest",
+ "mcp",
+ "start"
+ ]
+ }
+ }
+ },
+ {
+ "name": "data-agent-kit-starter-pack",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/data-agent-kit-starter-pack.git",
+ "sha": "22c27d5ea7d2695ae042aa7605daee97bfad7237"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/data-agent-kit-starter-pack/22c27d5ea7d2695ae042aa7605daee97bfad7237/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/data-agent-kit-starter-pack/22c27d5ea7d2695ae042aa7605daee97bfad7237/.mcp.json",
+ "mcpServers": {
+ "notebook": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "-p",
+ "git+https://github.com/gemini-cli-extensions/data-agent-kit-starter-pack.git",
+ "notebook-tools",
+ "--mode=notebook"
+ ],
+ "env": {},
+ "env_vars": [
+ "DATA_CLOUD_CURR_IDE_NAME"
+ ]
+ },
+ "visualization": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "-p",
+ "git+https://github.com/gemini-cli-extensions/data-agent-kit-starter-pack.git",
+ "notebook-tools",
+ "--mode=visualization"
+ ],
+ "env": {},
+ "env_vars": [
+ "DATA_CLOUD_CURR_IDE_NAME"
+ ]
+ },
+ "bigquery": {
+ "command": "node",
+ "args": [
+ "${CLAUDE_PLUGIN_ROOT}/mcp/bin/mcp_proxy_bundle.cjs",
+ "https://bigquery.googleapis.com/mcp"
+ ],
+ "env": {
+ "X_GOOG_PROXY_HEADERS": "{\"User-Agent\": \"datacloud.claude\"}"
+ }
+ },
+ "spanner": {
+ "command": "node",
+ "args": [
+ "${CLAUDE_PLUGIN_ROOT}/mcp/bin/mcp_proxy_bundle.cjs",
+ "https://spanner.googleapis.com/mcp"
+ ],
+ "env": {
+ "X_GOOG_PROXY_HEADERS": "{\"User-Agent\": \"datacloud.claude\"}"
+ }
+ },
+ "alloydb-postgres": {
+ "command": "node",
+ "args": [
+ "${CLAUDE_PLUGIN_ROOT}/mcp/bin/mcp_proxy_bundle.cjs",
+ "https://alloydb.googleapis.com/mcp"
+ ],
+ "env": {
+ "X_GOOG_PROXY_HEADERS": "{\"User-Agent\": \"datacloud.claude\"}"
+ }
+ },
+ "cloud-sql-postgresql": {
+ "command": "node",
+ "args": [
+ "${CLAUDE_PLUGIN_ROOT}/mcp/bin/mcp_proxy_bundle.cjs",
+ "https://sqladmin.googleapis.com/mcp"
+ ],
+ "env": {
+ "X_GOOG_PROXY_HEADERS": "{\"User-Agent\": \"datacloud.claude\"}"
+ }
+ },
+ "knowledge_catalog": {
+ "command": "node",
+ "args": [
+ "${CLAUDE_PLUGIN_ROOT}/mcp/bin/mcp_proxy_bundle.cjs",
+ "https://dataplex.googleapis.com/mcp"
+ ],
+ "env": {
+ "X_GOOG_PROXY_HEADERS": "{\"User-Agent\": \"datacloud.claude\"}"
+ }
+ },
+ "dataproc": {
+ "command": "node",
+ "args": [
+ "${CLAUDE_PLUGIN_ROOT}/mcp/bin/mcp_proxy_bundle.cjs",
+ "https://dataproc-${user_config.GCP_REGION}.googleapis.com/mcp"
+ ],
+ "env": {
+ "X_GOOG_PROXY_HEADERS": "{\"User-Agent\": \"datacloud.claude\"}"
+ }
+ },
+ "bigtable": {
+ "command": "node",
+ "args": [
+ "${CLAUDE_PLUGIN_ROOT}/mcp/bin/mcp_proxy_bundle.cjs",
+ "https://bigtableadmin.googleapis.com/mcp"
+ ],
+ "env": {
+ "X_GOOG_PROXY_HEADERS": "{\"User-Agent\": \"datacloud.claude\"}"
+ }
+ },
+ "cloud-storage": {
+ "command": "node",
+ "args": [
+ "${CLAUDE_PLUGIN_ROOT}/mcp/bin/mcp_proxy_bundle.cjs",
+ "https://storage.googleapis.com/storage/mcp"
+ ],
+ "env": {
+ "X_GOOG_PROXY_HEADERS": "{\"User-Agent\": \"datacloud.claude\"}"
+ }
+ }
+ }
+ },
+ {
+ "name": "datadog",
+ "category": "direct_remote_service",
+ "providers": [
+ "Datadog"
+ ],
+ "notes": "DD_MCP_DOMAIN is configurable; default not-setup is not a live service URL. Datadog API/app-key fields confirm target service; no auth/run test.",
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/datadog-labs/claude-code-plugin.git",
+ "sha": "195f570c002beab3d7bd342739034d0019aa4863"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/datadog-labs/claude-code-plugin/195f570c002beab3d7bd342739034d0019aa4863/",
+ "configUrl": "https://raw.githubusercontent.com/datadog-labs/claude-code-plugin/195f570c002beab3d7bd342739034d0019aa4863/.dd_claude-code_mcp.json",
+ "mcpServers": {
+ "mcp": {
+ "type": "http",
+ "url": "https://${DD_MCP_DOMAIN:-not-setup}/v1/mcp?referrer_ide=claude-code-plugin&plugin_version=0.7.17",
+ "headers": {
+ "DD_API_KEY": "${DD_API_KEY:-}",
+ "DD_APPLICATION_KEY": "${DD_APPLICATION_KEY:-}",
+ "X-Datadog-MCP-Toolsets": "${DD_MCP_TOOLSETS:-}"
+ }
+ }
+ }
+ },
+ {
+ "name": "dataproc",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/dataproc.git",
+ "sha": "afbd516845a34fcf460ec447b81868bc48962b0f"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/dataproc/afbd516845a34fcf460ec447b81868bc48962b0f/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/dataproc/afbd516845a34fcf460ec447b81868bc48962b0f/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "dataproc": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "dataproc",
+ "--stdio"
+ ],
+ "env": {
+ "DATAPROC_PROJECT": "${user_config.dataproc_project}",
+ "DATAPROC_REGION": "${user_config.dataproc_region}"
+ }
+ }
+ }
+ },
+ {
+ "name": "deploy-on-aws",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Amazon Web Services"
+ ],
+ "notes": "HTTP awsknowledge is docs-only. Service inclusion is the stdio AWS IaC server, which reads CloudFormation/CloudTrail using AWS credentials; not a direct remote service MCP.",
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/awslabs/agent-plugins.git",
+ "path": "plugins/deploy-on-aws",
+ "ref": "main",
+ "sha": "efe040ab66ed7eb4bccc0a94133181da5bc57567"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/awslabs/agent-plugins/efe040ab66ed7eb4bccc0a94133181da5bc57567/plugins/deploy-on-aws/",
+ "configUrl": "https://raw.githubusercontent.com/awslabs/agent-plugins/efe040ab66ed7eb4bccc0a94133181da5bc57567/plugins/deploy-on-aws/.mcp.json",
+ "mcpServers": {
+ "awsiac": {
+ "args": [
+ "awslabs.aws-iac-mcp-server@latest"
+ ],
+ "command": "uvx"
+ },
+ "awsknowledge": {
+ "type": "http",
+ "url": "https://knowledge-mcp.global.api.aws"
+ },
+ "awspricing": {
+ "args": [
+ "awslabs.aws-pricing-mcp-server@latest"
+ ],
+ "command": "uvx",
+ "disabled": false,
+ "env": {
+ "FASTMCP_LOG_LEVEL": "ERROR"
+ },
+ "timeout": 120000,
+ "type": "stdio"
+ }
+ }
+ },
+ {
+ "name": "discord",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Discord"
+ ],
+ "source": {
+ "kind": "external_plugins",
+ "path": "./external_plugins/discord"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/discord/",
+ "configUrl": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/discord/.mcp.json",
+ "mcpServers": {
+ "discord": {
+ "command": "bun",
+ "args": [
+ "run",
+ "--cwd",
+ "${CLAUDE_PLUGIN_ROOT}",
+ "--shell=bun",
+ "--silent",
+ "start"
+ ]
+ }
+ }
+ },
+ {
+ "name": "dominodatalab",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Domino Data Lab"
+ ],
+ "notes": "API key/host wired to vendored Domino MCP; command directory is an absolute workspace path and may require adjustment. Declaration, not runnability verified.",
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/dominodatalab/domino-claude-plugin.git",
+ "sha": "d86698d74d56d3934c8f8ddccb4f6aa55eb2bba7"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/dominodatalab/domino-claude-plugin/d86698d74d56d3934c8f8ddccb4f6aa55eb2bba7/",
+ "configUrl": "https://raw.githubusercontent.com/dominodatalab/domino-claude-plugin/d86698d74d56d3934c8f8ddccb4f6aa55eb2bba7/.mcp.json",
+ "mcpServers": {
+ "domino_server": {
+ "command": "uv",
+ "args": [
+ "--directory",
+ "$/mnt/code/.claude/mcp-servers/domino_mcp_server",
+ "run",
+ "domino_mcp_server.py"
+ ],
+ "env": {
+ "DOMINO_API_KEY": "${DOMINO_API_KEY}",
+ "DOMINO_HOST": "${DOMINO_HOST}"
+ }
+ }
+ }
+ },
+ {
+ "name": "dropbox",
+ "category": "direct_remote_service",
+ "providers": [
+ "Dropbox"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/dropbox/dropbox-ai-plugins.git",
+ "path": "claude",
+ "ref": "main",
+ "sha": "4135e81caf8275b4c97caef244479e0dcb6fb823"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/dropbox/dropbox-ai-plugins/4135e81caf8275b4c97caef244479e0dcb6fb823/claude/",
+ "configUrl": "https://raw.githubusercontent.com/dropbox/dropbox-ai-plugins/4135e81caf8275b4c97caef244479e0dcb6fb823/claude/.mcp.json",
+ "mcpServers": {
+ "claude_app_mcp": {
+ "type": "http",
+ "url": "https://mcp.dropbox.com/claude_app_mcp"
+ }
+ }
+ },
+ {
+ "name": "dynatrace",
+ "category": "direct_remote_service",
+ "providers": [
+ "Dynatrace"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/Dynatrace/dynatrace-for-ai.git",
+ "sha": "9ebe70d408ea59d2df4b371b745c6c2aa6229e5b"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/Dynatrace/dynatrace-for-ai/9ebe70d408ea59d2df4b371b745c6c2aa6229e5b/",
+ "configUrl": "https://raw.githubusercontent.com/Dynatrace/dynatrace-for-ai/9ebe70d408ea59d2df4b371b745c6c2aa6229e5b/.mcp.json",
+ "mcpServers": {
+ "dynatrace": {
+ "type": "http",
+ "url": "${DT_ENVIRONMENT}/platform-reserved/mcp-gateway/v0.1/servers/dynatrace-mcp/mcp",
+ "headers": {
+ "Authorization": "Bearer ${DT_PLATFORM_TOKEN}",
+ "X-Http-Source": "dynatrace-for-ai/7.0.0"
+ }
+ }
+ }
+ },
+ {
+ "name": "expo",
+ "category": "direct_remote_service",
+ "providers": [
+ "Expo"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/expo/skills.git",
+ "path": "plugins/expo",
+ "ref": "main",
+ "sha": "170589a7ee8963156f63de8202fa96cf08a9e610"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/expo/skills/170589a7ee8963156f63de8202fa96cf08a9e610/plugins/expo/",
+ "configUrl": "https://raw.githubusercontent.com/expo/skills/170589a7ee8963156f63de8202fa96cf08a9e610/plugins/expo/.mcp.json",
+ "mcpServers": {
+ "expo": {
+ "type": "http",
+ "url": "https://mcp.expo.dev/mcp"
+ }
+ }
+ },
+ {
+ "name": "figma",
+ "category": "direct_remote_service",
+ "providers": [
+ "Figma"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/figma/mcp-server-guide.git",
+ "sha": "f74a51c9aaec87a2e65c9121753b63fb42203d96"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/figma/mcp-server-guide/f74a51c9aaec87a2e65c9121753b63fb42203d96/",
+ "configUrl": "https://raw.githubusercontent.com/figma/mcp-server-guide/f74a51c9aaec87a2e65c9121753b63fb42203d96/.mcp.json",
+ "mcpServers": {
+ "figma": {
+ "type": "http",
+ "url": "https://mcp.figma.com/mcp",
+ "headers": {
+ "X-Figma-Plugin-Bundle": "figma_prod@2_2_108"
+ },
+ "_meta": {
+ "ideToolIconPath": "./Figma Icon (Mono-line black, tight).svg",
+ "ideToolIconRendersAsTemplate": true,
+ "ideToolTitles": {
+ "add_code_connect_map": "Add Code Connect Mapping",
+ "create_new_file": "Create New File",
+ "generate_diagram": "Generate Diagram",
+ "generate_figma_design": "Generate Figma Design",
+ "get_code_connect_map": "Get Code Connect Mapping",
+ "get_code_connect_suggestions": "Get Code Connect Suggestions",
+ "get_context_for_code_connect": "Get Code Connect Context",
+ "get_design_context": "Get Design Context",
+ "get_figjam": "Get FigJam Content",
+ "get_libraries": "Get Libraries",
+ "get_metadata": "Get Metadata",
+ "get_screenshot": "Get Screenshot",
+ "get_variable_defs": "Get Variable Definitions",
+ "search_design_system": "Search Design System",
+ "send_code_connect_mappings": "Send Code Connect Mappings",
+ "upload_assets": "Upload Assets",
+ "use_figma": "Use Figma",
+ "whoami": "Who Am I"
+ }
+ }
+ }
+ }
+ },
+ {
+ "name": "firebase",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "external_plugins",
+ "path": "./external_plugins/firebase"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/firebase/",
+ "configUrl": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/firebase/.mcp.json",
+ "mcpServers": {
+ "firebase": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "firebase-tools@latest",
+ "mcp"
+ ]
+ }
+ }
+ },
+ {
+ "name": "firestore-native",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/firestore-native.git",
+ "sha": "502ff19b853e760539717d3c640300af3400bba3"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/firestore-native/502ff19b853e760539717d3c640300af3400bba3/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/firestore-native/502ff19b853e760539717d3c640300af3400bba3/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "firestore": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "firestore",
+ "--stdio"
+ ],
+ "env": {
+ "FIRESTORE_PROJECT": "${user_config.firestore_project}",
+ "FIRESTORE_DATABASE": "${user_config.firestore_database}"
+ }
+ }
+ }
+ },
+ {
+ "name": "fullstory",
+ "category": "direct_remote_service",
+ "providers": [
+ "Fullstory"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/fullstorydev/fullstory-skills.git",
+ "sha": "b20614e2d08d7a7c70775bb62b5af640f60b024b"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/fullstorydev/fullstory-skills/b20614e2d08d7a7c70775bb62b5af640f60b024b/",
+ "configUrl": "https://raw.githubusercontent.com/fullstorydev/fullstory-skills/b20614e2d08d7a7c70775bb62b5af640f60b024b/.mcp.json",
+ "mcpServers": {
+ "fullstory": {
+ "type": "http",
+ "url": "https://api.fullstory.com/mcp/fullstory"
+ }
+ }
+ },
+ {
+ "name": "gc-ai",
+ "category": "direct_remote_service",
+ "providers": [
+ "GC AI"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/GC-AI-Inc/gc-ai-claude-plugin.git",
+ "sha": "efda779972c7b7162e79234e164bc2f359a8a518"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/GC-AI-Inc/gc-ai-claude-plugin/efda779972c7b7162e79234e164bc2f359a8a518/",
+ "configUrl": "https://raw.githubusercontent.com/GC-AI-Inc/gc-ai-claude-plugin/efda779972c7b7162e79234e164bc2f359a8a518/.mcp.json",
+ "mcpServers": {
+ "gc-ai": {
+ "type": "http",
+ "url": "https://app.gc.ai/api/mcp"
+ }
+ }
+ },
+ {
+ "name": "github",
+ "category": "direct_remote_service",
+ "providers": [
+ "GitHub"
+ ],
+ "source": {
+ "kind": "external_plugins",
+ "path": "./external_plugins/github"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/github/",
+ "configUrl": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/github/.mcp.json",
+ "mcpServers": {
+ "github": {
+ "type": "http",
+ "url": "https://api.githubcopilot.com/mcp/",
+ "headers": {
+ "Authorization": "Bearer ${GITHUB_PERSONAL_ACCESS_TOKEN}"
+ }
+ }
+ }
+ },
+ {
+ "name": "gitkraken",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "GitKraken"
+ ],
+ "notes": "Local gk MCP wraps GitKraken APIs and git-host/issue providers (GitHub/Jira); local git capabilities alone do not justify inclusion.",
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gitkraken/claude-plugin.git",
+ "sha": "f7a53b2cd138c22eccb977b9d93494ea6d423d12"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gitkraken/claude-plugin/f7a53b2cd138c22eccb977b9d93494ea6d423d12/",
+ "configUrl": "https://raw.githubusercontent.com/gitkraken/claude-plugin/f7a53b2cd138c22eccb977b9d93494ea6d423d12/mcp.json",
+ "mcpServers": {
+ "gitkraken": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@gitkraken/gk",
+ "mcp",
+ "--plugin",
+ "--host=claude"
+ ]
+ }
+ }
+ },
+ {
+ "name": "gitlab",
+ "category": "direct_remote_service",
+ "providers": [
+ "GitLab"
+ ],
+ "source": {
+ "kind": "external_plugins",
+ "path": "./external_plugins/gitlab"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/gitlab/",
+ "configUrl": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/gitlab/.mcp.json",
+ "mcpServers": {
+ "gitlab": {
+ "type": "http",
+ "url": "https://gitlab.com/api/v4/mcp"
+ }
+ }
+ },
+ {
+ "name": "google-cloud-storage",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/google-cloud-storage.git",
+ "sha": "db08d0fdb8c133ca0cb82e742d9d54228c4a318b"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/google-cloud-storage/db08d0fdb8c133ca0cb82e742d9d54228c4a318b/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/google-cloud-storage/db08d0fdb8c133ca0cb82e742d9d54228c4a318b/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "cloud-storage": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "cloud-storage",
+ "--stdio"
+ ],
+ "env": {
+ "CLOUD_STORAGE_PROJECT": "${user_config.cloud_storage_project}"
+ }
+ }
+ }
+ },
+ {
+ "name": "grafana-cloud-mcp",
+ "category": "direct_remote_service",
+ "providers": [
+ "Grafana"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/grafana/ai-marketplace.git",
+ "path": "plugins/grafana-cloud-mcp",
+ "ref": "main",
+ "sha": "12be5634a492f73c189d466c5449d09b853ad7a4"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/grafana/ai-marketplace/12be5634a492f73c189d466c5449d09b853ad7a4/plugins/grafana-cloud-mcp/",
+ "configUrl": "https://raw.githubusercontent.com/grafana/ai-marketplace/12be5634a492f73c189d466c5449d09b853ad7a4/plugins/grafana-cloud-mcp/.mcp.json",
+ "mcpServers": {
+ "grafana-cloud": {
+ "type": "http",
+ "url": "https://mcp.grafana.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "greptile",
+ "category": "direct_remote_service",
+ "providers": [
+ "Greptile"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/greptileai/claude-plugin.git",
+ "path": "plugins/greptile",
+ "ref": "greptile--v1.2.3",
+ "sha": "6b725af2636072cab79e0a5426f6a960b0fd29ef"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/greptileai/claude-plugin/6b725af2636072cab79e0a5426f6a960b0fd29ef/plugins/greptile/",
+ "configUrl": "https://raw.githubusercontent.com/greptileai/claude-plugin/6b725af2636072cab79e0a5426f6a960b0fd29ef/plugins/greptile/.mcp.json",
+ "mcpServers": {
+ "greptile": {
+ "type": "http",
+ "url": "https://api.greptile.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "honeycomb",
+ "category": "direct_remote_service",
+ "providers": [
+ "Honeycomb"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/honeycombio/agent-skill.git",
+ "path": "honeycomb",
+ "ref": "main",
+ "sha": "41214b7dfb97f262adabf295fa6f0fcad85bc0f6"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/honeycombio/agent-skill/41214b7dfb97f262adabf295fa6f0fcad85bc0f6/honeycomb/",
+ "configUrl": "https://raw.githubusercontent.com/honeycombio/agent-skill/41214b7dfb97f262adabf295fa6f0fcad85bc0f6/honeycomb/.mcp.json",
+ "mcpServers": {
+ "honeycomb": {
+ "type": "http",
+ "url": "https://mcp.honeycomb.io/mcp"
+ }
+ }
+ },
+ {
+ "name": "hostinger",
+ "category": "direct_remote_service",
+ "providers": [
+ "Hostinger"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/hostinger/claude-plugin.git",
+ "sha": "569880c60681a7068b3ca8ca84e2fe7ab6cfa7ff"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/hostinger/claude-plugin/569880c60681a7068b3ca8ca84e2fe7ab6cfa7ff/",
+ "configUrl": "https://raw.githubusercontent.com/hostinger/claude-plugin/569880c60681a7068b3ca8ca84e2fe7ab6cfa7ff/.mcp.json",
+ "mcpServers": {
+ "hostinger": {
+ "type": "http",
+ "url": "https://mcp.hostinger.com"
+ }
+ }
+ },
+ {
+ "name": "hubspot-sales",
+ "category": "direct_remote_service",
+ "providers": [
+ "HubSpot"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/HubSpot/hubspot-mcp-plugins.git",
+ "path": "HubSpot-Sales",
+ "ref": "main",
+ "sha": "843d5a38f82cdc1b275baf4953a659be0ad41247"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/HubSpot/hubspot-mcp-plugins/843d5a38f82cdc1b275baf4953a659be0ad41247/HubSpot-Sales/",
+ "configUrl": "https://raw.githubusercontent.com/HubSpot/hubspot-mcp-plugins/843d5a38f82cdc1b275baf4953a659be0ad41247/HubSpot-Sales/.mcp.json",
+ "mcpServers": {
+ "hubspot": {
+ "type": "http",
+ "url": "https://mcp.hubspot.com/anthropic"
+ }
+ }
+ },
+ {
+ "name": "huggingface-skills",
+ "category": "direct_remote_service",
+ "providers": [
+ "Hugging Face"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/huggingface/skills.git",
+ "sha": "f3186efbbc322121eb5d0f31e8a1d669ee961159"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/huggingface/skills/f3186efbbc322121eb5d0f31e8a1d669ee961159/",
+ "configUrl": "https://raw.githubusercontent.com/huggingface/skills/f3186efbbc322121eb5d0f31e8a1d669ee961159/.mcp.json",
+ "mcpServers": {
+ "huggingface-skills": {
+ "type": "http",
+ "url": "https://huggingface.co/mcp?login"
+ }
+ }
+ },
+ {
+ "name": "hunter",
+ "category": "direct_remote_service",
+ "providers": [
+ "Hunter.io"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/hunter-io/claude-plugin.git",
+ "sha": "2a6de2a00f7f459a05c146c6f0712417b8d30db9"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/hunter-io/claude-plugin/2a6de2a00f7f459a05c146c6f0712417b8d30db9/",
+ "configUrl": "https://raw.githubusercontent.com/hunter-io/claude-plugin/2a6de2a00f7f459a05c146c6f0712417b8d30db9/.mcp.json",
+ "mcpServers": {
+ "hunter": {
+ "type": "http",
+ "url": "https://mcp.hunter.io/mcp"
+ }
+ }
+ },
+ {
+ "name": "intercom",
+ "category": "direct_remote_service",
+ "providers": [
+ "Intercom"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/intercom/claude-plugin-external.git",
+ "sha": "62773a7d4b8aac31545d6888fe6479be3bc53804"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/intercom/claude-plugin-external/62773a7d4b8aac31545d6888fe6479be3bc53804/",
+ "configUrl": "https://raw.githubusercontent.com/intercom/claude-plugin-external/62773a7d4b8aac31545d6888fe6479be3bc53804/.mcp.json",
+ "mcpServers": {
+ "intercom": {
+ "type": "http",
+ "url": "https://mcp.intercom.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "jfrog",
+ "category": "direct_remote_service",
+ "providers": [
+ "JFrog"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/jfrog/claude-plugin.git",
+ "sha": "5f587f0bd40b0359ab6ee57291da95b40d15c605"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/jfrog/claude-plugin/5f587f0bd40b0359ab6ee57291da95b40d15c605/",
+ "configUrl": "https://raw.githubusercontent.com/jfrog/claude-plugin/5f587f0bd40b0359ab6ee57291da95b40d15c605/.mcp.json",
+ "mcpServers": {
+ "jfrog": {
+ "type": "http",
+ "url": "${JFROG_URL}/mcp"
+ }
+ }
+ },
+ {
+ "name": "knowledge-catalog",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/knowledge-catalog.git",
+ "sha": "930d73cfbb8e0637d79cb335ff0b8d80af383bd8"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/knowledge-catalog/930d73cfbb8e0637d79cb335ff0b8d80af383bd8/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/knowledge-catalog/930d73cfbb8e0637d79cb335ff0b8d80af383bd8/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "dataplex": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "dataplex",
+ "--stdio"
+ ],
+ "env": {
+ "DATAPLEX_PROJECT": "${user_config.dataplex_project}"
+ }
+ }
+ }
+ },
+ {
+ "name": "legalzoom",
+ "category": "direct_remote_service",
+ "providers": [
+ "LegalZoom"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/legalzoom/claude-plugins.git",
+ "path": "plugins/legalzoom",
+ "ref": "main",
+ "sha": "f9fd8a0ca6e1421bc1aacb113a109663a7a6f6d8"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/legalzoom/claude-plugins/f9fd8a0ca6e1421bc1aacb113a109663a7a6f6d8/plugins/legalzoom/",
+ "configUrl": "https://raw.githubusercontent.com/legalzoom/claude-plugins/f9fd8a0ca6e1421bc1aacb113a109663a7a6f6d8/plugins/legalzoom/.mcp.json",
+ "mcpServers": {
+ "legalzoom": {
+ "type": "http",
+ "url": "https://www.legalzoom.com/mcp/claude/v1",
+ "description": "LegalZoom MCP server for attorney consultations and legal services"
+ }
+ }
+ },
+ {
+ "name": "linear",
+ "category": "direct_remote_service",
+ "providers": [
+ "Linear"
+ ],
+ "source": {
+ "kind": "external_plugins",
+ "path": "./external_plugins/linear"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/linear/",
+ "configUrl": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/linear/.mcp.json",
+ "mcpServers": {
+ "linear": {
+ "type": "http",
+ "url": "https://mcp.linear.app/mcp"
+ }
+ }
+ },
+ {
+ "name": "logfire",
+ "category": "direct_remote_service",
+ "providers": [
+ "Pydantic Logfire"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/pydantic/skills.git",
+ "path": "plugins/logfire",
+ "ref": "main",
+ "sha": "9e9390ee24d44b32cf5379c58acaebd7563f5f86"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/pydantic/skills/9e9390ee24d44b32cf5379c58acaebd7563f5f86/plugins/logfire/",
+ "configUrl": "https://raw.githubusercontent.com/pydantic/skills/9e9390ee24d44b32cf5379c58acaebd7563f5f86/plugins/logfire/.mcp.json",
+ "mcpServers": {
+ "logfire": {
+ "type": "http",
+ "url": "${LOGFIRE_MCP_URL:-https://logfire-us.pydantic.dev/mcp}"
+ }
+ }
+ },
+ {
+ "name": "logrocket",
+ "category": "direct_remote_service",
+ "providers": [
+ "LogRocket"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/LogRocket/logrocket-claude-plugin.git",
+ "path": "plugins/logrocket",
+ "ref": "main",
+ "sha": "2e44dbb47faf9bb54e3405a8ae2714e7c5ce9791"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/LogRocket/logrocket-claude-plugin/2e44dbb47faf9bb54e3405a8ae2714e7c5ce9791/plugins/logrocket/",
+ "configUrl": "https://raw.githubusercontent.com/LogRocket/logrocket-claude-plugin/2e44dbb47faf9bb54e3405a8ae2714e7c5ce9791/plugins/logrocket/.mcp.json",
+ "mcpServers": {
+ "logrocket": {
+ "type": "http",
+ "url": "https://mcp.logrocket.com/mcp?toolsets=all"
+ }
+ }
+ },
+ {
+ "name": "looker",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/looker.git",
+ "sha": "4a8edc0912897a3bc9e9edfb85e9ec4914f38182"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/looker/4a8edc0912897a3bc9e9edfb85e9ec4914f38182/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/looker/4a8edc0912897a3bc9e9edfb85e9ec4914f38182/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "looker": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "looker",
+ "--stdio"
+ ],
+ "env": {
+ "LOOKER_BASE_URL": "${user_config.looker_base_url}",
+ "LOOKER_CLIENT_ID": "${user_config.looker_client_id}",
+ "LOOKER_CLIENT_SECRET": "${user_config.looker_client_secret}",
+ "LOOKER_VERIFY_SSL": "${user_config.looker_verify_ssl}",
+ "LOOKER_SHOW_HIDDEN_MODELS": "${user_config.looker_show_hidden_models}",
+ "LOOKER_SHOW_HIDDEN_EXPLORES": "${user_config.looker_show_hidden_explores}",
+ "LOOKER_SHOW_HIDDEN_FIELDS": "${user_config.looker_show_hidden_fields}"
+ }
+ },
+ "looker-dev": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "looker-dev",
+ "--stdio"
+ ],
+ "env": {
+ "LOOKER_BASE_URL": "${user_config.looker_base_url}",
+ "LOOKER_CLIENT_ID": "${user_config.looker_client_id}",
+ "LOOKER_CLIENT_SECRET": "${user_config.looker_client_secret}",
+ "LOOKER_VERIFY_SSL": "${user_config.looker_verify_ssl}",
+ "LOOKER_SHOW_HIDDEN_MODELS": "${user_config.looker_show_hidden_models}",
+ "LOOKER_SHOW_HIDDEN_EXPLORES": "${user_config.looker_show_hidden_explores}",
+ "LOOKER_SHOW_HIDDEN_FIELDS": "${user_config.looker_show_hidden_fields}"
+ }
+ }
+ }
+ },
+ {
+ "name": "lovable",
+ "category": "direct_remote_service",
+ "providers": [
+ "Lovable"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/lovablelabs/mcp.git",
+ "sha": "0336e6db8026b0f02cb89d1451cc48ea3f469791"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/lovablelabs/mcp/0336e6db8026b0f02cb89d1451cc48ea3f469791/",
+ "configUrl": "https://raw.githubusercontent.com/lovablelabs/mcp/0336e6db8026b0f02cb89d1451cc48ea3f469791/.mcp.json",
+ "mcpServers": {
+ "lovable": {
+ "type": "http",
+ "url": "https://mcp.lovable.dev/?src=cc-plugin"
+ }
+ }
+ },
+ {
+ "name": "lusha",
+ "category": "direct_remote_service",
+ "providers": [
+ "Lusha"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/lusha-oss/lusha-mcp-plugin.git",
+ "sha": "ed34947a36754411f03cdeaba91c8cdaa153ef2e"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/lusha-oss/lusha-mcp-plugin/ed34947a36754411f03cdeaba91c8cdaa153ef2e/",
+ "configUrl": "https://raw.githubusercontent.com/lusha-oss/lusha-mcp-plugin/ed34947a36754411f03cdeaba91c8cdaa153ef2e/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "lusha": {
+ "type": "http",
+ "url": "https://mcp.lusha.com/mcp/claude",
+ "headers": {
+ "X-Lusha-Plugin": "claude",
+ "X-Lusha-Plugin-Version": "0.1.2"
+ }
+ }
+ }
+ },
+ {
+ "name": "mapbox",
+ "category": "direct_remote_service",
+ "providers": [
+ "Mapbox"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/mapbox/mapbox-agent-skills.git",
+ "sha": "209e8c408fd65edfff45e491c941e8a00025a1a6"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/mapbox/mapbox-agent-skills/209e8c408fd65edfff45e491c941e8a00025a1a6/",
+ "configUrl": "https://raw.githubusercontent.com/mapbox/mapbox-agent-skills/209e8c408fd65edfff45e491c941e8a00025a1a6/.mcp.json",
+ "mcpServers": {
+ "mapbox-devkit": {
+ "type": "http",
+ "url": "https://mcp-devkit.mapbox.com/mcp"
+ },
+ "mapbox": {
+ "type": "http",
+ "url": "https://mcp.mapbox.com/mcp"
+ },
+ "mapbox-docs": {
+ "type": "http",
+ "url": "https://mcp-docs.mapbox.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "mercadopago",
+ "category": "direct_remote_service",
+ "providers": [
+ "Mercado Pago"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/mercadopago/mercadopago-claude-marketplace.git",
+ "path": "plugins/mercadopago",
+ "ref": "main",
+ "sha": "c0d06959afc90b2f3d637c35eeb51c36f512c005"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/mercadopago/mercadopago-claude-marketplace/c0d06959afc90b2f3d637c35eeb51c36f512c005/plugins/mercadopago/",
+ "configUrl": "https://raw.githubusercontent.com/mercadopago/mercadopago-claude-marketplace/c0d06959afc90b2f3d637c35eeb51c36f512c005/plugins/mercadopago/.mcp.json",
+ "mcpServers": {
+ "mcp": {
+ "type": "http",
+ "url": "https://mcp.mercadopago.com/mcp",
+ "headers": {
+ "X-Plugin-Version": "4.3.2",
+ "X-Invocation-Context": "router"
+ }
+ }
+ }
+ },
+ {
+ "name": "miro",
+ "category": "direct_remote_service",
+ "providers": [
+ "Miro"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/miroapp/miro-ai.git",
+ "path": "claude-plugins/miro",
+ "ref": "main",
+ "sha": "c2494b24510d01ec3e50fad94a0c5fc3ca40e339"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/miroapp/miro-ai/c2494b24510d01ec3e50fad94a0c5fc3ca40e339/claude-plugins/miro/",
+ "configUrl": "https://raw.githubusercontent.com/miroapp/miro-ai/c2494b24510d01ec3e50fad94a0c5fc3ca40e339/claude-plugins/miro/.mcp.json",
+ "mcpServers": {
+ "miro": {
+ "type": "http",
+ "url": "https://mcp.miro.com/",
+ "headers": {
+ "X-AI-Source": "claude-code-plugin"
+ }
+ }
+ }
+ },
+ {
+ "name": "monday-crm",
+ "category": "direct_remote_service",
+ "providers": [
+ "monday.com"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/mondaycom/mcp.git",
+ "path": "plugins/monday-crm",
+ "ref": "master",
+ "sha": "5eb0835e921de42ba603d7a8315ab4a2575a46b2"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/mondaycom/mcp/5eb0835e921de42ba603d7a8315ab4a2575a46b2/plugins/monday-crm/",
+ "configUrl": "https://raw.githubusercontent.com/mondaycom/mcp/5eb0835e921de42ba603d7a8315ab4a2575a46b2/plugins/monday-crm/.mcp.json",
+ "mcpServers": {
+ "monday": {
+ "type": "http",
+ "url": "https://mcp.monday.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "mongodb-atlas",
+ "category": "direct_remote_service",
+ "providers": [
+ "MongoDB"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/mongodb/agent-skills.git",
+ "path": "plugins/mongodb-atlas",
+ "ref": "main",
+ "sha": "1e72df255e54e81eff078054c2cfb2b5d8c13503"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/mongodb/agent-skills/1e72df255e54e81eff078054c2cfb2b5d8c13503/plugins/mongodb-atlas/",
+ "configUrl": "https://raw.githubusercontent.com/mongodb/agent-skills/1e72df255e54e81eff078054c2cfb2b5d8c13503/plugins/mongodb-atlas/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "mongodb-atlas": {
+ "type": "http",
+ "url": "https://mcp.mongodb.com/",
+ "oauth": {
+ "clientId": "https://claude.ai/oauth/claude-code-client-metadata"
+ }
+ }
+ }
+ },
+ {
+ "name": "neon",
+ "category": "direct_remote_service",
+ "providers": [
+ "Neon"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/neondatabase/agent-skills.git",
+ "path": "plugins/neon-postgres",
+ "ref": "main",
+ "sha": "2e0da3a1653bcdd227565ac14bb3e9e453a8b854"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/neondatabase/agent-skills/2e0da3a1653bcdd227565ac14bb3e9e453a8b854/plugins/neon-postgres/",
+ "configUrl": "https://raw.githubusercontent.com/neondatabase/agent-skills/2e0da3a1653bcdd227565ac14bb3e9e453a8b854/plugins/neon-postgres/mcp.json",
+ "mcpServers": {
+ "neon": {
+ "type": "http",
+ "url": "https://mcp.neon.tech/mcp"
+ }
+ }
+ },
+ {
+ "name": "netlify-skills",
+ "category": "direct_remote_service",
+ "providers": [
+ "Netlify"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/netlify/context-and-tools.git",
+ "sha": "b4fd870cf2f1f4cc66b28ead16277e1d799b510f"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/netlify/context-and-tools/b4fd870cf2f1f4cc66b28ead16277e1d799b510f/",
+ "configUrl": "https://raw.githubusercontent.com/netlify/context-and-tools/b4fd870cf2f1f4cc66b28ead16277e1d799b510f/.mcp.json",
+ "mcpServers": {
+ "netlify": {
+ "type": "http",
+ "url": "https://netlify-mcp.netlify.app/mcp",
+ "note": "Official Netlify MCP server (hosted, streamable HTTP). Authorizes via OAuth on first connection — the agent is prompted to sign in to Netlify; no token or local install required. Lets the agent create and manage Netlify projects, deploys, and environment variables."
+ }
+ }
+ },
+ {
+ "name": "newrelic",
+ "category": "direct_remote_service",
+ "providers": [
+ "New Relic"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/newrelic/claude-code-plugin.git",
+ "sha": "f8e5f8b62139072a22153ec92de1c0cc1af2f56a"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/newrelic/claude-code-plugin/f8e5f8b62139072a22153ec92de1c0cc1af2f56a/",
+ "configUrl": "https://raw.githubusercontent.com/newrelic/claude-code-plugin/f8e5f8b62139072a22153ec92de1c0cc1af2f56a/.mcp.json",
+ "mcpServers": {
+ "newrelic": {
+ "type": "http",
+ "url": "https://mcp.newrelic.com/mcp/"
+ }
+ }
+ },
+ {
+ "name": "notion",
+ "category": "direct_remote_service",
+ "providers": [
+ "Notion"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/makenotion/claude-code-notion-plugin.git",
+ "sha": "9847f2aa1a15f25df35ed1fb7b4557dbb60cd651"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/makenotion/claude-code-notion-plugin/9847f2aa1a15f25df35ed1fb7b4557dbb60cd651/",
+ "configUrl": "https://raw.githubusercontent.com/makenotion/claude-code-notion-plugin/9847f2aa1a15f25df35ed1fb7b4557dbb60cd651/.mcp.json",
+ "mcpServers": {
+ "notion": {
+ "type": "http",
+ "url": "https://mcp.notion.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "pagerduty",
+ "category": "direct_remote_service",
+ "providers": [
+ "PagerDuty"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/PagerDuty/claude-code-plugins.git",
+ "sha": "761cba75bd50fd561405c3b173ecf36084432089"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/PagerDuty/claude-code-plugins/761cba75bd50fd561405c3b173ecf36084432089/",
+ "configUrl": "https://raw.githubusercontent.com/PagerDuty/claude-code-plugins/761cba75bd50fd561405c3b173ecf36084432089/.mcp.json",
+ "mcpServers": {
+ "pagerduty": {
+ "type": "http",
+ "url": "https://mcp.pagerduty.com/mcp",
+ "headers": {
+ "Authorization": "Token token=${PAGERDUTY_API_KEY}"
+ }
+ }
+ }
+ },
+ {
+ "name": "paypal",
+ "category": "direct_remote_service",
+ "providers": [
+ "PayPal"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/paypal/AI-Toolkit.git",
+ "sha": "310b4962f0e5b3d09ff1c909d96ad5e226703ecb"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/paypal/AI-Toolkit/310b4962f0e5b3d09ff1c909d96ad5e226703ecb/",
+ "configUrl": "https://raw.githubusercontent.com/paypal/AI-Toolkit/310b4962f0e5b3d09ff1c909d96ad5e226703ecb/.mcp.json",
+ "mcpServers": {
+ "paypal-sandbox": {
+ "type": "sse",
+ "url": "https://mcp.sandbox.paypal.com/sse",
+ "headers": {
+ "Authorization": "Bearer ${PAYPAL_SANDBOX_ACCESS_TOKEN}"
+ }
+ }
+ }
+ },
+ {
+ "name": "pigment",
+ "category": "direct_remote_service",
+ "providers": [
+ "Pigment"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gopigment/ai-plugins.git",
+ "sha": "673e6994c9cc9745e1b5655a0dc4ba3607bb08ee"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gopigment/ai-plugins/673e6994c9cc9745e1b5655a0dc4ba3607bb08ee/",
+ "configUrl": "https://raw.githubusercontent.com/gopigment/ai-plugins/673e6994c9cc9745e1b5655a0dc4ba3607bb08ee/.mcp.json",
+ "mcpServers": {
+ "pigment": {
+ "type": "http",
+ "url": "https://pigment.app/api/mcp/public/{your-mcp-id}"
+ }
+ }
+ },
+ {
+ "name": "pinecone",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Pinecone"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/pinecone-io/pinecone-claude-code-plugin.git",
+ "sha": "c383d38b5cc3c5ec219f2e68026e47ffbf46524a"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/pinecone-io/pinecone-claude-code-plugin/c383d38b5cc3c5ec219f2e68026e47ffbf46524a/",
+ "configUrl": "https://raw.githubusercontent.com/pinecone-io/pinecone-claude-code-plugin/c383d38b5cc3c5ec219f2e68026e47ffbf46524a/.mcp.json",
+ "mcpServers": {
+ "pinecone": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@pinecone-database/mcp"
+ ],
+ "cwd": "${CLAUDE_PLUGIN_ROOT}",
+ "env": {
+ "PINECONE_API_KEY": "${PINECONE_API_KEY}"
+ }
+ }
+ }
+ },
+ {
+ "name": "planetscale",
+ "category": "direct_remote_service",
+ "providers": [
+ "PlanetScale"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/planetscale/claude-plugin.git",
+ "sha": "95c80f9f391be9b1b6172bf82d4191e1ec11b637"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/planetscale/claude-plugin/95c80f9f391be9b1b6172bf82d4191e1ec11b637/",
+ "configUrl": "https://raw.githubusercontent.com/planetscale/claude-plugin/95c80f9f391be9b1b6172bf82d4191e1ec11b637/.mcp.json",
+ "mcpServers": {
+ "planetscale": {
+ "type": "http",
+ "url": "https://mcp.pscale.dev/mcp/planetscale"
+ }
+ }
+ },
+ {
+ "name": "posthog",
+ "category": "direct_remote_service",
+ "providers": [
+ "PostHog"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/PostHog/ai-plugin.git",
+ "sha": "33c066c80776a962a4233d76b20a3317733070b4"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/PostHog/ai-plugin/33c066c80776a962a4233d76b20a3317733070b4/",
+ "configUrl": "https://raw.githubusercontent.com/PostHog/ai-plugin/33c066c80776a962a4233d76b20a3317733070b4/.mcp.json",
+ "mcpServers": {
+ "posthog": {
+ "type": "http",
+ "url": "https://mcp.posthog.com/mcp",
+ "headers": {
+ "x-posthog-mcp-consumer": "plugin"
+ }
+ }
+ }
+ },
+ {
+ "name": "postman",
+ "category": "direct_remote_service",
+ "providers": [
+ "Postman"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/Postman-Devrel/postman-claude-code-plugin.git",
+ "sha": "27f652ea98d9ae0cec0ccc9f2b46128239a36a8f"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/Postman-Devrel/postman-claude-code-plugin/27f652ea98d9ae0cec0ccc9f2b46128239a36a8f/",
+ "configUrl": "https://raw.githubusercontent.com/Postman-Devrel/postman-claude-code-plugin/27f652ea98d9ae0cec0ccc9f2b46128239a36a8f/.mcp.json",
+ "mcpServers": {
+ "postman": {
+ "type": "http",
+ "url": "https://mcp.postman.com/${POSTMAN_MCP_MODE:-mcp}",
+ "headers": {
+ "X-Source": "claude-code-plugin",
+ "X-Plugin-Version": "1.3.1",
+ "User-Agent": "postman-claude-code-plugin/1.3.1"
+ }
+ }
+ }
+ },
+ {
+ "name": "prisma",
+ "category": "direct_remote_service",
+ "providers": [
+ "Prisma"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/prisma/claude-plugin.git",
+ "sha": "815dbc4a045a29e3b81510ba0e3ab806f1baaf0e"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/prisma/claude-plugin/815dbc4a045a29e3b81510ba0e3ab806f1baaf0e/",
+ "configUrl": "https://raw.githubusercontent.com/prisma/claude-plugin/815dbc4a045a29e3b81510ba0e3ab806f1baaf0e/.mcp.json",
+ "mcpServers": {
+ "Prisma-Local": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "prisma",
+ "mcp"
+ ]
+ },
+ "Prisma-Remote": {
+ "type": "http",
+ "url": "https://mcp.prisma.io/mcp"
+ }
+ }
+ },
+ {
+ "name": "railway",
+ "category": "direct_remote_service",
+ "providers": [
+ "Railway"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/railwayapp/railway-skills.git",
+ "path": "plugins/railway",
+ "ref": "main",
+ "sha": "950acebcef3445f3915ea0709876c3ba9c237a7f"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/railwayapp/railway-skills/950acebcef3445f3915ea0709876c3ba9c237a7f/plugins/railway/",
+ "configUrl": "https://raw.githubusercontent.com/railwayapp/railway-skills/950acebcef3445f3915ea0709876c3ba9c237a7f/plugins/railway/.mcp.json",
+ "mcpServers": {
+ "railway": {
+ "type": "http",
+ "url": "https://mcp.railway.com"
+ }
+ }
+ },
+ {
+ "name": "rc",
+ "category": "direct_remote_service",
+ "providers": [
+ "RevenueCat"
+ ],
+ "notes": "Same RevenueCat endpoint as revenuecat. Counted as separate plugin, one provider.",
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/RevenueCat/rc-claude-code-plugin.git",
+ "sha": "b9b77b12da33213c9c2e750b06cd6270c1d8ed65"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/RevenueCat/rc-claude-code-plugin/b9b77b12da33213c9c2e750b06cd6270c1d8ed65/revenuecat/",
+ "configUrl": "https://raw.githubusercontent.com/RevenueCat/rc-claude-code-plugin/b9b77b12da33213c9c2e750b06cd6270c1d8ed65/revenuecat/.mcp.json",
+ "mcpServers": {
+ "RevenueCat": {
+ "type": "http",
+ "url": "https://mcp.revenuecat.ai/mcp",
+ "description": "RevenueCat MCP server for project configuration and data access"
+ }
+ }
+ },
+ {
+ "name": "render",
+ "category": "direct_remote_service",
+ "providers": [
+ "Render"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/render-oss/render-plugin-claude-code.git",
+ "sha": "e8f889396634dbc8c368448a7f3de993ed4a5ac1"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/render-oss/render-plugin-claude-code/e8f889396634dbc8c368448a7f3de993ed4a5ac1/",
+ "configUrl": "https://raw.githubusercontent.com/render-oss/render-plugin-claude-code/e8f889396634dbc8c368448a7f3de993ed4a5ac1/.mcp.json",
+ "mcpServers": {
+ "render": {
+ "type": "http",
+ "url": "https://mcp.render.com/mcp",
+ "oauth": {
+ "clientId": "claude"
+ }
+ }
+ }
+ },
+ {
+ "name": "resend",
+ "category": "direct_remote_service",
+ "providers": [
+ "Resend"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/resend/resend-skills.git",
+ "sha": "5f9f97958a785429ab8e4534d61fe2d712d74e3d"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/resend/resend-skills/5f9f97958a785429ab8e4534d61fe2d712d74e3d/",
+ "configUrl": "https://raw.githubusercontent.com/resend/resend-skills/5f9f97958a785429ab8e4534d61fe2d712d74e3d/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "resend": {
+ "type": "http",
+ "url": "https://mcp.resend.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "revenuecat",
+ "category": "direct_remote_service",
+ "providers": [
+ "RevenueCat"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/RevenueCat/rc-claude-code-plugin.git",
+ "sha": "b9b77b12da33213c9c2e750b06cd6270c1d8ed65"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/RevenueCat/rc-claude-code-plugin/b9b77b12da33213c9c2e750b06cd6270c1d8ed65/revenuecat/",
+ "configUrl": "https://raw.githubusercontent.com/RevenueCat/rc-claude-code-plugin/b9b77b12da33213c9c2e750b06cd6270c1d8ed65/revenuecat/.mcp.json",
+ "mcpServers": {
+ "RevenueCat": {
+ "type": "http",
+ "url": "https://mcp.revenuecat.ai/mcp",
+ "description": "RevenueCat MCP server for project configuration and data access"
+ }
+ }
+ },
+ {
+ "name": "rootly",
+ "category": "direct_remote_service",
+ "providers": [
+ "Rootly"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/Rootly-AI-Labs/rootly-claude-plugin.git",
+ "sha": "65832aa6ff7a7b39c6bd64899a7a64646e3948ed"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/Rootly-AI-Labs/rootly-claude-plugin/65832aa6ff7a7b39c6bd64899a7a64646e3948ed/",
+ "configUrl": "https://raw.githubusercontent.com/Rootly-AI-Labs/rootly-claude-plugin/65832aa6ff7a7b39c6bd64899a7a64646e3948ed/.mcp.json",
+ "mcpServers": {
+ "rootly": {
+ "type": "http",
+ "url": "https://mcp.rootly.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "sagemaker-ai",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Amazon Web Services"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/awslabs/agent-plugins.git",
+ "path": "plugins/sagemaker-ai",
+ "ref": "main",
+ "sha": "bab56a3b9991aa0c6857b05198a61ba14a60bce4"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/awslabs/agent-plugins/bab56a3b9991aa0c6857b05198a61ba14a60bce4/plugins/sagemaker-ai/",
+ "configUrl": "https://raw.githubusercontent.com/awslabs/agent-plugins/bab56a3b9991aa0c6857b05198a61ba14a60bce4/plugins/sagemaker-ai/.mcp.json",
+ "mcpServers": {
+ "aws-mcp": {
+ "command": "uvx",
+ "args": [
+ "mcp-proxy-for-aws@latest",
+ "https://aws-mcp.us-east-1.api.aws/mcp"
+ ],
+ "disabled": false
+ }
+ }
+ },
+ {
+ "name": "sanity",
+ "category": "direct_remote_service",
+ "providers": [
+ "Sanity"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/sanity-io/agent-toolkit.git",
+ "sha": "8675ed36b5f5da950c3920c118d025cd1c94f58e"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/sanity-io/agent-toolkit/8675ed36b5f5da950c3920c118d025cd1c94f58e/",
+ "configUrl": "https://raw.githubusercontent.com/sanity-io/agent-toolkit/8675ed36b5f5da950c3920c118d025cd1c94f58e/.mcp.json",
+ "mcpServers": {
+ "Sanity": {
+ "type": "http",
+ "url": "https://mcp.sanity.io"
+ }
+ }
+ },
+ {
+ "name": "semgrep",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Semgrep"
+ ],
+ "notes": "Pinned hook dispatcher starts Guardian MCP; pinned repository README documents login and pulling projects/findings from Semgrep app.",
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/semgrep/mcp-marketplace.git",
+ "path": "plugin",
+ "sha": "55b1f8d97a2571c7f27f15beb3080df3b536bd78"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/semgrep/mcp-marketplace/55b1f8d97a2571c7f27f15beb3080df3b536bd78/plugin/",
+ "configUrl": "https://raw.githubusercontent.com/semgrep/mcp-marketplace/55b1f8d97a2571c7f27f15beb3080df3b536bd78/plugin/.mcp.json",
+ "mcpServers": {
+ "guardian": {
+ "command": "${CLAUDE_PLUGIN_ROOT}/scripts/hook",
+ "args": [
+ "claude",
+ "mcp"
+ ]
+ }
+ }
+ },
+ {
+ "name": "sentry",
+ "category": "direct_remote_service",
+ "providers": [
+ "Sentry"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/getsentry/plugin-claude.git",
+ "sha": "73e53541d7af21672e27428c7067f4264b8a3d65"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/getsentry/plugin-claude/73e53541d7af21672e27428c7067f4264b8a3d65/",
+ "configUrl": "https://raw.githubusercontent.com/getsentry/plugin-claude/73e53541d7af21672e27428c7067f4264b8a3d65/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "sentry": {
+ "type": "http",
+ "url": "https://mcp.sentry.dev/mcp?utm_source=plugin"
+ }
+ }
+ },
+ {
+ "name": "shippo",
+ "category": "direct_remote_service",
+ "providers": [
+ "Shippo"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/goshippo/ai.git",
+ "path": "providers/claude/plugin",
+ "ref": "main",
+ "sha": "15cbb6364fbcfd465a134f5972da9179436d0787"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/goshippo/ai/15cbb6364fbcfd465a134f5972da9179436d0787/providers/claude/plugin/",
+ "configUrl": "https://raw.githubusercontent.com/goshippo/ai/15cbb6364fbcfd465a134f5972da9179436d0787/providers/claude/plugin/.mcp.json",
+ "mcpServers": {
+ "shippo-mcp": {
+ "type": "http",
+ "url": "https://mcp.shippo.com"
+ }
+ }
+ },
+ {
+ "name": "slack",
+ "category": "direct_remote_service",
+ "providers": [
+ "Slack"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/slackapi/slack-mcp-plugin.git",
+ "sha": "1579a071323da95c9b4a59fb6d510f7336c021e3"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/slackapi/slack-mcp-plugin/1579a071323da95c9b4a59fb6d510f7336c021e3/",
+ "configUrl": "https://raw.githubusercontent.com/slackapi/slack-mcp-plugin/1579a071323da95c9b4a59fb6d510f7336c021e3/.mcp.json",
+ "mcpServers": {
+ "slack": {
+ "type": "http",
+ "url": "https://mcp.slack.com/mcp",
+ "oauth": {
+ "clientId": "1601185624273.8899143856786",
+ "callbackPort": 3118
+ }
+ }
+ }
+ },
+ {
+ "name": "sonatype-guide",
+ "category": "direct_remote_service",
+ "providers": [
+ "Sonatype Guide"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/sonatype/sonatype-guide-claude-plugin.git",
+ "sha": "1dae73980f591d3196f5532ac72186513563d028"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/sonatype/sonatype-guide-claude-plugin/1dae73980f591d3196f5532ac72186513563d028/",
+ "configUrl": "https://raw.githubusercontent.com/sonatype/sonatype-guide-claude-plugin/1dae73980f591d3196f5532ac72186513563d028/.mcp.json",
+ "mcpServers": {
+ "sonatype-guide": {
+ "type": "http",
+ "url": "https://mcp.guide.sonatype.com/mcp",
+ "headers": {
+ "Authorization": "Bearer ${SONATYPE_GUIDE_TOKEN}"
+ }
+ }
+ }
+ },
+ {
+ "name": "sourcegraph",
+ "category": "direct_remote_service",
+ "providers": [
+ "Sourcegraph"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/sourcegraph-community/sourcegraph-claudecode-plugin.git",
+ "sha": "332ee0ca9a409ccd791abee43c7abf2606469017"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/sourcegraph-community/sourcegraph-claudecode-plugin/332ee0ca9a409ccd791abee43c7abf2606469017/",
+ "configUrl": "https://raw.githubusercontent.com/sourcegraph-community/sourcegraph-claudecode-plugin/332ee0ca9a409ccd791abee43c7abf2606469017/.mcp.json",
+ "mcpServers": {
+ "sourcegraph": {
+ "type": "http",
+ "url": "${SOURCEGRAPH_ENDPOINT}/.api/mcp",
+ "headers": {
+ "Authorization": "token ${SOURCEGRAPH_ACCESS_TOKEN}"
+ }
+ }
+ }
+ },
+ {
+ "name": "spanner",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Google Cloud (including Firebase and Looker)"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/gemini-cli-extensions/spanner.git",
+ "sha": "a69b5f3449387a851648f8bd9be58d0b27e0411c"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/gemini-cli-extensions/spanner/a69b5f3449387a851648f8bd9be58d0b27e0411c/",
+ "configUrl": "https://raw.githubusercontent.com/gemini-cli-extensions/spanner/a69b5f3449387a851648f8bd9be58d0b27e0411c/.claude-plugin/plugin.json",
+ "mcpServers": {
+ "spanner": {
+ "command": "npx",
+ "args": [
+ "-y",
+ "@toolbox-sdk/[email protected]",
+ "--prebuilt",
+ "spanner",
+ "--stdio"
+ ],
+ "env": {
+ "SPANNER_PROJECT": "${user_config.spanner_project}",
+ "SPANNER_INSTANCE": "${user_config.spanner_instance}",
+ "SPANNER_DATABASE": "${user_config.spanner_database}",
+ "SPANNER_DIALECT": "${user_config.spanner_dialect}"
+ }
+ }
+ }
+ },
+ {
+ "name": "stripe",
+ "category": "direct_remote_service",
+ "providers": [
+ "Stripe"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/stripe/ai.git",
+ "path": "providers/claude/plugin",
+ "ref": "main",
+ "sha": "68382523846ea5bfad75ba1ef58dc5db031d0a5a"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/stripe/ai/68382523846ea5bfad75ba1ef58dc5db031d0a5a/providers/claude/plugin/",
+ "configUrl": "https://raw.githubusercontent.com/stripe/ai/68382523846ea5bfad75ba1ef58dc5db031d0a5a/providers/claude/plugin/.mcp.json",
+ "mcpServers": {
+ "stripe": {
+ "type": "http",
+ "url": "https://mcp.stripe.com"
+ }
+ }
+ },
+ {
+ "name": "sumup",
+ "category": "direct_remote_service",
+ "providers": [
+ "SumUp"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/sumup/sumup-skills.git",
+ "sha": "cb72003b417cec5e717c6b788d63394b7e921938"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/sumup/sumup-skills/cb72003b417cec5e717c6b788d63394b7e921938/",
+ "configUrl": "https://raw.githubusercontent.com/sumup/sumup-skills/cb72003b417cec5e717c6b788d63394b7e921938/.mcp.json",
+ "mcpServers": {
+ "sumup": {
+ "type": "http",
+ "url": "https://mcp.sumup.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "supabase",
+ "category": "direct_remote_service",
+ "providers": [
+ "Supabase"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/supabase-community/supabase-plugin.git",
+ "sha": "f3f332e0164c34a8392772811737fda0cb972d06"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/supabase-community/supabase-plugin/f3f332e0164c34a8392772811737fda0cb972d06/",
+ "configUrl": "https://raw.githubusercontent.com/supabase-community/supabase-plugin/f3f332e0164c34a8392772811737fda0cb972d06/agents/claude/.mcp.json",
+ "mcpServers": {
+ "supabase": {
+ "type": "http",
+ "url": "https://mcp.supabase.com/mcp",
+ "headers": {
+ "X-Source-Name": "claude-code-plugin",
+ "X-Source-Version": "0.1.15"
+ }
+ }
+ }
+ },
+ {
+ "name": "synthflow",
+ "category": "direct_remote_service",
+ "providers": [
+ "Synthflow"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/SynthFlowAI/AnthropicPlugin.git",
+ "path": "plugins/synthflow",
+ "ref": "main",
+ "sha": "205871ee83508502d2c982ee1bb7e65a2a29190b"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/SynthFlowAI/AnthropicPlugin/205871ee83508502d2c982ee1bb7e65a2a29190b/plugins/synthflow/",
+ "configUrl": "https://raw.githubusercontent.com/SynthFlowAI/AnthropicPlugin/205871ee83508502d2c982ee1bb7e65a2a29190b/plugins/synthflow/.mcp.json",
+ "mcpServers": {
+ "synthflow": {
+ "type": "http",
+ "url": "https://mcp.synthflow.ai/mcp"
+ },
+ "synthflow-docs": {
+ "type": "http",
+ "url": "https://docs.synthflow.ai/_mcp/server"
+ }
+ }
+ },
+ {
+ "name": "telegram",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Telegram"
+ ],
+ "source": {
+ "kind": "external_plugins",
+ "path": "./external_plugins/telegram"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/telegram/",
+ "configUrl": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/telegram/.mcp.json",
+ "mcpServers": {
+ "telegram": {
+ "command": "bun",
+ "args": [
+ "run",
+ "--cwd",
+ "${CLAUDE_PLUGIN_ROOT}",
+ "--shell=bun",
+ "--silent",
+ "start"
+ ]
+ }
+ }
+ },
+ {
+ "name": "terraform",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "HashiCorp HCP Terraform"
+ ],
+ "notes": "Pinned Docker server 0.4.0 supports HCP Terraform workspaces/private registry with TFE_TOKEN, not just public Terraform docs.",
+ "source": {
+ "kind": "external_plugins",
+ "path": "./external_plugins/terraform"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/terraform/",
+ "configUrl": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/terraform/.mcp.json",
+ "mcpServers": {
+ "terraform": {
+ "command": "docker",
+ "args": [
+ "run",
+ "-i",
+ "--rm",
+ "-e",
+ "TFE_TOKEN=${TFE_TOKEN}",
+ "hashicorp/terraform-mcp-server:0.4.0"
+ ]
+ }
+ }
+ },
+ {
+ "name": "valtown",
+ "category": "direct_remote_service",
+ "providers": [
+ "Val Town"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/val-town/plugins.git",
+ "path": "plugin",
+ "ref": "main",
+ "sha": "2d3ec654b6a7d93e209afb8f2e8848eddcb9f17b"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/val-town/plugins/2d3ec654b6a7d93e209afb8f2e8848eddcb9f17b/plugin/",
+ "configUrl": "https://raw.githubusercontent.com/val-town/plugins/2d3ec654b6a7d93e209afb8f2e8848eddcb9f17b/plugin/.mcp.json",
+ "mcpServers": {
+ "valtown": {
+ "type": "http",
+ "url": "https://api.val.town/v3/mcp"
+ }
+ }
+ },
+ {
+ "name": "vanta",
+ "category": "direct_remote_service",
+ "providers": [
+ "Vanta"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "sha": "345d86b55faa649e955b7ea5569cf52d8425c2d5"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/",
+ "configUrl": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json",
+ "mcpServers": {
+ "vanta-us": {
+ "type": "http",
+ "url": "https://mcp.vanta.com/mcp"
+ },
+ "vanta-eu": {
+ "type": "http",
+ "url": "https://mcp.eu.vanta.com/mcp"
+ },
+ "vanta-aus": {
+ "type": "http",
+ "url": "https://mcp.aus.vanta.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "vanta-mcp-plugin",
+ "category": "direct_remote_service",
+ "providers": [
+ "Vanta"
+ ],
+ "notes": "Same three regional Vanta endpoints as vanta. Counted as separate plugin, one provider.",
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "sha": "345d86b55faa649e955b7ea5569cf52d8425c2d5"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/",
+ "configUrl": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json",
+ "mcpServers": {
+ "vanta-us": {
+ "type": "http",
+ "url": "https://mcp.vanta.com/mcp"
+ },
+ "vanta-eu": {
+ "type": "http",
+ "url": "https://mcp.eu.vanta.com/mcp"
+ },
+ "vanta-aus": {
+ "type": "http",
+ "url": "https://mcp.aus.vanta.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "vercel",
+ "category": "direct_remote_service",
+ "providers": [
+ "Vercel"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/vercel/vercel-plugin.git",
+ "sha": "dca8da784e876cbb8e81bd98cb5b2b87323449ca"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/vercel/vercel-plugin/dca8da784e876cbb8e81bd98cb5b2b87323449ca/",
+ "configUrl": "https://raw.githubusercontent.com/vercel/vercel-plugin/dca8da784e876cbb8e81bd98cb5b2b87323449ca/.mcp.json",
+ "mcpServers": {
+ "vercel": {
+ "type": "http",
+ "url": "https://mcp.vercel.com",
+ "note": "Official Vercel MCP server. Uses OAuth — on first connection the agent will be prompted to authorize via Vercel. Read-only in initial release: search docs, list projects/deployments, inspect logs."
+ }
+ }
+ },
+ {
+ "name": "windsor-ai",
+ "category": "direct_remote_service",
+ "providers": [
+ "Windsor.ai"
+ ],
+ "notes": "Declares type:url rather than standard Claude type:http; endpoint is evidence of intent, not schema/runtime compatibility.",
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/windsor-ai/claude-windsor-ai-plugin.git",
+ "sha": "d7ba1cb036c7ca765536355fb85f13a3237ea3f9"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/windsor-ai/claude-windsor-ai-plugin/d7ba1cb036c7ca765536355fb85f13a3237ea3f9/",
+ "configUrl": "https://raw.githubusercontent.com/windsor-ai/claude-windsor-ai-plugin/d7ba1cb036c7ca765536355fb85f13a3237ea3f9/.mcp.json",
+ "mcpServers": {
+ "windsor-ai": {
+ "type": "url",
+ "url": "https://mcp.windsor.ai",
+ "description": "Windsor.ai marketing data — query ad spend, campaigns, and analytics from 50+ sources"
+ }
+ }
+ },
+ {
+ "name": "wix",
+ "category": "direct_remote_service",
+ "providers": [
+ "Wix"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/wix/skills.git",
+ "sha": "d8247b9f4603ecadc2891d3ded9bb285d5ee433b"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/wix/skills/d8247b9f4603ecadc2891d3ded9bb285d5ee433b/",
+ "configUrl": "https://raw.githubusercontent.com/wix/skills/d8247b9f4603ecadc2891d3ded9bb285d5ee433b/.mcp.json",
+ "mcpServers": {
+ "wix-mcp": {
+ "type": "http",
+ "url": "https://mcp.wix.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "zapier",
+ "category": "direct_remote_service",
+ "providers": [
+ "Zapier"
+ ],
+ "source": {
+ "kind": "git-subdir",
+ "repository": "https://github.com/zapier/zapier-mcp.git",
+ "path": "plugins/zapier",
+ "ref": "main",
+ "sha": "217d65a980f9b75536babf89ba64bf03ad95beea"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/zapier/zapier-mcp/217d65a980f9b75536babf89ba64bf03ad95beea/plugins/zapier/",
+ "configUrl": "https://raw.githubusercontent.com/zapier/zapier-mcp/217d65a980f9b75536babf89ba64bf03ad95beea/plugins/zapier/.mcp.json",
+ "mcpServers": {
+ "zapier": {
+ "type": "http",
+ "url": "https://mcp.zapier.com/api/v1/connect"
+ }
+ }
+ },
+ {
+ "name": "zoom-plugin",
+ "category": "direct_remote_service",
+ "providers": [
+ "Zoom"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "sha": "9311dd4b31e8e55c27b95479a84601576e449e97"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/",
+ "configUrl": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json",
+ "mcpServers": {
+ "zoom-mcp": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/zoom/streamable",
+ "headers": {
+ "Authorization": "Bearer ${ZOOM_MCP_ACCESS_TOKEN}"
+ }
+ },
+ "zoom-meetings-mcp": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/meeting/streamable",
+ "headers": {
+ "Authorization": "Bearer ${ZOOM_MEETINGS_MCP_ACCESS_TOKEN}"
+ }
+ },
+ "zoom-canvas-mcp": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/canvas/streamable",
+ "headers": {
+ "Authorization": "Bearer ${ZOOM_CANVAS_MCP_ACCESS_TOKEN}"
+ }
+ },
+ "zoom-chat-mcp": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/chat/streamable",
+ "headers": {
+ "Authorization": "Bearer ${ZOOM_CHAT_MCP_ACCESS_TOKEN}"
+ }
+ },
+ "zoom-tasks-mcp": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/tasks/streamable",
+ "headers": {
+ "Authorization": "Bearer ${ZOOM_TASKS_MCP_ACCESS_TOKEN}"
+ }
+ },
+ "zoom-revenue-accelerator-mcp": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/revenue_accelerator/streamable",
+ "headers": {
+ "Authorization": "Bearer ${ZOOM_REVENUE_ACCELERATOR_MCP_ACCESS_TOKEN}"
+ }
+ },
+ "zoom-whiteboard-mcp": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/whiteboard/streamable",
+ "headers": {
+ "Authorization": "Bearer ${ZOOM_WHITEBOARD_MCP_ACCESS_TOKEN}"
+ }
+ }
+ }
+ },
+ {
+ "name": "zoominfo",
+ "category": "direct_remote_service",
+ "providers": [
+ "ZoomInfo"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/Zoominfo/zoominfo-mcp-plugin.git",
+ "sha": "d07402feb2b9967ccc118f55bacd41a79c822d6a"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/Zoominfo/zoominfo-mcp-plugin/d07402feb2b9967ccc118f55bacd41a79c822d6a/",
+ "configUrl": "https://raw.githubusercontent.com/Zoominfo/zoominfo-mcp-plugin/d07402feb2b9967ccc118f55bacd41a79c822d6a/.mcp.json",
+ "mcpServers": {
+ "zoominfo": {
+ "type": "http",
+ "url": "https://mcp.zoominfo.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "zscaler",
+ "category": "stdio_service_adapter",
+ "providers": [
+ "Zscaler"
+ ],
+ "source": {
+ "kind": "url",
+ "repository": "https://github.com/zscaler/zscaler-mcp-server.git",
+ "sha": "809f68d6c921e0829fb2e07e9b797e7e70cf720b"
+ },
+ "sourceBase": "https://raw.githubusercontent.com/zscaler/zscaler-mcp-server/809f68d6c921e0829fb2e07e9b797e7e70cf720b/",
+ "configUrl": "https://raw.githubusercontent.com/zscaler/zscaler-mcp-server/809f68d6c921e0829fb2e07e9b797e7e70cf720b/.mcp.json",
+ "mcpServers": {
+ "zscaler-mcp-server": {
+ "command": "uvx",
+ "args": [
+ "--env-file",
+ "${CLAUDE_PLUGIN_ROOT}/.env",
+ ]
+ }
+ }
+ }
+ ]
+}
diff --git a/packages/ai/mcp-catalog/sources/openai-plugins.json b/packages/ai/mcp-catalog/sources/openai-plugins.json
new file mode 100644
index 0000000000..41f9db8f86
--- /dev/null
+++ b/packages/ai/mcp-catalog/sources/openai-plugins.json
@@ -0,0 +1,626 @@
+{
+ "$comment": "Pinned snapshot of the remote account/SaaS/cloud service MCP configs in OpenAI's public plugins catalog. Derived 2026-09-11 by reading the public marketplace and per-plugin configs at the pinned commit (read-only HTTP, no plugin code executed, no auth). This file is an import input, not the shipped catalog; provenance fields are preserved verbatim so the importer can strip OAuth placeholders/branded client ids deterministically. Regenerate by re-reading the pinned URLs below and updating plugins[].mcpServers accordingly.",
+ "source": "openai-plugins",
+ "repository": "https://github.com/openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "catalogUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/.agents/plugins/marketplace.json",
+ "loaderConvention": "Legacy Codex plugins auto-discover a root .mcp.json when the manifest omits mcpServers; both explicitly referenced and implicitly discovered configs are recorded (see wiring).",
+ "scope": "Plugins whose shipped config is a remote account/SaaS/cloud MCP server. Excluded upstream: hosted research/search (consensus), hosted app-ID-only mappings, local stdio utilities, docs/workflow plugins.",
+ "counts": {
+ "plugins": 25,
+ "withOauthPlaceholders": 6
+ },
+ "plugins": [
+ {
+ "name": "airtable",
+ "displayName": "Airtable",
+ "description": "Bring operational data and context into the flow of your ChatGPT conversations. You can ask questions, create and update records, and analyze your data—all through conversation. Use the data in Airtable as input to the work you’re doing in ChatGPT, like building a landing page using content you’ve organized in Airtable. Make quick updates to Airtable without leaving the chat. Airtable for ChatGPT is ideal anytime you need quick access to structured internal data to inform your conversation.\n\nAirtable's App connects ChatGPT directly to your Airtable bases, so you can ask questions, create and update records, and analyze your data—all through conversation",
+ "category": "Productivity",
+ "author": "Airtable",
+ "homepage": "https://airtable.com",
+ "privacyUrl": "https://www.airtable.com/company/privacy",
+ "supportUrl": "https://support.airtable.com/docs/contacting-airtable-support",
+ "termsUrl": "https://www.airtable.com/company/tos",
+ "version": "6.0.1",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/airtable/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": true,
+ "mcpServers": {
+ "airtable": {
+ "type": "http",
+ "url": "https://mcp.airtable.com/mcp",
+ "oauth": {
+ "client_id": "<AIRTABLE_PUBLIC_CLIENT_ID>"
+ }
+ }
+ }
+ },
+ {
+ "name": "atlassian-rovo",
+ "displayName": "Atlassian Rovo",
+ "description": "Manage Jira and Confluence fast",
+ "category": "Productivity",
+ "author": "Atlassian",
+ "homepage": "https://www.atlassian.com",
+ "privacyUrl": "https://www.atlassian.com/legal/privacy-policy",
+ "termsUrl": "https://www.atlassian.com/legal/cloud-terms-of-service",
+ "license": "MIT",
+ "version": "1.0.6",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/atlassian-rovo/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "atlassian-rovo": {
+ "type": "http",
+ "url": "https://mcp.atlassian.com/v1/mcp/authv2"
+ }
+ }
+ },
+ {
+ "name": "canva",
+ "displayName": "Canva",
+ "description": "Bring your Canva design workflow into Codex and create, refine, and review designs through natural conversation.\nAvailable skills:\nResize for social media: Adapt a design for Facebook, Instagram, and LinkedIn in one step.\nBulk create: Generate multiple designs from spreadsheet data using a brand template.\nEdit designs: Update text, media, and formatting, or reposition and resize elements.\nGet design feedback: Receive structured feedback on visual hierarchy, layout, readability, consistency, and accessibility.\nImplement feedback: Review comment threads and apply clear, actionable changes.\nBrand check: Check colors, fonts, logo usage, and copy against your Brand Kit.\nOnce installed, describe what you want in plain language or invoke Canva directly with @Canva.\nTry prompts like:\n- @Canva, resize this design for social media.\n- @Canva, create designs from this spreadsheet using my brand template.\n- @Canva, update the headline in this design.\n- @Canva, review this design’s visual hierarchy and readability.\n- @Canva, implement the feedback in the comment threads.\n- @Canva, check this design against my Brand Kit.\n\nRequirements: Connect your Canva account to use the plugin. Bulk Create requires an eligible Canva Enterprise plan.\n\nWant to take a more hands-on approach? Instantly open your design in Canva’s powerful editor for the final touches.",
+ "category": "Creativity",
+ "author": "Canva Pty Ltd.",
+ "homepage": "https://www.canva.com",
+ "privacyUrl": "https://www.canva.com/policies/privacy-policy/",
+ "supportUrl": "https://www.canva.com/help/contact-us/",
+ "termsUrl": "https://www.canva.com/policies/terms-of-use/",
+ "version": "14.0.0",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/canva/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "canva": {
+ "type": "http",
+ "url": "https://mcp.canva.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "clickup",
+ "displayName": "ClickUp",
+ "description": "Turn Codex into your ClickUp command center.",
+ "category": "Productivity",
+ "author": "ClickUp",
+ "homepage": "https://clickup.com",
+ "license": "MIT",
+ "version": "1.0.3",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/clickup/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "clickup": {
+ "type": "http",
+ "url": "https://mcp.clickup.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "cloudflare",
+ "displayName": "Cloudflare",
+ "description": "Cloudflare platform plugin with curated skills for Workers, Wrangler, and Agents SDK plus the official Cloudflare API MCP server.",
+ "category": "Developer Tools",
+ "author": "Cloudflare",
+ "homepage": "https://workers.cloudflare.com/",
+ "privacyUrl": "https://www.cloudflare.com/privacypolicy/",
+ "termsUrl": "https://www.cloudflare.com/website-terms/",
+ "license": "MIT",
+ "version": "0.1.2",
+ "wiring": "explicit_manifest",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/cloudflare/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "cloudflare-api": {
+ "type": "http",
+ "url": "https://mcp.cloudflare.com/mcp",
+ "note": "Official Cloudflare API MCP server. Uses OAuth on first connection, with optional bearer-token auth for automation. Provides token-efficient access to the Cloudflare API via search() and execute()."
+ }
+ }
+ },
+ {
+ "name": "datadog",
+ "displayName": "Datadog (Preview)",
+ "description": "Available for US1 customers only. Analyze, investigate, and act on your Datadog telemetry directly from ChatGPT using natural language. Ask questions about your production applications, identify, visualize, and remediate issues in your critical services. Run agentic loops to ensure you continue to maintain good observability and service management posture.",
+ "category": "Developer Tools",
+ "author": "Datadog",
+ "homepage": "https://www.datadoghq.com",
+ "privacyUrl": "https://www.datadoghq.com/legal/privacy/",
+ "supportUrl": "https://www.datadoghq.com/support/",
+ "termsUrl": "https://www.datadoghq.com/legal/terms/2024-10-25/",
+ "version": "10.0.0",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/datadog/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "datadog": {
+ "type": "http",
+ "url": "https://mcp.datadoghq.com/v1/mcp"
+ }
+ }
+ },
+ {
+ "name": "dropbox",
+ "displayName": "Dropbox",
+ "description": "The Dropbox plugin for ChatGPT connects your Dropbox files directly to ChatGPT. You can access files, save ChatGPT-generated content to Dropbox, and create sharing links without switching tools. Everything respects your existing Dropbox permissions, and ChatGPT only works with files you already have access to.",
+ "category": "Productivity",
+ "author": "Dropbox",
+ "homepage": "https://www.dropbox.com",
+ "privacyUrl": "https://www.dropbox.com/privacy",
+ "supportUrl": "https://www.dropbox.com/get_help",
+ "termsUrl": "https://www.dropbox.com/terms",
+ "version": "5.0.1",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/dropbox/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "dropbox": {
+ "type": "http",
+ "url": "https://mcp.dropbox.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "figma",
+ "displayName": "Figma",
+ "description": "Figma workflows for design implementation, Code Connect templates, and design system rule generation.",
+ "category": "Creativity",
+ "author": "Figma",
+ "homepage": "https://www.figma.com",
+ "privacyUrl": "https://www.figma.com/legal/privacy/",
+ "termsUrl": "https://www.figma.com/legal/developer-terms/",
+ "license": "LicenseRef-Figma-Developer-Terms",
+ "version": "2.0.20",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/figma/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "figma": {
+ "type": "http",
+ "url": "https://mcp.figma.com/mcp",
+ "oauth_resource": "https://mcp.figma.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "github",
+ "displayName": "GitHub",
+ "description": "Inspect repositories, triage pull requests and issues, debug CI, and publish changes through a hybrid GitHub connector and CLI workflow.",
+ "category": "Developer Tools",
+ "author": "OpenAI",
+ "homepage": "https://github.com/",
+ "privacyUrl": "https://docs.github.com/site-policy/privacy-policies/github-general-privacy-statement",
+ "termsUrl": "https://docs.github.com/en/site-policy/github-terms/github-terms-of-service",
+ "license": "MIT",
+ "version": "0.1.11",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/github/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "github": {
+ "type": "http",
+ "url": "https://api.githubcopilot.com/mcp/",
+ "bearer_token_env_var": "GITHUB_PAT_TOKEN"
+ }
+ }
+ },
+ {
+ "name": "gmail",
+ "displayName": "Gmail",
+ "description": "Work with Gmail using the configured Gmail app connector.",
+ "category": "Communication",
+ "author": "OpenAI",
+ "homepage": "https://workspace.google.com/products/gmail/",
+ "privacyUrl": "https://policies.google.com/privacy",
+ "termsUrl": "https://policies.google.com/terms",
+ "license": "MIT",
+ "version": "0.1.9",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/gmail/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": true,
+ "mcpServers": {
+ "gmail": {
+ "type": "http",
+ "url": "https://gmailmcp.googleapis.com/mcp/v1",
+ "scopes": [
+ "https://mail.google.com/",
+ "https://www.googleapis.com/auth/gmail.modify",
+ "https://www.googleapis.com/auth/gmail.compose",
+ "https://www.googleapis.com/auth/gmail.readonly",
+ "https://www.googleapis.com/auth/gmail.metadata"
+ ],
+ "oauth": {
+ "callback_port": 12798,
+ "client_id": "<GMAIL_PUBLIC_CLIENT_ID>",
+ "client_secret": "<GMAIL_CLIENT_SECRET>"
+ }
+ }
+ }
+ },
+ {
+ "name": "google-calendar",
+ "displayName": "Google Calendar",
+ "description": "Connect Google Calendar for scheduling, availability, daily briefs, and event management.",
+ "category": "Productivity",
+ "author": "OpenAI",
+ "homepage": "https://workspace.google.com/products/calendar/",
+ "privacyUrl": "https://policies.google.com/privacy",
+ "termsUrl": "https://policies.google.com/terms",
+ "license": "MIT",
+ "version": "1.2.6",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/google-calendar/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": true,
+ "mcpServers": {
+ "google-calendar": {
+ "type": "http",
+ "url": "https://calendarmcp.googleapis.com/mcp/v1",
+ "scopes": [
+ "https://www.googleapis.com/auth/calendar",
+ "https://www.googleapis.com/auth/calendar.acls",
+ "https://www.googleapis.com/auth/calendar.calendarlist",
+ "https://www.googleapis.com/auth/calendar.calendarlist.readonly",
+ "https://www.googleapis.com/auth/calendar.calendars",
+ "https://www.googleapis.com/auth/calendar.calendars.readonly",
+ "https://www.googleapis.com/auth/calendar.events",
+ "https://www.googleapis.com/auth/calendar.events.freebusy",
+ "https://www.googleapis.com/auth/calendar.events.readonly",
+ "https://www.googleapis.com/auth/calendar.freebusy",
+ "https://www.googleapis.com/auth/calendar.readonly",
+ "https://www.googleapis.com/auth/calendar.settings.readonly"
+ ],
+ "oauth": {
+ "callback_port": 12798,
+ "client_id": "<GOOGLE_CALENDAR_PUBLIC_CLIENT_ID>",
+ "client_secret": "<GOOGLE_CALENDAR_CLIENT_SECRET>"
+ }
+ }
+ }
+ },
+ {
+ "name": "google-drive",
+ "displayName": "Google Drive",
+ "description": "Use Google Drive as the single entrypoint for Drive, Docs, Sheets, and Slides work.",
+ "category": "Productivity",
+ "author": "OpenAI",
+ "homepage": "https://workspace.google.com/products/drive/",
+ "privacyUrl": "https://policies.google.com/privacy",
+ "termsUrl": "https://policies.google.com/terms",
+ "license": "MIT",
+ "version": "0.1.15",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/google-drive/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": true,
+ "mcpServers": {
+ "google-drive": {
+ "type": "http",
+ "url": "https://drivemcp.googleapis.com/mcp/v1",
+ "scopes": [
+ "https://www.googleapis.com/auth/drive",
+ "https://www.googleapis.com/auth/drive.readonly",
+ "https://www.googleapis.com/auth/drive.file"
+ ],
+ "oauth": {
+ "callback_port": 12798,
+ "client_id": "<GOOGLE_DRIVE_PUBLIC_CLIENT_ID>",
+ "client_secret": "<GOOGLE_DRIVE_CLIENT_SECRET>"
+ }
+ }
+ }
+ },
+ {
+ "name": "granola",
+ "displayName": "Granola",
+ "description": "Granola MCP connects your meeting history to ChatGPT so your assistant can pull real context from past conversations while you work.\n\nUse MCP when you're already working on something bigger:\n\n- Writing PRDs or proposals: Pull customer feedback, stakeholder input, and decisions from relevant meetings directly into your draft\n \n- Building presentations or reports: Combine insights from multiple conversations with your other research and data\n \n- Coding with context: Give your AI the project background, requirements, and technical decisions discussed in planning meetings\n \n- Strategic analysis: Merge meeting insights with documents, data, and other sources for comprehensive analysis\n \nHow it works:\n\nYour AI assistant can search your Granola meetings by topic, person, company, or timeframe - then cite specific conversations in its responses. No more switching tabs to find \"what the customer said\" or \"when we decided that.\"\n\nThe difference:\n\nInstead of copy-pasting meeting notes into prompts, your AI pulls exactly what it needs from your meeting history automatically. You stay focused on the work, not the research or context.",
+ "category": "Productivity",
+ "author": "Granola",
+ "homepage": "https://www.granola.ai",
+ "privacyUrl": "https://help.granola.ai/article/privacy-policy",
+ "supportUrl": "https://help.granola.ai/",
+ "termsUrl": "https://help.granola.ai/article/platform-terms-of-service",
+ "license": "MIT",
+ "version": "1.0.0",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/granola/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "granola": {
+ "type": "http",
+ "url": "https://mcp.granola.ai/mcp"
+ }
+ }
+ },
+ {
+ "name": "higgsfield",
+ "displayName": "Higgsfield",
+ "description": "Generate images and videos from a text prompt or your own photo. Turn a product shot into a video ad, restyle a photo, animate a still, or build a two-minute narrated explainer. Every major image and video model in one place.",
+ "category": "Creativity",
+ "author": "Higgsfield AI, Inc.",
+ "homepage": "https://higgsfield.ai",
+ "privacyUrl": "https://higgsfield.ai/privacy-policy",
+ "supportUrl": "https://discord.com/invite/higgsfield",
+ "termsUrl": "https://higgsfield.ai/terms-of-use-agreement",
+ "version": "1.2.1",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/higgsfield/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "higgsfield": {
+ "type": "http",
+ "url": "https://mcp.higgsfield.ai/mcp"
+ }
+ }
+ },
+ {
+ "name": "linear",
+ "displayName": "Linear",
+ "description": "Search, create and update Linear issues, projects, and initiatives. Draft PRDs, write updates, analyze customer requests, and keep plans up to date — all from within ChatGPT",
+ "category": "Productivity",
+ "author": "Linear Orbit, Inc",
+ "homepage": "https://linear.app/",
+ "privacyUrl": "https://linear.app/privacy",
+ "supportUrl": "https://linear.app/contact",
+ "termsUrl": "https://linear.app/terms",
+ "license": "MIT",
+ "version": "5.0.1",
+ "wiring": "explicit_manifest",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/linear/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "linear": {
+ "type": "http",
+ "url": "https://mcp.linear.app/mcp",
+ "oauth_resource": "https://mcp.linear.app/mcp"
+ }
+ }
+ },
+ {
+ "name": "monday-com",
+ "displayName": "monday.com",
+ "description": "The monday.com AI Connector brings core platform capabilities directly to agents and AI assistants. It supports searching boards, creating and updating items and columns, assigning owners, setting timelines, and posting updates — enabling a wide range of work management and CRM use cases across teams and departments.\n\nTeams of people and agents use monday.com as a task tracker and project tracking hub: planning campaigns and events, tracking milestones, dependencies, and workload, managing approval workflows and request intake, and sharing status updates across projects and portfolios — as well as a CRM for managing leads, contacts, and deals.\n\nBeyond day-to-day work management, the connector lets agents answer questions using monday.com's official knowledge base, plan and build automations and multi-step workflows, run and save reusable code actions, and configure other monday.com agents .",
+ "category": "Productivity",
+ "author": "monday.com",
+ "homepage": "https://monday.com",
+ "privacyUrl": "https://monday.com/l/privacy/privacy-policy/",
+ "supportUrl": "https://support.monday.com/hc/en-us/requests/new?ticket_form_id=13855862562962",
+ "termsUrl": "https://monday.com/terms/tos",
+ "version": "2.0.0",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/monday-com/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "monday-com": {
+ "type": "http",
+ "url": "https://mcp.monday.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "notion",
+ "displayName": "Notion",
+ "description": "Notion workflows for implementation planning, research synthesis, meeting preparation, and knowledge capture.",
+ "category": "Productivity",
+ "author": "Notion",
+ "homepage": "https://www.notion.so/",
+ "privacyUrl": "https://www.notion.com/help/privacy",
+ "termsUrl": "https://www.notion.so/legal/terms-of-use",
+ "license": "MIT",
+ "version": "0.1.7",
+ "wiring": "explicit_manifest",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/notion/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "notion": {
+ "type": "http",
+ "url": "https://mcp.notion.com/mcp",
+ "oauth_resource": "https://mcp.notion.com"
+ }
+ }
+ },
+ {
+ "name": "posthog",
+ "displayName": "PostHog",
+ "description": "PostHog gives your AI agent direct access to your product analytics, feature flags, experiments, error tracking, surveys, logs, and LLM analytics. Ask questions about your data, create insights, toggle feature flags, analyze errors, search docs, and more — all from chat.",
+ "category": "Data & Analytics",
+ "author": "PostHog Inc.",
+ "homepage": "https://posthog.com",
+ "privacyUrl": "https://posthog.com/privacy",
+ "supportUrl": "https://posthog.com/support",
+ "termsUrl": "https://posthog.com/terms",
+ "license": "MIT",
+ "version": "1.0.0",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/posthog/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "posthog": {
+ "type": "http",
+ "url": "https://mcp.posthog.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "sentry",
+ "displayName": "Sentry",
+ "description": "Inspect recent issues and events in Sentry from Codex.",
+ "category": "Developer Tools",
+ "author": "OpenAI",
+ "homepage": "https://sentry.io/",
+ "privacyUrl": "https://sentry.io/privacy/",
+ "termsUrl": "https://sentry.io/terms/",
+ "license": "MIT",
+ "version": "0.1.2",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/sentry/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "sentry": {
+ "type": "http",
+ "url": "https://mcp.sentry.dev/mcp"
+ }
+ }
+ },
+ {
+ "name": "shopify",
+ "displayName": "Shopify",
+ "description": "Shopify for ChatGPT makes store building and management as easy as having a conversation. Effortlessly connect your existing store or create a new online store by describing your business. Simply chat to add products, adjust inventory across locations, create discount codes, browse recent orders, view customer details, or pull analytics on your store’s performance.",
+ "category": "Business & Operations",
+ "author": "Shopify",
+ "homepage": "https://shopify.com",
+ "privacyUrl": "https://www.shopify.com/legal/privacy",
+ "supportUrl": "https://help.shopify.com",
+ "termsUrl": "https://www.shopify.com/legal/terms",
+ "version": "3.0.0",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/shopify/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": true,
+ "mcpServers": {
+ "shopify": {
+ "type": "http",
+ "url": "https://setup.shopify.com/mcp",
+ "oauth": {
+ "client_id": "<SHOPIFY_PUBLIC_CLIENT_ID>"
+ },
+ "oauth_resource": "https://setup.shopify.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "slack",
+ "displayName": "Slack",
+ "description": "Work with Slack using the configured Slack integration.",
+ "category": "Communication",
+ "author": "Slack",
+ "homepage": "https://slack.com/",
+ "privacyUrl": "https://slack.com/privacy-policy",
+ "termsUrl": "https://slack.com/terms-of-service/user",
+ "license": "MIT",
+ "version": "0.1.7",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/slack/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "slack": {
+ "type": "http",
+ "url": "https://mcp.slack.com/mcp",
+ "oauth": {
+ "client_id": "11843774967.11905492103734"
+ }
+ }
+ }
+ },
+ {
+ "name": "stripe",
+ "displayName": "Stripe",
+ "description": "Develop your payments integration faster with the ability to create products, prices, and payment links directly in ChatGPT. Run your business from ChatGPT with the ability to retrieve and manage payments, subscriptions, invoices, refunds, disputes, and customers. Build and debug your payment integration quicker than ever by searching the Stripe documentation and getting integration recommendations without needing to leave ChatGPT.",
+ "category": "Finance",
+ "author": "Stripe",
+ "homepage": "https://stripe.com",
+ "privacyUrl": "https://stripe.com/privacy",
+ "supportUrl": "https://support.stripe.com",
+ "termsUrl": "https://stripe.com/legal/ssa",
+ "version": "7.0.0",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/stripe/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "stripe": {
+ "type": "http",
+ "url": "https://mcp.stripe.com"
+ }
+ }
+ },
+ {
+ "name": "supabase",
+ "displayName": "Supabase",
+ "description": "Manage Supabase projects directly through ChatGPT. Execute SQL queries on PostgreSQL databases, design and modify table schemas, deploy serverless edge functions, and configure user authentication. Access real-time logs for debugging, create and apply database migrations, and manage development branches through natural language.",
+ "category": "Developer Tools",
+ "author": "Supabase",
+ "homepage": "https://supabase.com",
+ "privacyUrl": "https://supabase.com/privacy",
+ "supportUrl": "https://supabase.com/support",
+ "termsUrl": "https://supabase.com/terms",
+ "license": "MIT",
+ "version": "1.0.0",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/supabase/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "supabase": {
+ "type": "http",
+ "url": "https://mcp.supabase.com/mcp"
+ }
+ }
+ },
+ {
+ "name": "vercel",
+ "displayName": "Vercel",
+ "description": "Build and deploy web apps and agents",
+ "category": "Developer Tools",
+ "author": "Vercel Labs",
+ "homepage": "https://vercel.com/",
+ "privacyUrl": "https://vercel.com/legal/privacy-policy",
+ "termsUrl": "https://vercel.com/legal/terms",
+ "license": "Apache-2.0",
+ "version": "0.21.4",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/vercel/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": false,
+ "mcpServers": {
+ "vercel": {
+ "type": "http",
+ "url": "https://mcp.vercel.com"
+ }
+ }
+ },
+ {
+ "name": "zoom",
+ "displayName": "Zoom",
+ "description": "Smart meeting insights from Zoom",
+ "category": "Communication",
+ "author": "Zoom",
+ "homepage": "https://zoom.us",
+ "privacyUrl": "https://zoom.us/privacy",
+ "termsUrl": "https://www.zoom.com/en/trust/terms/",
+ "license": "MIT",
+ "version": "1.0.0",
+ "wiring": "implicit_default_dot_mcp",
+ "configUrl": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/zoom/.mcp.json",
+ "serviceKind": "account_saas_cloud",
+ "oauthPlaceholders": true,
+ "mcpServers": {
+ "zoom": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/meeting/streamable",
+ "oauth": {
+ "client_id": "<ZOOM_PUBLIC_CLIENT_ID>"
+ }
+ }
+ }
+ }
+ ]
+}
diff --git a/packages/ai/package.json b/packages/ai/package.json
index 1cfb89a285..cc34b07693 100644
--- a/packages/ai/package.json
+++ b/packages/ai/package.json
@@ -76,6 +76,7 @@
"@aws-sdk/client-bedrock-runtime": "^3.1095.0",
"@google/genai": "^1.40.0",
"@mistralai/mistralai": "^2.2.0",
+ "@modelcontextprotocol/sdk": "^1.30.0",
"typebox": "^1.3.9",
"chalk": "^5.6.2",
"openai": "6.47.0",
diff --git a/packages/ai/scripts/import-mcp-catalog.ts b/packages/ai/scripts/import-mcp-catalog.ts
new file mode 100644
index 0000000000..9f4a021032
--- /dev/null
+++ b/packages/ai/scripts/import-mcp-catalog.ts
@@ -0,0 +1,1630 @@
+#!/usr/bin/env node
+/**
+ * Deterministic MCP service catalog importer (ENG-6108).
+ *
+ * Reads the pinned upstream source fixtures in `packages/ai/mcp-catalog/sources/`
+ * plus the curated `packages/ai/mcp-catalog/overrides.json`, and emits:
+ * - `packages/ai/src/mcp/catalog.json` (the shipped, single source of truth)
+ * - `packages/ai/mcp-catalog/import-report.json` (reviewable merge report)
+ *
+ * The import is offline, deterministic and side-effect free: no plugin code is
+ * executed, no network/auth is performed, and upstream OAuth client identities
+ * or secrets are never copied into the output. Fixtures preserve upstream
+ * configs verbatim (including placeholders and branded client ids) so that the
+ * stripping and dedup rules below stay reproducible and testable; the emitted
+ * catalog must contain none of them.
+ *
+ * Zero-app shipping policy (2026-09-14 product decision): Prime maintains ZERO
+ * provider OAuth apps, so the catalog advertises only what works self-serve —
+ * dynamic client registration (readiness "oauth-ready") or user-supplied
+ * tokens/keys ("user-setup"). Providers that require a provider-registered
+ * client ("prime-restricted") or whose self-serve path could not be verified
+ * ("unknown") are cut via the documented `excludedServers` list in
+ * overrides.json, each with a per-entry reason; the importer enforces the cut
+ * structurally and refuses to ship such entries. Source snapshots and audit
+ * evidence stay committed as history and are never deleted by the cut.
+ *
+ * Final catalog cut (2026-09-15 product decision): the catalog ships one-click
+ * DCR or user token/key auth ONLY. Registered-client entries (the user's own
+ * confidential OAuth app), local-runtime stdio adapters and url-only tenant
+ * templates are cut via the documented `excludedServers` list.
+ *
+ * Token-only catalog cut (2026-09-16 product decision): the user-setup class is
+ * narrowed to a SIMPLE paste-an-API-key/token service — requirement
+ * "bearer-token" or "api-key" AND at least one bearer-token/api-key setup
+ * field. Tenant configs (instance URL or per-tenant id), legacy-transport
+ * entries the runtime cannot connect to, and api-key promises with zero setup
+ * fields are cut the same documented way, and the importer fails the import on
+ * any other user-setup shape instead of shipping it.
+ *
+ * Run from the repository root: npx tsx packages/ai/scripts/import-mcp-catalog.ts
+ */
+
+import * as fs from "node:fs";
+import * as path from "node:path";
+import { fileURLToPath } from "node:url";
+import {
+ tokenAuthMethodsSupportConfiguredClient,
+ tokenAuthMethodsSupportPublicClient,
+} from "../src/mcp/oauth.js";
+import { isLiteralPrivateOrLoopbackHost } from "../src/mcp/url-checks.js";
+
+// ---------------------------------------------------------------------------
+// Input types (fixture snapshots of the pinned public upstream catalogs)
+// ---------------------------------------------------------------------------
+
+export interface SourceServerDef {
+ type?: string;
+ url?: string;
+ command?: string;
+ args?: string[];
+ env?: Record<string, string>;
+ headers?: Record<string, string>;
+ oauth?: { client_id?: string; client_secret?: string; clientId?: string; [k: string]: unknown };
+ oauth_resource?: string;
+ scopes?: string[];
+ bearer_token_env_var?: string;
+ note?: string;
+ [k: string]: unknown;
+}
+
+export interface OpenAiPluginFixture {
+ name: string;
+ displayName?: string;
+ description?: string;
+ category?: string;
+ author?: string;
+ homepage?: string;
+ privacyUrl?: string;
+ supportUrl?: string;
+ termsUrl?: string;
+ license?: string;
+ version?: string;
+ wiring?: string;
+ configUrl?: string;
+ serviceKind?: string;
+ oauthPlaceholders?: boolean;
+ mcpServers: Record<string, SourceServerDef>;
+}
+
+export interface OpenAiFixture {
+ source: "openai-plugins";
+ repository: string;
+ commit: string;
+ plugins: OpenAiPluginFixture[];
+}
+
+export interface ClaudeSourceFixture {
+ kind: string;
+ repository?: string;
+ path?: string;
+ ref?: string;
+ sha?: string;
+}
+
+export interface ClaudePluginFixture {
+ name: string;
+ category: "direct_remote_service" | "stdio_service_adapter";
+ providers: string[];
+ notes?: string;
+ source: ClaudeSourceFixture;
+ sourceBase?: string;
+ configUrl?: string;
+ mcpServers: Record<string, SourceServerDef>;
+}
+
+export interface ClaudeFixture {
+ source: "claude-plugins-official";
+ repository: string;
+ catalogCommit: string;
+ plugins: ClaudePluginFixture[];
+}
+
+export interface OverrideEntry {
+ /** Renames the derived stable id. */
+ id?: string;
+ label?: string;
+ description?: string;
+ /** Brand grouping id (defaults to the provider slug). */
+ service?: string;
+ aliases?: string[];
+ verification?: "metadata-reviewed" | "unverified";
+ clientRegistration?: "dynamic" | "pre-registered" | "unknown";
+ legacyBuiltin?: boolean;
+ setup?: "ready" | "requires-setup";
+ setupReason?: string;
+ setupFields?: CatalogSetupField[];
+ /** Research-anchored readiness of the default path; overrides derivation. */
+ readiness?: CatalogReadiness;
+ /** Research-anchored genuine requirement; overrides derivation. */
+ requirement?: CatalogSetupRequirement;
+ /** Documented alternative auth paths, each with per-path readiness. */
+ alternatives?: CatalogAuthAlternative[];
+ /** Honest note attached to the observational metadata block. */
+ metadataNote?: string;
+ /** Curated note recorded as a `prime` provenance entry. */
+ note?: string;
+ homepage?: string;
+ docsUrl?: string;
+}
+
+export interface Overrides {
+ /** Curated per-server overrides keyed by "<source>/<plugin>/<server>". */
+ servers: Record<string, OverrideEntry>;
+ /** Servers excluded from import with documented reasons, keyed the same way. */
+ excludedServers: { key: string; reason: string }[];
+}
+
+// ---------------------------------------------------------------------------
+// Output types (the emitted catalog file)
+// ---------------------------------------------------------------------------
+
+export interface CatalogProvenance {
+ source: "openai-plugins" | "claude-plugins-official" | "prime";
+ repository?: string;
+ commit?: string;
+ path?: string;
+ url?: string;
+ license?: string;
+ note?: string;
+}
+
+export type CatalogSetupFieldKind =
+ | "env-var"
+ | "url"
+ | "client-id"
+ | "client-secret"
+ | "bearer-token"
+ | "api-key";
+
+export interface CatalogSetupField {
+ id: string;
+ label: string;
+ description?: string;
+ required: boolean;
+ kind?: CatalogSetupFieldKind;
+ /** Shared by fields that are ALTERNATIVE NAMES for one credential. */
+ credentialSet?: string;
+}
+
+export type CatalogReadiness = "oauth-ready" | "user-setup" | "prime-restricted" | "unknown";
+
+export type CatalogSetupRequirement =
+ | "api-key"
+ | "bearer-token"
+ | "registered-client"
+ | "tenant"
+ | "unsupported-transport"
+ | "local-runtime";
+
+export interface CatalogSetup {
+ status: "ready" | "requires-setup";
+ reason?: string;
+ fields?: CatalogSetupField[];
+ readiness?: CatalogReadiness;
+ requirement?: CatalogSetupRequirement;
+}
+
+export interface CatalogAuthAlternative {
+ kind: "oauth" | "api-key" | "bearer-token" | "service-account";
+ readiness: CatalogReadiness;
+ note?: string;
+ sourceUrl?: string;
+}
+
+/**
+ * Observational public-metadata evidence from the read-only audit
+ * (packages/ai/mcp-catalog/audit/metadata-audit.json). Never a live credential
+ * authority and never a Connect gate; omitted fields mean "not advertised",
+ * never "unsupported".
+ */
+export interface CatalogAuthMetadata {
+ status: "available" | "unavailable" | "not-audited";
+ authorizationServer?: string;
+ resource?: string;
+ pkceS256?: boolean;
+ dynamicClientRegistration?: boolean;
+ clientIdMetadataDocument?: boolean;
+ protectedResourceScopes?: string[];
+ authorizationServerScopes?: string[];
+ tokenAuthMethods?: string[];
+ sourceUrls: string[];
+ fetchedAt: string;
+ note?: string;
+}
+
+export interface CatalogAuth {
+ strategy: "oauth" | "api_key" | "none" | "unknown";
+ clientRegistration: "dynamic" | "pre-registered" | "unknown";
+ alternatives?: CatalogAuthAlternative[];
+ metadata?: CatalogAuthMetadata;
+}
+
+// ---------------------------------------------------------------------------
+// Read-only audit evidence input (committed snapshot; the importer is offline)
+// ---------------------------------------------------------------------------
+
+export interface AuditPrmEvidence {
+ resource?: string;
+ authorizationServers?: string[];
+ protectedResourceScopes?: string[];
+}
+
+export interface AuditAsEvidence {
+ issuer?: string;
+ authorizationEndpoint?: string;
+ tokenEndpoint?: string;
+ registrationEndpoint?: string;
+ pkceS256?: boolean;
+ clientIdMetadataDocument?: boolean;
+ authorizationServerScopes?: string[];
+ tokenAuthMethods?: string[];
+}
+
+/**
+ * Live registration-attempt evidence recorded in the audit store from a real
+ * engine login attempt. The read-only audit itself never POSTs registration
+ * endpoints, so provenance is recorded on the block. It mirrors the engine's
+ * no-credentials flow exactly: an anonymous POST to the advertised
+ * registration_endpoint.
+ */
+export interface AuditRegistrationAttempt {
+ /** How the attempt was observed, quoted honestly (e.g. live dogfooding login). */
+ provenance: string;
+ /** ISO date of the attempt. */
+ date: string;
+ /** HTTP method of the attempt. */
+ method: string;
+ /** The registration endpoint the attempt targeted. */
+ url: string;
+ /** HTTP status the attempt received. */
+ httpStatus: number;
+ /** Engine error, quoted verbatim when available. */
+ error?: string;
+ /** What the attempt establishes. */
+ finding?: string;
+ /** Public corroboration (reports, metadata-only probes). */
+ corroboration?: string[];
+}
+
+export interface AuditResult {
+ server: string;
+ endpoint: string;
+ probe: { url: string; httpStatus?: number; resourceMetadataHeader?: string; error?: string };
+ protectedResource: {
+ attempts: Array<{
+ sourceUrl: string;
+ kind: string;
+ status: string;
+ audienceMatches?: boolean;
+ evidence?: AuditPrmEvidence;
+ httpStatus?: number;
+ error?: string;
+ }>;
+ engineVisible: "available" | "unavailable";
+ engineSelectedSourceUrl?: string;
+ selectionNote?: string;
+ };
+ authorizationServer: {
+ issuer?: string;
+ sourceUrls: string[];
+ status: "available" | "unavailable";
+ evidence?: AuditAsEvidence;
+ /** Live (non-audit) registration-attempt evidence; the audit GETs never produce this. */
+ registrationAttempt?: AuditRegistrationAttempt;
+ };
+}
+
+export interface AuditFile {
+ fetchedAt: string;
+ targets: { server: string; endpoint: string }[];
+ results: AuditResult[];
+ /**
+ * Live registration-attempt evidence for servers that later left the audit
+ * target set (e.g. a server cut from the catalog by the 2026-09-14
+ * zero-app decision): the audit script carries these blocks forward
+ * verbatim on re-runs so live evidence is never silently dropped.
+ * Evidence/history only — the importer never classifies from them.
+ */
+ retiredRegistrationAttempts?: {
+ server: string;
+ endpoint: string;
+ registrationAttempt: AuditRegistrationAttempt;
+ }[];
+ counts: Record<string, number>;
+ bounds: Record<string, string>;
+}
+
+export type CatalogTransport =
+ | { type: "http"; url: string }
+ | { type: "http-template"; template: string; variables: { name: string; description: string }[] }
+ | { type: "sse"; url: string }
+ | { type: "stdio"; servers: { name: string; command: string; args?: string[]; env?: Record<string, string> }[] };
+
+export interface CatalogEntry {
+ server: string;
+ service: string;
+ label: string;
+ url: string;
+ description?: string;
+ category?: string;
+ aliases: string[];
+ publisher?: string;
+ transport: CatalogTransport;
+ auth: CatalogAuth;
+ setup: CatalogSetup;
+ verification: { status: "metadata-reviewed" | "unverified" };
+ legacyBuiltin: boolean;
+ oauth?: { kind: "oauth" };
+ provenance: CatalogProvenance[];
+ homepage?: string;
+ docsUrl?: string;
+ privacyUrl?: string;
+ supportUrl?: string;
+}
+
+export interface CatalogFile {
+ version: number;
+ sources: { source: string; repository: string; commit: string }[];
+ counts: Record<string, number>;
+ entries: CatalogEntry[];
+}
+
+export interface ImportReport {
+ sources: Record<string, { plugins: number; remoteServers: number; stdioServers: number; excluded: number }>;
+ merged: { server: string; sources: string[]; urls: string[] }[];
+ excluded: { key: string; reason: string }[];
+ counts: Record<string, number>;
+}
+
+// ---------------------------------------------------------------------------
+// Helpers
+// ---------------------------------------------------------------------------
+
+const OPENAI = "openai-plugins";
+const CLAUDE = "claude-plugins-official";
+const SOURCE_PRECEDENCE: Record<string, number> = { [OPENAI]: 0, [CLAUDE]: 1 };
+
+function slug(value: string): string {
+ return value
+ .trim()
+ .toLowerCase()
+ .replace(/[^a-z0-9]+/g, "-")
+ .replace(/^-+|-+$/g, "");
+}
+
+function titleCase(value: string): string {
+ return value
+ .split(/-+/)
+ .map((word) => (word ? word[0].toUpperCase() + word.slice(1) : word))
+ .join(" ");
+}
+
+/**
+ * Dedup key: lowercase scheme+host, drop a trailing slash and utm_* tracking
+ * params. The emitted endpoint stays verbatim upstream text.
+ */
+function reviewedUrl(raw: string): string | undefined {
+ const match = /^(\w+:\/\/[^/?#]+)([^#]*)$/.exec(raw.trim());
+ if (!match) return undefined;
+ const origin = match[1].toLowerCase();
+ let suffix = match[2];
+ if (suffix.endsWith("/") && suffix.length > 1) suffix = suffix.slice(0, -1);
+ const queryStart = suffix.indexOf("?");
+ if (queryStart !== -1) {
+ const basePath = suffix.slice(0, queryStart);
+ const kept = suffix
+ .slice(queryStart + 1)
+ .split("&")
+ .filter((param) => param !== "" && !/^utm[_-]/i.test(param));
+ suffix = kept.length ? `${basePath}?${kept.join("&")}` : basePath;
+ }
+ return `${origin}${suffix}`;
+}
+
+function isLoopbackUrl(raw: string): boolean {
+ const host = /^\w+:\/\/([^/?#]+)/.exec(raw)?.[1]?.split(":")[0]?.toLowerCase();
+ return isLiteralPrivateOrLoopbackHost(host ?? "");
+}
+
+const TEMPLATE_RE = /\$\{([^}]+)\}/g;
+const TEMPLATE_TEST = /\$\{[^}]+\}/;
+
+interface ResolvedTemplate {
+ url?: string;
+ template?: string;
+ variables: { name: string; description: string }[];
+}
+
+/** Resolves ${VAR} and ${VAR:-default}; unresolved variables become setup fields. */
+function resolveTemplate(raw: string, describe: (name: string) => string): ResolvedTemplate {
+ const variables: { name: string; description: string }[] = [];
+ const seen = new Set<string>();
+ let unresolved = false;
+ const url = raw.replace(TEMPLATE_RE, (_match, expr: string) => {
+ const sep = expr.indexOf(":-");
+ const name = (sep === -1 ? expr : expr.slice(0, sep)).trim();
+ const fallback = sep === -1 ? undefined : expr.slice(sep + 2);
+ if (!seen.has(name)) {
+ seen.add(name);
+ variables.push({ name, description: describe(name) });
+ }
+ if (fallback === undefined || fallback === "") {
+ unresolved = true;
+ return `\${${name}}`;
+ }
+ return fallback;
+ });
+ TEMPLATE_RE.lastIndex = 0;
+ if (unresolved || !/^https:\/\/[a-z0-9][a-z0-9.-]*\.[a-z]{2,}/i.test(url)) {
+ return { template: url, variables };
+ }
+ return { url, variables };
+}
+
+/**
+ * Normalizes `${VAR}`-style templates and `{placeholder}` path segments into one
+ * canonical `${name}` form so both upstream styles become http-template entries.
+ */
+function normalizeTemplatePlaceholders(url: string): string {
+ return url.replace(/(?<!\$)\{([^{}]+)\}/g, (_match, name: string) => `\${${slug(name)}}`);
+}
+
+function envRefs(value: string): string[] {
+ const names: string[] = [];
+ for (const match of value.matchAll(/\$\{([A-Za-z_][A-Za-z0-9_]*)(?::-([^}]*))?\}/g)) {
+ if (!names.includes(match[1])) names.push(match[1]);
+ }
+ return names;
+}
+
+function classifyOauthClientId(value: string | undefined): "placeholder" | "branded" | "claude-specific" | undefined {
+ if (!value) return undefined;
+ const trimmed = value.trim();
+ if (trimmed === "" || trimmed.startsWith("<") || /placeholder/i.test(trimmed)) return "placeholder";
+ if (trimmed === "claude" || trimmed.startsWith("https://claude.ai/")) return "claude-specific";
+ return "branded";
+}
+
+/** Treat null/absent/empty fixture values as undefined. */
+function optionalString(value: unknown): string | undefined {
+ return typeof value === "string" && value !== "" ? value : undefined;
+}
+
+function envField(name: string, kind: CatalogSetupFieldKind = "env-var"): CatalogSetupField {
+ return { id: name, label: name, description: `Environment variable ${name}`, required: true, kind };
+}
+
+function dedupeFields(fields: CatalogSetupField[]): CatalogSetupField[] {
+ const seen = new Set<string>();
+ const result: CatalogSetupField[] = [];
+ for (const field of fields) {
+ if (seen.has(field.id)) continue;
+ seen.add(field.id);
+ result.push(field);
+ }
+ return result.sort((a, b) => a.id.localeCompare(b.id));
+}
+
+// ---------------------------------------------------------------------------
+// Record extraction
+// ---------------------------------------------------------------------------
+
+interface AuthEvidence {
+ oauth: boolean;
+ apiKey: boolean;
+ blocks: string[];
+ fields: CatalogSetupField[];
+}
+
+interface RemoteRecord {
+ source: string;
+ plugin: string;
+ serverName: string;
+ url: string;
+ auth: AuthEvidence;
+ provenance: CatalogProvenance;
+ labelHint?: string;
+ description?: string;
+ category?: string;
+ provider?: string;
+ homepage?: string;
+ privacyUrl?: string;
+ supportUrl?: string;
+}
+
+interface TemplateRecord {
+ source: string;
+ plugin: string;
+ serverName: string;
+ resolved: ResolvedTemplate;
+ auth: AuthEvidence;
+ provenance: CatalogProvenance;
+ provider?: string;
+}
+
+interface SseRecord {
+ source: string;
+ plugin: string;
+ serverName: string;
+ url: string;
+ auth: AuthEvidence;
+ provenance: CatalogProvenance;
+ provider?: string;
+}
+
+interface StdioRecord {
+ source: string;
+ plugin: string;
+ provider?: string;
+ provenance: CatalogProvenance;
+ servers: { name: string; command: string; args?: string[]; env?: Record<string, string> }[];
+ fields: CatalogSetupField[];
+}
+
+function recordAuth(server: SourceServerDef, pluginPlaceholders: boolean): AuthEvidence {
+ const evidence: AuthEvidence = { oauth: false, apiKey: false, blocks: [], fields: [] };
+ const oauth = server.oauth;
+ if (oauth) {
+ evidence.oauth = true;
+ const clientId = (oauth.client_id ?? oauth.clientId) as string | undefined;
+ const issue = classifyOauthClientId(clientId);
+ if (issue === "placeholder") {
+ evidence.blocks.push("upstream OAuth config contains client-id placeholders");
+ } else if (issue === "branded") {
+ evidence.blocks.push("upstream config carries a provider-branded OAuth client id that must not be reused");
+ } else if (issue === "claude-specific") {
+ evidence.blocks.push("upstream config relies on a Claude-specific OAuth client identity");
+ }
+ if (oauth.client_secret) {
+ evidence.blocks.push("upstream OAuth config contains client-secret placeholders");
+ }
+ }
+ if (pluginPlaceholders) {
+ evidence.blocks.push("upstream OAuth client values are placeholders");
+ }
+ if (server.oauth_resource) evidence.oauth = true;
+ if (server.note && /oauth/i.test(server.note)) evidence.oauth = true;
+ if (server.bearer_token_env_var) {
+ evidence.apiKey = true;
+ evidence.blocks.push("requires a bearer token supplied via environment variable");
+ evidence.fields.push(envField(server.bearer_token_env_var, "bearer-token"));
+ }
+ for (const [header, value] of Object.entries(server.headers ?? {})) {
+ if (typeof value !== "string") continue;
+ const refs = envRefs(value);
+ if (/^authorization$/i.test(header)) {
+ evidence.apiKey = true;
+ evidence.blocks.push("requires an auth token supplied via environment variable");
+ for (const ref of refs) evidence.fields.push(envField(ref, "bearer-token"));
+ } else if (refs.length > 0 || /key|secret|token|authorization/i.test(header)) {
+ evidence.apiKey = true;
+ evidence.blocks.push("requires provider credentials supplied as headers");
+ // Credential-named headers collect an api-key; other header bindings stay generic env vars.
+ const credentialHeader = /key|secret|token|authorization/i.test(header);
+ evidence.fields.push(envField(refs[0] ?? header, credentialHeader ? "api-key" : "env-var"));
+ }
+ }
+ evidence.fields = dedupeFields(evidence.fields);
+ return evidence;
+}
+
+function authStrategy(auth: AuthEvidence): "oauth" | "api_key" | "none" | "unknown" {
+ if (auth.oauth && auth.apiKey) return "unknown";
+ if (auth.oauth) return "oauth";
+ if (auth.apiKey) return "api_key";
+ return "unknown";
+}
+
+function openAiProvenance(fixture: OpenAiFixture, plugin: OpenAiPluginFixture): CatalogProvenance {
+ return {
+ source: OPENAI,
+ repository: "openai/plugins",
+ commit: fixture.commit,
+ path: `plugins/${plugin.name}/.mcp.json`,
+ url: optionalString(plugin.configUrl),
+ license: optionalString(plugin.license),
+ };
+}
+
+function claudeProvenance(fixture: ClaudeFixture, plugin: ClaudePluginFixture): CatalogProvenance {
+ const source = plugin.source;
+ const vendored = source.kind === "external_plugins";
+ return {
+ source: CLAUDE,
+ repository: vendored ? "anthropics/claude-plugins-official" : optionalString(source.repository),
+ commit: vendored ? fixture.catalogCommit : (optionalString(source.sha) ?? fixture.catalogCommit),
+ path: optionalString(source.path),
+ url: optionalString(plugin.configUrl),
+ };
+}
+
+// ---------------------------------------------------------------------------
+// Merge
+// ---------------------------------------------------------------------------
+
+interface BuiltEntry {
+ entry: CatalogEntry;
+ identityKey: string;
+}
+
+const GENERIC_SERVER_NAMES = new Set(["mcp", "default", "server", "main", "remote"]);
+
+function deriveId(plugin: string, serverName: string): string {
+ const fromServer = slug(serverName);
+ if (fromServer && !GENERIC_SERVER_NAMES.has(fromServer)) {
+ return fromServer.endsWith("-mcp") && fromServer.length > "-mcp".length
+ ? fromServer.slice(0, -"-mcp".length)
+ : fromServer;
+ }
+ return slug(plugin);
+}
+
+function primeProvenance(override: OverrideEntry): CatalogProvenance {
+ return {
+ source: "prime",
+ note: override.note ?? "curated override applied; see mcp-catalog/overrides.json",
+ };
+}
+
+function finalizeAliases(entry: CatalogEntry): string[] {
+ const aliasSet = new Set<string>();
+ for (const alias of entry.aliases) {
+ const normalized = slug(alias);
+ if (normalized && normalized !== entry.server) aliasSet.add(normalized);
+ }
+ const labelSlug = slug(entry.label);
+ if (labelSlug && labelSlug !== entry.server) aliasSet.add(labelSlug);
+ const serviceSlug = slug(entry.service);
+ if (serviceSlug && serviceSlug !== entry.server) aliasSet.add(serviceSlug);
+ return [...aliasSet].sort();
+}
+
+// ---------------------------------------------------------------------------
+// Audit evidence merge + readiness derivation
+// ---------------------------------------------------------------------------
+
+function deriveRequirement(entry: CatalogEntry): CatalogSetupRequirement | undefined {
+ if (entry.setup.status === "ready") return undefined;
+ switch (entry.transport.type) {
+ case "stdio":
+ return "local-runtime";
+ case "sse":
+ return "unsupported-transport";
+ case "http-template":
+ return "tenant";
+ case "http":
+ // Field kinds classify the genuine requirement: bearer tokens, api keys,
+ // or a non-credential per-instance config value (cluster id).
+ if (entry.setup.fields?.some((field) => field.kind === "bearer-token")) return "bearer-token";
+ if (entry.setup.fields?.some((field) => field.kind === "api-key")) return "api-key";
+ if (entry.setup.fields?.some((field) => field.kind === "env-var")) return "tenant";
+ return undefined;
+ }
+ return undefined;
+}
+
+/**
+ * The advertised registration endpoint is gated when a live engine registration
+ * attempt — an anonymous POST to exactly the advertised registration_endpoint,
+ * the engine's own no-credentials flow (see oauth.ts registerClient) — was
+ * rejected with a client-forbidden status (401/403). Recorded live in the audit
+ * store (the read-only audit itself never POSTs registration endpoints); an
+ * advertisement alone is NOT usable-DCR evidence once the real flow is known
+ * to fail.
+ *
+ * Exported for offline machinery tests: since the 2026-09-14 zero-app cut the
+ * gated entry that exercised this predicate live (Figma) is excluded from the
+ * shipped catalog (the evidence stays in the audit store), so the predicate
+ * now guards future entries and is unit-tested directly.
+ */
+export function advertisedRegistrationGated(as: AuditResult["authorizationServer"]): boolean {
+ const attempt = as.registrationAttempt;
+ if (!attempt || !as.evidence?.registrationEndpoint) return false;
+ return (
+ attempt.method === "POST" &&
+ attempt.url === as.evidence.registrationEndpoint &&
+ (attempt.httpStatus === 401 || attempt.httpStatus === 403)
+ );
+}
+
+/**
+ * Coherent standard-OAuth evidence, independent of the client-auth-method
+ * compatibility gate: a served, structurally valid authorization-server
+ * document with an advertised dynamic registration endpoint that a live
+ * anonymous registration attempt was not recorded as rejected at, plus a
+ * reachable endpoint/AS audience association. This is the evidence the
+ * ENGINE itself needs to reach the token request; whether the standard
+ * no-credentials flow then survives client-auth negotiation is decided by
+ * the shared engine decision (see evidenceSupportsStandardOauth).
+ */
+function standardOauthEvidenceCoherent(result: AuditResult): boolean {
+ // oauth-ready needs a coherent authorization server AND dynamic client
+ // registration. CIMD alone is NOT sufficient: no Prime-controlled identity
+ // document is deployed or authorized today (root decision), and foreign
+ // client ids must never be copied. Omitted PKCE lists are omitted
+ // evidence, never unsupported — they do not block oauth-ready.
+ const as = result.authorizationServer;
+ if (as.status !== "available" || !as.evidence) return false;
+ if (
+ !as.evidence.issuer ||
+ !as.evidence.authorizationEndpoint ||
+ !as.evidence.tokenEndpoint ||
+ !as.evidence.registrationEndpoint
+ ) {
+ return false;
+ }
+ // The engine POSTs an anonymous registration to the advertised endpoint when
+ // no client credentials are configured; a live recorded rejection means the
+ // advertised DCR is gated and the standard flow fails — fail closed, the
+ // same honest class as DCR-less providers (Slack, HubSpot).
+ if (advertisedRegistrationGated(as)) return false;
+ // The engine's PRM validation uses the component comparison (root-approved
+ // audience policy): the document's resource must match the exact endpoint
+ // (canonical form) OR the exact origin, root-slash normalized. Anything
+ // else fails closed — e.g. a resource that keeps the path but drops the
+ // query string never matches (LogRocket), and DCR-less providers never
+ // become oauth-ready regardless (Slack, HubSpot).
+ if (result.protectedResource.engineVisible === "available") return !audienceMismatched(result);
+ // No valid PRM document anywhere. oauth-ready via the origin-AS fallback
+ // requires the engine to actually REACH that fallback: no followed pointer
+ // (any pointer failure throws) and every tried well-known candidate exactly
+ // 4xx. Served-but-invalid documents, 5xx responses and fetch errors all
+ // throw with no fallback — the entry stays honestly unknown.
+ return engineFallsBackToOriginAs(result);
+}
+
+export function evidenceSupportsStandardOauth(result: AuditResult): boolean {
+ // The engine's no-credentials flow logs in as a PUBLIC client (DCR/CIMD, no
+ // configured secret), so oauth-ready additionally requires the advertised
+ // token auth methods to be compatible with exactly that client shape —
+ // the SAME shared engine decision the runtime login runs
+ // (tokenAuthMethodsSupportPublicClient → decideClientAuthMethod). A
+ // confidential-only authorization server (e.g. Hugging Face: "advertised:
+ // client_secret_basic, client_secret_post") fails the engine's gate at
+ // connect time, so it can never classify one-click. Omitted lists are
+ // omitted evidence: the engine applies the public-client spec default.
+ return (
+ standardOauthEvidenceCoherent(result) &&
+ tokenAuthMethodsSupportPublicClient(result.authorizationServer.evidence?.tokenAuthMethods)
+ );
+}
+
+/**
+ * The honest self-serve fallback when the standard no-credentials flow cannot
+ * authenticate: the evidence is fully coherent for standard OAuth (same
+ * checks as evidenceSupportsStandardOauth) but the authorization server
+ * advertises only secret-bearing client auth methods. The SAME standard flow
+ * completes with a user-registered confidential app (configured client id +
+ * secret), so these entries demote from oauth-ready to the user-setup OAuth
+ * path with client-id/client-secret setup fields — the user's OWN registered
+ * app, zero-app compliant, never an exclusion. Entries whose advertised
+ * methods serve not even a secret-bearing client (e.g. mTLS-only) stay
+ * honestly unknown and fail closed as today.
+ */
+export function evidenceSupportsUserRegisteredOauth(result: AuditResult): boolean {
+ const methods = result.authorizationServer.evidence?.tokenAuthMethods;
+ return (
+ standardOauthEvidenceCoherent(result) &&
+ !tokenAuthMethodsSupportPublicClient(methods) &&
+ tokenAuthMethodsSupportConfiguredClient(methods)
+ );
+}
+
+/** The engine's canonicalResource rule: bare origins collapse, paths and searches stay. */
+function canonicalResource(url: string): string {
+ const parsed = new URL(url);
+ if (parsed.pathname === "/" && !parsed.search) return parsed.origin;
+ return `${parsed.origin}${parsed.pathname}${parsed.search}`;
+}
+
+/** The engine's component comparison: exact canonical endpoint OR exact origin (root-slash normalized). */
+function audienceMatches(resource: string, endpoint: string): boolean {
+ const parsed = new URL(endpoint);
+ const canonical = canonicalResource(endpoint);
+ return resource === canonical || resource === parsed.origin || resource === `${parsed.origin}/`;
+}
+
+function audienceMismatched(result: AuditResult): boolean {
+ const selected = result.protectedResource.attempts.find(
+ (attempt) => attempt.sourceUrl === result.protectedResource.engineSelectedSourceUrl,
+ );
+ if (!selected?.evidence?.resource) return result.protectedResource.engineVisible === "available";
+ return !audienceMatches(selected.evidence.resource, result.endpoint);
+}
+
+/**
+ * The engine reaches its origin-level authorization-server fallback ONLY when
+ * no resource_metadata pointer was followed (a followed pointer fails closed
+ * on ANY error; a present-but-rejected pointer fails closed at URL validation)
+ * AND every well-known candidate it tried returned exactly a 4xx (the loop
+ * continues only on 4xx; 5xx, fetch errors and served-but-invalid documents
+ * all throw). Derived exactly from the recorded attempts.
+ */
+function engineFallsBackToOriginAs(result: AuditResult): boolean {
+ if (result.protectedResource.attempts.some((attempt) => attempt.kind === "header")) return false;
+ if (result.probe.resourceMetadataHeader) return false;
+ const wellKnown = result.protectedResource.attempts.filter(
+ (attempt) => attempt.kind === "pathful" || attempt.kind === "origin",
+ );
+ if (wellKnown.some((attempt) => attempt.status === "available")) return false;
+ return wellKnown.every(
+ (attempt) =>
+ attempt.httpStatus !== undefined && attempt.httpStatus >= 400 && attempt.httpStatus < 500,
+ );
+}
+
+function metadataNote(result: AuditResult, overrideNote?: string): string | undefined {
+ if (overrideNote) return overrideNote;
+ if (result.protectedResource.selectionNote) return result.protectedResource.selectionNote;
+ if (advertisedRegistrationGated(result.authorizationServer)) {
+ const status = result.authorizationServer.registrationAttempt?.httpStatus;
+ return `advertises a registration endpoint, but a live anonymous registration attempt was rejected there (HTTP ${status}): the advertised dynamic client registration is gated and the engine's standard flow fails without a pre-registered client`;
+ }
+ if (audienceMismatched(result)) {
+ return "the engine-visible protected-resource document's resource matches neither the exact endpoint nor the origin under the engine's component comparison; the engine fails closed on this entry";
+ }
+ if (evidenceSupportsUserRegisteredOauth(result)) {
+ const methods = result.authorizationServer.evidence?.tokenAuthMethods ?? [];
+ return `the authorization server advertises only secret-based client authentication (${methods.join(", ")}); the engine's no-credentials flow fails its client-auth compatibility gate at connect, so the entry classifies as user-setup with your own registered OAuth app`;
+ }
+ return undefined;
+}
+
+/**
+ * Setup fields for the user-registered OAuth app path (readiness user-setup,
+ * requirement registered-client): the user registers their OWN app with the
+ * provider and configures its identity exactly the way the host's settings
+ * shape does (oauthClientId + oauthClientSecretEnvVar on an mcpServers
+ * entry). Zero-app compliant: Prime still registers nothing.
+ */
+const OAUTH_USER_APP_FIELDS: CatalogSetupField[] = [
+ {
+ id: "oauthClientId",
+ label: "OAuth client id",
+ description: "Client id of your own registered OAuth app (settings mcpServers oauthClientId)",
+ required: true,
+ kind: "client-id",
+ },
+ {
+ id: "oauthClientSecretEnvVar",
+ label: "OAuth client secret",
+ description:
+ "Environment variable holding your app's client secret (settings mcpServers oauthClientSecretEnvVar)",
+ required: true,
+ kind: "client-secret",
+ },
+];
+
+/** Honest per-entry demotion reason quoting the advertised auth-method evidence. */
+function userRegisteredOauthReason(result: AuditResult): string {
+ const methods = result.authorizationServer.evidence?.tokenAuthMethods ?? [];
+ const advertised = methods.length > 0 ? ` (${methods.join(", ")})` : "";
+ return `requires your own OAuth app: the authorization server accepts only secret-based client authentication${advertised}; register an app with the provider and configure its client id and secret`;
+}
+
+/**
+ * Demote a would-be-one-click entry to the user-setup OAuth path. The engine's
+ * standard no-credentials flow fails its client-auth compatibility gate against
+ * this authorization server (live evidence: Hugging Face /mcp login fails with
+ * "no compatible client authentication method"), but the same standard flow
+ * completes with a user-registered confidential app, so the honest
+ * classification is user-setup with client-id/client-secret setup fields — NOT
+ * the exclusions list, and never prime-restricted: Prime registers nothing,
+ * the user registers their own app.
+ */
+function demoteToUserRegisteredOauth(entry: CatalogEntry, result: AuditResult): void {
+ entry.setup.status = "requires-setup";
+ entry.setup.reason = userRegisteredOauthReason(result);
+ entry.setup.fields = dedupeFields([...(entry.setup.fields ?? []), ...OAUTH_USER_APP_FIELDS.map((field) => ({ ...field }))]);
+ entry.setup.requirement = "registered-client";
+ entry.setup.readiness = "user-setup";
+}
+
+function applyAuditEvidence(built: BuiltEntry[], audit: AuditFile | undefined, overrides?: Overrides): void {
+ if (!audit) return;
+ const byServer = new Map(audit.results.map((result) => [result.server, result]));
+ for (const { entry, identityKey } of built) {
+ if (entry.transport.type !== "http" && entry.transport.type !== "sse") continue;
+ const endpointUrl = entry.transport.url;
+ const result = byServer.get(entry.server);
+ const overrideNote = overrides?.servers[identityKey]?.metadataNote;
+ if (!result) {
+ // Catalog drift: an endpoint without a committed audit snapshot.
+ // "not-audited" is honest; never a gate, never a downgrade.
+ entry.auth.metadata = {
+ status: "not-audited",
+ sourceUrls: [endpointUrl],
+ fetchedAt: audit.fetchedAt,
+ };
+ if (entry.setup.status === "ready" && !entry.setup.readiness) entry.setup.readiness = "unknown";
+ continue;
+ }
+ const as = result.authorizationServer;
+ const selected = result.protectedResource.attempts.find(
+ (attempt) => attempt.sourceUrl === result.protectedResource.engineSelectedSourceUrl,
+ );
+ const selectedPrm = selected?.evidence;
+ entry.auth.metadata = {
+ status: as.status === "available" ? "available" : "unavailable",
+ ...(as.issuer ? { authorizationServer: as.issuer } : {}),
+ ...(selectedPrm?.resource ? { resource: selectedPrm.resource } : {}),
+ ...(as.evidence?.pkceS256 !== undefined ? { pkceS256: as.evidence.pkceS256 } : {}),
+ // An advertisement alone is not usable-DCR evidence: when a live
+ // anonymous registration attempt at the advertised endpoint was
+ // rejected, the honest flag is explicit false (gated), not omitted
+ // (omitted means "not advertised").
+ ...(as.evidence?.registrationEndpoint !== undefined
+ ? { dynamicClientRegistration: !advertisedRegistrationGated(as) }
+ : {}),
+ ...(as.evidence?.clientIdMetadataDocument ? { clientIdMetadataDocument: true } : {}),
+ ...(selectedPrm?.protectedResourceScopes?.length ? { protectedResourceScopes: selectedPrm.protectedResourceScopes } : {}),
+ ...(as.evidence?.authorizationServerScopes?.length
+ ? { authorizationServerScopes: as.evidence.authorizationServerScopes }
+ : {}),
+ ...(as.evidence?.tokenAuthMethods?.length ? { tokenAuthMethods: as.evidence.tokenAuthMethods } : {}),
+ sourceUrls: [
+ ...new Set([
+ result.probe.url,
+ ...result.protectedResource.attempts.map((attempt) => attempt.sourceUrl),
+ ...as.sourceUrls,
+ ]),
+ ],
+ fetchedAt: audit.fetchedAt,
+ ...(metadataNote(result, overrideNote) ? { note: metadataNote(result, overrideNote) } : {}),
+ };
+ if (entry.setup.readiness) continue; // curated override wins
+ if (entry.setup.status === "ready") {
+ // Metadata availability never downgrades a ready entry; oauth-ready
+ // requires positive evidence — including the engine's
+ // client-auth compatibility gate. A coherent DCR entry whose
+ // authorization server advertises only secret-bearing methods
+ // demotes honestly to the user-setup OAuth path (the user's own
+ // registered app, zero-app compliant); everything else stays
+ // unknown.
+ if (evidenceSupportsStandardOauth(result)) {
+ entry.setup.readiness = "oauth-ready";
+ continue;
+ }
+ if (evidenceSupportsUserRegisteredOauth(result)) {
+ demoteToUserRegisteredOauth(entry, result);
+ continue;
+ }
+ entry.setup.readiness = "unknown";
+ continue;
+ }
+ const requirement = entry.setup.requirement ?? deriveRequirement(entry);
+ if (!requirement) {
+ throw new Error(
+ `requires-setup entry ${entry.server} has no genuine requirement signal; curate overrides.json (requirement) or flip the status with evidence`,
+ );
+ }
+ entry.setup.requirement = requirement;
+ entry.setup.readiness = requirement === "registered-client" ? "prime-restricted" : "user-setup";
+ }
+ // Non-remote adapters: local runtime / tenant URL / unsupported transport.
+ for (const { entry } of built) {
+ if (entry.transport.type === "http" || entry.transport.type === "sse") continue;
+ if (entry.setup.readiness) continue;
+ if (entry.setup.status === "ready") {
+ entry.setup.readiness = "unknown";
+ continue;
+ }
+ entry.setup.requirement ??= deriveRequirement(entry);
+ entry.setup.readiness = "user-setup";
+ }
+}
+
+export function buildCatalog(
+ openAi: OpenAiFixture,
+ claude: ClaudeFixture,
+ overrides: Overrides,
+ audit?: AuditFile,
+): { catalog: CatalogFile; report: ImportReport } {
+ const excluded: { key: string; reason: string }[] = [];
+ const excludedKeys = new Set(overrides.excludedServers.map((entry) => entry.key));
+ for (const entry of overrides.excludedServers) {
+ excluded.push({ key: entry.key, reason: entry.reason });
+ }
+
+ const remoteRecords: RemoteRecord[] = [];
+ const templateRecords: TemplateRecord[] = [];
+ const sseRecords: SseRecord[] = [];
+ const stdioRecords: StdioRecord[] = [];
+
+ let oaiRemote = 0;
+ let oaiExcluded = 0;
+ for (const plugin of openAi.plugins) {
+ for (const [serverName, server] of Object.entries(plugin.mcpServers)) {
+ const key = `${OPENAI}/${plugin.name}/${serverName}`;
+ if (excludedKeys.has(key)) {
+ oaiExcluded++;
+ continue;
+ }
+ const auth = recordAuth(server, plugin.oauthPlaceholders === true);
+ remoteRecords.push({
+ source: OPENAI,
+ plugin: plugin.name,
+ serverName,
+ url: server.url ?? "",
+ auth,
+ provenance: openAiProvenance(openAi, plugin),
+ labelHint: optionalString(plugin.displayName),
+ description: optionalString(plugin.description),
+ category: optionalString(plugin.category),
+ homepage: optionalString(plugin.homepage),
+ privacyUrl: optionalString(plugin.privacyUrl),
+ supportUrl: optionalString(plugin.supportUrl),
+ });
+ oaiRemote++;
+ }
+ }
+
+ let claudeRemote = 0;
+ let claudeStdioServers = 0;
+ let claudeExcluded = 0;
+ for (const plugin of claude.plugins) {
+ const provenance = claudeProvenance(claude, plugin);
+ const provider = plugin.providers[0];
+ if (plugin.category === "stdio_service_adapter") {
+ const servers: StdioRecord["servers"] = [];
+ const fields: CatalogSetupField[] = [];
+ for (const [serverName, server] of Object.entries(plugin.mcpServers)) {
+ const key = `${CLAUDE}/${plugin.name}/${serverName}`;
+ if (excludedKeys.has(key)) {
+ claudeExcluded++;
+ continue;
+ }
+ if (server.command) {
+ servers.push({
+ name: serverName,
+ command: server.command,
+ args: server.args,
+ env: server.env && Object.keys(server.env).length > 0 ? server.env : undefined,
+ });
+ for (const envName of Object.keys(server.env ?? {})) fields.push(envField(envName));
+ claudeStdioServers++;
+ }
+ }
+ if (servers.length > 0) {
+ stdioRecords.push({ source: CLAUDE, plugin: plugin.name, provider: optionalString(provider), provenance, servers, fields });
+ }
+ continue;
+ }
+ for (const [serverName, server] of Object.entries(plugin.mcpServers)) {
+ const key = `${CLAUDE}/${plugin.name}/${serverName}`;
+ if (excludedKeys.has(key)) {
+ claudeExcluded++;
+ continue;
+ }
+ const auth = recordAuth(server, false);
+ if (server.command) {
+ excluded.push({
+ key,
+ reason: "local stdio utility inside a remote-service plugin; outside the remote service lane",
+ });
+ claudeExcluded++;
+ continue;
+ }
+ const url = normalizeTemplatePlaceholders(server.url ?? "");
+ if (server.type === "sse") {
+ sseRecords.push({ source: CLAUDE, plugin: plugin.name, serverName, url: server.url ?? "", auth, provenance, provider });
+ claudeRemote++;
+ continue;
+ }
+ if (isLoopbackUrl(url)) {
+ excluded.push({ key, reason: "loopback/private endpoint; local server, not a remote service" });
+ claudeExcluded++;
+ continue;
+ }
+ if (TEMPLATE_TEST.test(url)) {
+ const resolved = resolveTemplate(url, (name) => `Upstream template variable ${name}`);
+ if (resolved.url) {
+ remoteRecords.push({
+ source: CLAUDE,
+ plugin: plugin.name,
+ serverName,
+ url: resolved.url,
+ auth,
+ provenance,
+ provider,
+ });
+ claudeRemote++;
+ } else {
+ templateRecords.push({
+ source: CLAUDE,
+ plugin: plugin.name,
+ serverName,
+ resolved,
+ auth,
+ provenance,
+ provider,
+ });
+ }
+ continue;
+ }
+ if (!/^https:\/\//.test(url)) {
+ excluded.push({ key, reason: "endpoint is not https" });
+ claudeExcluded++;
+ continue;
+ }
+ remoteRecords.push({
+ source: CLAUDE,
+ plugin: plugin.name,
+ serverName,
+ url,
+ auth,
+ provenance,
+ provider,
+ description: optionalString(server.note),
+ });
+ claudeRemote++;
+ }
+ }
+ TEMPLATE_RE.lastIndex = 0;
+
+ // --- group static remote records by reviewed endpoint ---
+ const groups = new Map<string, RemoteRecord[]>();
+ const groupOrder: string[] = [];
+ for (const record of remoteRecords) {
+ const key = reviewedUrl(record.url);
+ if (!key) {
+ excluded.push({
+ key: `${record.source}/${record.plugin}/${record.serverName}`,
+ reason: "endpoint could not be parsed as an absolute URL",
+ });
+ continue;
+ }
+ if (!groups.has(key)) {
+ groups.set(key, []);
+ groupOrder.push(key);
+ }
+ groups.get(key)!.push(record);
+ }
+
+ const built: BuiltEntry[] = [];
+ const mergedReport: ImportReport["merged"] = [];
+
+ for (const key of groupOrder) {
+ const records = groups.get(key)!;
+ records.sort((a, b) => {
+ const source = SOURCE_PRECEDENCE[a.source] - SOURCE_PRECEDENCE[b.source];
+ if (source !== 0) return source;
+ const plugin = a.plugin.localeCompare(b.plugin);
+ if (plugin !== 0) return plugin;
+ return a.serverName.localeCompare(b.serverName);
+ });
+ const identity = records[0];
+ const identityKey = `${identity.source}/${identity.plugin}/${identity.serverName}`;
+ const override = overrides.servers[identityKey];
+
+ // Attach templated records for the same plugin declared by another source.
+ const attachedTemplates: TemplateRecord[] = [];
+ for (let index = templateRecords.length - 1; index >= 0; index--) {
+ const template = templateRecords[index];
+ const samePluginElsewhere = records.some(
+ (record) => record.plugin === template.plugin && record.source !== template.source,
+ );
+ if (samePluginElsewhere) {
+ attachedTemplates.push(template);
+ templateRecords.splice(index, 1);
+ }
+ }
+
+ built.push(buildHttpEntry(records, attachedTemplates, identityKey, override, mergedReport));
+ }
+
+ for (const template of templateRecords) {
+ const identityKey = `${template.source}/${template.plugin}/${template.serverName}`;
+ const override = overrides.servers[identityKey];
+ const strategy = authStrategy(template.auth);
+ // Template variables are per-instance endpoint URL bindings.
+ const fields = dedupeFields([
+ ...template.auth.fields,
+ ...template.resolved.variables.map((variable) => ({
+ id: variable.name,
+ label: variable.name,
+ description: variable.description,
+ required: true,
+ kind: "url" as const,
+ })),
+ ]);
+ built.push({
+ identityKey,
+ entry: {
+ server: override?.id ?? deriveId(template.plugin, template.serverName),
+ service: override?.service ?? slug(template.provider ?? template.plugin),
+ label: override?.label ?? template.provider ?? titleCase(slug(template.serverName)),
+ url: "",
+ transport: {
+ type: "http-template",
+ template: template.resolved.template ?? "",
+ variables: template.resolved.variables,
+ },
+ auth: { strategy, clientRegistration: override?.clientRegistration ?? "unknown" },
+ setup: {
+ status: "requires-setup",
+ reason:
+ override?.setupReason ?? "endpoint is tenant-specific; provide your instance URL and credentials",
+ fields: fields.length > 0 ? fields : undefined,
+ },
+ verification: { status: override?.verification ?? "unverified" },
+ legacyBuiltin: override?.legacyBuiltin ?? false,
+ aliases: [template.plugin, template.serverName, ...(template.provider ? [template.provider] : [])],
+ provenance: [template.provenance, ...(override ? [primeProvenance(override)] : [])],
+ ...(strategy === "oauth" ? { oauth: { kind: "oauth" } } : {}),
+ },
+ });
+ }
+
+ for (const record of sseRecords) {
+ const identityKey = `${record.source}/${record.plugin}/${record.serverName}`;
+ const override = overrides.servers[identityKey];
+ const strategy = authStrategy(record.auth);
+ built.push({
+ identityKey,
+ entry: {
+ server: override?.id ?? deriveId(record.plugin, record.serverName),
+ service: override?.service ?? slug(record.provider ?? record.plugin),
+ label: override?.label ?? record.provider ?? titleCase(slug(record.serverName)),
+ url: record.url,
+ transport: { type: "sse", url: record.url },
+ auth: { strategy, clientRegistration: override?.clientRegistration ?? "unknown" },
+ setup: {
+ status: "requires-setup",
+ reason:
+ override?.setupReason ??
+ "legacy SSE transport; the generic runtime currently supports streamable HTTP and stdio only",
+ fields: record.auth.fields.length > 0 ? record.auth.fields : undefined,
+ },
+ verification: { status: override?.verification ?? "unverified" },
+ legacyBuiltin: override?.legacyBuiltin ?? false,
+ aliases: [record.plugin, record.serverName, ...(record.provider ? [record.provider] : [])],
+ provenance: [record.provenance, ...(override ? [primeProvenance(override)] : [])],
+ ...(strategy === "oauth" ? { oauth: { kind: "oauth" } } : {}),
+ },
+ });
+ }
+
+ for (const record of stdioRecords) {
+ const identityKey = `${record.source}/${record.plugin}`;
+ const override = overrides.servers[identityKey];
+ const fields = dedupeFields(record.fields);
+ const strategy: CatalogAuth["strategy"] = fields.length > 0 ? "api_key" : "unknown";
+ built.push({
+ identityKey,
+ entry: {
+ server: override?.id ?? slug(record.plugin),
+ service: override?.service ?? slug(record.provider ?? record.plugin),
+ label: override?.label ?? record.provider ?? titleCase(slug(record.plugin)),
+ url: "",
+ transport: { type: "stdio", servers: record.servers },
+ auth: { strategy, clientRegistration: override?.clientRegistration ?? "unknown" },
+ setup: {
+ status: "requires-setup",
+ reason:
+ override?.setupReason ??
+ "local stdio adapter: requires the listed command and its credentials locally; not part of the remote one-click lane",
+ fields: fields.length > 0 ? fields : undefined,
+ },
+ verification: { status: override?.verification ?? "unverified" },
+ legacyBuiltin: override?.legacyBuiltin ?? false,
+ aliases: [record.plugin, ...(record.provider ? [record.provider] : [])],
+ provenance: [record.provenance, ...(override ? [primeProvenance(override)] : [])],
+ },
+ });
+ }
+
+ // --- apply id-level curated overrides and finalize aliases ---
+ for (const { entry, identityKey } of built) {
+ const override = overrides.servers[identityKey];
+ if (override) {
+ if (override.verification) entry.verification = { status: override.verification };
+ if (override.clientRegistration) entry.auth.clientRegistration = override.clientRegistration;
+ if (override.legacyBuiltin !== undefined) entry.legacyBuiltin = override.legacyBuiltin;
+ if (override.setup) entry.setup.status = override.setup;
+ if (override.setupReason) entry.setup.reason = override.setupReason;
+ if (override.setup === "ready") entry.setup.reason = undefined;
+ if (override.setupFields) entry.setup.fields = override.setupFields;
+ if (override.readiness) entry.setup.readiness = override.readiness;
+ if (override.requirement) entry.setup.requirement = override.requirement;
+ if (override.alternatives) entry.auth.alternatives = override.alternatives;
+ if (override.description) entry.description = override.description;
+ if (override.homepage) entry.homepage = override.homepage;
+ if (override.docsUrl) entry.docsUrl = override.docsUrl;
+ if (override.service) entry.service = override.service;
+ if (override.label) entry.label = override.label;
+ }
+ entry.aliases = finalizeAliases(entry);
+ }
+
+ applyAuditEvidence(built, audit, overrides);
+
+ // Zero-app shipping policy (2026-09-14 product decision): Prime maintains
+ // ZERO provider OAuth apps, so the shipped catalog advertises only what
+ // works self-serve — dynamic client registration (readiness "oauth-ready")
+ // or user-supplied credentials ("user-setup": tokens/keys, or the user's
+ // OWN registered OAuth app for providers whose authorization server
+ // accepts only secret-bearing client auth methods). Any entry that still
+ // classifies "prime-restricted" (needs a provider-registered client) or
+ // "unknown" (no verified self-serve path) fails the import on purpose: cut
+ // it via overrides.json `excludedServers` with a documented per-entry
+ // reason, or curate its readiness with evidence. The readiness vocabulary
+ // and the fail-closed audit machinery that derives it are unchanged — only
+ // shipping is policed; the excluded source snapshots and audit evidence
+ // stay committed as history.
+ for (const { entry } of built) {
+ // A missing classification is not a pass: an entry the readiness pass
+ // never reached (for example a remote endpoint with no committed audit
+ // result) would otherwise slip past every downstream shipping guard.
+ // Fail closed and force curation instead (2026-09-16).
+ if (!entry.setup.readiness) {
+ throw new Error(
+ `entry ${entry.server} carries no readiness classification; the catalog ships only classified self-serve (oauth-ready/user-setup) entries — add it to overrides.json excludedServers with a documented reason, or curate its readiness with evidence`,
+ );
+ }
+ if (entry.setup.readiness === "prime-restricted" || entry.setup.readiness === "unknown") {
+ throw new Error(
+ `entry ${entry.server} classifies readiness "${entry.setup.readiness}"; the zero-app catalog ships only self-serve (oauth-ready/user-setup) entries — add it to overrides.json excludedServers with a documented reason, or curate its readiness with evidence`,
+ );
+ }
+ }
+
+ // Token-only catalog cut (2026-09-16 product decision, Kevin live-testing
+ // the picker: "things like cockroachdb cloud still need mcp/ 'requires
+ // provider credentials supplied as headers'? i told you to remove all
+ // that stuff?"): the catalog ships one-click dynamic client registration
+ // ("oauth-ready") or a SIMPLE paste-an-API-key/token service ONLY. A
+ // user-setup survivor is shippable only when BOTH hold:
+ // 1. its requirement is literally "bearer-token" or "api-key" — the two
+ // shapes a user can satisfy by pasting a credential; and
+ // 2. it actually collects at least one bearer-token/api-key field, so
+ // the connect sheet always has something to paste.
+ // This is deliberately narrower than the 2026-09-15 rule it replaces:
+ // tenant configs (instance URL or per-tenant id: Dynatrace, Sourcegraph,
+ // CockroachDB Cloud), legacy-transport entries the runtime cannot even
+ // connect to (PayPal Sandbox SSE) and api-key promises with zero fields
+ // (Render) are no longer shippable shapes at all — they can never
+ // silently re-derive into the catalog. Cut such entries via
+ // overrides.json `excludedServers` with a documented per-entry reason, or
+ // curate the requirement with evidence. The auth-methods honesty
+ // machinery that derives these requirements (decideClientAuthMethod
+ // parity, demotion, tokenAuthMethods capture) is unchanged — only
+ // shipping is policed, and all excluded source snapshots and audit
+ // evidence stay committed as history.
+ for (const { entry } of built) {
+ if (entry.setup.readiness !== "user-setup") continue;
+ const requirement = entry.setup.requirement;
+ const fields = entry.setup.fields ?? [];
+ const pasteableShape = requirement === "bearer-token" || requirement === "api-key";
+ const collectsCredential = fields.some(
+ (field) => field.kind === "bearer-token" || field.kind === "api-key",
+ );
+ if (!pasteableShape) {
+ throw new Error(
+ `entry ${entry.server} has requirement "${requirement ?? "undefined"}"; the catalog ships one-click DCR or a paste-an-api-key/token service only (2026-09-16 decision) — add it to overrides.json excludedServers with a documented reason, or curate its requirement with evidence`,
+ );
+ }
+ if (!collectsCredential) {
+ throw new Error(
+ `entry ${entry.server} has requirement "${requirement}" but collects no bearer-token/api-key field; a key/token entry the user cannot fill in is unusable (2026-09-16 decision) — add it to overrides.json excludedServers with a documented reason, or curate its setup fields with evidence`,
+ );
+ }
+ // The runtime sends exactly ONE Authorization: Bearer per connection, so a
+ // shipped paste-a-key service collects exactly one credential. Fields that
+ // are alternative NAMES for it share a curated `credentialSet` id.
+ const credentialFields = fields.filter(
+ (field) => field.required && (field.kind === "bearer-token" || field.kind === "api-key"),
+ );
+ const distinctCredentials = new Set(credentialFields.map((field) => field.credentialSet ?? field.id));
+ if (distinctCredentials.size > 1) {
+ throw new Error(
+ `entry ${entry.server} collects ${distinctCredentials.size} distinct required credentials (${[...distinctCredentials].join(", ")}); the generic runtime sends a single bearer per connection, so a complete paste cannot authenticate — mark alternative names with a shared setupFields credentialSet in overrides.json, or exclude the entry with a documented reason`,
+ );
+ }
+ }
+
+ const entries = built.map((item) => item.entry).sort((a, b) => a.server.localeCompare(b.server));
+
+ // Uniqueness and endpoint checks — deterministic failures that force curation.
+ if (process.env.MCP_CATALOG_DEBUG_IDS) {
+ for (const { entry, identityKey } of built) {
+ console.log(`ID ${entry.server} <- ${identityKey} [${entry.transport.type}]`);
+ }
+ }
+ const seenIds = new Set<string>();
+ for (const entry of entries) {
+ if (seenIds.has(entry.server)) {
+ throw new Error(`Duplicate catalog server id: ${entry.server}`);
+ }
+ seenIds.add(entry.server);
+ if (entry.transport.type === "http" || entry.transport.type === "sse") {
+ if (!/^https:\/\//.test(entry.transport.url) || isLoopbackUrl(entry.transport.url)) {
+ throw new Error(`Entry ${entry.server} has a non-https or loopback endpoint: ${entry.transport.url}`);
+ }
+ }
+ }
+
+ const counts = {
+ total: entries.length,
+ http: entries.filter((entry) => entry.transport.type === "http").length,
+ httpTemplate: entries.filter((entry) => entry.transport.type === "http-template").length,
+ sse: entries.filter((entry) => entry.transport.type === "sse").length,
+ stdio: entries.filter((entry) => entry.transport.type === "stdio").length,
+ ready: entries.filter((entry) => entry.setup.status === "ready").length,
+ requiresSetup: entries.filter((entry) => entry.setup.status === "requires-setup").length,
+ metadataReviewed: entries.filter((entry) => entry.verification.status === "metadata-reviewed").length,
+ oauthStrategy: entries.filter((entry) => entry.auth.strategy === "oauth").length,
+ apiKeyStrategy: entries.filter((entry) => entry.auth.strategy === "api_key").length,
+ mergedFromBothSources: entries.filter(
+ (entry) =>
+ new Set(
+ entry.provenance
+ .map((prov) => prov.source)
+ .filter((source) => source !== "prime"),
+ ).size >= 2,
+ ).length,
+ readinessOauthReady: entries.filter((entry) => entry.setup.readiness === "oauth-ready").length,
+ readinessUserSetup: entries.filter((entry) => entry.setup.readiness === "user-setup").length,
+ readinessPrimeRestricted: entries.filter((entry) => entry.setup.readiness === "prime-restricted").length,
+ readinessUnknown: entries.filter((entry) => entry.setup.readiness === "unknown").length,
+ metadataAvailable: entries.filter((entry) => entry.auth.metadata?.status === "available").length,
+ metadataUnavailable: entries.filter((entry) => entry.auth.metadata?.status === "unavailable").length,
+ };
+
+ const catalog: CatalogFile = {
+ version: 2,
+ sources: [
+ { source: OPENAI, repository: "openai/plugins", commit: openAi.commit },
+ { source: CLAUDE, repository: "anthropics/claude-plugins-official", commit: claude.catalogCommit },
+ ],
+ counts,
+ entries,
+ };
+
+ const report: ImportReport = {
+ sources: {
+ [OPENAI]: {
+ plugins: openAi.plugins.length,
+ remoteServers: oaiRemote,
+ stdioServers: 0,
+ excluded: oaiExcluded,
+ },
+ [CLAUDE]: {
+ plugins: claude.plugins.length,
+ remoteServers: claudeRemote,
+ stdioServers: claudeStdioServers,
+ excluded: claudeExcluded,
+ },
+ },
+ merged: mergedReport,
+ excluded: excluded.sort((a, b) => a.key.localeCompare(b.key)),
+ counts,
+ };
+
+ return { catalog, report };
+}
+
+function buildHttpEntry(
+ records: RemoteRecord[],
+ templates: TemplateRecord[],
+ identityKey: string,
+ override: OverrideEntry | undefined,
+ mergedReport: ImportReport["merged"],
+): BuiltEntry {
+ const identity = records[0];
+ const union: AuthEvidence = { oauth: false, apiKey: false, blocks: [], fields: [] };
+ for (const record of records) {
+ union.oauth = union.oauth || record.auth.oauth;
+ union.apiKey = union.apiKey || record.auth.apiKey;
+ for (const block of record.auth.blocks) {
+ if (!union.blocks.includes(block)) union.blocks.push(block);
+ }
+ for (const field of record.auth.fields) union.fields.push(field);
+ }
+ for (const template of templates) {
+ union.oauth = union.oauth || template.auth.oauth;
+ union.apiKey = union.apiKey || template.auth.apiKey;
+ for (const block of template.auth.blocks) {
+ if (!union.blocks.includes(block)) union.blocks.push(block);
+ }
+ for (const field of template.auth.fields) union.fields.push(field);
+ }
+ const strategy = authStrategy(union);
+ const fields = dedupeFields(union.fields);
+ const providers = records
+ .map((record) => record.provider)
+ .filter((provider): provider is string => !!provider);
+ const publisher = providers[0];
+ const label = override?.label ?? identity.labelHint ?? publisher ?? titleCase(slug(identity.serverName));
+ const service = override?.service ?? slug(providers[0] ?? identity.plugin);
+ const requiresSetup = union.blocks.length > 0;
+ const provenance: CatalogProvenance[] = records.map((record) => record.provenance);
+ for (const template of templates) {
+ provenance.push({
+ ...template.provenance,
+ note: "templated endpoint excluded; upstream requires per-tenant configuration",
+ });
+ }
+ if (override) provenance.push(primeProvenance(override));
+ const description =
+ override?.description ??
+ records.map((record) => record.description).find((value): value is string => !!value);
+ const entry: CatalogEntry = {
+ server: override?.id ?? deriveId(identity.plugin, identity.serverName),
+ service,
+ label,
+ url: identity.url,
+ description,
+ category: records.map((record) => record.category).find((value): value is string => !!value),
+ aliases: [
+ ...records.flatMap((record) => [record.plugin, record.serverName]),
+ ...providers,
+ ...(override?.aliases ?? []),
+ ],
+ publisher,
+ transport: { type: "http", url: identity.url },
+ auth: { strategy, clientRegistration: override?.clientRegistration ?? "unknown" },
+ setup: requiresSetup
+ ? {
+ status: "requires-setup",
+ reason: override?.setupReason ?? [...union.blocks].sort().join("; "),
+ fields: fields.length > 0 ? fields : undefined,
+ }
+ : { status: "ready" },
+ verification: { status: override?.verification ?? "unverified" },
+ legacyBuiltin: override?.legacyBuiltin ?? false,
+ provenance,
+ homepage: records.map((record) => record.homepage).find((value): value is string => !!value),
+ privacyUrl: records.map((record) => record.privacyUrl).find((value): value is string => !!value),
+ supportUrl: records.map((record) => record.supportUrl).find((value): value is string => !!value),
+ ...(strategy === "oauth" ? { oauth: { kind: "oauth" } } : {}),
+ };
+ if (records.length > 1 || templates.length > 0) {
+ const sources = records
+ .map((record) => record.source)
+ .filter((value, index, array) => array.indexOf(value) === index);
+ mergedReport.push({ server: entry.server, sources, urls: [...new Set(records.map((r) => r.url))] });
+ }
+ return { entry, identityKey };
+}
+
+// ---------------------------------------------------------------------------
+// CLI
+// ---------------------------------------------------------------------------
+
+function main(): void {
+ const scriptDir = path.dirname(fileURLToPath(import.meta.url));
+ const catalogDir = path.resolve(scriptDir, "../mcp-catalog");
+ const openAi = JSON.parse(
+ fs.readFileSync(path.join(catalogDir, "sources/openai-plugins.json"), "utf8"),
+ ) as OpenAiFixture;
+ const claude = JSON.parse(
+ fs.readFileSync(path.join(catalogDir, "sources/claude-plugins-official.json"), "utf8"),
+ ) as ClaudeFixture;
+ const overrides = JSON.parse(fs.readFileSync(path.join(catalogDir, "overrides.json"), "utf8")) as Overrides;
+ const audit = JSON.parse(
+ fs.readFileSync(path.join(catalogDir, "audit/metadata-audit.json"), "utf8"),
+ ) as AuditFile;
+
+ const { catalog, report } = buildCatalog(openAi, claude, overrides, audit);
+
+ const outPath = path.resolve(scriptDir, "../src/mcp/catalog.json");
+ fs.writeFileSync(outPath, `${JSON.stringify(catalog, null, "\t")}\n`);
+ // Generated TS mirror (models.generated.ts precedent) so the runtime never needs
+ // Node JSON import attributes (the repo compiles with module Node16) and the
+ // esbuild CLI bundle can inline the data. catalog.json stays the canonical,
+ // reviewable source of truth; both files are regenerated together.
+ const generatedPath = path.resolve(scriptDir, "../src/mcp/catalog.data.generated.ts");
+ const header = `// AUTO-GENERATED by packages/ai/scripts/import-mcp-catalog.ts — do not edit.\n// Canonical source: packages/ai/src/mcp/catalog.json (both files regenerate together).\n\nimport type { CatalogFileShape } from "./catalog.js";\n\nexport const CATALOG_DATA: CatalogFileShape = `;
+ fs.writeFileSync(generatedPath, `${header}${JSON.stringify(catalog, null, "\t")};\n`);
+ const reportPath = path.join(catalogDir, "import-report.json");
+ fs.writeFileSync(reportPath, `${JSON.stringify(report, null, "\t")}\n`);
+ console.log(
+ `catalog: ${catalog.counts.total} entries (${catalog.counts.http} http, ${catalog.counts.httpTemplate} templated, ${catalog.counts.sse} sse, ${catalog.counts.stdio} stdio); ${catalog.counts.ready} ready, ${catalog.counts.requiresSetup} require setup`,
+ );
+}
+
+if (process.argv[1] && path.resolve(process.argv[1]) === fileURLToPath(import.meta.url)) {
+ main();
+}
diff --git a/packages/ai/src/mcp/catalog.data.generated.ts b/packages/ai/src/mcp/catalog.data.generated.ts
new file mode 100644
index 0000000000..2534d60c4e
--- /dev/null
+++ b/packages/ai/src/mcp/catalog.data.generated.ts
@@ -0,0 +1,5143 @@
+// AUTO-GENERATED by packages/ai/scripts/import-mcp-catalog.ts — do not edit.
+// Canonical source: packages/ai/src/mcp/catalog.json (both files regenerate together).
+
+import type { CatalogFileShape } from "./catalog.js";
+
+export const CATALOG_DATA: CatalogFileShape = {
+ "version": 2,
+ "sources": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "anthropics/claude-plugins-official",
+ "commit": "3deb821cb71ccfaaf2ffa9935e977df314ce5cd5"
+ }
+ ],
+ "counts": {
+ "total": 68,
+ "http": 68,
+ "httpTemplate": 0,
+ "sse": 0,
+ "stdio": 0,
+ "ready": 57,
+ "requiresSetup": 11,
+ "metadataReviewed": 2,
+ "oauthStrategy": 5,
+ "apiKeyStrategy": 10,
+ "mergedFromBothSources": 10,
+ "readinessOauthReady": 57,
+ "readinessUserSetup": 11,
+ "readinessPrimeRestricted": 0,
+ "readinessUnknown": 0,
+ "metadataAvailable": 66,
+ "metadataUnavailable": 2
+ },
+ "entries": [
+ {
+ "server": "airtable",
+ "service": "airtable",
+ "label": "Airtable",
+ "url": "https://mcp.airtable.com/mcp",
+ "description": "Bring operational data and context into the flow of your ChatGPT conversations. You can ask questions, create and update records, and analyze your data—all through conversation. Use the data in Airtable as input to the work you’re doing in ChatGPT, like building a landing page using content you’ve organized in Airtable. Make quick updates to Airtable without leaving the chat. Airtable for ChatGPT is ideal anytime you need quick access to structured internal data to inform your conversation.\n\nAirtable's App connects ChatGPT directly to your Airtable bases, so you can ask questions, create and update records, and analyze your data—all through conversation",
+ "category": "Productivity",
+ "aliases": [],
+ "publisher": "Airtable",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.airtable.com/mcp"
+ },
+ "auth": {
+ "strategy": "oauth",
+ "clientRegistration": "unknown",
+ "alternatives": [
+ {
+ "kind": "api-key",
+ "readiness": "user-setup",
+ "note": "Airtable also documents personal access tokens as a distinct API access path; OAuth dynamic client registration is the default route for the MCP server",
+ "sourceUrl": "https://airtable.com/developers/agents/mcp/getting-started"
+ }
+ ],
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://airtable.com/oauth2/v1",
+ "resource": "https://mcp.airtable.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "data.records:read",
+ "data.records:write",
+ "schema.bases:read",
+ "schema.bases:write",
+ "data.recordComments:read",
+ "data.recordComments:write",
+ "workspacesAndBases:read"
+ ],
+ "authorizationServerScopes": [
+ "data.records:read",
+ "data.records:write",
+ "schema.bases:read",
+ "schema.bases:write",
+ "data.recordComments:read",
+ "data.recordComments:write",
+ "workspacesAndBases:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.airtable.com/mcp",
+ "https://mcp.airtable.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.airtable.com/.well-known/oauth-protected-resource",
+ "https://airtable.com/.well-known/oauth-authorization-server/oauth2/v1",
+ "https://airtable.com/oauth2/v1/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/airtable/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/airtable/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/Airtable/skills.git",
+ "commit": "812ee67f1fd3d76fb45ff8df40afaa0448602ba8",
+ "path": "plugins/airtable",
+ "url": "https://raw.githubusercontent.com/Airtable/skills/812ee67f1fd3d76fb45ff8df40afaa0448602ba8/plugins/airtable/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "placeholder-only upstream OAuth blocks cleared: provider docs confirm OAuth for the Airtable MCP server and the committed audit evidence confirms a live registration endpoint"
+ }
+ ],
+ "homepage": "https://airtable.com",
+ "privacyUrl": "https://www.airtable.com/company/privacy",
+ "supportUrl": "https://support.airtable.com/docs/contacting-airtable-support",
+ "oauth": {
+ "kind": "oauth"
+ }
+ },
+ {
+ "server": "aiven",
+ "service": "aiven",
+ "label": "Aiven",
+ "url": "https://mcp.aiven.live/mcp",
+ "aliases": [],
+ "publisher": "Aiven",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.aiven.live/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.aiven.io",
+ "resource": "https://mcp.aiven.live/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "projects",
+ "services",
+ "accounts:read"
+ ],
+ "authorizationServerScopes": [
+ "projects",
+ "services",
+ "accounts:read"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.aiven.live/mcp",
+ "https://mcp.aiven.live/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.aiven.live/.well-known/oauth-protected-resource",
+ "https://api.aiven.io/.well-known/oauth-authorization-server",
+ "https://api.aiven.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/aiven/aiven-ai-plugins.git",
+ "commit": "634f41d6852957cb9280e9245f2ea6f74645b4f1",
+ "url": "https://raw.githubusercontent.com/aiven/aiven-ai-plugins/634f41d6852957cb9280e9245f2ea6f74645b4f1/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "amplitude",
+ "service": "amplitude",
+ "label": "Amplitude",
+ "url": "https://mcp.amplitude.com/mcp",
+ "aliases": [],
+ "publisher": "Amplitude",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.amplitude.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.amplitude.com",
+ "resource": "https://mcp.amplitude.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp:read",
+ "mcp:write"
+ ],
+ "authorizationServerScopes": [
+ "mcp:read",
+ "mcp:write",
+ "offline_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.amplitude.com/mcp",
+ "https://mcp.amplitude.com/.well-known/oauth-protected-resource",
+ "https://mcp.amplitude.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.amplitude.com/.well-known/oauth-authorization-server",
+ "https://mcp.amplitude.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/amplitude/mcp-marketplace.git",
+ "commit": "96fc7d4c58bb33b4e60c334d34ad944c8a246869",
+ "path": "plugins/amplitude",
+ "url": "https://raw.githubusercontent.com/amplitude/mcp-marketplace/96fc7d4c58bb33b4e60c334d34ad944c8a246869/plugins/amplitude/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "apollo",
+ "service": "apollo-io",
+ "label": "Apollo.io",
+ "url": "https://mcp.apollo.io/mcp",
+ "aliases": [
+ "apollo-io"
+ ],
+ "publisher": "Apollo.io",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.apollo.io/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.apollo.io",
+ "resource": "https://mcp.apollo.io/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "read_user_profile",
+ "app_scopes",
+ "people_bulk_match",
+ "organizations_bulk_enrich",
+ "organizations_enrich",
+ "people_match",
+ "webhook_result_read",
+ "mixed_people_api_search",
+ "organizations_job_posting",
+ "mixed_companies_search",
+ "organizations_search",
+ "contact_write",
+ "contact_update",
+ "contacts_search",
+ "contact_read",
+ "account_write",
+ "account_update",
+ "context_center_read",
+ "context_center_write",
+ "emailer_campaigns_search",
+ "emailer_campaigns_create",
+ "emailer_campaigns_update",
+ "emailer_campaigns_approve",
+ "emailer_campaigns_add_contact_ids",
+ "emailer_campaigns_remove_or_stop_contact_ids",
+ "emailer_schedules_list",
+ "emailer_messages_search",
+ "emailer_messages_create",
+ "emailer_messages_send_now",
+ "emailer_messages_email_send_status"
+ ],
+ "authorizationServerScopes": [
+ "read_user_profile",
+ "app_scopes",
+ "people_bulk_match",
+ "organizations_bulk_enrich",
+ "organizations_enrich",
+ "people_match",
+ "webhook_result_read",
+ "mixed_people_api_search",
+ "organizations_job_posting",
+ "mixed_companies_search",
+ "organizations_search",
+ "contact_write",
+ "contact_update",
+ "contacts_search",
+ "contact_read",
+ "account_write",
+ "account_update",
+ "context_center_read",
+ "context_center_write",
+ "emailer_campaigns_search",
+ "emailer_campaigns_create",
+ "emailer_campaigns_update",
+ "emailer_campaigns_approve",
+ "emailer_campaigns_add_contact_ids",
+ "emailer_campaigns_remove_or_stop_contact_ids",
+ "emailer_schedules_list",
+ "emailer_messages_search",
+ "emailer_messages_create",
+ "emailer_messages_send_now",
+ "emailer_messages_email_send_status"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.apollo.io/mcp",
+ "https://mcp.apollo.io/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.apollo.io/.well-known/oauth-protected-resource",
+ "https://mcp.apollo.io/.well-known/oauth-authorization-server",
+ "https://mcp.apollo.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/apolloio/apollo-mcp-plugin.git",
+ "commit": "2adde980e45f421b7e9383d92870455627936bce",
+ "url": "https://raw.githubusercontent.com/apolloio/apollo-mcp-plugin/2adde980e45f421b7e9383d92870455627936bce/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "appwrite",
+ "service": "appwrite",
+ "label": "Appwrite",
+ "url": "https://mcp.appwrite.io/",
+ "aliases": [],
+ "publisher": "Appwrite",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.appwrite.io/"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://fra.cloud.appwrite.io/v1/oauth2/console",
+ "resource": "https://mcp.appwrite.io/",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "phone",
+ "all",
+ "project:all",
+ "organization:all",
+ "project:project.read",
+ "project:project.write",
+ "project:keys.read",
+ "project:keys.write",
+ "project:platforms.read",
+ "project:platforms.write",
+ "project:mocks.read",
+ "project:mocks.write",
+ "project:project.policies.read",
+ "project:project.policies.write",
+ "project:project.oauth2.read",
+ "project:project.oauth2.write",
+ "project:templates.read",
+ "project:templates.write",
+ "project:stages.read",
+ "project:stages.write",
+ "project:users.read",
+ "project:users.write",
+ "project:sessions.read",
+ "project:sessions.write",
+ "project:teams.read",
+ "project:teams.write",
+ "project:databases.read"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "phone",
+ "all",
+ "project:all",
+ "organization:all",
+ "project:project.read",
+ "project:project.write",
+ "project:keys.read",
+ "project:keys.write",
+ "project:platforms.read",
+ "project:platforms.write",
+ "project:mocks.read",
+ "project:mocks.write",
+ "project:policies.read",
+ "project:policies.write",
+ "project:project.policies.read",
+ "project:project.policies.write",
+ "project:project.oauth2.read",
+ "project:project.oauth2.write",
+ "project:templates.read",
+ "project:templates.write",
+ "project:stages.read",
+ "project:stages.write",
+ "project:users.read",
+ "project:users.write",
+ "project:sessions.read",
+ "project:sessions.write",
+ "project:teams.read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.appwrite.io/",
+ "https://mcp.appwrite.io/.well-known/oauth-protected-resource",
+ "https://fra.cloud.appwrite.io/.well-known/oauth-authorization-server/v1/oauth2/console",
+ "https://fra.cloud.appwrite.io/v1/oauth2/console/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/appwrite/claude-plugin.git",
+ "commit": "ab3c90b37c95b7068f0c064dc562cf21958e8e19",
+ "url": "https://raw.githubusercontent.com/appwrite/claude-plugin/ab3c90b37c95b7068f0c064dc562cf21958e8e19/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "atlassian",
+ "service": "atlassian",
+ "label": "Atlassian",
+ "url": "https://mcp.atlassian.com/v2/mcp",
+ "aliases": [],
+ "publisher": "Atlassian",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.atlassian.com/v2/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "resource": "https://mcp.atlassian.com/v2/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "read:me",
+ "read:account",
+ "offline_access",
+ "email",
+ "read:jira:agent-interface",
+ "write:jira:agent-interface",
+ "search:jira:agent-interface",
+ "delete:jira:agent-interface",
+ "manage:jira:agent-interface",
+ "read:confluence:agent-interface",
+ "write:confluence:agent-interface",
+ "search:confluence:agent-interface",
+ "search:rovo:agent-interface",
+ "search:code:agent-interface",
+ "read:all:twg",
+ "write:all:twg",
+ "read:goals:agent-interface",
+ "write:goals:agent-interface",
+ "read:projects:agent-interface",
+ "write:projects:agent-interface",
+ "read:bitbucket:agent-interface",
+ "write:bitbucket:agent-interface",
+ "read:loom:agent-interface",
+ "write:loom:agent-interface",
+ "read:talent:agent-interface",
+ "write:talent:agent-interface",
+ "read:teams:agent-interface",
+ "write:teams:agent-interface",
+ "read:artifacts:agent-interface",
+ "write:artifacts:agent-interface"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt"
+ ],
+ "sourceUrls": [
+ "https://mcp.atlassian.com/v2/mcp",
+ "https://mcp.atlassian.com/.well-known/oauth-protected-resource/v2/mcp",
+ "https://mcp.atlassian.com/.well-known/oauth-protected-resource",
+ "https://auth.atlassian.com/.well-known/oauth-authorization-server/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/atlassian/atlassian-mcp-server.git",
+ "commit": "7e9591607a5ae6c7e8f58c821da7af96fd1d8200",
+ "url": "https://raw.githubusercontent.com/atlassian/atlassian-mcp-server/7e9591607a5ae6c7e8f58c821da7af96fd1d8200/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "atlassian-rovo",
+ "service": "atlassian-rovo",
+ "label": "Atlassian Rovo",
+ "url": "https://mcp.atlassian.com/v1/mcp/authv2",
+ "description": "Manage Jira and Confluence fast",
+ "category": "Productivity",
+ "aliases": [],
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.atlassian.com/v1/mcp/authv2"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "resource": "https://mcp.atlassian.com/v1/mcp/authv2",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "read:me",
+ "read:account",
+ "offline_access",
+ "email",
+ "read:jira-work",
+ "write:jira-work",
+ "search:confluence",
+ "read:confluence-user",
+ "read:page:confluence",
+ "write:page:confluence",
+ "read:comment:confluence",
+ "write:comment:confluence",
+ "read:space:confluence",
+ "read:hierarchical-content:confluence",
+ "write:component:compass",
+ "read:component:compass",
+ "read:scorecard:compass",
+ "write:scorecard:compass",
+ "read:event:compass",
+ "read:metric:compass",
+ "read:all:twg",
+ "write:all:twg"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt"
+ ],
+ "sourceUrls": [
+ "https://mcp.atlassian.com/v1/mcp/authv2",
+ "https://mcp.atlassian.com/.well-known/oauth-protected-resource/v1/mcp/authv2",
+ "https://mcp.atlassian.com/.well-known/oauth-protected-resource",
+ "https://auth.atlassian.com/.well-known/oauth-authorization-server/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/atlassian-rovo/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/atlassian-rovo/.mcp.json",
+ "license": "MIT"
+ }
+ ],
+ "homepage": "https://www.atlassian.com",
+ "privacyUrl": "https://www.atlassian.com/legal/privacy-policy"
+ },
+ {
+ "server": "aws-devops-agent",
+ "service": "amazon-web-services",
+ "label": "AWS Agents for DevSecOps",
+ "url": "https://connect.aidevops.us-east-1.api.aws/mcp",
+ "aliases": [
+ "amazon-web-services",
+ "aws-agents-for-devsecops"
+ ],
+ "publisher": "Amazon Web Services",
+ "transport": {
+ "type": "http",
+ "url": "https://connect.aidevops.us-east-1.api.aws/mcp"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "unavailable",
+ "sourceUrls": [
+ "https://connect.aidevops.us-east-1.api.aws/mcp",
+ "https://connect.aidevops.us-east-1.api.aws/.well-known/oauth-protected-resource/mcp",
+ "https://connect.aidevops.us-east-1.api.aws/.well-known/oauth-protected-resource",
+ "https://connect.aidevops.us-east-1.api.aws/.well-known/oauth-authorization-server",
+ "https://connect.aidevops.us-east-1.api.aws/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your AWS DevSecOps agent token (DEVOPS_AGENT_TOKEN)",
+ "fields": [
+ {
+ "id": "DEVOPS_AGENT_TOKEN",
+ "label": "DEVOPS_AGENT_TOKEN",
+ "description": "Environment variable DEVOPS_AGENT_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/aws/agent-toolkit-for-aws.git",
+ "commit": "68d9e8541c45afd2510662bcea69fe1e433ea9db",
+ "path": "plugins/aws-agents-for-devsecops",
+ "url": "https://raw.githubusercontent.com/aws/agent-toolkit-for-aws/68d9e8541c45afd2510662bcea69fe1e433ea9db/plugins/aws-agents-for-devsecops/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "canva",
+ "service": "canva",
+ "label": "Canva",
+ "url": "https://mcp.canva.com/mcp",
+ "description": "Bring your Canva design workflow into Codex and create, refine, and review designs through natural conversation.\nAvailable skills:\nResize for social media: Adapt a design for Facebook, Instagram, and LinkedIn in one step.\nBulk create: Generate multiple designs from spreadsheet data using a brand template.\nEdit designs: Update text, media, and formatting, or reposition and resize elements.\nGet design feedback: Receive structured feedback on visual hierarchy, layout, readability, consistency, and accessibility.\nImplement feedback: Review comment threads and apply clear, actionable changes.\nBrand check: Check colors, fonts, logo usage, and copy against your Brand Kit.\nOnce installed, describe what you want in plain language or invoke Canva directly with @Canva.\nTry prompts like:\n- @Canva, resize this design for social media.\n- @Canva, create designs from this spreadsheet using my brand template.\n- @Canva, update the headline in this design.\n- @Canva, review this design’s visual hierarchy and readability.\n- @Canva, implement the feedback in the comment threads.\n- @Canva, check this design against my Brand Kit.\n\nRequirements: Connect your Canva account to use the plugin. Bulk Create requires an eligible Canva Enterprise plan.\n\nWant to take a more hands-on approach? Instantly open your design in Canva’s powerful editor for the final touches.",
+ "category": "Creativity",
+ "aliases": [],
+ "publisher": "Canva",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.canva.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.canva.com",
+ "resource": "https://mcp.canva.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "profile:read",
+ "design:meta:read",
+ "design:content:write",
+ "design:content:read",
+ "folder:read",
+ "folder:write",
+ "brandtemplate:content:read",
+ "brandtemplate:meta:read",
+ "brandtemplate:content:write",
+ "comment:write",
+ "comment:read",
+ "asset:read",
+ "asset:write",
+ "brandkit:read",
+ "help:answers:read",
+ "help:answers:write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.canva.com/mcp",
+ "https://mcp.canva.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.canva.com/.well-known/oauth-protected-resource",
+ "https://mcp.canva.com/.well-known/oauth-authorization-server",
+ "https://mcp.canva.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/canva/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/canva/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/canva-sdks/canva-skills.git",
+ "commit": "b56291ea0a36d0a941e1478b47959be5f1771dee",
+ "path": "plugins/canva",
+ "url": "https://raw.githubusercontent.com/canva-sdks/canva-skills/b56291ea0a36d0a941e1478b47959be5f1771dee/plugins/canva/.mcp.json"
+ }
+ ],
+ "homepage": "https://www.canva.com",
+ "privacyUrl": "https://www.canva.com/policies/privacy-policy/",
+ "supportUrl": "https://www.canva.com/help/contact-us/"
+ },
+ {
+ "server": "catalyst-by-zoho",
+ "service": "zoho-catalyst",
+ "label": "Zoho Catalyst",
+ "url": "https://catalyst.zohomcp.com/mcp/message",
+ "aliases": [
+ "zoho-catalyst"
+ ],
+ "publisher": "Zoho Catalyst",
+ "transport": {
+ "type": "http",
+ "url": "https://catalyst.zohomcp.com/mcp/message"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://catalyst.zohomcp.com",
+ "resource": "https://catalyst.zohomcp.com/mcp/message",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "ZohoCatalyst.fullaccess.ALL",
+ "ZohoCatalyst.functions.execute.CUSTOM",
+ "QuickML.projects.READ",
+ "QuickML.pipelines.READ",
+ "QuickML.pipelines.CREATE",
+ "QuickML.pipelines.UPDATE",
+ "QuickML.pipelines.DELETE",
+ "QuickML.datasets.READ",
+ "QuickML.datasets.UPDATE",
+ "QuickML.datasets.DELETE",
+ "QuickML.datasets.CREATE",
+ "QuickML.models.READ",
+ "QuickML.models.UPDATE",
+ "QuickML.models.DELETE",
+ "QuickML.endpoints.CREATE",
+ "QuickML.endpoints.READ",
+ "QuickML.endpoints.UPDATE",
+ "QuickML.endpoints.DELETE",
+ "QuickML.deployment.READ",
+ "QuickML.rag.READ",
+ "QuickML.rag.CREATE",
+ "QuickML.rag.DELETE",
+ "ZohoCatalyst.Slate.app.READ",
+ "ZohoCatalyst.Slate.app.CREATE",
+ "ZohoCatalyst.automationtesting.execute",
+ "ZohoCatalyst.circuits.execute",
+ "ZohoMCP.tool.execute"
+ ],
+ "authorizationServerScopes": [
+ "ZohoCatalyst.fullaccess.ALL",
+ "ZohoCatalyst.functions.execute.CUSTOM",
+ "QuickML.projects.READ",
+ "QuickML.pipelines.READ",
+ "QuickML.pipelines.CREATE",
+ "QuickML.pipelines.UPDATE",
+ "QuickML.pipelines.DELETE",
+ "QuickML.datasets.READ",
+ "QuickML.datasets.UPDATE",
+ "QuickML.datasets.DELETE",
+ "QuickML.datasets.CREATE",
+ "QuickML.models.READ",
+ "QuickML.models.UPDATE",
+ "QuickML.models.DELETE",
+ "QuickML.endpoints.CREATE",
+ "QuickML.endpoints.READ",
+ "QuickML.endpoints.UPDATE",
+ "QuickML.endpoints.DELETE",
+ "QuickML.deployment.READ",
+ "QuickML.rag.READ",
+ "QuickML.rag.CREATE",
+ "QuickML.rag.DELETE",
+ "ZohoCatalyst.Slate.app.READ",
+ "ZohoCatalyst.Slate.app.CREATE",
+ "ZohoCatalyst.automationtesting.execute",
+ "ZohoCatalyst.circuits.execute",
+ "ZohoMCP.tool.execute"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://catalyst.zohomcp.com/mcp/message",
+ "https://catalyst.zohomcp.com/.well-known/oauth-protected-resource",
+ "https://catalyst.zohomcp.com/.well-known/oauth-protected-resource/mcp/message",
+ "https://catalyst.zohomcp.com/.well-known/oauth-authorization-server",
+ "https://catalyst.zohomcp.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/catalystbyzoho/claude-plugin.git",
+ "commit": "9670b79d72fe4923cc845ca0414d009ef3684ccb",
+ "url": "https://raw.githubusercontent.com/catalystbyzoho/claude-plugin/9670b79d72fe4923cc845ca0414d009ef3684ccb/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "circleback",
+ "service": "circleback",
+ "label": "Circleback",
+ "url": "https://circleback.ai/api/mcp",
+ "aliases": [],
+ "publisher": "Circleback",
+ "transport": {
+ "type": "http",
+ "url": "https://circleback.ai/api/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://circleback.ai",
+ "resource": "https://circleback.ai/api/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "user"
+ ],
+ "authorizationServerScopes": [
+ "user"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://circleback.ai/api/mcp",
+ "https://circleback.ai/.well-known/oauth-protected-resource/api/mcp",
+ "https://circleback.ai/.well-known/oauth-protected-resource",
+ "https://circleback.ai/.well-known/oauth-authorization-server",
+ "https://circleback.ai/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/circlebackai/claude-code-plugin.git",
+ "commit": "a610634c95ab310accf20a0cabdf0fa7ab784fa3",
+ "url": "https://raw.githubusercontent.com/circlebackai/claude-code-plugin/a610634c95ab310accf20a0cabdf0fa7ab784fa3/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "clickhouse",
+ "service": "clickhouse",
+ "label": "ClickHouse",
+ "url": "https://mcp.clickhouse.cloud/mcp",
+ "aliases": [],
+ "publisher": "ClickHouse",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.clickhouse.cloud/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.clickhouse.cloud",
+ "resource": "https://mcp.clickhouse.cloud/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp:access",
+ "openid",
+ "profile",
+ "email"
+ ],
+ "authorizationServerScopes": [
+ "mcp:access",
+ "clickstack:access",
+ "openid",
+ "profile",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.clickhouse.cloud/mcp",
+ "https://mcp.clickhouse.cloud/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.clickhouse.cloud/.well-known/oauth-protected-resource",
+ "https://mcp.clickhouse.cloud/.well-known/oauth-authorization-server",
+ "https://mcp.clickhouse.cloud/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/ClickHouse/clickhouse-claude-code-plugin.git",
+ "commit": "988a7a39834af9c9e14ec3650365243e2cfc6882",
+ "url": "https://raw.githubusercontent.com/ClickHouse/clickhouse-claude-code-plugin/988a7a39834af9c9e14ec3650365243e2cfc6882/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "clickup",
+ "service": "clickup",
+ "label": "ClickUp",
+ "url": "https://mcp.clickup.com/mcp",
+ "description": "Turn Codex into your ClickUp command center.",
+ "category": "Productivity",
+ "aliases": [],
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.clickup.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.clickup.com",
+ "resource": "https://mcp.clickup.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ],
+ "authorizationServerScopes": [
+ "read",
+ "write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.clickup.com/mcp",
+ "https://mcp.clickup.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.clickup.com/.well-known/oauth-protected-resource",
+ "https://mcp.clickup.com/.well-known/oauth-authorization-server",
+ "https://mcp.clickup.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/clickup/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/clickup/.mcp.json",
+ "license": "MIT"
+ }
+ ],
+ "homepage": "https://clickup.com"
+ },
+ {
+ "server": "cloudflare-api",
+ "service": "cloudflare",
+ "label": "Cloudflare",
+ "url": "https://mcp.cloudflare.com/mcp",
+ "description": "Cloudflare platform plugin with curated skills for Workers, Wrangler, and Agents SDK plus the official Cloudflare API MCP server.",
+ "category": "Developer Tools",
+ "aliases": [
+ "cloudflare"
+ ],
+ "publisher": "Cloudflare",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.cloudflare.com/mcp"
+ },
+ "auth": {
+ "strategy": "oauth",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.cloudflare.com",
+ "resource": "https://mcp.cloudflare.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.cloudflare.com/mcp",
+ "https://mcp.cloudflare.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.cloudflare.com/.well-known/oauth-protected-resource",
+ "https://mcp.cloudflare.com/.well-known/oauth-authorization-server",
+ "https://mcp.cloudflare.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/cloudflare/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/cloudflare/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/cloudflare/skills.git",
+ "commit": "b052c32bab7dd493513260228a36c88294f343f1",
+ "url": "https://raw.githubusercontent.com/cloudflare/skills/b052c32bab7dd493513260228a36c88294f343f1/.mcp.json"
+ }
+ ],
+ "homepage": "https://workers.cloudflare.com/",
+ "privacyUrl": "https://www.cloudflare.com/privacypolicy/",
+ "oauth": {
+ "kind": "oauth"
+ }
+ },
+ {
+ "server": "cloudinary-analysis",
+ "service": "cloudinary",
+ "label": "Cloudinary Analysis",
+ "url": "https://analysis.mcp.cloudinary.com/mcp",
+ "aliases": [
+ "cloudinary"
+ ],
+ "publisher": "Cloudinary",
+ "transport": {
+ "type": "http",
+ "url": "https://analysis.mcp.cloudinary.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://analysis.mcp.cloudinary.com",
+ "resource": "https://analysis.mcp.cloudinary.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "media_analysis",
+ "query_analysis_tasks"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "media_analysis",
+ "query_analysis_tasks"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://analysis.mcp.cloudinary.com/mcp",
+ "https://analysis.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "https://analysis.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "https://analysis.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://analysis.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/cloudinary-devs/cloudinary-plugin.git",
+ "commit": "86be53409e3fb1c465cd5ff4d1dc937a2860f45c",
+ "url": "https://raw.githubusercontent.com/cloudinary-devs/cloudinary-plugin/86be53409e3fb1c465cd5ff4d1dc937a2860f45c/mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "cloudinary-asset-mgmt",
+ "service": "cloudinary",
+ "label": "Cloudinary Asset Management",
+ "url": "https://asset-management.mcp.cloudinary.com/mcp",
+ "aliases": [
+ "cloudinary",
+ "cloudinary-asset-management"
+ ],
+ "publisher": "Cloudinary",
+ "transport": {
+ "type": "http",
+ "url": "https://asset-management.mcp.cloudinary.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://asset-management.mcp.cloudinary.com",
+ "resource": "https://asset-management.mcp.cloudinary.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload",
+ "media_generation"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload",
+ "media_generation"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://asset-management.mcp.cloudinary.com/mcp",
+ "https://asset-management.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "https://asset-management.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "https://asset-management.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://asset-management.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/cloudinary-devs/cloudinary-plugin.git",
+ "commit": "86be53409e3fb1c465cd5ff4d1dc937a2860f45c",
+ "url": "https://raw.githubusercontent.com/cloudinary-devs/cloudinary-plugin/86be53409e3fb1c465cd5ff4d1dc937a2860f45c/mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "cloudinary-env-config",
+ "service": "cloudinary",
+ "label": "Cloudinary Environment Config",
+ "url": "https://environment-config.mcp.cloudinary.com/mcp",
+ "aliases": [
+ "cloudinary",
+ "cloudinary-environment-config"
+ ],
+ "publisher": "Cloudinary",
+ "transport": {
+ "type": "http",
+ "url": "https://environment-config.mcp.cloudinary.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://environment-config.mcp.cloudinary.com",
+ "resource": "https://environment-config.mcp.cloudinary.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://environment-config.mcp.cloudinary.com/mcp",
+ "https://environment-config.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "https://environment-config.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "https://environment-config.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://environment-config.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/cloudinary-devs/cloudinary-plugin.git",
+ "commit": "86be53409e3fb1c465cd5ff4d1dc937a2860f45c",
+ "url": "https://raw.githubusercontent.com/cloudinary-devs/cloudinary-plugin/86be53409e3fb1c465cd5ff4d1dc937a2860f45c/mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "cloudinary-smd",
+ "service": "cloudinary",
+ "label": "Cloudinary Structured Metadata",
+ "url": "https://structured-metadata.mcp.cloudinary.com/mcp",
+ "aliases": [
+ "cloudinary",
+ "cloudinary-structured-metadata"
+ ],
+ "publisher": "Cloudinary",
+ "transport": {
+ "type": "http",
+ "url": "https://structured-metadata.mcp.cloudinary.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://structured-metadata.mcp.cloudinary.com",
+ "resource": "https://structured-metadata.mcp.cloudinary.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://structured-metadata.mcp.cloudinary.com/mcp",
+ "https://structured-metadata.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "https://structured-metadata.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "https://structured-metadata.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://structured-metadata.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/cloudinary-devs/cloudinary-plugin.git",
+ "commit": "86be53409e3fb1c465cd5ff4d1dc937a2860f45c",
+ "url": "https://raw.githubusercontent.com/cloudinary-devs/cloudinary-plugin/86be53409e3fb1c465cd5ff4d1dc937a2860f45c/mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "codspeed",
+ "service": "codspeed",
+ "label": "CodSpeed",
+ "url": "https://mcp.codspeed.io/mcp",
+ "aliases": [],
+ "publisher": "CodSpeed",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.codspeed.io/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.codspeed.io",
+ "resource": "https://mcp.codspeed.io/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.codspeed.io/mcp",
+ "https://mcp.codspeed.io/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.codspeed.io/.well-known/oauth-protected-resource",
+ "https://api.codspeed.io/.well-known/oauth-authorization-server",
+ "https://api.codspeed.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/CodSpeedHQ/codspeed.git",
+ "commit": "37eba9ed92b0f1a17cf386303446475df380af37",
+ "url": "https://raw.githubusercontent.com/CodSpeedHQ/codspeed/37eba9ed92b0f1a17cf386303446475df380af37/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "dropbox",
+ "service": "dropbox",
+ "label": "Dropbox",
+ "url": "https://mcp.dropbox.com/mcp",
+ "description": "The Dropbox plugin for ChatGPT connects your Dropbox files directly to ChatGPT. You can access files, save ChatGPT-generated content to Dropbox, and create sharing links without switching tools. Everything respects your existing Dropbox permissions, and ChatGPT only works with files you already have access to.",
+ "category": "Productivity",
+ "aliases": [],
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.dropbox.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://www.dropbox.com",
+ "resource": "https://mcp.dropbox.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "account_info.read",
+ "file_requests.read",
+ "file_requests.write",
+ "files.content.read",
+ "files.content.write",
+ "files.metadata.read",
+ "sharing.read",
+ "sharing.write"
+ ],
+ "authorizationServerScopes": [
+ "account_info.read",
+ "contacts.read",
+ "contacts.write",
+ "files.metadata.read",
+ "files.content.read",
+ "files.content.write",
+ "files.permanent_delete",
+ "files.metadata.write",
+ "sharing.read",
+ "sharing.write",
+ "file_requests.read",
+ "file_requests.write",
+ "openid",
+ "profile",
+ "email",
+ "account_info.write",
+ "backup.read",
+ "backup.write",
+ "dash/content.read",
+ "dash/content.write",
+ "team_info.read",
+ "team_info.write",
+ "sessions.list",
+ "sessions.modify",
+ "members.read",
+ "members.write",
+ "members.delete",
+ "groups.read",
+ "groups.write",
+ "events.read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.dropbox.com/mcp",
+ "https://mcp.dropbox.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.dropbox.com/.well-known/oauth-protected-resource",
+ "https://www.dropbox.com/.well-known/oauth-authorization-server",
+ "https://www.dropbox.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/dropbox/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/dropbox/.mcp.json"
+ }
+ ],
+ "homepage": "https://www.dropbox.com",
+ "privacyUrl": "https://www.dropbox.com/privacy",
+ "supportUrl": "https://www.dropbox.com/get_help"
+ },
+ {
+ "server": "expo",
+ "service": "expo",
+ "label": "Expo",
+ "url": "https://mcp.expo.dev/mcp",
+ "aliases": [],
+ "publisher": "Expo",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.expo.dev/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.expo.dev",
+ "resource": "https://mcp.expo.dev/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "mcp:access"
+ ],
+ "authorizationServerScopes": [
+ "mcp:access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "private_key_jwt",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.expo.dev/mcp",
+ "https://mcp.expo.dev/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.expo.dev/.well-known/oauth-protected-resource",
+ "https://mcp.expo.dev/.well-known/oauth-authorization-server",
+ "https://mcp.expo.dev/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/expo/skills.git",
+ "commit": "170589a7ee8963156f63de8202fa96cf08a9e610",
+ "path": "plugins/expo",
+ "url": "https://raw.githubusercontent.com/expo/skills/170589a7ee8963156f63de8202fa96cf08a9e610/plugins/expo/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "fullstory",
+ "service": "fullstory",
+ "label": "Fullstory",
+ "url": "https://api.fullstory.com/mcp/fullstory",
+ "aliases": [],
+ "publisher": "Fullstory",
+ "transport": {
+ "type": "http",
+ "url": "https://api.fullstory.com/mcp/fullstory"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.fullstory.com",
+ "resource": "https://api.fullstory.com/mcp/fullstory",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "playback:read",
+ "search:read",
+ "search.metadata:read",
+ "sessions:read",
+ "metrics:read",
+ "metrics.funnel:read",
+ "metrics.page:read",
+ "library.objects:read",
+ "playback.spec:read",
+ "playback.page.definitions:read",
+ "specs.mappings:read",
+ "settings.own:read",
+ "settings.own:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://api.fullstory.com/mcp/fullstory",
+ "https://api.fullstory.com/.well-known/oauth-protected-resource/mcp/fullstory",
+ "https://api.fullstory.com/.well-known/oauth-protected-resource",
+ "https://auth.fullstory.com/.well-known/oauth-authorization-server",
+ "https://auth.fullstory.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/fullstorydev/fullstory-skills.git",
+ "commit": "b20614e2d08d7a7c70775bb62b5af640f60b024b",
+ "url": "https://raw.githubusercontent.com/fullstorydev/fullstory-skills/b20614e2d08d7a7c70775bb62b5af640f60b024b/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "gc-ai",
+ "service": "gc-ai",
+ "label": "GC AI",
+ "url": "https://app.gc.ai/api/mcp",
+ "aliases": [],
+ "publisher": "GC AI",
+ "transport": {
+ "type": "http",
+ "url": "https://app.gc.ai/api/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://app.gc.ai/",
+ "resource": "https://app.gc.ai/api/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://app.gc.ai/api/mcp",
+ "https://app.gc.ai/.well-known/oauth-protected-resource/api/mcp",
+ "https://app.gc.ai/.well-known/oauth-protected-resource",
+ "https://app.gc.ai/.well-known/oauth-authorization-server",
+ "https://app.gc.ai/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/GC-AI-Inc/gc-ai-claude-plugin.git",
+ "commit": "efda779972c7b7162e79234e164bc2f359a8a518",
+ "url": "https://raw.githubusercontent.com/GC-AI-Inc/gc-ai-claude-plugin/efda779972c7b7162e79234e164bc2f359a8a518/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "github",
+ "service": "github",
+ "label": "GitHub",
+ "url": "https://api.githubcopilot.com/mcp/",
+ "description": "Inspect repositories, triage pull requests and issues, debug CI, and publish changes through a hybrid GitHub connector and CLI workflow.",
+ "category": "Developer Tools",
+ "aliases": [],
+ "publisher": "GitHub",
+ "transport": {
+ "type": "http",
+ "url": "https://api.githubcopilot.com/mcp/"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "alternatives": [
+ {
+ "kind": "oauth",
+ "readiness": "unknown",
+ "note": "GitHub's MCP endpoint advertises standard OAuth (PKCE S256 observed) but no dynamic client registration; a Prime-controlled registered client is not established",
+ "sourceUrl": "https://github.com/login/oauth/.well-known/oauth-authorization-server"
+ }
+ ],
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://github.com/login/oauth",
+ "resource": "https://api.githubcopilot.com/mcp/",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "repo",
+ "read:org",
+ "read:user",
+ "user:email",
+ "read:packages",
+ "write:packages",
+ "read:project",
+ "project",
+ "gist",
+ "notifications"
+ ],
+ "authorizationServerScopes": [
+ "offline_access"
+ ],
+ "sourceUrls": [
+ "https://api.githubcopilot.com/mcp/",
+ "https://api.githubcopilot.com/.well-known/oauth-protected-resource/mcp/",
+ "https://api.githubcopilot.com/.well-known/oauth-protected-resource",
+ "https://github.com/.well-known/oauth-authorization-server/login/oauth",
+ "https://github.com/login/oauth/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste a GitHub personal access token (GITHUB_PAT_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "GITHUB_PAT_TOKEN",
+ "label": "GITHUB_PAT_TOKEN",
+ "description": "Environment variable GITHUB_PAT_TOKEN",
+ "required": true,
+ "kind": "bearer-token",
+ "credentialSet": "github-pat"
+ },
+ {
+ "id": "GITHUB_PERSONAL_ACCESS_TOKEN",
+ "label": "GITHUB_PERSONAL_ACCESS_TOKEN",
+ "description": "Environment variable GITHUB_PERSONAL_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token",
+ "credentialSet": "github-pat"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/github/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/github/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "anthropics/claude-plugins-official",
+ "commit": "3deb821cb71ccfaaf2ffa9935e977df314ce5cd5",
+ "path": "./external_plugins/github",
+ "url": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/github/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ],
+ "homepage": "https://github.com/",
+ "privacyUrl": "https://docs.github.com/site-policy/privacy-policies/github-general-privacy-statement"
+ },
+ {
+ "server": "grafana-cloud",
+ "service": "grafana",
+ "label": "Grafana",
+ "url": "https://mcp.grafana.com/mcp",
+ "aliases": [
+ "grafana",
+ "grafana-cloud-mcp"
+ ],
+ "publisher": "Grafana",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.grafana.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.grafana.com/mcp",
+ "resource": "https://mcp.grafana.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "grafana:read",
+ "grafana:query",
+ "grafana:write"
+ ],
+ "authorizationServerScopes": [
+ "grafana:read",
+ "grafana:query",
+ "grafana:write"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://mcp.grafana.com/mcp",
+ "https://mcp.grafana.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.grafana.com/.well-known/oauth-protected-resource",
+ "https://mcp.grafana.com/.well-known/oauth-authorization-server/mcp",
+ "https://mcp.grafana.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/grafana/ai-marketplace.git",
+ "commit": "12be5634a492f73c189d466c5449d09b853ad7a4",
+ "path": "plugins/grafana-cloud-mcp",
+ "url": "https://raw.githubusercontent.com/grafana/ai-marketplace/12be5634a492f73c189d466c5449d09b853ad7a4/plugins/grafana-cloud-mcp/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "granola",
+ "service": "granola",
+ "label": "Granola",
+ "url": "https://mcp.granola.ai/mcp",
+ "description": "Granola MCP connects your meeting history to ChatGPT so your assistant can pull real context from past conversations while you work.\n\nUse MCP when you're already working on something bigger:\n\n- Writing PRDs or proposals: Pull customer feedback, stakeholder input, and decisions from relevant meetings directly into your draft\n \n- Building presentations or reports: Combine insights from multiple conversations with your other research and data\n \n- Coding with context: Give your AI the project background, requirements, and technical decisions discussed in planning meetings\n \n- Strategic analysis: Merge meeting insights with documents, data, and other sources for comprehensive analysis\n \nHow it works:\n\nYour AI assistant can search your Granola meetings by topic, person, company, or timeframe - then cite specific conversations in its responses. No more switching tabs to find \"what the customer said\" or \"when we decided that.\"\n\nThe difference:\n\nInstead of copy-pasting meeting notes into prompts, your AI pulls exactly what it needs from your meeting history automatically. You stay focused on the work, not the research or context.",
+ "category": "Productivity",
+ "aliases": [],
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.granola.ai/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp-auth.granola.ai",
+ "resource": "https://mcp.granola.ai/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "mcp"
+ ],
+ "authorizationServerScopes": [
+ "email",
+ "offline_access",
+ "openid",
+ "profile"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt"
+ ],
+ "sourceUrls": [
+ "https://mcp.granola.ai/mcp",
+ "https://mcp.granola.ai/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.granola.ai/.well-known/oauth-protected-resource",
+ "https://mcp-auth.granola.ai/.well-known/oauth-authorization-server",
+ "https://mcp-auth.granola.ai/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/granola/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/granola/.mcp.json",
+ "license": "MIT"
+ }
+ ],
+ "homepage": "https://www.granola.ai",
+ "privacyUrl": "https://help.granola.ai/article/privacy-policy",
+ "supportUrl": "https://help.granola.ai/"
+ },
+ {
+ "server": "greptile",
+ "service": "greptile",
+ "label": "Greptile",
+ "url": "https://api.greptile.com/mcp",
+ "aliases": [],
+ "publisher": "Greptile",
+ "transport": {
+ "type": "http",
+ "url": "https://api.greptile.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.greptile.com",
+ "resource": "https://api.greptile.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ],
+ "authorizationServerScopes": [
+ "offline_access",
+ "offline",
+ "openid",
+ "read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://api.greptile.com/mcp",
+ "https://api.greptile.com/.well-known/oauth-protected-resource/mcp",
+ "https://api.greptile.com/.well-known/oauth-protected-resource",
+ "https://auth.greptile.com/.well-known/oauth-authorization-server",
+ "https://auth.greptile.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/greptileai/claude-plugin.git",
+ "commit": "6b725af2636072cab79e0a5426f6a960b0fd29ef",
+ "path": "plugins/greptile",
+ "url": "https://raw.githubusercontent.com/greptileai/claude-plugin/6b725af2636072cab79e0a5426f6a960b0fd29ef/plugins/greptile/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "higgsfield",
+ "service": "higgsfield",
+ "label": "Higgsfield",
+ "url": "https://mcp.higgsfield.ai/mcp",
+ "description": "Generate images and videos from a text prompt or your own photo. Turn a product shot into a video ad, restyle a photo, animate a still, or build a two-minute narrated explainer. Every major image and video model in one place.",
+ "category": "Creativity",
+ "aliases": [],
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.higgsfield.ai/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://clerk.higgsfield.ai",
+ "resource": "https://mcp.higgsfield.ai/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "openid",
+ "email",
+ "offline_access"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "public_metadata",
+ "private_metadata",
+ "offline_access",
+ "user:org:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "none",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://mcp.higgsfield.ai/mcp",
+ "https://mcp.higgsfield.ai/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.higgsfield.ai/.well-known/oauth-protected-resource",
+ "https://clerk.higgsfield.ai/.well-known/oauth-authorization-server",
+ "https://clerk.higgsfield.ai/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/higgsfield/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/higgsfield/.mcp.json"
+ }
+ ],
+ "homepage": "https://higgsfield.ai",
+ "privacyUrl": "https://higgsfield.ai/privacy-policy",
+ "supportUrl": "https://discord.com/invite/higgsfield"
+ },
+ {
+ "server": "honeycomb",
+ "service": "honeycomb",
+ "label": "Honeycomb",
+ "url": "https://mcp.honeycomb.io/mcp",
+ "aliases": [],
+ "publisher": "Honeycomb",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.honeycomb.io/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://ui.honeycomb.io",
+ "resource": "https://mcp.honeycomb.io/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "mcp:read",
+ "mcp:write"
+ ],
+ "authorizationServerScopes": [
+ "mcp:read",
+ "mcp:write"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://mcp.honeycomb.io/mcp",
+ "https://mcp.honeycomb.io/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.honeycomb.io/.well-known/oauth-protected-resource",
+ "https://ui.honeycomb.io/.well-known/oauth-authorization-server",
+ "https://ui.honeycomb.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/honeycombio/agent-skill.git",
+ "commit": "41214b7dfb97f262adabf295fa6f0fcad85bc0f6",
+ "path": "honeycomb",
+ "url": "https://raw.githubusercontent.com/honeycombio/agent-skill/41214b7dfb97f262adabf295fa6f0fcad85bc0f6/honeycomb/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "hostinger",
+ "service": "hostinger",
+ "label": "Hostinger",
+ "url": "https://mcp.hostinger.com",
+ "aliases": [],
+ "publisher": "Hostinger",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.hostinger.com"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.hostinger.com",
+ "resource": "https://mcp.hostinger.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp:use"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.hostinger.com",
+ "https://mcp.hostinger.com/.well-known/oauth-protected-resource",
+ "https://auth.hostinger.com/.well-known/oauth-authorization-server",
+ "https://auth.hostinger.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/hostinger/claude-plugin.git",
+ "commit": "569880c60681a7068b3ca8ca84e2fe7ab6cfa7ff",
+ "url": "https://raw.githubusercontent.com/hostinger/claude-plugin/569880c60681a7068b3ca8ca84e2fe7ab6cfa7ff/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "hunter",
+ "service": "hunter-io",
+ "label": "Hunter.io",
+ "url": "https://mcp.hunter.io/mcp",
+ "aliases": [
+ "hunter-io"
+ ],
+ "publisher": "Hunter.io",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.hunter.io/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://hunter.io",
+ "resource": "https://mcp.hunter.io",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ],
+ "authorizationServerScopes": [
+ "read",
+ "write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.hunter.io/mcp",
+ "https://mcp.hunter.io/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.hunter.io/.well-known/oauth-protected-resource",
+ "https://hunter.io/.well-known/oauth-authorization-server",
+ "https://hunter.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/hunter-io/claude-plugin.git",
+ "commit": "2a6de2a00f7f459a05c146c6f0712417b8d30db9",
+ "url": "https://raw.githubusercontent.com/hunter-io/claude-plugin/2a6de2a00f7f459a05c146c6f0712417b8d30db9/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "intercom",
+ "service": "intercom",
+ "label": "Intercom",
+ "url": "https://mcp.intercom.com/mcp",
+ "aliases": [],
+ "publisher": "Intercom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.intercom.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.intercom.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.intercom.com/mcp",
+ "https://mcp.intercom.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.intercom.com/.well-known/oauth-protected-resource",
+ "https://mcp.intercom.com/.well-known/oauth-authorization-server",
+ "https://mcp.intercom.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/intercom/claude-plugin-external.git",
+ "commit": "62773a7d4b8aac31545d6888fe6479be3bc53804",
+ "url": "https://raw.githubusercontent.com/intercom/claude-plugin-external/62773a7d4b8aac31545d6888fe6479be3bc53804/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "linear",
+ "service": "linear",
+ "label": "Linear",
+ "url": "https://mcp.linear.app/mcp",
+ "description": "Search, create and update Linear issues, projects, and initiatives. Draft PRDs, write updates, analyze customer requests, and keep plans up to date — all from within ChatGPT",
+ "category": "Productivity",
+ "aliases": [
+ "linear-app"
+ ],
+ "publisher": "Linear",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.linear.app/mcp"
+ },
+ "auth": {
+ "strategy": "oauth",
+ "clientRegistration": "dynamic",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.linear.app",
+ "resource": "https://mcp.linear.app/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ],
+ "authorizationServerScopes": [
+ "read",
+ "write",
+ "openid",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.linear.app/mcp",
+ "https://mcp.linear.app/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.linear.app/.well-known/oauth-protected-resource",
+ "https://mcp.linear.app/.well-known/oauth-authorization-server",
+ "https://mcp.linear.app/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "metadata-reviewed"
+ },
+ "legacyBuiltin": true,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/linear/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/linear/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "anthropics/claude-plugins-official",
+ "commit": "3deb821cb71ccfaaf2ffa9935e977df314ce5cd5",
+ "path": "./external_plugins/linear",
+ "url": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/linear/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "legacy built-in integration; OAuth dynamic client registration (plus CIMD) reviewed against public provider metadata"
+ }
+ ],
+ "homepage": "https://linear.app/",
+ "privacyUrl": "https://linear.app/privacy",
+ "supportUrl": "https://linear.app/contact",
+ "oauth": {
+ "kind": "oauth"
+ }
+ },
+ {
+ "server": "logfire",
+ "service": "pydantic-logfire",
+ "label": "Pydantic Logfire",
+ "url": "https://logfire-us.pydantic.dev/mcp",
+ "aliases": [
+ "pydantic-logfire"
+ ],
+ "publisher": "Pydantic Logfire",
+ "transport": {
+ "type": "http",
+ "url": "https://logfire-us.pydantic.dev/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://logfire-us.pydantic.dev",
+ "resource": "https://logfire-us.pydantic.dev/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "organization:create_project",
+ "organization:read_channel",
+ "organization:write_channel",
+ "project:read",
+ "project:read_alert",
+ "project:read_dashboard",
+ "project:read_variables",
+ "project:trigger_workflow",
+ "project:write",
+ "project:write_alert",
+ "project:write_dashboard",
+ "project:write_token",
+ "project:write_variables"
+ ],
+ "authorizationServerScopes": [
+ "instance:admin",
+ "instance:billing",
+ "organization:admin",
+ "organization:read",
+ "organization:write",
+ "organization:create_project",
+ "organization:read_member",
+ "organization:write_member",
+ "organization:read_channel",
+ "organization:write_channel",
+ "organization:create_api_key",
+ "organization:read_api_key",
+ "organization:write_api_key",
+ "organization:read_invitation",
+ "organization:write_invitation",
+ "project:read",
+ "project:write",
+ "project:write_token",
+ "project:read_token",
+ "project:read_dashboard",
+ "project:write_dashboard",
+ "project:trigger_workflow",
+ "project:read_alert",
+ "project:write_alert",
+ "project:read_datasets",
+ "project:write_datasets",
+ "project:read_variables",
+ "project:write_variables",
+ "project:read_external_variables",
+ "project:gateway_proxy"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://logfire-us.pydantic.dev/mcp",
+ "https://logfire-us.pydantic.dev/.well-known/oauth-protected-resource/mcp",
+ "https://logfire-us.pydantic.dev/.well-known/oauth-protected-resource",
+ "https://logfire-us.pydantic.dev/.well-known/oauth-authorization-server",
+ "https://logfire-us.pydantic.dev/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/pydantic/skills.git",
+ "commit": "9e9390ee24d44b32cf5379c58acaebd7563f5f86",
+ "path": "plugins/logfire",
+ "url": "https://raw.githubusercontent.com/pydantic/skills/9e9390ee24d44b32cf5379c58acaebd7563f5f86/plugins/logfire/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "lovable",
+ "service": "lovable",
+ "label": "Lovable",
+ "url": "https://mcp.lovable.dev/?src=cc-plugin",
+ "aliases": [],
+ "publisher": "Lovable",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.lovable.dev/?src=cc-plugin"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://lovable.dev/oauth",
+ "resource": "https://mcp.lovable.dev",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "offline",
+ "projects:read",
+ "projects:write",
+ "workspaces:read",
+ "workspaces:write"
+ ],
+ "authorizationServerScopes": [
+ "offline",
+ "openid",
+ "email",
+ "profile",
+ "projects:create",
+ "projects:read",
+ "projects:write",
+ "workspaces:create",
+ "workspaces:read",
+ "workspaces:write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.lovable.dev/?src=cc-plugin",
+ "https://mcp.lovable.dev/.well-known/oauth-protected-resource?src=cc-plugin",
+ "https://lovable.dev/.well-known/oauth-authorization-server/oauth",
+ "https://lovable.dev/oauth/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/lovablelabs/mcp.git",
+ "commit": "0336e6db8026b0f02cb89d1451cc48ea3f469791",
+ "url": "https://raw.githubusercontent.com/lovablelabs/mcp/0336e6db8026b0f02cb89d1451cc48ea3f469791/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "mapbox",
+ "service": "mapbox",
+ "label": "Mapbox",
+ "url": "https://mcp.mapbox.com/mcp",
+ "aliases": [],
+ "publisher": "Mapbox",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.mapbox.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.mapbox.com",
+ "resource": "https://mcp.mapbox.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "styles:tiles",
+ "styles:read",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read"
+ ],
+ "authorizationServerScopes": [
+ "styles:tiles",
+ "styles:read",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.mapbox.com/mcp",
+ "https://mcp.mapbox.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.mapbox.com/.well-known/oauth-protected-resource",
+ "https://mcp.mapbox.com/.well-known/oauth-authorization-server",
+ "https://mcp.mapbox.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/mapbox/mapbox-agent-skills.git",
+ "commit": "209e8c408fd65edfff45e491c941e8a00025a1a6",
+ "url": "https://raw.githubusercontent.com/mapbox/mapbox-agent-skills/209e8c408fd65edfff45e491c941e8a00025a1a6/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "mapbox-devkit",
+ "service": "mapbox",
+ "label": "Mapbox DevKit",
+ "url": "https://mcp-devkit.mapbox.com/mcp",
+ "aliases": [
+ "mapbox"
+ ],
+ "publisher": "Mapbox",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp-devkit.mapbox.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp-devkit.mapbox.com",
+ "resource": "https://mcp-devkit.mapbox.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "styles:tiles",
+ "styles:read",
+ "styles:write",
+ "styles:list",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read",
+ "tilesets:read",
+ "user-feedback:read"
+ ],
+ "authorizationServerScopes": [
+ "styles:tiles",
+ "styles:read",
+ "styles:write",
+ "styles:list",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read",
+ "tilesets:read",
+ "user-feedback:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp-devkit.mapbox.com/mcp",
+ "https://mcp-devkit.mapbox.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp-devkit.mapbox.com/.well-known/oauth-protected-resource",
+ "https://mcp-devkit.mapbox.com/.well-known/oauth-authorization-server",
+ "https://mcp-devkit.mapbox.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/mapbox/mapbox-agent-skills.git",
+ "commit": "209e8c408fd65edfff45e491c941e8a00025a1a6",
+ "url": "https://raw.githubusercontent.com/mapbox/mapbox-agent-skills/209e8c408fd65edfff45e491c941e8a00025a1a6/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "mercadopago",
+ "service": "mercado-pago",
+ "label": "Mercado Pago",
+ "url": "https://mcp.mercadopago.com/mcp",
+ "aliases": [
+ "mcp",
+ "mercado-pago"
+ ],
+ "publisher": "Mercado Pago",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.mercadopago.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.mercadopago.com/mcp",
+ "resource": "https://mcp.mercadopago.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "offline_access",
+ "write",
+ "read"
+ ],
+ "authorizationServerScopes": [
+ "offline_access",
+ "write",
+ "read"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.mercadopago.com/mcp",
+ "https://mcp.mercadopago.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.mercadopago.com/.well-known/oauth-protected-resource",
+ "https://mcp.mercadopago.com/.well-known/oauth-authorization-server/mcp",
+ "https://mcp.mercadopago.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/mercadopago/mercadopago-claude-marketplace.git",
+ "commit": "c0d06959afc90b2f3d637c35eeb51c36f512c005",
+ "path": "plugins/mercadopago",
+ "url": "https://raw.githubusercontent.com/mercadopago/mercadopago-claude-marketplace/c0d06959afc90b2f3d637c35eeb51c36f512c005/plugins/mercadopago/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "neon",
+ "service": "neon",
+ "label": "Neon",
+ "url": "https://mcp.neon.tech/mcp",
+ "aliases": [],
+ "publisher": "Neon",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.neon.tech/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.neon.tech",
+ "resource": "https://mcp.neon.tech/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "authorizationServerScopes": [
+ "read",
+ "write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.neon.tech/mcp",
+ "https://mcp.neon.tech/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.neon.tech/.well-known/oauth-protected-resource",
+ "https://mcp.neon.tech/.well-known/oauth-authorization-server",
+ "https://mcp.neon.tech/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/neondatabase/agent-skills.git",
+ "commit": "2e0da3a1653bcdd227565ac14bb3e9e453a8b854",
+ "path": "plugins/neon-postgres",
+ "url": "https://raw.githubusercontent.com/neondatabase/agent-skills/2e0da3a1653bcdd227565ac14bb3e9e453a8b854/plugins/neon-postgres/mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "netlify",
+ "service": "netlify",
+ "label": "Netlify",
+ "url": "https://netlify-mcp.netlify.app/mcp",
+ "description": "Official Netlify MCP server (hosted, streamable HTTP). Authorizes via OAuth on first connection — the agent is prompted to sign in to Netlify; no token or local install required. Lets the agent create and manage Netlify projects, deploys, and environment variables.",
+ "aliases": [
+ "netlify-skills"
+ ],
+ "publisher": "Netlify",
+ "transport": {
+ "type": "http",
+ "url": "https://netlify-mcp.netlify.app/mcp"
+ },
+ "auth": {
+ "strategy": "oauth",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://netlify-mcp.netlify.app/",
+ "resource": "https://netlify-mcp.netlify.app/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "offline_access",
+ "read",
+ "write",
+ "claudeai"
+ ],
+ "authorizationServerScopes": [
+ "offline_access",
+ "read",
+ "write",
+ "claudeai"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://netlify-mcp.netlify.app/mcp",
+ "https://netlify-mcp.netlify.app/.well-known/oauth-protected-resource/mcp",
+ "https://netlify-mcp.netlify.app/.well-known/oauth-protected-resource",
+ "https://netlify-mcp.netlify.app/.well-known/oauth-authorization-server",
+ "https://netlify-mcp.netlify.app/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/netlify/context-and-tools.git",
+ "commit": "b4fd870cf2f1f4cc66b28ead16277e1d799b510f",
+ "url": "https://raw.githubusercontent.com/netlify/context-and-tools/b4fd870cf2f1f4cc66b28ead16277e1d799b510f/.mcp.json"
+ }
+ ],
+ "oauth": {
+ "kind": "oauth"
+ }
+ },
+ {
+ "server": "newrelic",
+ "service": "new-relic",
+ "label": "New Relic",
+ "url": "https://mcp.newrelic.com/mcp/",
+ "aliases": [
+ "new-relic"
+ ],
+ "publisher": "New Relic",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.newrelic.com/mcp/"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://oauth2.service.newrelic.com",
+ "resource": "https://mcp.newrelic.com/mcp/",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "observability:read",
+ "offline",
+ "offline_access"
+ ],
+ "authorizationServerScopes": [
+ "offline_access",
+ "offline",
+ "openid",
+ "observability:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.newrelic.com/mcp/",
+ "https://mcp.newrelic.com/.well-known/oauth-protected-resource",
+ "https://mcp.newrelic.com/.well-known/oauth-protected-resource/mcp/",
+ "https://oauth2.service.newrelic.com/.well-known/oauth-authorization-server",
+ "https://oauth2.service.newrelic.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/newrelic/claude-code-plugin.git",
+ "commit": "f8e5f8b62139072a22153ec92de1c0cc1af2f56a",
+ "url": "https://raw.githubusercontent.com/newrelic/claude-code-plugin/f8e5f8b62139072a22153ec92de1c0cc1af2f56a/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "notion",
+ "service": "notion",
+ "label": "Notion",
+ "url": "https://mcp.notion.com/mcp",
+ "description": "Notion workflows for implementation planning, research synthesis, meeting preparation, and knowledge capture.",
+ "category": "Productivity",
+ "aliases": [
+ "notion-workspace"
+ ],
+ "publisher": "Notion",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.notion.com/mcp"
+ },
+ "auth": {
+ "strategy": "oauth",
+ "clientRegistration": "dynamic",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.notion.com",
+ "resource": "https://mcp.notion.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "default"
+ ],
+ "authorizationServerScopes": [
+ "default"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.notion.com/mcp",
+ "https://mcp.notion.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.notion.com/.well-known/oauth-protected-resource",
+ "https://mcp.notion.com/.well-known/oauth-authorization-server",
+ "https://mcp.notion.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "metadata-reviewed"
+ },
+ "legacyBuiltin": true,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/notion/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/notion/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/makenotion/claude-code-notion-plugin.git",
+ "commit": "9847f2aa1a15f25df35ed1fb7b4557dbb60cd651",
+ "url": "https://raw.githubusercontent.com/makenotion/claude-code-notion-plugin/9847f2aa1a15f25df35ed1fb7b4557dbb60cd651/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "legacy built-in integration; OAuth dynamic client registration (plus CIMD) reviewed against public provider metadata"
+ }
+ ],
+ "homepage": "https://www.notion.so/",
+ "privacyUrl": "https://www.notion.com/help/privacy",
+ "oauth": {
+ "kind": "oauth"
+ }
+ },
+ {
+ "server": "pagerduty",
+ "service": "pagerduty",
+ "label": "PagerDuty",
+ "url": "https://mcp.pagerduty.com/mcp",
+ "aliases": [],
+ "publisher": "PagerDuty",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.pagerduty.com/mcp"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.pagerduty.com/",
+ "resource": "https://mcp.pagerduty.com/mcp",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "incidents.read",
+ "extension_schemas.read",
+ "subscribers.write",
+ "users:sessions.write",
+ "recommendations.write",
+ "recommendations.read",
+ "none",
+ "users:contact_methods.read",
+ "users.write",
+ "templates.read",
+ "incident_types.read",
+ "jira_cloud_rules.read",
+ "workflow_integrations:connections.write",
+ "session_configurations.write",
+ "addons.write",
+ "oncalls.read",
+ "standards.write",
+ "users:contact_methods.write",
+ "users.read",
+ "incident_workflows.write",
+ "notifications.read",
+ "workflow_integrations:connections.read",
+ "copilot:chat.write",
+ "write",
+ "incident_types.write",
+ "contextual_data.write",
+ "event_orchestrations.read",
+ "read",
+ "webhook_subscriptions.write",
+ "openid"
+ ],
+ "authorizationServerScopes": [
+ "incidents.read",
+ "extension_schemas.read",
+ "subscribers.write",
+ "users:sessions.write",
+ "recommendations.write",
+ "recommendations.read",
+ "none",
+ "users:contact_methods.read",
+ "users.write",
+ "templates.read",
+ "incident_types.read",
+ "jira_cloud_rules.read",
+ "workflow_integrations:connections.write",
+ "session_configurations.write",
+ "addons.write",
+ "oncalls.read",
+ "standards.write",
+ "users:contact_methods.write",
+ "users.read",
+ "incident_workflows.write",
+ "notifications.read",
+ "workflow_integrations:connections.read",
+ "copilot:chat.write",
+ "write",
+ "incident_types.write",
+ "contextual_data.write",
+ "event_orchestrations.read",
+ "read",
+ "webhook_subscriptions.write",
+ "openid"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.pagerduty.com/mcp",
+ "https://mcp.pagerduty.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.pagerduty.com/.well-known/oauth-protected-resource",
+ "https://mcp.pagerduty.com/.well-known/oauth-authorization-server",
+ "https://mcp.pagerduty.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your PagerDuty API key (PAGERDUTY_API_KEY)",
+ "fields": [
+ {
+ "id": "PAGERDUTY_API_KEY",
+ "label": "PAGERDUTY_API_KEY",
+ "description": "Environment variable PAGERDUTY_API_KEY",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/PagerDuty/claude-code-plugins.git",
+ "commit": "761cba75bd50fd561405c3b173ecf36084432089",
+ "url": "https://raw.githubusercontent.com/PagerDuty/claude-code-plugins/761cba75bd50fd561405c3b173ecf36084432089/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "posthog",
+ "service": "posthog",
+ "label": "PostHog",
+ "url": "https://mcp.posthog.com/mcp",
+ "description": "PostHog gives your AI agent direct access to your product analytics, feature flags, experiments, error tracking, surveys, logs, and LLM analytics. Ask questions about your data, create insights, toggle feature flags, analyze errors, search docs, and more — all from chat.",
+ "category": "Data & Analytics",
+ "aliases": [],
+ "publisher": "PostHog",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.posthog.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://oauth.posthog.com",
+ "resource": "https://mcp.posthog.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "introspection",
+ "action:read",
+ "action:write",
+ "access_control:read",
+ "account:read",
+ "account:write",
+ "activity_log:read",
+ "alert:read",
+ "alert:write",
+ "annotation:read",
+ "annotation:write",
+ "approvals:read",
+ "approvals:write",
+ "batch_export:read",
+ "batch_export:write",
+ "billing:read",
+ "business_knowledge:read",
+ "business_knowledge:write",
+ "canvas:read",
+ "canvas:write",
+ "cohort:read",
+ "cohort:write",
+ "comment:read",
+ "comment:write",
+ "conversation:read",
+ "customer_analytics:read",
+ "customer_analytics:write"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "introspection",
+ "action:read",
+ "action:write",
+ "access_control:read",
+ "access_control:write",
+ "account:read",
+ "account:write",
+ "activity_log:read",
+ "activity_log:write",
+ "alert:read",
+ "alert:write",
+ "annotation:read",
+ "annotation:write",
+ "approvals:read",
+ "approvals:write",
+ "autoresearch:read",
+ "autoresearch:write",
+ "batch_export:read",
+ "batch_export:write",
+ "batch_import:read",
+ "batch_import:write",
+ "billing:read",
+ "billing:write",
+ "business_knowledge:read",
+ "business_knowledge:write",
+ "canvas:read",
+ "canvas:write"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "private_key_jwt"
+ ],
+ "sourceUrls": [
+ "https://mcp.posthog.com/mcp",
+ "https://mcp.posthog.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.posthog.com/.well-known/oauth-protected-resource",
+ "https://oauth.posthog.com/.well-known/oauth-authorization-server",
+ "https://oauth.posthog.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/posthog/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/posthog/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/PostHog/ai-plugin.git",
+ "commit": "33c066c80776a962a4233d76b20a3317733070b4",
+ "url": "https://raw.githubusercontent.com/PostHog/ai-plugin/33c066c80776a962a4233d76b20a3317733070b4/.mcp.json"
+ }
+ ],
+ "homepage": "https://posthog.com",
+ "privacyUrl": "https://posthog.com/privacy",
+ "supportUrl": "https://posthog.com/support"
+ },
+ {
+ "server": "postman",
+ "service": "postman",
+ "label": "Postman",
+ "url": "https://mcp.postman.com/mcp",
+ "aliases": [],
+ "publisher": "Postman",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.postman.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.postman.com",
+ "resource": "https://mcp.postman.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://mcp.postman.com/mcp",
+ "https://mcp.postman.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.postman.com/.well-known/oauth-protected-resource",
+ "https://mcp.postman.com/.well-known/oauth-authorization-server",
+ "https://mcp.postman.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/Postman-Devrel/postman-claude-code-plugin.git",
+ "commit": "27f652ea98d9ae0cec0ccc9f2b46128239a36a8f",
+ "url": "https://raw.githubusercontent.com/Postman-Devrel/postman-claude-code-plugin/27f652ea98d9ae0cec0ccc9f2b46128239a36a8f/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "prisma",
+ "service": "prisma",
+ "label": "Prisma",
+ "url": "https://mcp.prisma.io/mcp",
+ "aliases": [
+ "prisma-remote"
+ ],
+ "publisher": "Prisma",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.prisma.io/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.prisma.io",
+ "resource": "https://mcp.prisma.io/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "workspace:admin",
+ "offline_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.prisma.io/mcp",
+ "https://mcp.prisma.io/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.prisma.io/.well-known/oauth-protected-resource",
+ "https://auth.prisma.io/.well-known/oauth-authorization-server",
+ "https://auth.prisma.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/prisma/claude-plugin.git",
+ "commit": "815dbc4a045a29e3b81510ba0e3ab806f1baaf0e",
+ "url": "https://raw.githubusercontent.com/prisma/claude-plugin/815dbc4a045a29e3b81510ba0e3ab806f1baaf0e/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "railway",
+ "service": "railway",
+ "label": "Railway",
+ "url": "https://mcp.railway.com",
+ "aliases": [],
+ "publisher": "Railway",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.railway.com"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://backboard.railway.com",
+ "resource": "https://mcp.railway.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "workspace:member"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "workspace:member"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none",
+ "private_key_jwt"
+ ],
+ "sourceUrls": [
+ "https://mcp.railway.com",
+ "https://mcp.railway.com/.well-known/oauth-protected-resource",
+ "https://backboard.railway.com/.well-known/oauth-authorization-server",
+ "https://backboard.railway.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/railwayapp/railway-skills.git",
+ "commit": "950acebcef3445f3915ea0709876c3ba9c237a7f",
+ "path": "plugins/railway",
+ "url": "https://raw.githubusercontent.com/railwayapp/railway-skills/950acebcef3445f3915ea0709876c3ba9c237a7f/plugins/railway/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "resend",
+ "service": "resend",
+ "label": "Resend",
+ "url": "https://mcp.resend.com/mcp",
+ "aliases": [],
+ "publisher": "Resend",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.resend.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.resend.com",
+ "resource": "https://mcp.resend.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "full_access",
+ "emails:send"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://mcp.resend.com/mcp",
+ "https://mcp.resend.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.resend.com/.well-known/oauth-protected-resource",
+ "https://api.resend.com/.well-known/oauth-authorization-server",
+ "https://api.resend.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/resend/resend-skills.git",
+ "commit": "5f9f97958a785429ab8e4534d61fe2d712d74e3d",
+ "url": "https://raw.githubusercontent.com/resend/resend-skills/5f9f97958a785429ab8e4534d61fe2d712d74e3d/.claude-plugin/plugin.json"
+ }
+ ]
+ },
+ {
+ "server": "revenuecat",
+ "service": "revenuecat",
+ "label": "RevenueCat",
+ "url": "https://mcp.revenuecat.ai/mcp",
+ "aliases": [
+ "rc"
+ ],
+ "publisher": "RevenueCat",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.revenuecat.ai/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.revenuecat.ai",
+ "resource": "https://mcp.revenuecat.ai/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "*:*:read",
+ "*:*:read_write"
+ ],
+ "authorizationServerScopes": [
+ "*:*:read",
+ "*:*:read_write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.revenuecat.ai/mcp",
+ "https://mcp.revenuecat.ai/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.revenuecat.ai/.well-known/oauth-protected-resource",
+ "https://mcp.revenuecat.ai/.well-known/oauth-authorization-server",
+ "https://mcp.revenuecat.ai/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/RevenueCat/rc-claude-code-plugin.git",
+ "commit": "b9b77b12da33213c9c2e750b06cd6270c1d8ed65",
+ "url": "https://raw.githubusercontent.com/RevenueCat/rc-claude-code-plugin/b9b77b12da33213c9c2e750b06cd6270c1d8ed65/revenuecat/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/RevenueCat/rc-claude-code-plugin.git",
+ "commit": "b9b77b12da33213c9c2e750b06cd6270c1d8ed65",
+ "url": "https://raw.githubusercontent.com/RevenueCat/rc-claude-code-plugin/b9b77b12da33213c9c2e750b06cd6270c1d8ed65/revenuecat/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "rootly",
+ "service": "rootly",
+ "label": "Rootly",
+ "url": "https://mcp.rootly.com/mcp",
+ "aliases": [],
+ "publisher": "Rootly",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.rootly.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://rootly.com",
+ "resource": "https://mcp.rootly.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "all"
+ ],
+ "authorizationServerScopes": [
+ "profile",
+ "email",
+ "all",
+ "ir.all",
+ "oc.all",
+ "ir.incidents:read",
+ "ir.incidents:write",
+ "ir.services:read",
+ "ir.services:write",
+ "ir.environments:read",
+ "ir.environments:write",
+ "ir.functionalities:read",
+ "ir.functionalities:write",
+ "ir.severities:read",
+ "ir.severities:write",
+ "ir.incident_types:read",
+ "ir.incident_types:write",
+ "ir.incident_roles:read",
+ "ir.incident_roles:write",
+ "ir.workflows:read",
+ "ir.workflows:write",
+ "ir.catalogs:read",
+ "ir.catalogs:write",
+ "ir.groups:read",
+ "ir.groups:write",
+ "ir.playbooks:read",
+ "ir.playbooks:write",
+ "ir.retrospectives:read",
+ "ir.retrospectives:write",
+ "ir.status_pages:read"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.rootly.com/mcp",
+ "https://mcp.rootly.com/.well-known/oauth-protected-resource",
+ "https://mcp.rootly.com/.well-known/oauth-protected-resource/mcp",
+ "https://rootly.com/.well-known/oauth-authorization-server",
+ "https://rootly.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/Rootly-AI-Labs/rootly-claude-plugin.git",
+ "commit": "65832aa6ff7a7b39c6bd64899a7a64646e3948ed",
+ "url": "https://raw.githubusercontent.com/Rootly-AI-Labs/rootly-claude-plugin/65832aa6ff7a7b39c6bd64899a7a64646e3948ed/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "sanity",
+ "service": "sanity",
+ "label": "Sanity",
+ "url": "https://mcp.sanity.io",
+ "aliases": [],
+ "publisher": "Sanity",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.sanity.io"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.sanity.io",
+ "resource": "https://mcp.sanity.io",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "global"
+ ],
+ "authorizationServerScopes": [
+ "global"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.sanity.io",
+ "https://mcp.sanity.io/.well-known/oauth-protected-resource",
+ "https://mcp.sanity.io/.well-known/oauth-authorization-server",
+ "https://mcp.sanity.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/sanity-io/agent-toolkit.git",
+ "commit": "8675ed36b5f5da950c3920c118d025cd1c94f58e",
+ "url": "https://raw.githubusercontent.com/sanity-io/agent-toolkit/8675ed36b5f5da950c3920c118d025cd1c94f58e/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "sentry",
+ "service": "sentry",
+ "label": "Sentry",
+ "url": "https://mcp.sentry.dev/mcp",
+ "description": "Inspect recent issues and events in Sentry from Codex.",
+ "category": "Developer Tools",
+ "aliases": [],
+ "publisher": "Sentry",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.sentry.dev/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.sentry.dev",
+ "resource": "https://mcp.sentry.dev/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "org:read",
+ "project:write",
+ "team:write",
+ "event:write"
+ ],
+ "authorizationServerScopes": [
+ "org:read",
+ "project:write",
+ "team:write",
+ "event:write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.sentry.dev/mcp",
+ "https://mcp.sentry.dev/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.sentry.dev/.well-known/oauth-protected-resource",
+ "https://mcp.sentry.dev/.well-known/oauth-authorization-server",
+ "https://mcp.sentry.dev/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/sentry/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/sentry/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/getsentry/plugin-claude.git",
+ "commit": "73e53541d7af21672e27428c7067f4264b8a3d65",
+ "url": "https://raw.githubusercontent.com/getsentry/plugin-claude/73e53541d7af21672e27428c7067f4264b8a3d65/.claude-plugin/plugin.json"
+ }
+ ],
+ "homepage": "https://sentry.io/",
+ "privacyUrl": "https://sentry.io/privacy/"
+ },
+ {
+ "server": "shippo",
+ "service": "shippo",
+ "label": "Shippo",
+ "url": "https://mcp.shippo.com",
+ "aliases": [
+ "shippo-mcp"
+ ],
+ "publisher": "Shippo",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.shippo.com"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://goshippo.com",
+ "resource": "https://mcp.shippo.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "*"
+ ],
+ "authorizationServerScopes": [
+ "*"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.shippo.com",
+ "https://mcp.shippo.com/.well-known/oauth-protected-resource",
+ "https://goshippo.com/.well-known/oauth-authorization-server",
+ "https://goshippo.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/goshippo/ai.git",
+ "commit": "15cbb6364fbcfd465a134f5972da9179436d0787",
+ "path": "providers/claude/plugin",
+ "url": "https://raw.githubusercontent.com/goshippo/ai/15cbb6364fbcfd465a134f5972da9179436d0787/providers/claude/plugin/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "sonatype-guide",
+ "service": "sonatype-guide",
+ "label": "Sonatype Guide",
+ "url": "https://mcp.guide.sonatype.com/mcp",
+ "aliases": [],
+ "publisher": "Sonatype Guide",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.guide.sonatype.com/mcp"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "unavailable",
+ "sourceUrls": [
+ "https://mcp.guide.sonatype.com/mcp",
+ "https://mcp.guide.sonatype.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.guide.sonatype.com/.well-known/oauth-protected-resource",
+ "https://mcp.guide.sonatype.com/.well-known/oauth-authorization-server",
+ "https://mcp.guide.sonatype.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Sonatype Guide token (SONATYPE_GUIDE_TOKEN)",
+ "fields": [
+ {
+ "id": "SONATYPE_GUIDE_TOKEN",
+ "label": "SONATYPE_GUIDE_TOKEN",
+ "description": "Environment variable SONATYPE_GUIDE_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/sonatype/sonatype-guide-claude-plugin.git",
+ "commit": "1dae73980f591d3196f5532ac72186513563d028",
+ "url": "https://raw.githubusercontent.com/sonatype/sonatype-guide-claude-plugin/1dae73980f591d3196f5532ac72186513563d028/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "stripe",
+ "service": "stripe",
+ "label": "Stripe",
+ "url": "https://mcp.stripe.com",
+ "description": "Develop your payments integration faster with the ability to create products, prices, and payment links directly in ChatGPT. Run your business from ChatGPT with the ability to retrieve and manage payments, subscriptions, invoices, refunds, disputes, and customers. Build and debug your payment integration quicker than ever by searching the Stripe documentation and getting integration recommendations without needing to leave ChatGPT.",
+ "category": "Finance",
+ "aliases": [],
+ "publisher": "Stripe",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.stripe.com"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://access.stripe.com/mcp",
+ "resource": "https://mcp.stripe.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "authorizationServerScopes": [
+ "mcp"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.stripe.com",
+ "https://mcp.stripe.com/.well-known/oauth-protected-resource",
+ "https://access.stripe.com/.well-known/oauth-authorization-server/mcp",
+ "https://access.stripe.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/stripe/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/stripe/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/stripe/ai.git",
+ "commit": "68382523846ea5bfad75ba1ef58dc5db031d0a5a",
+ "path": "providers/claude/plugin",
+ "url": "https://raw.githubusercontent.com/stripe/ai/68382523846ea5bfad75ba1ef58dc5db031d0a5a/providers/claude/plugin/.mcp.json"
+ }
+ ],
+ "homepage": "https://stripe.com",
+ "privacyUrl": "https://stripe.com/privacy",
+ "supportUrl": "https://support.stripe.com"
+ },
+ {
+ "server": "valtown",
+ "service": "val-town",
+ "label": "Val Town",
+ "url": "https://api.val.town/v3/mcp",
+ "aliases": [
+ "val-town"
+ ],
+ "publisher": "Val Town",
+ "transport": {
+ "type": "http",
+ "url": "https://api.val.town/v3/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://www.val.town/oauth",
+ "resource": "https://api.val.town/v3/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "project_rw",
+ "user_r",
+ "blob_rw",
+ "email_rw",
+ "sqlite_rw",
+ "telemetry_r"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "offline_access",
+ "project_rw",
+ "user_r",
+ "user_rw",
+ "blob_rw",
+ "email_rw",
+ "sqlite_rw",
+ "telemetry_r",
+ "telemetry_rw",
+ "val_r",
+ "val_rw",
+ "profile",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://api.val.town/v3/mcp",
+ "https://api.val.town/.well-known/oauth-protected-resource",
+ "https://api.val.town/.well-known/oauth-protected-resource/v3/mcp",
+ "https://www.val.town/.well-known/oauth-authorization-server/oauth",
+ "https://www.val.town/oauth/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/val-town/plugins.git",
+ "commit": "2d3ec654b6a7d93e209afb8f2e8848eddcb9f17b",
+ "path": "plugin",
+ "url": "https://raw.githubusercontent.com/val-town/plugins/2d3ec654b6a7d93e209afb8f2e8848eddcb9f17b/plugin/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "vanta",
+ "service": "vanta",
+ "label": "Vanta (US)",
+ "url": "https://mcp.vanta.com/mcp",
+ "aliases": [
+ "vanta-mcp-plugin",
+ "vanta-us"
+ ],
+ "publisher": "Vanta",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.vanta.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.vanta.com/mcp",
+ "resource": "https://mcp.vanta.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp-api.all:write"
+ ],
+ "authorizationServerScopes": [
+ "mcp-api.all:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.vanta.com/mcp",
+ "https://mcp.vanta.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.vanta.com/.well-known/oauth-protected-resource",
+ "https://api.vanta.com/.well-known/oauth-authorization-server/mcp",
+ "https://api.vanta.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "vanta-aus",
+ "service": "vanta",
+ "label": "Vanta (Australia)",
+ "url": "https://mcp.aus.vanta.com/mcp",
+ "aliases": [
+ "vanta",
+ "vanta-australia",
+ "vanta-mcp-plugin"
+ ],
+ "publisher": "Vanta",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.aus.vanta.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.vanta.com/mcp",
+ "resource": "https://mcp.aus.vanta.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp-api.all:write"
+ ],
+ "authorizationServerScopes": [
+ "mcp-api.all:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.aus.vanta.com/mcp",
+ "https://mcp.aus.vanta.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.aus.vanta.com/.well-known/oauth-protected-resource",
+ "https://api.vanta.com/.well-known/oauth-authorization-server/mcp",
+ "https://api.vanta.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "vanta-eu",
+ "service": "vanta",
+ "label": "Vanta (EU)",
+ "url": "https://mcp.eu.vanta.com/mcp",
+ "aliases": [
+ "vanta",
+ "vanta-mcp-plugin"
+ ],
+ "publisher": "Vanta",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.eu.vanta.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.vanta.com/mcp",
+ "resource": "https://mcp.eu.vanta.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp-api.all:write"
+ ],
+ "authorizationServerScopes": [
+ "mcp-api.all:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.eu.vanta.com/mcp",
+ "https://mcp.eu.vanta.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.eu.vanta.com/.well-known/oauth-protected-resource",
+ "https://api.vanta.com/.well-known/oauth-authorization-server/mcp",
+ "https://api.vanta.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "wix",
+ "service": "wix",
+ "label": "Wix",
+ "url": "https://mcp.wix.com/mcp",
+ "aliases": [
+ "wix-mcp"
+ ],
+ "publisher": "Wix",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.wix.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.wix.com",
+ "resource": "https://mcp.wix.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "offline_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.wix.com/mcp",
+ "https://mcp.wix.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.wix.com/.well-known/oauth-protected-resource",
+ "https://mcp.wix.com/.well-known/oauth-authorization-server",
+ "https://mcp.wix.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/wix/skills.git",
+ "commit": "d8247b9f4603ecadc2891d3ded9bb285d5ee433b",
+ "url": "https://raw.githubusercontent.com/wix/skills/d8247b9f4603ecadc2891d3ded9bb285d5ee433b/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "zapier",
+ "service": "zapier",
+ "label": "Zapier",
+ "url": "https://mcp.zapier.com/api/v1/connect",
+ "aliases": [],
+ "publisher": "Zapier",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zapier.com/api/v1/connect"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.zapier.com",
+ "resource": "https://mcp.zapier.com/api/v1/connect",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zapier.com/api/v1/connect",
+ "https://mcp.zapier.com/.well-known/oauth-protected-resource/api/v1/connect",
+ "https://mcp.zapier.com/.well-known/oauth-protected-resource",
+ "https://mcp.zapier.com/.well-known/oauth-authorization-server",
+ "https://mcp.zapier.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zapier/zapier-mcp.git",
+ "commit": "217d65a980f9b75536babf89ba64bf03ad95beea",
+ "path": "plugins/zapier",
+ "url": "https://raw.githubusercontent.com/zapier/zapier-mcp/217d65a980f9b75536babf89ba64bf03ad95beea/plugins/zapier/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom",
+ "service": "zoom",
+ "label": "Zoom",
+ "url": "https://mcp.zoom.us/mcp/zoom/streamable",
+ "aliases": [
+ "zoom-mcp",
+ "zoom-plugin"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/zoom/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/zoom/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "docs:update:collaborator",
+ "docs:write:collaborator",
+ "docs:read:list_file_collaborators",
+ "docs:delete:collaborator",
+ "my_notes:read:content",
+ "meeting:write:meeting",
+ "meeting:read:search",
+ "meeting:update:meeting",
+ "cloud_recording:read:list_user_recordings",
+ "docs:write:import",
+ "cloud_recording:read:content",
+ "docs:read:export",
+ "hub:write:content",
+ "meeting:update:in_meeting_controls",
+ "agentic_search:read:search",
+ "hub:read:content",
+ "meeting:delete:meeting",
+ "meeting:read:assets",
+ "agentic_search:read:ask"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/zoom/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/zoom/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom access token (ZOOM_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom-canvas",
+ "service": "zoom",
+ "label": "Zoom Canvas",
+ "url": "https://mcp.zoom.us/mcp/canvas/streamable",
+ "aliases": [
+ "zoom",
+ "zoom-canvas-mcp",
+ "zoom-plugin"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/canvas/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/canvas/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "docs:update:file",
+ "docs:read:export",
+ "docs:update:content",
+ "canvas:read:data_table",
+ "docs:delete:file",
+ "docs:write:file",
+ "docs:update:collaborator",
+ "canvas:write:data_table",
+ "docs:delete:collaborator",
+ "docs:read:general_access",
+ "canvas:delete:data_table",
+ "docs:write:collaborator",
+ "docs:write:content",
+ "canvas:update:data_table",
+ "canvas:write:file_search",
+ "hub:write:move",
+ "docs:delete:content",
+ "docs:write:import",
+ "docs:read:file",
+ "docs:read:list_children",
+ "docs:read:list_file_collaborators",
+ "docs:update:file_owner",
+ "docs:update:general_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/canvas/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/canvas/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Canvas access token (ZOOM_CANVAS_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_CANVAS_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_CANVAS_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_CANVAS_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom-chat",
+ "service": "zoom",
+ "label": "Zoom Chat",
+ "url": "https://mcp.zoom.us/mcp/chat/streamable",
+ "aliases": [
+ "zoom",
+ "zoom-chat-mcp",
+ "zoom-plugin"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/chat/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/chat/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "team_chat:read:list_user_messages",
+ "team_chat:update:user_message",
+ "team_chat:read:list_user_sessions",
+ "team_chat:write:contact_information",
+ "team_chat:update:user_channel",
+ "chat_channel:read",
+ "chat_channel:write",
+ "team_chat:read:channel",
+ "team_chat:read:list_contacts",
+ "team_chat:write:members",
+ "team_chat:write:user_message",
+ "team_chat:read:list_user_channels",
+ "team_chat:read:list_members",
+ "team_chat:write:user_channel",
+ "team_chat:update:channel_member_role",
+ "team_chat:read:list_user_files"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/chat/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/chat/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Chat access token (ZOOM_CHAT_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_CHAT_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_CHAT_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_CHAT_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom-meetings",
+ "service": "zoom",
+ "label": "Zoom Meetings",
+ "url": "https://mcp.zoom.us/mcp/meeting/streamable",
+ "description": "Smart meeting insights from Zoom",
+ "category": "Communication",
+ "aliases": [
+ "zoom",
+ "zoom-meetings-mcp",
+ "zoom-plugin"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/meeting/streamable"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/meeting/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "meeting:write:meeting",
+ "meeting:read:search",
+ "meeting:delete:meeting",
+ "meeting:update:in_meeting_controls",
+ "meeting:update:meeting",
+ "meeting:read:assets",
+ "cloud_recording:read:list_user_recordings",
+ "cloud_recording:read:content"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/meeting/streamable",
+ "https://zoom.us/.well-known/oauth-protected-resource/mcp/meeting/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/meeting/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Meetings access token (ZOOM_MEETINGS_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_MEETINGS_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_MEETINGS_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_MEETINGS_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/zoom/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/zoom/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "the upstream OpenAI zoom plugin targets the Zoom meetings MCP endpoint; renamed to keep the general zoom endpoint distinct"
+ }
+ ],
+ "homepage": "https://zoom.us",
+ "privacyUrl": "https://zoom.us/privacy"
+ },
+ {
+ "server": "zoom-revenue-accelerator",
+ "service": "zoom",
+ "label": "Zoom Revenue Accelerator",
+ "url": "https://mcp.zoom.us/mcp/revenue_accelerator/streamable",
+ "aliases": [
+ "zoom",
+ "zoom-plugin",
+ "zoom-revenue-accelerator-mcp"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/revenue_accelerator/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/revenue_accelerator/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "zra:read:conversation_analysis",
+ "zra:read:list_conversations",
+ "zra:read:list_deal_activities",
+ "zra:read:deal",
+ "zra:read:list_conversation_comments",
+ "zra:read:crm_customer_contact",
+ "zra:read:indicator",
+ "zra:read:conversations",
+ "zra:read:team",
+ "zra:read:conversation_scorecards",
+ "zra:read:user",
+ "zra:read:list_deals"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/revenue_accelerator/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/revenue_accelerator/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Revenue Accelerator access token (ZOOM_REVENUE_ACCELERATOR_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_REVENUE_ACCELERATOR_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_REVENUE_ACCELERATOR_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_REVENUE_ACCELERATOR_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom-tasks",
+ "service": "zoom",
+ "label": "Zoom Tasks",
+ "url": "https://mcp.zoom.us/mcp/tasks/streamable",
+ "aliases": [
+ "zoom",
+ "zoom-plugin",
+ "zoom-tasks-mcp"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/tasks/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/tasks/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "tasks:read:list_tasks",
+ "tasks:update:task",
+ "tasks:delete:comment",
+ "tasks:write:task",
+ "tasks:write:assignees",
+ "tasks:write:collaborators",
+ "tasks:write:comment",
+ "tasks:read:comments",
+ "tasks:read:task",
+ "tasks:delete:assignees",
+ "tasks:delete:trash_task",
+ "tasks:delete:collaborator",
+ "tasks:read:list_collaborators",
+ "tasks:read:assignees"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/tasks/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/tasks/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Tasks access token (ZOOM_TASKS_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_TASKS_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_TASKS_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_TASKS_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom-whiteboard",
+ "service": "zoom",
+ "label": "Zoom Whiteboard",
+ "url": "https://mcp.zoom.us/mcp/whiteboard/streamable",
+ "aliases": [
+ "zoom",
+ "zoom-plugin",
+ "zoom-whiteboard-mcp"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/whiteboard/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/whiteboard/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "whiteboard:delete:whiteboard",
+ "whiteboard:write:collaborator",
+ "whiteboard:update:collaborator",
+ "whiteboard:read:list_collaborators",
+ "whiteboard:update:whiteboard",
+ "whiteboard:write:content",
+ "whiteboard:read:list_whiteboards",
+ "whiteboard:read:whiteboard",
+ "whiteboard:write:whiteboard",
+ "whiteboard:read:content",
+ "whiteboard:delete:content",
+ "whiteboard:delete:collaborator"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/whiteboard/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/whiteboard/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Whiteboard access token (ZOOM_WHITEBOARD_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_WHITEBOARD_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_WHITEBOARD_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_WHITEBOARD_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ }
+ ]
+};
diff --git a/packages/ai/src/mcp/catalog.json b/packages/ai/src/mcp/catalog.json
new file mode 100644
index 0000000000..73a05db427
--- /dev/null
+++ b/packages/ai/src/mcp/catalog.json
@@ -0,0 +1,5138 @@
+{
+ "version": 2,
+ "sources": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "anthropics/claude-plugins-official",
+ "commit": "3deb821cb71ccfaaf2ffa9935e977df314ce5cd5"
+ }
+ ],
+ "counts": {
+ "total": 68,
+ "http": 68,
+ "httpTemplate": 0,
+ "sse": 0,
+ "stdio": 0,
+ "ready": 57,
+ "requiresSetup": 11,
+ "metadataReviewed": 2,
+ "oauthStrategy": 5,
+ "apiKeyStrategy": 10,
+ "mergedFromBothSources": 10,
+ "readinessOauthReady": 57,
+ "readinessUserSetup": 11,
+ "readinessPrimeRestricted": 0,
+ "readinessUnknown": 0,
+ "metadataAvailable": 66,
+ "metadataUnavailable": 2
+ },
+ "entries": [
+ {
+ "server": "airtable",
+ "service": "airtable",
+ "label": "Airtable",
+ "url": "https://mcp.airtable.com/mcp",
+ "description": "Bring operational data and context into the flow of your ChatGPT conversations. You can ask questions, create and update records, and analyze your data—all through conversation. Use the data in Airtable as input to the work you’re doing in ChatGPT, like building a landing page using content you’ve organized in Airtable. Make quick updates to Airtable without leaving the chat. Airtable for ChatGPT is ideal anytime you need quick access to structured internal data to inform your conversation.\n\nAirtable's App connects ChatGPT directly to your Airtable bases, so you can ask questions, create and update records, and analyze your data—all through conversation",
+ "category": "Productivity",
+ "aliases": [],
+ "publisher": "Airtable",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.airtable.com/mcp"
+ },
+ "auth": {
+ "strategy": "oauth",
+ "clientRegistration": "unknown",
+ "alternatives": [
+ {
+ "kind": "api-key",
+ "readiness": "user-setup",
+ "note": "Airtable also documents personal access tokens as a distinct API access path; OAuth dynamic client registration is the default route for the MCP server",
+ "sourceUrl": "https://airtable.com/developers/agents/mcp/getting-started"
+ }
+ ],
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://airtable.com/oauth2/v1",
+ "resource": "https://mcp.airtable.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "data.records:read",
+ "data.records:write",
+ "schema.bases:read",
+ "schema.bases:write",
+ "data.recordComments:read",
+ "data.recordComments:write",
+ "workspacesAndBases:read"
+ ],
+ "authorizationServerScopes": [
+ "data.records:read",
+ "data.records:write",
+ "schema.bases:read",
+ "schema.bases:write",
+ "data.recordComments:read",
+ "data.recordComments:write",
+ "workspacesAndBases:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.airtable.com/mcp",
+ "https://mcp.airtable.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.airtable.com/.well-known/oauth-protected-resource",
+ "https://airtable.com/.well-known/oauth-authorization-server/oauth2/v1",
+ "https://airtable.com/oauth2/v1/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/airtable/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/airtable/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/Airtable/skills.git",
+ "commit": "812ee67f1fd3d76fb45ff8df40afaa0448602ba8",
+ "path": "plugins/airtable",
+ "url": "https://raw.githubusercontent.com/Airtable/skills/812ee67f1fd3d76fb45ff8df40afaa0448602ba8/plugins/airtable/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "placeholder-only upstream OAuth blocks cleared: provider docs confirm OAuth for the Airtable MCP server and the committed audit evidence confirms a live registration endpoint"
+ }
+ ],
+ "homepage": "https://airtable.com",
+ "privacyUrl": "https://www.airtable.com/company/privacy",
+ "supportUrl": "https://support.airtable.com/docs/contacting-airtable-support",
+ "oauth": {
+ "kind": "oauth"
+ }
+ },
+ {
+ "server": "aiven",
+ "service": "aiven",
+ "label": "Aiven",
+ "url": "https://mcp.aiven.live/mcp",
+ "aliases": [],
+ "publisher": "Aiven",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.aiven.live/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.aiven.io",
+ "resource": "https://mcp.aiven.live/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "projects",
+ "services",
+ "accounts:read"
+ ],
+ "authorizationServerScopes": [
+ "projects",
+ "services",
+ "accounts:read"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.aiven.live/mcp",
+ "https://mcp.aiven.live/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.aiven.live/.well-known/oauth-protected-resource",
+ "https://api.aiven.io/.well-known/oauth-authorization-server",
+ "https://api.aiven.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/aiven/aiven-ai-plugins.git",
+ "commit": "634f41d6852957cb9280e9245f2ea6f74645b4f1",
+ "url": "https://raw.githubusercontent.com/aiven/aiven-ai-plugins/634f41d6852957cb9280e9245f2ea6f74645b4f1/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "amplitude",
+ "service": "amplitude",
+ "label": "Amplitude",
+ "url": "https://mcp.amplitude.com/mcp",
+ "aliases": [],
+ "publisher": "Amplitude",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.amplitude.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.amplitude.com",
+ "resource": "https://mcp.amplitude.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp:read",
+ "mcp:write"
+ ],
+ "authorizationServerScopes": [
+ "mcp:read",
+ "mcp:write",
+ "offline_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.amplitude.com/mcp",
+ "https://mcp.amplitude.com/.well-known/oauth-protected-resource",
+ "https://mcp.amplitude.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.amplitude.com/.well-known/oauth-authorization-server",
+ "https://mcp.amplitude.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/amplitude/mcp-marketplace.git",
+ "commit": "96fc7d4c58bb33b4e60c334d34ad944c8a246869",
+ "path": "plugins/amplitude",
+ "url": "https://raw.githubusercontent.com/amplitude/mcp-marketplace/96fc7d4c58bb33b4e60c334d34ad944c8a246869/plugins/amplitude/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "apollo",
+ "service": "apollo-io",
+ "label": "Apollo.io",
+ "url": "https://mcp.apollo.io/mcp",
+ "aliases": [
+ "apollo-io"
+ ],
+ "publisher": "Apollo.io",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.apollo.io/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.apollo.io",
+ "resource": "https://mcp.apollo.io/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "read_user_profile",
+ "app_scopes",
+ "people_bulk_match",
+ "organizations_bulk_enrich",
+ "organizations_enrich",
+ "people_match",
+ "webhook_result_read",
+ "mixed_people_api_search",
+ "organizations_job_posting",
+ "mixed_companies_search",
+ "organizations_search",
+ "contact_write",
+ "contact_update",
+ "contacts_search",
+ "contact_read",
+ "account_write",
+ "account_update",
+ "context_center_read",
+ "context_center_write",
+ "emailer_campaigns_search",
+ "emailer_campaigns_create",
+ "emailer_campaigns_update",
+ "emailer_campaigns_approve",
+ "emailer_campaigns_add_contact_ids",
+ "emailer_campaigns_remove_or_stop_contact_ids",
+ "emailer_schedules_list",
+ "emailer_messages_search",
+ "emailer_messages_create",
+ "emailer_messages_send_now",
+ "emailer_messages_email_send_status"
+ ],
+ "authorizationServerScopes": [
+ "read_user_profile",
+ "app_scopes",
+ "people_bulk_match",
+ "organizations_bulk_enrich",
+ "organizations_enrich",
+ "people_match",
+ "webhook_result_read",
+ "mixed_people_api_search",
+ "organizations_job_posting",
+ "mixed_companies_search",
+ "organizations_search",
+ "contact_write",
+ "contact_update",
+ "contacts_search",
+ "contact_read",
+ "account_write",
+ "account_update",
+ "context_center_read",
+ "context_center_write",
+ "emailer_campaigns_search",
+ "emailer_campaigns_create",
+ "emailer_campaigns_update",
+ "emailer_campaigns_approve",
+ "emailer_campaigns_add_contact_ids",
+ "emailer_campaigns_remove_or_stop_contact_ids",
+ "emailer_schedules_list",
+ "emailer_messages_search",
+ "emailer_messages_create",
+ "emailer_messages_send_now",
+ "emailer_messages_email_send_status"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.apollo.io/mcp",
+ "https://mcp.apollo.io/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.apollo.io/.well-known/oauth-protected-resource",
+ "https://mcp.apollo.io/.well-known/oauth-authorization-server",
+ "https://mcp.apollo.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/apolloio/apollo-mcp-plugin.git",
+ "commit": "2adde980e45f421b7e9383d92870455627936bce",
+ "url": "https://raw.githubusercontent.com/apolloio/apollo-mcp-plugin/2adde980e45f421b7e9383d92870455627936bce/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "appwrite",
+ "service": "appwrite",
+ "label": "Appwrite",
+ "url": "https://mcp.appwrite.io/",
+ "aliases": [],
+ "publisher": "Appwrite",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.appwrite.io/"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://fra.cloud.appwrite.io/v1/oauth2/console",
+ "resource": "https://mcp.appwrite.io/",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "phone",
+ "all",
+ "project:all",
+ "organization:all",
+ "project:project.read",
+ "project:project.write",
+ "project:keys.read",
+ "project:keys.write",
+ "project:platforms.read",
+ "project:platforms.write",
+ "project:mocks.read",
+ "project:mocks.write",
+ "project:project.policies.read",
+ "project:project.policies.write",
+ "project:project.oauth2.read",
+ "project:project.oauth2.write",
+ "project:templates.read",
+ "project:templates.write",
+ "project:stages.read",
+ "project:stages.write",
+ "project:users.read",
+ "project:users.write",
+ "project:sessions.read",
+ "project:sessions.write",
+ "project:teams.read",
+ "project:teams.write",
+ "project:databases.read"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "phone",
+ "all",
+ "project:all",
+ "organization:all",
+ "project:project.read",
+ "project:project.write",
+ "project:keys.read",
+ "project:keys.write",
+ "project:platforms.read",
+ "project:platforms.write",
+ "project:mocks.read",
+ "project:mocks.write",
+ "project:policies.read",
+ "project:policies.write",
+ "project:project.policies.read",
+ "project:project.policies.write",
+ "project:project.oauth2.read",
+ "project:project.oauth2.write",
+ "project:templates.read",
+ "project:templates.write",
+ "project:stages.read",
+ "project:stages.write",
+ "project:users.read",
+ "project:users.write",
+ "project:sessions.read",
+ "project:sessions.write",
+ "project:teams.read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.appwrite.io/",
+ "https://mcp.appwrite.io/.well-known/oauth-protected-resource",
+ "https://fra.cloud.appwrite.io/.well-known/oauth-authorization-server/v1/oauth2/console",
+ "https://fra.cloud.appwrite.io/v1/oauth2/console/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/appwrite/claude-plugin.git",
+ "commit": "ab3c90b37c95b7068f0c064dc562cf21958e8e19",
+ "url": "https://raw.githubusercontent.com/appwrite/claude-plugin/ab3c90b37c95b7068f0c064dc562cf21958e8e19/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "atlassian",
+ "service": "atlassian",
+ "label": "Atlassian",
+ "url": "https://mcp.atlassian.com/v2/mcp",
+ "aliases": [],
+ "publisher": "Atlassian",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.atlassian.com/v2/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "resource": "https://mcp.atlassian.com/v2/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "read:me",
+ "read:account",
+ "offline_access",
+ "email",
+ "read:jira:agent-interface",
+ "write:jira:agent-interface",
+ "search:jira:agent-interface",
+ "delete:jira:agent-interface",
+ "manage:jira:agent-interface",
+ "read:confluence:agent-interface",
+ "write:confluence:agent-interface",
+ "search:confluence:agent-interface",
+ "search:rovo:agent-interface",
+ "search:code:agent-interface",
+ "read:all:twg",
+ "write:all:twg",
+ "read:goals:agent-interface",
+ "write:goals:agent-interface",
+ "read:projects:agent-interface",
+ "write:projects:agent-interface",
+ "read:bitbucket:agent-interface",
+ "write:bitbucket:agent-interface",
+ "read:loom:agent-interface",
+ "write:loom:agent-interface",
+ "read:talent:agent-interface",
+ "write:talent:agent-interface",
+ "read:teams:agent-interface",
+ "write:teams:agent-interface",
+ "read:artifacts:agent-interface",
+ "write:artifacts:agent-interface"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt"
+ ],
+ "sourceUrls": [
+ "https://mcp.atlassian.com/v2/mcp",
+ "https://mcp.atlassian.com/.well-known/oauth-protected-resource/v2/mcp",
+ "https://mcp.atlassian.com/.well-known/oauth-protected-resource",
+ "https://auth.atlassian.com/.well-known/oauth-authorization-server/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/atlassian/atlassian-mcp-server.git",
+ "commit": "7e9591607a5ae6c7e8f58c821da7af96fd1d8200",
+ "url": "https://raw.githubusercontent.com/atlassian/atlassian-mcp-server/7e9591607a5ae6c7e8f58c821da7af96fd1d8200/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "atlassian-rovo",
+ "service": "atlassian-rovo",
+ "label": "Atlassian Rovo",
+ "url": "https://mcp.atlassian.com/v1/mcp/authv2",
+ "description": "Manage Jira and Confluence fast",
+ "category": "Productivity",
+ "aliases": [],
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.atlassian.com/v1/mcp/authv2"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "resource": "https://mcp.atlassian.com/v1/mcp/authv2",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "read:me",
+ "read:account",
+ "offline_access",
+ "email",
+ "read:jira-work",
+ "write:jira-work",
+ "search:confluence",
+ "read:confluence-user",
+ "read:page:confluence",
+ "write:page:confluence",
+ "read:comment:confluence",
+ "write:comment:confluence",
+ "read:space:confluence",
+ "read:hierarchical-content:confluence",
+ "write:component:compass",
+ "read:component:compass",
+ "read:scorecard:compass",
+ "write:scorecard:compass",
+ "read:event:compass",
+ "read:metric:compass",
+ "read:all:twg",
+ "write:all:twg"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt"
+ ],
+ "sourceUrls": [
+ "https://mcp.atlassian.com/v1/mcp/authv2",
+ "https://mcp.atlassian.com/.well-known/oauth-protected-resource/v1/mcp/authv2",
+ "https://mcp.atlassian.com/.well-known/oauth-protected-resource",
+ "https://auth.atlassian.com/.well-known/oauth-authorization-server/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3",
+ "https://auth.atlassian.com/VCeDsk8ZHncYF1g234fKtc4lNipbBhu3/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/atlassian-rovo/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/atlassian-rovo/.mcp.json",
+ "license": "MIT"
+ }
+ ],
+ "homepage": "https://www.atlassian.com",
+ "privacyUrl": "https://www.atlassian.com/legal/privacy-policy"
+ },
+ {
+ "server": "aws-devops-agent",
+ "service": "amazon-web-services",
+ "label": "AWS Agents for DevSecOps",
+ "url": "https://connect.aidevops.us-east-1.api.aws/mcp",
+ "aliases": [
+ "amazon-web-services",
+ "aws-agents-for-devsecops"
+ ],
+ "publisher": "Amazon Web Services",
+ "transport": {
+ "type": "http",
+ "url": "https://connect.aidevops.us-east-1.api.aws/mcp"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "unavailable",
+ "sourceUrls": [
+ "https://connect.aidevops.us-east-1.api.aws/mcp",
+ "https://connect.aidevops.us-east-1.api.aws/.well-known/oauth-protected-resource/mcp",
+ "https://connect.aidevops.us-east-1.api.aws/.well-known/oauth-protected-resource",
+ "https://connect.aidevops.us-east-1.api.aws/.well-known/oauth-authorization-server",
+ "https://connect.aidevops.us-east-1.api.aws/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your AWS DevSecOps agent token (DEVOPS_AGENT_TOKEN)",
+ "fields": [
+ {
+ "id": "DEVOPS_AGENT_TOKEN",
+ "label": "DEVOPS_AGENT_TOKEN",
+ "description": "Environment variable DEVOPS_AGENT_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/aws/agent-toolkit-for-aws.git",
+ "commit": "68d9e8541c45afd2510662bcea69fe1e433ea9db",
+ "path": "plugins/aws-agents-for-devsecops",
+ "url": "https://raw.githubusercontent.com/aws/agent-toolkit-for-aws/68d9e8541c45afd2510662bcea69fe1e433ea9db/plugins/aws-agents-for-devsecops/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "canva",
+ "service": "canva",
+ "label": "Canva",
+ "url": "https://mcp.canva.com/mcp",
+ "description": "Bring your Canva design workflow into Codex and create, refine, and review designs through natural conversation.\nAvailable skills:\nResize for social media: Adapt a design for Facebook, Instagram, and LinkedIn in one step.\nBulk create: Generate multiple designs from spreadsheet data using a brand template.\nEdit designs: Update text, media, and formatting, or reposition and resize elements.\nGet design feedback: Receive structured feedback on visual hierarchy, layout, readability, consistency, and accessibility.\nImplement feedback: Review comment threads and apply clear, actionable changes.\nBrand check: Check colors, fonts, logo usage, and copy against your Brand Kit.\nOnce installed, describe what you want in plain language or invoke Canva directly with @Canva.\nTry prompts like:\n- @Canva, resize this design for social media.\n- @Canva, create designs from this spreadsheet using my brand template.\n- @Canva, update the headline in this design.\n- @Canva, review this design’s visual hierarchy and readability.\n- @Canva, implement the feedback in the comment threads.\n- @Canva, check this design against my Brand Kit.\n\nRequirements: Connect your Canva account to use the plugin. Bulk Create requires an eligible Canva Enterprise plan.\n\nWant to take a more hands-on approach? Instantly open your design in Canva’s powerful editor for the final touches.",
+ "category": "Creativity",
+ "aliases": [],
+ "publisher": "Canva",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.canva.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.canva.com",
+ "resource": "https://mcp.canva.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "profile:read",
+ "design:meta:read",
+ "design:content:write",
+ "design:content:read",
+ "folder:read",
+ "folder:write",
+ "brandtemplate:content:read",
+ "brandtemplate:meta:read",
+ "brandtemplate:content:write",
+ "comment:write",
+ "comment:read",
+ "asset:read",
+ "asset:write",
+ "brandkit:read",
+ "help:answers:read",
+ "help:answers:write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.canva.com/mcp",
+ "https://mcp.canva.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.canva.com/.well-known/oauth-protected-resource",
+ "https://mcp.canva.com/.well-known/oauth-authorization-server",
+ "https://mcp.canva.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/canva/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/canva/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/canva-sdks/canva-skills.git",
+ "commit": "b56291ea0a36d0a941e1478b47959be5f1771dee",
+ "path": "plugins/canva",
+ "url": "https://raw.githubusercontent.com/canva-sdks/canva-skills/b56291ea0a36d0a941e1478b47959be5f1771dee/plugins/canva/.mcp.json"
+ }
+ ],
+ "homepage": "https://www.canva.com",
+ "privacyUrl": "https://www.canva.com/policies/privacy-policy/",
+ "supportUrl": "https://www.canva.com/help/contact-us/"
+ },
+ {
+ "server": "catalyst-by-zoho",
+ "service": "zoho-catalyst",
+ "label": "Zoho Catalyst",
+ "url": "https://catalyst.zohomcp.com/mcp/message",
+ "aliases": [
+ "zoho-catalyst"
+ ],
+ "publisher": "Zoho Catalyst",
+ "transport": {
+ "type": "http",
+ "url": "https://catalyst.zohomcp.com/mcp/message"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://catalyst.zohomcp.com",
+ "resource": "https://catalyst.zohomcp.com/mcp/message",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "ZohoCatalyst.fullaccess.ALL",
+ "ZohoCatalyst.functions.execute.CUSTOM",
+ "QuickML.projects.READ",
+ "QuickML.pipelines.READ",
+ "QuickML.pipelines.CREATE",
+ "QuickML.pipelines.UPDATE",
+ "QuickML.pipelines.DELETE",
+ "QuickML.datasets.READ",
+ "QuickML.datasets.UPDATE",
+ "QuickML.datasets.DELETE",
+ "QuickML.datasets.CREATE",
+ "QuickML.models.READ",
+ "QuickML.models.UPDATE",
+ "QuickML.models.DELETE",
+ "QuickML.endpoints.CREATE",
+ "QuickML.endpoints.READ",
+ "QuickML.endpoints.UPDATE",
+ "QuickML.endpoints.DELETE",
+ "QuickML.deployment.READ",
+ "QuickML.rag.READ",
+ "QuickML.rag.CREATE",
+ "QuickML.rag.DELETE",
+ "ZohoCatalyst.Slate.app.READ",
+ "ZohoCatalyst.Slate.app.CREATE",
+ "ZohoCatalyst.automationtesting.execute",
+ "ZohoCatalyst.circuits.execute",
+ "ZohoMCP.tool.execute"
+ ],
+ "authorizationServerScopes": [
+ "ZohoCatalyst.fullaccess.ALL",
+ "ZohoCatalyst.functions.execute.CUSTOM",
+ "QuickML.projects.READ",
+ "QuickML.pipelines.READ",
+ "QuickML.pipelines.CREATE",
+ "QuickML.pipelines.UPDATE",
+ "QuickML.pipelines.DELETE",
+ "QuickML.datasets.READ",
+ "QuickML.datasets.UPDATE",
+ "QuickML.datasets.DELETE",
+ "QuickML.datasets.CREATE",
+ "QuickML.models.READ",
+ "QuickML.models.UPDATE",
+ "QuickML.models.DELETE",
+ "QuickML.endpoints.CREATE",
+ "QuickML.endpoints.READ",
+ "QuickML.endpoints.UPDATE",
+ "QuickML.endpoints.DELETE",
+ "QuickML.deployment.READ",
+ "QuickML.rag.READ",
+ "QuickML.rag.CREATE",
+ "QuickML.rag.DELETE",
+ "ZohoCatalyst.Slate.app.READ",
+ "ZohoCatalyst.Slate.app.CREATE",
+ "ZohoCatalyst.automationtesting.execute",
+ "ZohoCatalyst.circuits.execute",
+ "ZohoMCP.tool.execute"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://catalyst.zohomcp.com/mcp/message",
+ "https://catalyst.zohomcp.com/.well-known/oauth-protected-resource",
+ "https://catalyst.zohomcp.com/.well-known/oauth-protected-resource/mcp/message",
+ "https://catalyst.zohomcp.com/.well-known/oauth-authorization-server",
+ "https://catalyst.zohomcp.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/catalystbyzoho/claude-plugin.git",
+ "commit": "9670b79d72fe4923cc845ca0414d009ef3684ccb",
+ "url": "https://raw.githubusercontent.com/catalystbyzoho/claude-plugin/9670b79d72fe4923cc845ca0414d009ef3684ccb/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "circleback",
+ "service": "circleback",
+ "label": "Circleback",
+ "url": "https://circleback.ai/api/mcp",
+ "aliases": [],
+ "publisher": "Circleback",
+ "transport": {
+ "type": "http",
+ "url": "https://circleback.ai/api/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://circleback.ai",
+ "resource": "https://circleback.ai/api/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "user"
+ ],
+ "authorizationServerScopes": [
+ "user"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://circleback.ai/api/mcp",
+ "https://circleback.ai/.well-known/oauth-protected-resource/api/mcp",
+ "https://circleback.ai/.well-known/oauth-protected-resource",
+ "https://circleback.ai/.well-known/oauth-authorization-server",
+ "https://circleback.ai/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/circlebackai/claude-code-plugin.git",
+ "commit": "a610634c95ab310accf20a0cabdf0fa7ab784fa3",
+ "url": "https://raw.githubusercontent.com/circlebackai/claude-code-plugin/a610634c95ab310accf20a0cabdf0fa7ab784fa3/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "clickhouse",
+ "service": "clickhouse",
+ "label": "ClickHouse",
+ "url": "https://mcp.clickhouse.cloud/mcp",
+ "aliases": [],
+ "publisher": "ClickHouse",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.clickhouse.cloud/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.clickhouse.cloud",
+ "resource": "https://mcp.clickhouse.cloud/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp:access",
+ "openid",
+ "profile",
+ "email"
+ ],
+ "authorizationServerScopes": [
+ "mcp:access",
+ "clickstack:access",
+ "openid",
+ "profile",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.clickhouse.cloud/mcp",
+ "https://mcp.clickhouse.cloud/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.clickhouse.cloud/.well-known/oauth-protected-resource",
+ "https://mcp.clickhouse.cloud/.well-known/oauth-authorization-server",
+ "https://mcp.clickhouse.cloud/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/ClickHouse/clickhouse-claude-code-plugin.git",
+ "commit": "988a7a39834af9c9e14ec3650365243e2cfc6882",
+ "url": "https://raw.githubusercontent.com/ClickHouse/clickhouse-claude-code-plugin/988a7a39834af9c9e14ec3650365243e2cfc6882/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "clickup",
+ "service": "clickup",
+ "label": "ClickUp",
+ "url": "https://mcp.clickup.com/mcp",
+ "description": "Turn Codex into your ClickUp command center.",
+ "category": "Productivity",
+ "aliases": [],
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.clickup.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.clickup.com",
+ "resource": "https://mcp.clickup.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ],
+ "authorizationServerScopes": [
+ "read",
+ "write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.clickup.com/mcp",
+ "https://mcp.clickup.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.clickup.com/.well-known/oauth-protected-resource",
+ "https://mcp.clickup.com/.well-known/oauth-authorization-server",
+ "https://mcp.clickup.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/clickup/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/clickup/.mcp.json",
+ "license": "MIT"
+ }
+ ],
+ "homepage": "https://clickup.com"
+ },
+ {
+ "server": "cloudflare-api",
+ "service": "cloudflare",
+ "label": "Cloudflare",
+ "url": "https://mcp.cloudflare.com/mcp",
+ "description": "Cloudflare platform plugin with curated skills for Workers, Wrangler, and Agents SDK plus the official Cloudflare API MCP server.",
+ "category": "Developer Tools",
+ "aliases": [
+ "cloudflare"
+ ],
+ "publisher": "Cloudflare",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.cloudflare.com/mcp"
+ },
+ "auth": {
+ "strategy": "oauth",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.cloudflare.com",
+ "resource": "https://mcp.cloudflare.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.cloudflare.com/mcp",
+ "https://mcp.cloudflare.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.cloudflare.com/.well-known/oauth-protected-resource",
+ "https://mcp.cloudflare.com/.well-known/oauth-authorization-server",
+ "https://mcp.cloudflare.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/cloudflare/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/cloudflare/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/cloudflare/skills.git",
+ "commit": "b052c32bab7dd493513260228a36c88294f343f1",
+ "url": "https://raw.githubusercontent.com/cloudflare/skills/b052c32bab7dd493513260228a36c88294f343f1/.mcp.json"
+ }
+ ],
+ "homepage": "https://workers.cloudflare.com/",
+ "privacyUrl": "https://www.cloudflare.com/privacypolicy/",
+ "oauth": {
+ "kind": "oauth"
+ }
+ },
+ {
+ "server": "cloudinary-analysis",
+ "service": "cloudinary",
+ "label": "Cloudinary Analysis",
+ "url": "https://analysis.mcp.cloudinary.com/mcp",
+ "aliases": [
+ "cloudinary"
+ ],
+ "publisher": "Cloudinary",
+ "transport": {
+ "type": "http",
+ "url": "https://analysis.mcp.cloudinary.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://analysis.mcp.cloudinary.com",
+ "resource": "https://analysis.mcp.cloudinary.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "media_analysis",
+ "query_analysis_tasks"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "media_analysis",
+ "query_analysis_tasks"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://analysis.mcp.cloudinary.com/mcp",
+ "https://analysis.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "https://analysis.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "https://analysis.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://analysis.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/cloudinary-devs/cloudinary-plugin.git",
+ "commit": "86be53409e3fb1c465cd5ff4d1dc937a2860f45c",
+ "url": "https://raw.githubusercontent.com/cloudinary-devs/cloudinary-plugin/86be53409e3fb1c465cd5ff4d1dc937a2860f45c/mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "cloudinary-asset-mgmt",
+ "service": "cloudinary",
+ "label": "Cloudinary Asset Management",
+ "url": "https://asset-management.mcp.cloudinary.com/mcp",
+ "aliases": [
+ "cloudinary",
+ "cloudinary-asset-management"
+ ],
+ "publisher": "Cloudinary",
+ "transport": {
+ "type": "http",
+ "url": "https://asset-management.mcp.cloudinary.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://asset-management.mcp.cloudinary.com",
+ "resource": "https://asset-management.mcp.cloudinary.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload",
+ "media_generation"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload",
+ "media_generation"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://asset-management.mcp.cloudinary.com/mcp",
+ "https://asset-management.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "https://asset-management.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "https://asset-management.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://asset-management.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/cloudinary-devs/cloudinary-plugin.git",
+ "commit": "86be53409e3fb1c465cd5ff4d1dc937a2860f45c",
+ "url": "https://raw.githubusercontent.com/cloudinary-devs/cloudinary-plugin/86be53409e3fb1c465cd5ff4d1dc937a2860f45c/mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "cloudinary-env-config",
+ "service": "cloudinary",
+ "label": "Cloudinary Environment Config",
+ "url": "https://environment-config.mcp.cloudinary.com/mcp",
+ "aliases": [
+ "cloudinary",
+ "cloudinary-environment-config"
+ ],
+ "publisher": "Cloudinary",
+ "transport": {
+ "type": "http",
+ "url": "https://environment-config.mcp.cloudinary.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://environment-config.mcp.cloudinary.com",
+ "resource": "https://environment-config.mcp.cloudinary.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://environment-config.mcp.cloudinary.com/mcp",
+ "https://environment-config.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "https://environment-config.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "https://environment-config.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://environment-config.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/cloudinary-devs/cloudinary-plugin.git",
+ "commit": "86be53409e3fb1c465cd5ff4d1dc937a2860f45c",
+ "url": "https://raw.githubusercontent.com/cloudinary-devs/cloudinary-plugin/86be53409e3fb1c465cd5ff4d1dc937a2860f45c/mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "cloudinary-smd",
+ "service": "cloudinary",
+ "label": "Cloudinary Structured Metadata",
+ "url": "https://structured-metadata.mcp.cloudinary.com/mcp",
+ "aliases": [
+ "cloudinary",
+ "cloudinary-structured-metadata"
+ ],
+ "publisher": "Cloudinary",
+ "transport": {
+ "type": "http",
+ "url": "https://structured-metadata.mcp.cloudinary.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://structured-metadata.mcp.cloudinary.com",
+ "resource": "https://structured-metadata.mcp.cloudinary.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "asset_management",
+ "upload"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://structured-metadata.mcp.cloudinary.com/mcp",
+ "https://structured-metadata.mcp.cloudinary.com/.well-known/oauth-protected-resource/mcp",
+ "https://structured-metadata.mcp.cloudinary.com/.well-known/oauth-protected-resource",
+ "https://structured-metadata.mcp.cloudinary.com/.well-known/oauth-authorization-server",
+ "https://structured-metadata.mcp.cloudinary.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/cloudinary-devs/cloudinary-plugin.git",
+ "commit": "86be53409e3fb1c465cd5ff4d1dc937a2860f45c",
+ "url": "https://raw.githubusercontent.com/cloudinary-devs/cloudinary-plugin/86be53409e3fb1c465cd5ff4d1dc937a2860f45c/mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "codspeed",
+ "service": "codspeed",
+ "label": "CodSpeed",
+ "url": "https://mcp.codspeed.io/mcp",
+ "aliases": [],
+ "publisher": "CodSpeed",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.codspeed.io/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.codspeed.io",
+ "resource": "https://mcp.codspeed.io/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.codspeed.io/mcp",
+ "https://mcp.codspeed.io/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.codspeed.io/.well-known/oauth-protected-resource",
+ "https://api.codspeed.io/.well-known/oauth-authorization-server",
+ "https://api.codspeed.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/CodSpeedHQ/codspeed.git",
+ "commit": "37eba9ed92b0f1a17cf386303446475df380af37",
+ "url": "https://raw.githubusercontent.com/CodSpeedHQ/codspeed/37eba9ed92b0f1a17cf386303446475df380af37/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "dropbox",
+ "service": "dropbox",
+ "label": "Dropbox",
+ "url": "https://mcp.dropbox.com/mcp",
+ "description": "The Dropbox plugin for ChatGPT connects your Dropbox files directly to ChatGPT. You can access files, save ChatGPT-generated content to Dropbox, and create sharing links without switching tools. Everything respects your existing Dropbox permissions, and ChatGPT only works with files you already have access to.",
+ "category": "Productivity",
+ "aliases": [],
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.dropbox.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://www.dropbox.com",
+ "resource": "https://mcp.dropbox.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "account_info.read",
+ "file_requests.read",
+ "file_requests.write",
+ "files.content.read",
+ "files.content.write",
+ "files.metadata.read",
+ "sharing.read",
+ "sharing.write"
+ ],
+ "authorizationServerScopes": [
+ "account_info.read",
+ "contacts.read",
+ "contacts.write",
+ "files.metadata.read",
+ "files.content.read",
+ "files.content.write",
+ "files.permanent_delete",
+ "files.metadata.write",
+ "sharing.read",
+ "sharing.write",
+ "file_requests.read",
+ "file_requests.write",
+ "openid",
+ "profile",
+ "email",
+ "account_info.write",
+ "backup.read",
+ "backup.write",
+ "dash/content.read",
+ "dash/content.write",
+ "team_info.read",
+ "team_info.write",
+ "sessions.list",
+ "sessions.modify",
+ "members.read",
+ "members.write",
+ "members.delete",
+ "groups.read",
+ "groups.write",
+ "events.read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.dropbox.com/mcp",
+ "https://mcp.dropbox.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.dropbox.com/.well-known/oauth-protected-resource",
+ "https://www.dropbox.com/.well-known/oauth-authorization-server",
+ "https://www.dropbox.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/dropbox/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/dropbox/.mcp.json"
+ }
+ ],
+ "homepage": "https://www.dropbox.com",
+ "privacyUrl": "https://www.dropbox.com/privacy",
+ "supportUrl": "https://www.dropbox.com/get_help"
+ },
+ {
+ "server": "expo",
+ "service": "expo",
+ "label": "Expo",
+ "url": "https://mcp.expo.dev/mcp",
+ "aliases": [],
+ "publisher": "Expo",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.expo.dev/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.expo.dev",
+ "resource": "https://mcp.expo.dev/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "mcp:access"
+ ],
+ "authorizationServerScopes": [
+ "mcp:access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "private_key_jwt",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.expo.dev/mcp",
+ "https://mcp.expo.dev/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.expo.dev/.well-known/oauth-protected-resource",
+ "https://mcp.expo.dev/.well-known/oauth-authorization-server",
+ "https://mcp.expo.dev/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/expo/skills.git",
+ "commit": "170589a7ee8963156f63de8202fa96cf08a9e610",
+ "path": "plugins/expo",
+ "url": "https://raw.githubusercontent.com/expo/skills/170589a7ee8963156f63de8202fa96cf08a9e610/plugins/expo/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "fullstory",
+ "service": "fullstory",
+ "label": "Fullstory",
+ "url": "https://api.fullstory.com/mcp/fullstory",
+ "aliases": [],
+ "publisher": "Fullstory",
+ "transport": {
+ "type": "http",
+ "url": "https://api.fullstory.com/mcp/fullstory"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.fullstory.com",
+ "resource": "https://api.fullstory.com/mcp/fullstory",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "playback:read",
+ "search:read",
+ "search.metadata:read",
+ "sessions:read",
+ "metrics:read",
+ "metrics.funnel:read",
+ "metrics.page:read",
+ "library.objects:read",
+ "playback.spec:read",
+ "playback.page.definitions:read",
+ "specs.mappings:read",
+ "settings.own:read",
+ "settings.own:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://api.fullstory.com/mcp/fullstory",
+ "https://api.fullstory.com/.well-known/oauth-protected-resource/mcp/fullstory",
+ "https://api.fullstory.com/.well-known/oauth-protected-resource",
+ "https://auth.fullstory.com/.well-known/oauth-authorization-server",
+ "https://auth.fullstory.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/fullstorydev/fullstory-skills.git",
+ "commit": "b20614e2d08d7a7c70775bb62b5af640f60b024b",
+ "url": "https://raw.githubusercontent.com/fullstorydev/fullstory-skills/b20614e2d08d7a7c70775bb62b5af640f60b024b/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "gc-ai",
+ "service": "gc-ai",
+ "label": "GC AI",
+ "url": "https://app.gc.ai/api/mcp",
+ "aliases": [],
+ "publisher": "GC AI",
+ "transport": {
+ "type": "http",
+ "url": "https://app.gc.ai/api/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://app.gc.ai/",
+ "resource": "https://app.gc.ai/api/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://app.gc.ai/api/mcp",
+ "https://app.gc.ai/.well-known/oauth-protected-resource/api/mcp",
+ "https://app.gc.ai/.well-known/oauth-protected-resource",
+ "https://app.gc.ai/.well-known/oauth-authorization-server",
+ "https://app.gc.ai/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/GC-AI-Inc/gc-ai-claude-plugin.git",
+ "commit": "efda779972c7b7162e79234e164bc2f359a8a518",
+ "url": "https://raw.githubusercontent.com/GC-AI-Inc/gc-ai-claude-plugin/efda779972c7b7162e79234e164bc2f359a8a518/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "github",
+ "service": "github",
+ "label": "GitHub",
+ "url": "https://api.githubcopilot.com/mcp/",
+ "description": "Inspect repositories, triage pull requests and issues, debug CI, and publish changes through a hybrid GitHub connector and CLI workflow.",
+ "category": "Developer Tools",
+ "aliases": [],
+ "publisher": "GitHub",
+ "transport": {
+ "type": "http",
+ "url": "https://api.githubcopilot.com/mcp/"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "alternatives": [
+ {
+ "kind": "oauth",
+ "readiness": "unknown",
+ "note": "GitHub's MCP endpoint advertises standard OAuth (PKCE S256 observed) but no dynamic client registration; a Prime-controlled registered client is not established",
+ "sourceUrl": "https://github.com/login/oauth/.well-known/oauth-authorization-server"
+ }
+ ],
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://github.com/login/oauth",
+ "resource": "https://api.githubcopilot.com/mcp/",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "repo",
+ "read:org",
+ "read:user",
+ "user:email",
+ "read:packages",
+ "write:packages",
+ "read:project",
+ "project",
+ "gist",
+ "notifications"
+ ],
+ "authorizationServerScopes": [
+ "offline_access"
+ ],
+ "sourceUrls": [
+ "https://api.githubcopilot.com/mcp/",
+ "https://api.githubcopilot.com/.well-known/oauth-protected-resource/mcp/",
+ "https://api.githubcopilot.com/.well-known/oauth-protected-resource",
+ "https://github.com/.well-known/oauth-authorization-server/login/oauth",
+ "https://github.com/login/oauth/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste a GitHub personal access token (GITHUB_PAT_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "GITHUB_PAT_TOKEN",
+ "label": "GITHUB_PAT_TOKEN",
+ "description": "Environment variable GITHUB_PAT_TOKEN",
+ "required": true,
+ "kind": "bearer-token",
+ "credentialSet": "github-pat"
+ },
+ {
+ "id": "GITHUB_PERSONAL_ACCESS_TOKEN",
+ "label": "GITHUB_PERSONAL_ACCESS_TOKEN",
+ "description": "Environment variable GITHUB_PERSONAL_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token",
+ "credentialSet": "github-pat"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/github/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/github/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "anthropics/claude-plugins-official",
+ "commit": "3deb821cb71ccfaaf2ffa9935e977df314ce5cd5",
+ "path": "./external_plugins/github",
+ "url": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/github/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ],
+ "homepage": "https://github.com/",
+ "privacyUrl": "https://docs.github.com/site-policy/privacy-policies/github-general-privacy-statement"
+ },
+ {
+ "server": "grafana-cloud",
+ "service": "grafana",
+ "label": "Grafana",
+ "url": "https://mcp.grafana.com/mcp",
+ "aliases": [
+ "grafana",
+ "grafana-cloud-mcp"
+ ],
+ "publisher": "Grafana",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.grafana.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.grafana.com/mcp",
+ "resource": "https://mcp.grafana.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "grafana:read",
+ "grafana:query",
+ "grafana:write"
+ ],
+ "authorizationServerScopes": [
+ "grafana:read",
+ "grafana:query",
+ "grafana:write"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://mcp.grafana.com/mcp",
+ "https://mcp.grafana.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.grafana.com/.well-known/oauth-protected-resource",
+ "https://mcp.grafana.com/.well-known/oauth-authorization-server/mcp",
+ "https://mcp.grafana.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/grafana/ai-marketplace.git",
+ "commit": "12be5634a492f73c189d466c5449d09b853ad7a4",
+ "path": "plugins/grafana-cloud-mcp",
+ "url": "https://raw.githubusercontent.com/grafana/ai-marketplace/12be5634a492f73c189d466c5449d09b853ad7a4/plugins/grafana-cloud-mcp/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "granola",
+ "service": "granola",
+ "label": "Granola",
+ "url": "https://mcp.granola.ai/mcp",
+ "description": "Granola MCP connects your meeting history to ChatGPT so your assistant can pull real context from past conversations while you work.\n\nUse MCP when you're already working on something bigger:\n\n- Writing PRDs or proposals: Pull customer feedback, stakeholder input, and decisions from relevant meetings directly into your draft\n \n- Building presentations or reports: Combine insights from multiple conversations with your other research and data\n \n- Coding with context: Give your AI the project background, requirements, and technical decisions discussed in planning meetings\n \n- Strategic analysis: Merge meeting insights with documents, data, and other sources for comprehensive analysis\n \nHow it works:\n\nYour AI assistant can search your Granola meetings by topic, person, company, or timeframe - then cite specific conversations in its responses. No more switching tabs to find \"what the customer said\" or \"when we decided that.\"\n\nThe difference:\n\nInstead of copy-pasting meeting notes into prompts, your AI pulls exactly what it needs from your meeting history automatically. You stay focused on the work, not the research or context.",
+ "category": "Productivity",
+ "aliases": [],
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.granola.ai/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp-auth.granola.ai",
+ "resource": "https://mcp.granola.ai/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "mcp"
+ ],
+ "authorizationServerScopes": [
+ "email",
+ "offline_access",
+ "openid",
+ "profile"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt"
+ ],
+ "sourceUrls": [
+ "https://mcp.granola.ai/mcp",
+ "https://mcp.granola.ai/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.granola.ai/.well-known/oauth-protected-resource",
+ "https://mcp-auth.granola.ai/.well-known/oauth-authorization-server",
+ "https://mcp-auth.granola.ai/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/granola/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/granola/.mcp.json",
+ "license": "MIT"
+ }
+ ],
+ "homepage": "https://www.granola.ai",
+ "privacyUrl": "https://help.granola.ai/article/privacy-policy",
+ "supportUrl": "https://help.granola.ai/"
+ },
+ {
+ "server": "greptile",
+ "service": "greptile",
+ "label": "Greptile",
+ "url": "https://api.greptile.com/mcp",
+ "aliases": [],
+ "publisher": "Greptile",
+ "transport": {
+ "type": "http",
+ "url": "https://api.greptile.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.greptile.com",
+ "resource": "https://api.greptile.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ],
+ "authorizationServerScopes": [
+ "offline_access",
+ "offline",
+ "openid",
+ "read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://api.greptile.com/mcp",
+ "https://api.greptile.com/.well-known/oauth-protected-resource/mcp",
+ "https://api.greptile.com/.well-known/oauth-protected-resource",
+ "https://auth.greptile.com/.well-known/oauth-authorization-server",
+ "https://auth.greptile.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/greptileai/claude-plugin.git",
+ "commit": "6b725af2636072cab79e0a5426f6a960b0fd29ef",
+ "path": "plugins/greptile",
+ "url": "https://raw.githubusercontent.com/greptileai/claude-plugin/6b725af2636072cab79e0a5426f6a960b0fd29ef/plugins/greptile/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "higgsfield",
+ "service": "higgsfield",
+ "label": "Higgsfield",
+ "url": "https://mcp.higgsfield.ai/mcp",
+ "description": "Generate images and videos from a text prompt or your own photo. Turn a product shot into a video ad, restyle a photo, animate a still, or build a two-minute narrated explainer. Every major image and video model in one place.",
+ "category": "Creativity",
+ "aliases": [],
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.higgsfield.ai/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://clerk.higgsfield.ai",
+ "resource": "https://mcp.higgsfield.ai/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "openid",
+ "email",
+ "offline_access"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "public_metadata",
+ "private_metadata",
+ "offline_access",
+ "user:org:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "none",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://mcp.higgsfield.ai/mcp",
+ "https://mcp.higgsfield.ai/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.higgsfield.ai/.well-known/oauth-protected-resource",
+ "https://clerk.higgsfield.ai/.well-known/oauth-authorization-server",
+ "https://clerk.higgsfield.ai/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/higgsfield/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/higgsfield/.mcp.json"
+ }
+ ],
+ "homepage": "https://higgsfield.ai",
+ "privacyUrl": "https://higgsfield.ai/privacy-policy",
+ "supportUrl": "https://discord.com/invite/higgsfield"
+ },
+ {
+ "server": "honeycomb",
+ "service": "honeycomb",
+ "label": "Honeycomb",
+ "url": "https://mcp.honeycomb.io/mcp",
+ "aliases": [],
+ "publisher": "Honeycomb",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.honeycomb.io/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://ui.honeycomb.io",
+ "resource": "https://mcp.honeycomb.io/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "mcp:read",
+ "mcp:write"
+ ],
+ "authorizationServerScopes": [
+ "mcp:read",
+ "mcp:write"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://mcp.honeycomb.io/mcp",
+ "https://mcp.honeycomb.io/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.honeycomb.io/.well-known/oauth-protected-resource",
+ "https://ui.honeycomb.io/.well-known/oauth-authorization-server",
+ "https://ui.honeycomb.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/honeycombio/agent-skill.git",
+ "commit": "41214b7dfb97f262adabf295fa6f0fcad85bc0f6",
+ "path": "honeycomb",
+ "url": "https://raw.githubusercontent.com/honeycombio/agent-skill/41214b7dfb97f262adabf295fa6f0fcad85bc0f6/honeycomb/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "hostinger",
+ "service": "hostinger",
+ "label": "Hostinger",
+ "url": "https://mcp.hostinger.com",
+ "aliases": [],
+ "publisher": "Hostinger",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.hostinger.com"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.hostinger.com",
+ "resource": "https://mcp.hostinger.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp:use"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.hostinger.com",
+ "https://mcp.hostinger.com/.well-known/oauth-protected-resource",
+ "https://auth.hostinger.com/.well-known/oauth-authorization-server",
+ "https://auth.hostinger.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/hostinger/claude-plugin.git",
+ "commit": "569880c60681a7068b3ca8ca84e2fe7ab6cfa7ff",
+ "url": "https://raw.githubusercontent.com/hostinger/claude-plugin/569880c60681a7068b3ca8ca84e2fe7ab6cfa7ff/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "hunter",
+ "service": "hunter-io",
+ "label": "Hunter.io",
+ "url": "https://mcp.hunter.io/mcp",
+ "aliases": [
+ "hunter-io"
+ ],
+ "publisher": "Hunter.io",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.hunter.io/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://hunter.io",
+ "resource": "https://mcp.hunter.io",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ],
+ "authorizationServerScopes": [
+ "read",
+ "write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.hunter.io/mcp",
+ "https://mcp.hunter.io/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.hunter.io/.well-known/oauth-protected-resource",
+ "https://hunter.io/.well-known/oauth-authorization-server",
+ "https://hunter.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/hunter-io/claude-plugin.git",
+ "commit": "2a6de2a00f7f459a05c146c6f0712417b8d30db9",
+ "url": "https://raw.githubusercontent.com/hunter-io/claude-plugin/2a6de2a00f7f459a05c146c6f0712417b8d30db9/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "intercom",
+ "service": "intercom",
+ "label": "Intercom",
+ "url": "https://mcp.intercom.com/mcp",
+ "aliases": [],
+ "publisher": "Intercom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.intercom.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.intercom.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.intercom.com/mcp",
+ "https://mcp.intercom.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.intercom.com/.well-known/oauth-protected-resource",
+ "https://mcp.intercom.com/.well-known/oauth-authorization-server",
+ "https://mcp.intercom.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/intercom/claude-plugin-external.git",
+ "commit": "62773a7d4b8aac31545d6888fe6479be3bc53804",
+ "url": "https://raw.githubusercontent.com/intercom/claude-plugin-external/62773a7d4b8aac31545d6888fe6479be3bc53804/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "linear",
+ "service": "linear",
+ "label": "Linear",
+ "url": "https://mcp.linear.app/mcp",
+ "description": "Search, create and update Linear issues, projects, and initiatives. Draft PRDs, write updates, analyze customer requests, and keep plans up to date — all from within ChatGPT",
+ "category": "Productivity",
+ "aliases": [
+ "linear-app"
+ ],
+ "publisher": "Linear",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.linear.app/mcp"
+ },
+ "auth": {
+ "strategy": "oauth",
+ "clientRegistration": "dynamic",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.linear.app",
+ "resource": "https://mcp.linear.app/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "read",
+ "write"
+ ],
+ "authorizationServerScopes": [
+ "read",
+ "write",
+ "openid",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.linear.app/mcp",
+ "https://mcp.linear.app/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.linear.app/.well-known/oauth-protected-resource",
+ "https://mcp.linear.app/.well-known/oauth-authorization-server",
+ "https://mcp.linear.app/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "metadata-reviewed"
+ },
+ "legacyBuiltin": true,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/linear/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/linear/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "anthropics/claude-plugins-official",
+ "commit": "3deb821cb71ccfaaf2ffa9935e977df314ce5cd5",
+ "path": "./external_plugins/linear",
+ "url": "https://raw.githubusercontent.com/anthropics/claude-plugins-official/3deb821cb71ccfaaf2ffa9935e977df314ce5cd5/external_plugins/linear/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "legacy built-in integration; OAuth dynamic client registration (plus CIMD) reviewed against public provider metadata"
+ }
+ ],
+ "homepage": "https://linear.app/",
+ "privacyUrl": "https://linear.app/privacy",
+ "supportUrl": "https://linear.app/contact",
+ "oauth": {
+ "kind": "oauth"
+ }
+ },
+ {
+ "server": "logfire",
+ "service": "pydantic-logfire",
+ "label": "Pydantic Logfire",
+ "url": "https://logfire-us.pydantic.dev/mcp",
+ "aliases": [
+ "pydantic-logfire"
+ ],
+ "publisher": "Pydantic Logfire",
+ "transport": {
+ "type": "http",
+ "url": "https://logfire-us.pydantic.dev/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://logfire-us.pydantic.dev",
+ "resource": "https://logfire-us.pydantic.dev/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "organization:create_project",
+ "organization:read_channel",
+ "organization:write_channel",
+ "project:read",
+ "project:read_alert",
+ "project:read_dashboard",
+ "project:read_variables",
+ "project:trigger_workflow",
+ "project:write",
+ "project:write_alert",
+ "project:write_dashboard",
+ "project:write_token",
+ "project:write_variables"
+ ],
+ "authorizationServerScopes": [
+ "instance:admin",
+ "instance:billing",
+ "organization:admin",
+ "organization:read",
+ "organization:write",
+ "organization:create_project",
+ "organization:read_member",
+ "organization:write_member",
+ "organization:read_channel",
+ "organization:write_channel",
+ "organization:create_api_key",
+ "organization:read_api_key",
+ "organization:write_api_key",
+ "organization:read_invitation",
+ "organization:write_invitation",
+ "project:read",
+ "project:write",
+ "project:write_token",
+ "project:read_token",
+ "project:read_dashboard",
+ "project:write_dashboard",
+ "project:trigger_workflow",
+ "project:read_alert",
+ "project:write_alert",
+ "project:read_datasets",
+ "project:write_datasets",
+ "project:read_variables",
+ "project:write_variables",
+ "project:read_external_variables",
+ "project:gateway_proxy"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://logfire-us.pydantic.dev/mcp",
+ "https://logfire-us.pydantic.dev/.well-known/oauth-protected-resource/mcp",
+ "https://logfire-us.pydantic.dev/.well-known/oauth-protected-resource",
+ "https://logfire-us.pydantic.dev/.well-known/oauth-authorization-server",
+ "https://logfire-us.pydantic.dev/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/pydantic/skills.git",
+ "commit": "9e9390ee24d44b32cf5379c58acaebd7563f5f86",
+ "path": "plugins/logfire",
+ "url": "https://raw.githubusercontent.com/pydantic/skills/9e9390ee24d44b32cf5379c58acaebd7563f5f86/plugins/logfire/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "lovable",
+ "service": "lovable",
+ "label": "Lovable",
+ "url": "https://mcp.lovable.dev/?src=cc-plugin",
+ "aliases": [],
+ "publisher": "Lovable",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.lovable.dev/?src=cc-plugin"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://lovable.dev/oauth",
+ "resource": "https://mcp.lovable.dev",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "offline",
+ "projects:read",
+ "projects:write",
+ "workspaces:read",
+ "workspaces:write"
+ ],
+ "authorizationServerScopes": [
+ "offline",
+ "openid",
+ "email",
+ "profile",
+ "projects:create",
+ "projects:read",
+ "projects:write",
+ "workspaces:create",
+ "workspaces:read",
+ "workspaces:write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.lovable.dev/?src=cc-plugin",
+ "https://mcp.lovable.dev/.well-known/oauth-protected-resource?src=cc-plugin",
+ "https://lovable.dev/.well-known/oauth-authorization-server/oauth",
+ "https://lovable.dev/oauth/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/lovablelabs/mcp.git",
+ "commit": "0336e6db8026b0f02cb89d1451cc48ea3f469791",
+ "url": "https://raw.githubusercontent.com/lovablelabs/mcp/0336e6db8026b0f02cb89d1451cc48ea3f469791/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "mapbox",
+ "service": "mapbox",
+ "label": "Mapbox",
+ "url": "https://mcp.mapbox.com/mcp",
+ "aliases": [],
+ "publisher": "Mapbox",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.mapbox.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.mapbox.com",
+ "resource": "https://mcp.mapbox.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "styles:tiles",
+ "styles:read",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read"
+ ],
+ "authorizationServerScopes": [
+ "styles:tiles",
+ "styles:read",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.mapbox.com/mcp",
+ "https://mcp.mapbox.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.mapbox.com/.well-known/oauth-protected-resource",
+ "https://mcp.mapbox.com/.well-known/oauth-authorization-server",
+ "https://mcp.mapbox.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/mapbox/mapbox-agent-skills.git",
+ "commit": "209e8c408fd65edfff45e491c941e8a00025a1a6",
+ "url": "https://raw.githubusercontent.com/mapbox/mapbox-agent-skills/209e8c408fd65edfff45e491c941e8a00025a1a6/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "mapbox-devkit",
+ "service": "mapbox",
+ "label": "Mapbox DevKit",
+ "url": "https://mcp-devkit.mapbox.com/mcp",
+ "aliases": [
+ "mapbox"
+ ],
+ "publisher": "Mapbox",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp-devkit.mapbox.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp-devkit.mapbox.com",
+ "resource": "https://mcp-devkit.mapbox.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "styles:tiles",
+ "styles:read",
+ "styles:write",
+ "styles:list",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read",
+ "tilesets:read",
+ "user-feedback:read"
+ ],
+ "authorizationServerScopes": [
+ "styles:tiles",
+ "styles:read",
+ "styles:write",
+ "styles:list",
+ "fonts:read",
+ "datasets:read",
+ "tokens:read",
+ "tilesets:read",
+ "user-feedback:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp-devkit.mapbox.com/mcp",
+ "https://mcp-devkit.mapbox.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp-devkit.mapbox.com/.well-known/oauth-protected-resource",
+ "https://mcp-devkit.mapbox.com/.well-known/oauth-authorization-server",
+ "https://mcp-devkit.mapbox.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/mapbox/mapbox-agent-skills.git",
+ "commit": "209e8c408fd65edfff45e491c941e8a00025a1a6",
+ "url": "https://raw.githubusercontent.com/mapbox/mapbox-agent-skills/209e8c408fd65edfff45e491c941e8a00025a1a6/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "mercadopago",
+ "service": "mercado-pago",
+ "label": "Mercado Pago",
+ "url": "https://mcp.mercadopago.com/mcp",
+ "aliases": [
+ "mcp",
+ "mercado-pago"
+ ],
+ "publisher": "Mercado Pago",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.mercadopago.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.mercadopago.com/mcp",
+ "resource": "https://mcp.mercadopago.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "offline_access",
+ "write",
+ "read"
+ ],
+ "authorizationServerScopes": [
+ "offline_access",
+ "write",
+ "read"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.mercadopago.com/mcp",
+ "https://mcp.mercadopago.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.mercadopago.com/.well-known/oauth-protected-resource",
+ "https://mcp.mercadopago.com/.well-known/oauth-authorization-server/mcp",
+ "https://mcp.mercadopago.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/mercadopago/mercadopago-claude-marketplace.git",
+ "commit": "c0d06959afc90b2f3d637c35eeb51c36f512c005",
+ "path": "plugins/mercadopago",
+ "url": "https://raw.githubusercontent.com/mercadopago/mercadopago-claude-marketplace/c0d06959afc90b2f3d637c35eeb51c36f512c005/plugins/mercadopago/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "neon",
+ "service": "neon",
+ "label": "Neon",
+ "url": "https://mcp.neon.tech/mcp",
+ "aliases": [],
+ "publisher": "Neon",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.neon.tech/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.neon.tech",
+ "resource": "https://mcp.neon.tech/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "authorizationServerScopes": [
+ "read",
+ "write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.neon.tech/mcp",
+ "https://mcp.neon.tech/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.neon.tech/.well-known/oauth-protected-resource",
+ "https://mcp.neon.tech/.well-known/oauth-authorization-server",
+ "https://mcp.neon.tech/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/neondatabase/agent-skills.git",
+ "commit": "2e0da3a1653bcdd227565ac14bb3e9e453a8b854",
+ "path": "plugins/neon-postgres",
+ "url": "https://raw.githubusercontent.com/neondatabase/agent-skills/2e0da3a1653bcdd227565ac14bb3e9e453a8b854/plugins/neon-postgres/mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "netlify",
+ "service": "netlify",
+ "label": "Netlify",
+ "url": "https://netlify-mcp.netlify.app/mcp",
+ "description": "Official Netlify MCP server (hosted, streamable HTTP). Authorizes via OAuth on first connection — the agent is prompted to sign in to Netlify; no token or local install required. Lets the agent create and manage Netlify projects, deploys, and environment variables.",
+ "aliases": [
+ "netlify-skills"
+ ],
+ "publisher": "Netlify",
+ "transport": {
+ "type": "http",
+ "url": "https://netlify-mcp.netlify.app/mcp"
+ },
+ "auth": {
+ "strategy": "oauth",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://netlify-mcp.netlify.app/",
+ "resource": "https://netlify-mcp.netlify.app/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "offline_access",
+ "read",
+ "write",
+ "claudeai"
+ ],
+ "authorizationServerScopes": [
+ "offline_access",
+ "read",
+ "write",
+ "claudeai"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://netlify-mcp.netlify.app/mcp",
+ "https://netlify-mcp.netlify.app/.well-known/oauth-protected-resource/mcp",
+ "https://netlify-mcp.netlify.app/.well-known/oauth-protected-resource",
+ "https://netlify-mcp.netlify.app/.well-known/oauth-authorization-server",
+ "https://netlify-mcp.netlify.app/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/netlify/context-and-tools.git",
+ "commit": "b4fd870cf2f1f4cc66b28ead16277e1d799b510f",
+ "url": "https://raw.githubusercontent.com/netlify/context-and-tools/b4fd870cf2f1f4cc66b28ead16277e1d799b510f/.mcp.json"
+ }
+ ],
+ "oauth": {
+ "kind": "oauth"
+ }
+ },
+ {
+ "server": "newrelic",
+ "service": "new-relic",
+ "label": "New Relic",
+ "url": "https://mcp.newrelic.com/mcp/",
+ "aliases": [
+ "new-relic"
+ ],
+ "publisher": "New Relic",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.newrelic.com/mcp/"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://oauth2.service.newrelic.com",
+ "resource": "https://mcp.newrelic.com/mcp/",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "observability:read",
+ "offline",
+ "offline_access"
+ ],
+ "authorizationServerScopes": [
+ "offline_access",
+ "offline",
+ "openid",
+ "observability:read"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic",
+ "private_key_jwt",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.newrelic.com/mcp/",
+ "https://mcp.newrelic.com/.well-known/oauth-protected-resource",
+ "https://mcp.newrelic.com/.well-known/oauth-protected-resource/mcp/",
+ "https://oauth2.service.newrelic.com/.well-known/oauth-authorization-server",
+ "https://oauth2.service.newrelic.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/newrelic/claude-code-plugin.git",
+ "commit": "f8e5f8b62139072a22153ec92de1c0cc1af2f56a",
+ "url": "https://raw.githubusercontent.com/newrelic/claude-code-plugin/f8e5f8b62139072a22153ec92de1c0cc1af2f56a/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "notion",
+ "service": "notion",
+ "label": "Notion",
+ "url": "https://mcp.notion.com/mcp",
+ "description": "Notion workflows for implementation planning, research synthesis, meeting preparation, and knowledge capture.",
+ "category": "Productivity",
+ "aliases": [
+ "notion-workspace"
+ ],
+ "publisher": "Notion",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.notion.com/mcp"
+ },
+ "auth": {
+ "strategy": "oauth",
+ "clientRegistration": "dynamic",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.notion.com",
+ "resource": "https://mcp.notion.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "default"
+ ],
+ "authorizationServerScopes": [
+ "default"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.notion.com/mcp",
+ "https://mcp.notion.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.notion.com/.well-known/oauth-protected-resource",
+ "https://mcp.notion.com/.well-known/oauth-authorization-server",
+ "https://mcp.notion.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "metadata-reviewed"
+ },
+ "legacyBuiltin": true,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/notion/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/notion/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/makenotion/claude-code-notion-plugin.git",
+ "commit": "9847f2aa1a15f25df35ed1fb7b4557dbb60cd651",
+ "url": "https://raw.githubusercontent.com/makenotion/claude-code-notion-plugin/9847f2aa1a15f25df35ed1fb7b4557dbb60cd651/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "legacy built-in integration; OAuth dynamic client registration (plus CIMD) reviewed against public provider metadata"
+ }
+ ],
+ "homepage": "https://www.notion.so/",
+ "privacyUrl": "https://www.notion.com/help/privacy",
+ "oauth": {
+ "kind": "oauth"
+ }
+ },
+ {
+ "server": "pagerduty",
+ "service": "pagerduty",
+ "label": "PagerDuty",
+ "url": "https://mcp.pagerduty.com/mcp",
+ "aliases": [],
+ "publisher": "PagerDuty",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.pagerduty.com/mcp"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.pagerduty.com/",
+ "resource": "https://mcp.pagerduty.com/mcp",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "incidents.read",
+ "extension_schemas.read",
+ "subscribers.write",
+ "users:sessions.write",
+ "recommendations.write",
+ "recommendations.read",
+ "none",
+ "users:contact_methods.read",
+ "users.write",
+ "templates.read",
+ "incident_types.read",
+ "jira_cloud_rules.read",
+ "workflow_integrations:connections.write",
+ "session_configurations.write",
+ "addons.write",
+ "oncalls.read",
+ "standards.write",
+ "users:contact_methods.write",
+ "users.read",
+ "incident_workflows.write",
+ "notifications.read",
+ "workflow_integrations:connections.read",
+ "copilot:chat.write",
+ "write",
+ "incident_types.write",
+ "contextual_data.write",
+ "event_orchestrations.read",
+ "read",
+ "webhook_subscriptions.write",
+ "openid"
+ ],
+ "authorizationServerScopes": [
+ "incidents.read",
+ "extension_schemas.read",
+ "subscribers.write",
+ "users:sessions.write",
+ "recommendations.write",
+ "recommendations.read",
+ "none",
+ "users:contact_methods.read",
+ "users.write",
+ "templates.read",
+ "incident_types.read",
+ "jira_cloud_rules.read",
+ "workflow_integrations:connections.write",
+ "session_configurations.write",
+ "addons.write",
+ "oncalls.read",
+ "standards.write",
+ "users:contact_methods.write",
+ "users.read",
+ "incident_workflows.write",
+ "notifications.read",
+ "workflow_integrations:connections.read",
+ "copilot:chat.write",
+ "write",
+ "incident_types.write",
+ "contextual_data.write",
+ "event_orchestrations.read",
+ "read",
+ "webhook_subscriptions.write",
+ "openid"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_post",
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.pagerduty.com/mcp",
+ "https://mcp.pagerduty.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.pagerduty.com/.well-known/oauth-protected-resource",
+ "https://mcp.pagerduty.com/.well-known/oauth-authorization-server",
+ "https://mcp.pagerduty.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your PagerDuty API key (PAGERDUTY_API_KEY)",
+ "fields": [
+ {
+ "id": "PAGERDUTY_API_KEY",
+ "label": "PAGERDUTY_API_KEY",
+ "description": "Environment variable PAGERDUTY_API_KEY",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/PagerDuty/claude-code-plugins.git",
+ "commit": "761cba75bd50fd561405c3b173ecf36084432089",
+ "url": "https://raw.githubusercontent.com/PagerDuty/claude-code-plugins/761cba75bd50fd561405c3b173ecf36084432089/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "posthog",
+ "service": "posthog",
+ "label": "PostHog",
+ "url": "https://mcp.posthog.com/mcp",
+ "description": "PostHog gives your AI agent direct access to your product analytics, feature flags, experiments, error tracking, surveys, logs, and LLM analytics. Ask questions about your data, create insights, toggle feature flags, analyze errors, search docs, and more — all from chat.",
+ "category": "Data & Analytics",
+ "aliases": [],
+ "publisher": "PostHog",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.posthog.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://oauth.posthog.com",
+ "resource": "https://mcp.posthog.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "introspection",
+ "action:read",
+ "action:write",
+ "access_control:read",
+ "account:read",
+ "account:write",
+ "activity_log:read",
+ "alert:read",
+ "alert:write",
+ "annotation:read",
+ "annotation:write",
+ "approvals:read",
+ "approvals:write",
+ "batch_export:read",
+ "batch_export:write",
+ "billing:read",
+ "business_knowledge:read",
+ "business_knowledge:write",
+ "canvas:read",
+ "canvas:write",
+ "cohort:read",
+ "cohort:write",
+ "comment:read",
+ "comment:write",
+ "conversation:read",
+ "customer_analytics:read",
+ "customer_analytics:write"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "introspection",
+ "action:read",
+ "action:write",
+ "access_control:read",
+ "access_control:write",
+ "account:read",
+ "account:write",
+ "activity_log:read",
+ "activity_log:write",
+ "alert:read",
+ "alert:write",
+ "annotation:read",
+ "annotation:write",
+ "approvals:read",
+ "approvals:write",
+ "autoresearch:read",
+ "autoresearch:write",
+ "batch_export:read",
+ "batch_export:write",
+ "batch_import:read",
+ "batch_import:write",
+ "billing:read",
+ "billing:write",
+ "business_knowledge:read",
+ "business_knowledge:write",
+ "canvas:read",
+ "canvas:write"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "private_key_jwt"
+ ],
+ "sourceUrls": [
+ "https://mcp.posthog.com/mcp",
+ "https://mcp.posthog.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.posthog.com/.well-known/oauth-protected-resource",
+ "https://oauth.posthog.com/.well-known/oauth-authorization-server",
+ "https://oauth.posthog.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/posthog/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/posthog/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/PostHog/ai-plugin.git",
+ "commit": "33c066c80776a962a4233d76b20a3317733070b4",
+ "url": "https://raw.githubusercontent.com/PostHog/ai-plugin/33c066c80776a962a4233d76b20a3317733070b4/.mcp.json"
+ }
+ ],
+ "homepage": "https://posthog.com",
+ "privacyUrl": "https://posthog.com/privacy",
+ "supportUrl": "https://posthog.com/support"
+ },
+ {
+ "server": "postman",
+ "service": "postman",
+ "label": "Postman",
+ "url": "https://mcp.postman.com/mcp",
+ "aliases": [],
+ "publisher": "Postman",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.postman.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.postman.com",
+ "resource": "https://mcp.postman.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://mcp.postman.com/mcp",
+ "https://mcp.postman.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.postman.com/.well-known/oauth-protected-resource",
+ "https://mcp.postman.com/.well-known/oauth-authorization-server",
+ "https://mcp.postman.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/Postman-Devrel/postman-claude-code-plugin.git",
+ "commit": "27f652ea98d9ae0cec0ccc9f2b46128239a36a8f",
+ "url": "https://raw.githubusercontent.com/Postman-Devrel/postman-claude-code-plugin/27f652ea98d9ae0cec0ccc9f2b46128239a36a8f/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "prisma",
+ "service": "prisma",
+ "label": "Prisma",
+ "url": "https://mcp.prisma.io/mcp",
+ "aliases": [
+ "prisma-remote"
+ ],
+ "publisher": "Prisma",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.prisma.io/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://auth.prisma.io",
+ "resource": "https://mcp.prisma.io/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "workspace:admin",
+ "offline_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.prisma.io/mcp",
+ "https://mcp.prisma.io/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.prisma.io/.well-known/oauth-protected-resource",
+ "https://auth.prisma.io/.well-known/oauth-authorization-server",
+ "https://auth.prisma.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/prisma/claude-plugin.git",
+ "commit": "815dbc4a045a29e3b81510ba0e3ab806f1baaf0e",
+ "url": "https://raw.githubusercontent.com/prisma/claude-plugin/815dbc4a045a29e3b81510ba0e3ab806f1baaf0e/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "railway",
+ "service": "railway",
+ "label": "Railway",
+ "url": "https://mcp.railway.com",
+ "aliases": [],
+ "publisher": "Railway",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.railway.com"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://backboard.railway.com",
+ "resource": "https://mcp.railway.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "workspace:member"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "workspace:member"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none",
+ "private_key_jwt"
+ ],
+ "sourceUrls": [
+ "https://mcp.railway.com",
+ "https://mcp.railway.com/.well-known/oauth-protected-resource",
+ "https://backboard.railway.com/.well-known/oauth-authorization-server",
+ "https://backboard.railway.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/railwayapp/railway-skills.git",
+ "commit": "950acebcef3445f3915ea0709876c3ba9c237a7f",
+ "path": "plugins/railway",
+ "url": "https://raw.githubusercontent.com/railwayapp/railway-skills/950acebcef3445f3915ea0709876c3ba9c237a7f/plugins/railway/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "resend",
+ "service": "resend",
+ "label": "Resend",
+ "url": "https://mcp.resend.com/mcp",
+ "aliases": [],
+ "publisher": "Resend",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.resend.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.resend.com",
+ "resource": "https://mcp.resend.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "authorizationServerScopes": [
+ "full_access",
+ "emails:send"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_basic",
+ "client_secret_post"
+ ],
+ "sourceUrls": [
+ "https://mcp.resend.com/mcp",
+ "https://mcp.resend.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.resend.com/.well-known/oauth-protected-resource",
+ "https://api.resend.com/.well-known/oauth-authorization-server",
+ "https://api.resend.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/resend/resend-skills.git",
+ "commit": "5f9f97958a785429ab8e4534d61fe2d712d74e3d",
+ "url": "https://raw.githubusercontent.com/resend/resend-skills/5f9f97958a785429ab8e4534d61fe2d712d74e3d/.claude-plugin/plugin.json"
+ }
+ ]
+ },
+ {
+ "server": "revenuecat",
+ "service": "revenuecat",
+ "label": "RevenueCat",
+ "url": "https://mcp.revenuecat.ai/mcp",
+ "aliases": [
+ "rc"
+ ],
+ "publisher": "RevenueCat",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.revenuecat.ai/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.revenuecat.ai",
+ "resource": "https://mcp.revenuecat.ai/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "*:*:read",
+ "*:*:read_write"
+ ],
+ "authorizationServerScopes": [
+ "*:*:read",
+ "*:*:read_write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.revenuecat.ai/mcp",
+ "https://mcp.revenuecat.ai/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.revenuecat.ai/.well-known/oauth-protected-resource",
+ "https://mcp.revenuecat.ai/.well-known/oauth-authorization-server",
+ "https://mcp.revenuecat.ai/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/RevenueCat/rc-claude-code-plugin.git",
+ "commit": "b9b77b12da33213c9c2e750b06cd6270c1d8ed65",
+ "url": "https://raw.githubusercontent.com/RevenueCat/rc-claude-code-plugin/b9b77b12da33213c9c2e750b06cd6270c1d8ed65/revenuecat/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/RevenueCat/rc-claude-code-plugin.git",
+ "commit": "b9b77b12da33213c9c2e750b06cd6270c1d8ed65",
+ "url": "https://raw.githubusercontent.com/RevenueCat/rc-claude-code-plugin/b9b77b12da33213c9c2e750b06cd6270c1d8ed65/revenuecat/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "rootly",
+ "service": "rootly",
+ "label": "Rootly",
+ "url": "https://mcp.rootly.com/mcp",
+ "aliases": [],
+ "publisher": "Rootly",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.rootly.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://rootly.com",
+ "resource": "https://mcp.rootly.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "all"
+ ],
+ "authorizationServerScopes": [
+ "profile",
+ "email",
+ "all",
+ "ir.all",
+ "oc.all",
+ "ir.incidents:read",
+ "ir.incidents:write",
+ "ir.services:read",
+ "ir.services:write",
+ "ir.environments:read",
+ "ir.environments:write",
+ "ir.functionalities:read",
+ "ir.functionalities:write",
+ "ir.severities:read",
+ "ir.severities:write",
+ "ir.incident_types:read",
+ "ir.incident_types:write",
+ "ir.incident_roles:read",
+ "ir.incident_roles:write",
+ "ir.workflows:read",
+ "ir.workflows:write",
+ "ir.catalogs:read",
+ "ir.catalogs:write",
+ "ir.groups:read",
+ "ir.groups:write",
+ "ir.playbooks:read",
+ "ir.playbooks:write",
+ "ir.retrospectives:read",
+ "ir.retrospectives:write",
+ "ir.status_pages:read"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.rootly.com/mcp",
+ "https://mcp.rootly.com/.well-known/oauth-protected-resource",
+ "https://mcp.rootly.com/.well-known/oauth-protected-resource/mcp",
+ "https://rootly.com/.well-known/oauth-authorization-server",
+ "https://rootly.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/Rootly-AI-Labs/rootly-claude-plugin.git",
+ "commit": "65832aa6ff7a7b39c6bd64899a7a64646e3948ed",
+ "url": "https://raw.githubusercontent.com/Rootly-AI-Labs/rootly-claude-plugin/65832aa6ff7a7b39c6bd64899a7a64646e3948ed/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "sanity",
+ "service": "sanity",
+ "label": "Sanity",
+ "url": "https://mcp.sanity.io",
+ "aliases": [],
+ "publisher": "Sanity",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.sanity.io"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.sanity.io",
+ "resource": "https://mcp.sanity.io",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "global"
+ ],
+ "authorizationServerScopes": [
+ "global"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.sanity.io",
+ "https://mcp.sanity.io/.well-known/oauth-protected-resource",
+ "https://mcp.sanity.io/.well-known/oauth-authorization-server",
+ "https://mcp.sanity.io/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/sanity-io/agent-toolkit.git",
+ "commit": "8675ed36b5f5da950c3920c118d025cd1c94f58e",
+ "url": "https://raw.githubusercontent.com/sanity-io/agent-toolkit/8675ed36b5f5da950c3920c118d025cd1c94f58e/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "sentry",
+ "service": "sentry",
+ "label": "Sentry",
+ "url": "https://mcp.sentry.dev/mcp",
+ "description": "Inspect recent issues and events in Sentry from Codex.",
+ "category": "Developer Tools",
+ "aliases": [],
+ "publisher": "Sentry",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.sentry.dev/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.sentry.dev",
+ "resource": "https://mcp.sentry.dev/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "clientIdMetadataDocument": true,
+ "protectedResourceScopes": [
+ "org:read",
+ "project:write",
+ "team:write",
+ "event:write"
+ ],
+ "authorizationServerScopes": [
+ "org:read",
+ "project:write",
+ "team:write",
+ "event:write"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.sentry.dev/mcp",
+ "https://mcp.sentry.dev/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.sentry.dev/.well-known/oauth-protected-resource",
+ "https://mcp.sentry.dev/.well-known/oauth-authorization-server",
+ "https://mcp.sentry.dev/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/sentry/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/sentry/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/getsentry/plugin-claude.git",
+ "commit": "73e53541d7af21672e27428c7067f4264b8a3d65",
+ "url": "https://raw.githubusercontent.com/getsentry/plugin-claude/73e53541d7af21672e27428c7067f4264b8a3d65/.claude-plugin/plugin.json"
+ }
+ ],
+ "homepage": "https://sentry.io/",
+ "privacyUrl": "https://sentry.io/privacy/"
+ },
+ {
+ "server": "shippo",
+ "service": "shippo",
+ "label": "Shippo",
+ "url": "https://mcp.shippo.com",
+ "aliases": [
+ "shippo-mcp"
+ ],
+ "publisher": "Shippo",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.shippo.com"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://goshippo.com",
+ "resource": "https://mcp.shippo.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "*"
+ ],
+ "authorizationServerScopes": [
+ "*"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.shippo.com",
+ "https://mcp.shippo.com/.well-known/oauth-protected-resource",
+ "https://goshippo.com/.well-known/oauth-authorization-server",
+ "https://goshippo.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/goshippo/ai.git",
+ "commit": "15cbb6364fbcfd465a134f5972da9179436d0787",
+ "path": "providers/claude/plugin",
+ "url": "https://raw.githubusercontent.com/goshippo/ai/15cbb6364fbcfd465a134f5972da9179436d0787/providers/claude/plugin/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "sonatype-guide",
+ "service": "sonatype-guide",
+ "label": "Sonatype Guide",
+ "url": "https://mcp.guide.sonatype.com/mcp",
+ "aliases": [],
+ "publisher": "Sonatype Guide",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.guide.sonatype.com/mcp"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "unavailable",
+ "sourceUrls": [
+ "https://mcp.guide.sonatype.com/mcp",
+ "https://mcp.guide.sonatype.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.guide.sonatype.com/.well-known/oauth-protected-resource",
+ "https://mcp.guide.sonatype.com/.well-known/oauth-authorization-server",
+ "https://mcp.guide.sonatype.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Sonatype Guide token (SONATYPE_GUIDE_TOKEN)",
+ "fields": [
+ {
+ "id": "SONATYPE_GUIDE_TOKEN",
+ "label": "SONATYPE_GUIDE_TOKEN",
+ "description": "Environment variable SONATYPE_GUIDE_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/sonatype/sonatype-guide-claude-plugin.git",
+ "commit": "1dae73980f591d3196f5532ac72186513563d028",
+ "url": "https://raw.githubusercontent.com/sonatype/sonatype-guide-claude-plugin/1dae73980f591d3196f5532ac72186513563d028/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "stripe",
+ "service": "stripe",
+ "label": "Stripe",
+ "url": "https://mcp.stripe.com",
+ "description": "Develop your payments integration faster with the ability to create products, prices, and payment links directly in ChatGPT. Run your business from ChatGPT with the ability to retrieve and manage payments, subscriptions, invoices, refunds, disputes, and customers. Build and debug your payment integration quicker than ever by searching the Stripe documentation and getting integration recommendations without needing to leave ChatGPT.",
+ "category": "Finance",
+ "aliases": [],
+ "publisher": "Stripe",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.stripe.com"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://access.stripe.com/mcp",
+ "resource": "https://mcp.stripe.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "authorizationServerScopes": [
+ "mcp"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.stripe.com",
+ "https://mcp.stripe.com/.well-known/oauth-protected-resource",
+ "https://access.stripe.com/.well-known/oauth-authorization-server/mcp",
+ "https://access.stripe.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/stripe/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/stripe/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/stripe/ai.git",
+ "commit": "68382523846ea5bfad75ba1ef58dc5db031d0a5a",
+ "path": "providers/claude/plugin",
+ "url": "https://raw.githubusercontent.com/stripe/ai/68382523846ea5bfad75ba1ef58dc5db031d0a5a/providers/claude/plugin/.mcp.json"
+ }
+ ],
+ "homepage": "https://stripe.com",
+ "privacyUrl": "https://stripe.com/privacy",
+ "supportUrl": "https://support.stripe.com"
+ },
+ {
+ "server": "valtown",
+ "service": "val-town",
+ "label": "Val Town",
+ "url": "https://api.val.town/v3/mcp",
+ "aliases": [
+ "val-town"
+ ],
+ "publisher": "Val Town",
+ "transport": {
+ "type": "http",
+ "url": "https://api.val.town/v3/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://www.val.town/oauth",
+ "resource": "https://api.val.town/v3/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email",
+ "offline_access",
+ "project_rw",
+ "user_r",
+ "blob_rw",
+ "email_rw",
+ "sqlite_rw",
+ "telemetry_r"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "offline_access",
+ "project_rw",
+ "user_r",
+ "user_rw",
+ "blob_rw",
+ "email_rw",
+ "sqlite_rw",
+ "telemetry_r",
+ "telemetry_rw",
+ "val_r",
+ "val_rw",
+ "profile",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://api.val.town/v3/mcp",
+ "https://api.val.town/.well-known/oauth-protected-resource",
+ "https://api.val.town/.well-known/oauth-protected-resource/v3/mcp",
+ "https://www.val.town/.well-known/oauth-authorization-server/oauth",
+ "https://www.val.town/oauth/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/val-town/plugins.git",
+ "commit": "2d3ec654b6a7d93e209afb8f2e8848eddcb9f17b",
+ "path": "plugin",
+ "url": "https://raw.githubusercontent.com/val-town/plugins/2d3ec654b6a7d93e209afb8f2e8848eddcb9f17b/plugin/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "vanta",
+ "service": "vanta",
+ "label": "Vanta (US)",
+ "url": "https://mcp.vanta.com/mcp",
+ "aliases": [
+ "vanta-mcp-plugin",
+ "vanta-us"
+ ],
+ "publisher": "Vanta",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.vanta.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.vanta.com/mcp",
+ "resource": "https://mcp.vanta.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp-api.all:write"
+ ],
+ "authorizationServerScopes": [
+ "mcp-api.all:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.vanta.com/mcp",
+ "https://mcp.vanta.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.vanta.com/.well-known/oauth-protected-resource",
+ "https://api.vanta.com/.well-known/oauth-authorization-server/mcp",
+ "https://api.vanta.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "vanta-aus",
+ "service": "vanta",
+ "label": "Vanta (Australia)",
+ "url": "https://mcp.aus.vanta.com/mcp",
+ "aliases": [
+ "vanta",
+ "vanta-australia",
+ "vanta-mcp-plugin"
+ ],
+ "publisher": "Vanta",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.aus.vanta.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.vanta.com/mcp",
+ "resource": "https://mcp.aus.vanta.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp-api.all:write"
+ ],
+ "authorizationServerScopes": [
+ "mcp-api.all:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.aus.vanta.com/mcp",
+ "https://mcp.aus.vanta.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.aus.vanta.com/.well-known/oauth-protected-resource",
+ "https://api.vanta.com/.well-known/oauth-authorization-server/mcp",
+ "https://api.vanta.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "vanta-eu",
+ "service": "vanta",
+ "label": "Vanta (EU)",
+ "url": "https://mcp.eu.vanta.com/mcp",
+ "aliases": [
+ "vanta",
+ "vanta-mcp-plugin"
+ ],
+ "publisher": "Vanta",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.eu.vanta.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://api.vanta.com/mcp",
+ "resource": "https://mcp.eu.vanta.com",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "mcp-api.all:write"
+ ],
+ "authorizationServerScopes": [
+ "mcp-api.all:write"
+ ],
+ "tokenAuthMethods": [
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.eu.vanta.com/mcp",
+ "https://mcp.eu.vanta.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.eu.vanta.com/.well-known/oauth-protected-resource",
+ "https://api.vanta.com/.well-known/oauth-authorization-server/mcp",
+ "https://api.vanta.com/mcp/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/VantaInc/vanta-mcp-plugin.git",
+ "commit": "345d86b55faa649e955b7ea5569cf52d8425c2d5",
+ "url": "https://raw.githubusercontent.com/VantaInc/vanta-mcp-plugin/345d86b55faa649e955b7ea5569cf52d8425c2d5/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "wix",
+ "service": "wix",
+ "label": "Wix",
+ "url": "https://mcp.wix.com/mcp",
+ "aliases": [
+ "wix-mcp"
+ ],
+ "publisher": "Wix",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.wix.com/mcp"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.wix.com",
+ "resource": "https://mcp.wix.com/mcp",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "offline_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic",
+ "client_secret_post",
+ "none"
+ ],
+ "sourceUrls": [
+ "https://mcp.wix.com/mcp",
+ "https://mcp.wix.com/.well-known/oauth-protected-resource/mcp",
+ "https://mcp.wix.com/.well-known/oauth-protected-resource",
+ "https://mcp.wix.com/.well-known/oauth-authorization-server",
+ "https://mcp.wix.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/wix/skills.git",
+ "commit": "d8247b9f4603ecadc2891d3ded9bb285d5ee433b",
+ "url": "https://raw.githubusercontent.com/wix/skills/d8247b9f4603ecadc2891d3ded9bb285d5ee433b/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "zapier",
+ "service": "zapier",
+ "label": "Zapier",
+ "url": "https://mcp.zapier.com/api/v1/connect",
+ "aliases": [],
+ "publisher": "Zapier",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zapier.com/api/v1/connect"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://mcp.zapier.com",
+ "resource": "https://mcp.zapier.com/api/v1/connect",
+ "pkceS256": true,
+ "dynamicClientRegistration": true,
+ "protectedResourceScopes": [
+ "openid",
+ "profile",
+ "email"
+ ],
+ "authorizationServerScopes": [
+ "openid",
+ "profile",
+ "email"
+ ],
+ "tokenAuthMethods": [
+ "none",
+ "client_secret_post",
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zapier.com/api/v1/connect",
+ "https://mcp.zapier.com/.well-known/oauth-protected-resource/api/v1/connect",
+ "https://mcp.zapier.com/.well-known/oauth-protected-resource",
+ "https://mcp.zapier.com/.well-known/oauth-authorization-server",
+ "https://mcp.zapier.com/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "ready",
+ "readiness": "oauth-ready"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zapier/zapier-mcp.git",
+ "commit": "217d65a980f9b75536babf89ba64bf03ad95beea",
+ "path": "plugins/zapier",
+ "url": "https://raw.githubusercontent.com/zapier/zapier-mcp/217d65a980f9b75536babf89ba64bf03ad95beea/plugins/zapier/.mcp.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom",
+ "service": "zoom",
+ "label": "Zoom",
+ "url": "https://mcp.zoom.us/mcp/zoom/streamable",
+ "aliases": [
+ "zoom-mcp",
+ "zoom-plugin"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/zoom/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/zoom/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "docs:update:collaborator",
+ "docs:write:collaborator",
+ "docs:read:list_file_collaborators",
+ "docs:delete:collaborator",
+ "my_notes:read:content",
+ "meeting:write:meeting",
+ "meeting:read:search",
+ "meeting:update:meeting",
+ "cloud_recording:read:list_user_recordings",
+ "docs:write:import",
+ "cloud_recording:read:content",
+ "docs:read:export",
+ "hub:write:content",
+ "meeting:update:in_meeting_controls",
+ "agentic_search:read:search",
+ "hub:read:content",
+ "meeting:delete:meeting",
+ "meeting:read:assets",
+ "agentic_search:read:ask"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/zoom/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/zoom/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom access token (ZOOM_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom-canvas",
+ "service": "zoom",
+ "label": "Zoom Canvas",
+ "url": "https://mcp.zoom.us/mcp/canvas/streamable",
+ "aliases": [
+ "zoom",
+ "zoom-canvas-mcp",
+ "zoom-plugin"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/canvas/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/canvas/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "docs:update:file",
+ "docs:read:export",
+ "docs:update:content",
+ "canvas:read:data_table",
+ "docs:delete:file",
+ "docs:write:file",
+ "docs:update:collaborator",
+ "canvas:write:data_table",
+ "docs:delete:collaborator",
+ "docs:read:general_access",
+ "canvas:delete:data_table",
+ "docs:write:collaborator",
+ "docs:write:content",
+ "canvas:update:data_table",
+ "canvas:write:file_search",
+ "hub:write:move",
+ "docs:delete:content",
+ "docs:write:import",
+ "docs:read:file",
+ "docs:read:list_children",
+ "docs:read:list_file_collaborators",
+ "docs:update:file_owner",
+ "docs:update:general_access"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/canvas/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/canvas/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Canvas access token (ZOOM_CANVAS_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_CANVAS_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_CANVAS_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_CANVAS_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom-chat",
+ "service": "zoom",
+ "label": "Zoom Chat",
+ "url": "https://mcp.zoom.us/mcp/chat/streamable",
+ "aliases": [
+ "zoom",
+ "zoom-chat-mcp",
+ "zoom-plugin"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/chat/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/chat/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "team_chat:read:list_user_messages",
+ "team_chat:update:user_message",
+ "team_chat:read:list_user_sessions",
+ "team_chat:write:contact_information",
+ "team_chat:update:user_channel",
+ "chat_channel:read",
+ "chat_channel:write",
+ "team_chat:read:channel",
+ "team_chat:read:list_contacts",
+ "team_chat:write:members",
+ "team_chat:write:user_message",
+ "team_chat:read:list_user_channels",
+ "team_chat:read:list_members",
+ "team_chat:write:user_channel",
+ "team_chat:update:channel_member_role",
+ "team_chat:read:list_user_files"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/chat/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/chat/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Chat access token (ZOOM_CHAT_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_CHAT_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_CHAT_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_CHAT_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom-meetings",
+ "service": "zoom",
+ "label": "Zoom Meetings",
+ "url": "https://mcp.zoom.us/mcp/meeting/streamable",
+ "description": "Smart meeting insights from Zoom",
+ "category": "Communication",
+ "aliases": [
+ "zoom",
+ "zoom-meetings-mcp",
+ "zoom-plugin"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/meeting/streamable"
+ },
+ "auth": {
+ "strategy": "unknown",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/meeting/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "meeting:write:meeting",
+ "meeting:read:search",
+ "meeting:delete:meeting",
+ "meeting:update:in_meeting_controls",
+ "meeting:update:meeting",
+ "meeting:read:assets",
+ "cloud_recording:read:list_user_recordings",
+ "cloud_recording:read:content"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/meeting/streamable",
+ "https://zoom.us/.well-known/oauth-protected-resource/mcp/meeting/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/meeting/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Meetings access token (ZOOM_MEETINGS_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_MEETINGS_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_MEETINGS_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_MEETINGS_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "openai-plugins",
+ "repository": "openai/plugins",
+ "commit": "1dc195897af4161d039b80d8471ec0a10c9bbc89",
+ "path": "plugins/zoom/.mcp.json",
+ "url": "https://raw.githubusercontent.com/openai/plugins/1dc195897af4161d039b80d8471ec0a10c9bbc89/plugins/zoom/.mcp.json",
+ "license": "MIT"
+ },
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "the upstream OpenAI zoom plugin targets the Zoom meetings MCP endpoint; renamed to keep the general zoom endpoint distinct"
+ }
+ ],
+ "homepage": "https://zoom.us",
+ "privacyUrl": "https://zoom.us/privacy"
+ },
+ {
+ "server": "zoom-revenue-accelerator",
+ "service": "zoom",
+ "label": "Zoom Revenue Accelerator",
+ "url": "https://mcp.zoom.us/mcp/revenue_accelerator/streamable",
+ "aliases": [
+ "zoom",
+ "zoom-plugin",
+ "zoom-revenue-accelerator-mcp"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/revenue_accelerator/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/revenue_accelerator/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "zra:read:conversation_analysis",
+ "zra:read:list_conversations",
+ "zra:read:list_deal_activities",
+ "zra:read:deal",
+ "zra:read:list_conversation_comments",
+ "zra:read:crm_customer_contact",
+ "zra:read:indicator",
+ "zra:read:conversations",
+ "zra:read:team",
+ "zra:read:conversation_scorecards",
+ "zra:read:user",
+ "zra:read:list_deals"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/revenue_accelerator/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/revenue_accelerator/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Revenue Accelerator access token (ZOOM_REVENUE_ACCELERATOR_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_REVENUE_ACCELERATOR_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_REVENUE_ACCELERATOR_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_REVENUE_ACCELERATOR_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom-tasks",
+ "service": "zoom",
+ "label": "Zoom Tasks",
+ "url": "https://mcp.zoom.us/mcp/tasks/streamable",
+ "aliases": [
+ "zoom",
+ "zoom-plugin",
+ "zoom-tasks-mcp"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/tasks/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/tasks/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "tasks:read:list_tasks",
+ "tasks:update:task",
+ "tasks:delete:comment",
+ "tasks:write:task",
+ "tasks:write:assignees",
+ "tasks:write:collaborators",
+ "tasks:write:comment",
+ "tasks:read:comments",
+ "tasks:read:task",
+ "tasks:delete:assignees",
+ "tasks:delete:trash_task",
+ "tasks:delete:collaborator",
+ "tasks:read:list_collaborators",
+ "tasks:read:assignees"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/tasks/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/tasks/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Tasks access token (ZOOM_TASKS_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_TASKS_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_TASKS_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_TASKS_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ },
+ {
+ "server": "zoom-whiteboard",
+ "service": "zoom",
+ "label": "Zoom Whiteboard",
+ "url": "https://mcp.zoom.us/mcp/whiteboard/streamable",
+ "aliases": [
+ "zoom",
+ "zoom-plugin",
+ "zoom-whiteboard-mcp"
+ ],
+ "publisher": "Zoom",
+ "transport": {
+ "type": "http",
+ "url": "https://mcp.zoom.us/mcp/whiteboard/streamable"
+ },
+ "auth": {
+ "strategy": "api_key",
+ "clientRegistration": "unknown",
+ "metadata": {
+ "status": "available",
+ "authorizationServer": "https://zoom.us",
+ "resource": "https://mcp.zoom.us/mcp/whiteboard/streamable",
+ "pkceS256": true,
+ "protectedResourceScopes": [
+ "whiteboard:delete:whiteboard",
+ "whiteboard:write:collaborator",
+ "whiteboard:update:collaborator",
+ "whiteboard:read:list_collaborators",
+ "whiteboard:update:whiteboard",
+ "whiteboard:write:content",
+ "whiteboard:read:list_whiteboards",
+ "whiteboard:read:whiteboard",
+ "whiteboard:write:whiteboard",
+ "whiteboard:read:content",
+ "whiteboard:delete:content",
+ "whiteboard:delete:collaborator"
+ ],
+ "tokenAuthMethods": [
+ "client_secret_basic"
+ ],
+ "sourceUrls": [
+ "https://mcp.zoom.us/mcp/whiteboard/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource/mcp/whiteboard/streamable",
+ "https://mcp.zoom.us/.well-known/oauth-protected-resource",
+ "https://zoom.us/.well-known/oauth-authorization-server",
+ "https://zoom.us/.well-known/openid-configuration"
+ ],
+ "fetchedAt": "2026-09-12"
+ }
+ },
+ "setup": {
+ "status": "requires-setup",
+ "reason": "paste your Zoom Whiteboard access token (ZOOM_WHITEBOARD_MCP_ACCESS_TOKEN)",
+ "fields": [
+ {
+ "id": "ZOOM_WHITEBOARD_MCP_ACCESS_TOKEN",
+ "label": "ZOOM_WHITEBOARD_MCP_ACCESS_TOKEN",
+ "description": "Environment variable ZOOM_WHITEBOARD_MCP_ACCESS_TOKEN",
+ "required": true,
+ "kind": "bearer-token"
+ }
+ ],
+ "requirement": "bearer-token",
+ "readiness": "user-setup"
+ },
+ "verification": {
+ "status": "unverified"
+ },
+ "legacyBuiltin": false,
+ "provenance": [
+ {
+ "source": "claude-plugins-official",
+ "repository": "https://github.com/zoom/zoom-plugin.git",
+ "commit": "9311dd4b31e8e55c27b95479a84601576e449e97",
+ "url": "https://raw.githubusercontent.com/zoom/zoom-plugin/9311dd4b31e8e55c27b95479a84601576e449e97/.mcp.json"
+ },
+ {
+ "source": "prime",
+ "note": "curated override applied; see mcp-catalog/overrides.json"
+ }
+ ]
+ }
+ ]
+}
diff --git a/packages/ai/src/mcp/catalog.ts b/packages/ai/src/mcp/catalog.ts
index 049b779cb2..4cbfe21da6 100644
--- a/packages/ai/src/mcp/catalog.ts
+++ b/packages/ai/src/mcp/catalog.ts
@@ -1,35 +1,646 @@
-// Built-in MCP integrations we ship a skill package for. User servers go in the `mcpServers` setting instead.
+// The MCP service catalog. `catalog.json` beside this file is the single public
+// source of truth; it is generated deterministically by
+// `packages/ai/scripts/import-mcp-catalog.ts` from the pinned upstream fixtures
+// in `packages/ai/mcp-catalog/` and must not be hand-edited per entry.
+// `catalog.data.generated.ts` is the build-shipped mirror of that JSON
+// (regenerated together with it) so the runtime works under the repo's Node16
+// module target without JSON import attributes.
import { getOAuthProvider, registerOAuthProvider } from "../utils/oauth/index.js";
+import { CATALOG_DATA } from "./catalog.data.generated.js";
import { createMcpOAuthProvider, type McpOAuthConfig } from "./oauth.js";
+import { isLiteralPrivateOrLoopbackHost } from "./url-checks.js";
-export interface McpCatalogEntry {
- /** Matches the skill package import name and the auth.json key `mcp:<server>`. */
+export interface McpServiceProvenance {
+ /** Upstream catalog the definition came from, `prime` for curated data, or `user` for local sources. */
+ source: "openai-plugins" | "claude-plugins-official" | "prime" | "user";
+ repository?: string;
+ commit?: string;
+ path?: string;
+ /** Pinned raw URL of the upstream config this entry was derived from. */
+ url?: string;
+ license?: string;
+ note?: string;
+}
+
+export type McpServiceSetupFieldKind = "env-var" | "url" | "client-id" | "client-secret" | "bearer-token" | "api-key";
+
+export interface McpServiceSetupField {
+ id: string;
+ label: string;
+ description?: string;
+ required: boolean;
+ /** What the field collects. Absent means the importer had no signal (legacy generic env-var). */
+ kind?: McpServiceSetupFieldKind;
+ /**
+ * Fields sharing a credential-set id are ALTERNATIVE NAMES for one
+ * credential (GitHub's GITHUB_PAT_TOKEN and GITHUB_PERSONAL_ACCESS_TOKEN
+ * name the same PAT). The paste flow prompts ONCE for the credential and
+ * stores the value under the first alternative; the importer refuses to
+ * ship a requires-setup entry whose required credential fields resolve to
+ * more than one distinct credential, because the runtime sends exactly one
+ * Authorization: Bearer per connection.
+ */
+ credentialSet?: string;
+}
+
+/**
+ * Honest setup state. `ready` means upstream configs declare no blocker — it is
+ * never a claim of tested connectivity (see `verification`). `status` is the
+ * only lever that gates Connect; readiness is informational and NEVER a gate.
+ */
+export interface McpServiceSetup {
+ status: "ready" | "requires-setup";
+ reason?: string;
+ fields?: McpServiceSetupField[];
+ /**
+ * INFORMATIONAL readiness of the default auth path (never consulted by
+ * Connect gating; `status` is the only hard lever):
+ * - `oauth-ready`: public metadata evidence shows a coherent standard-OAuth
+ * path usable today (dynamic client registration; a successful metadata
+ * GET is never proof live OAuth works).
+ * - `user-setup`: the provider's documented default path needs user-supplied
+ * credentials (API key, token) before connecting.
+ * - `prime-restricted`: the provider requires a pre-registered client or
+ * gated program (documented, research-anchored).
+ * - `unknown`: no conclusive public evidence — connect attempts surface
+ * real errors honestly; never treated as proof of a restriction.
+ */
+ readiness?: McpReadiness;
+ /** The genuine hard requirement behind a `requires-setup` status, when known. */
+ requirement?: McpSetupRequirement;
+}
+
+export type McpReadiness = "oauth-ready" | "user-setup" | "prime-restricted" | "unknown";
+
+export type McpSetupRequirement =
+ | "api-key"
+ | "bearer-token"
+ | "registered-client"
+ | "tenant"
+ | "unsupported-transport"
+ | "local-runtime";
+
+/**
+ * A documented alternative auth path with its own per-path readiness. Never
+ * replaces the primary path — recorded so consumers can show honest options
+ * (e.g. MongoDB interactive is prime-restricted, but a dedicated service
+ * account is a user-setup alternative; Airtable OAuth via DCR, PAT bearer as
+ * an api-key alternative).
+ */
+export interface McpServiceAuthAlternative {
+ kind: "oauth" | "api-key" | "bearer-token" | "service-account";
+ readiness: McpReadiness;
+ /** Human-readable basis for this path (provider docs / evidence), not a gate. */
+ note?: string;
+ /** Research or provider-doc anchor backing this path. */
+ sourceUrl?: string;
+}
+
+/**
+ * OBSERVATIONAL metadata evidence captured by the read-only public audit
+ * (public unauthenticated GETs only). Never a live credential authority and
+ * never a Connect gate: a successful metadata GET is never proof live OAuth
+ * works. Omitted fields mean "not advertised" or "not captured" — never
+ * "unsupported" (the engine applies protocol defaults for omitted lists).
+ */
+export interface McpServiceAuthMetadata {
+ /** Whether a public authorization-server metadata document was captured for the endpoint. */
+ status: "available" | "unavailable" | "not-audited";
+ authorizationServer?: string;
+ resource?: string;
+ /** code_challenge_methods_supported advertises S256; absent = list omitted (engine still sends S256). */
+ pkceS256?: boolean;
+ /** registration_endpoint advertised (RFC 7591 dynamic client registration). */
+ dynamicClientRegistration?: boolean;
+ /** client_id_metadata_document_supported advertised (CIMD; alone it is NOT oauth-readiness). */
+ clientIdMetadataDocument?: boolean;
+ /** scopes_supported from the protected-resource document — login-relevant list (reviewed/config > PRM > omit). */
+ protectedResourceScopes?: string[];
+ /** scopes_supported from the authorization-server document — observational only; NEVER fed to the requested scopes. */
+ authorizationServerScopes?: string[];
+ /** token_endpoint_auth_methods_supported; absent = omitted (engine applies spec defaults). */
+ tokenAuthMethods?: string[];
+ /** Evidence capture locations (probe + well-known documents). */
+ sourceUrls: string[];
+ /** ISO timestamp of the read-only public metadata capture. */
+ fetchedAt: string;
+ /** Free-form honesty note (e.g. audience mismatch, provider-side block). */
+ note?: string;
+}
+
+export interface McpServiceAuth {
+ strategy: "oauth" | "api_key" | "none" | "unknown";
+ /** How an OAuth client is obtained; `unknown` means discovery is attempted at connect. */
+ clientRegistration: "dynamic" | "pre-registered" | "unknown";
+ /** Reviewed upstream scope hints only; never auto-requested, and empty in the first snapshot. */
+ reviewedScopes?: string[];
+ /** Documented alternative auth paths, each with per-path readiness. */
+ alternatives?: McpServiceAuthAlternative[];
+ /** Observational public-metadata evidence from the read-only audit (never a gate). */
+ metadata?: McpServiceAuthMetadata;
+}
+
+export type McpServiceTransport =
+ | { type: "http"; url: string }
+ | { type: "http-template"; template: string; variables: { name: string; description: string }[] }
+ | { type: "sse"; url: string }
+ | { type: "stdio"; servers: { name: string; command: string; args?: string[]; env?: Record<string, string> }[] };
+
+/**
+ * One catalog entry = one reviewed connection (endpoint) of a service. Stable
+ * `server` ids are the kernel dispatch id, the auth.json credential key
+ * `mcp:<server>`, and the /plugins card identity; `service` groups entries of
+ * the same brand (e.g. the Zoom product endpoints) without merging products
+ * like Gmail and Google Drive.
+ */
+export interface McpServiceEntry {
+ /** Stable service id: `^[a-z0-9][a-z0-9-]{0,63}$`. */
server: string;
+ /** Brand grouping id; defaults to `server`. */
+ service: string;
label: string;
+ /** Default reviewed endpoint; empty for stdio and tenant-URL-template transports. */
url: string;
+ description?: string;
+ category?: string;
+ /** Lowercase, sorted search aliases. */
+ aliases: string[];
+ publisher?: string;
+ transport: McpServiceTransport;
+ auth: McpServiceAuth;
+ setup: McpServiceSetup;
+ /**
+ * Entry-level review state, never a runtime claim: `metadata-reviewed` means
+ * public provider OAuth metadata was reviewed for an already-shipped legacy
+ * integration; `unverified` means imported only. Distinct from per-account
+ * connection verification, which the host owns.
+ */
+ verification: { status: "metadata-reviewed" | "unverified" };
+ /**
+ * True only for legacy built-in integrations that pre-date the catalog; their
+ * ids stay reserved. Not a claim about shipped skill packages.
+ */
+ legacyBuiltin: boolean;
+ /** Present on OAuth-strategy entries; consumers key OAuth support off `auth.strategy` (the host uses authStrategy), not this marker. */
oauth?: Omit<McpOAuthConfig, "server" | "url"> & { kind: "oauth" };
+ provenance: McpServiceProvenance[];
+ homepage?: string;
+ docsUrl?: string;
+ privacyUrl?: string;
+ supportUrl?: string;
+}
+
+/** Shape of the generated catalog.json file. */
+export interface CatalogFileShape {
+ version: number;
+ sources: { source: string; repository: string; commit: string }[];
+ counts: Record<string, number>;
+ entries: McpServiceEntry[];
+}
+
+export { isLiteralPrivateOrLoopbackHost } from "./url-checks.js";
+
+const SERVER_ID_PATTERN = /^[a-z0-9][a-z0-9-]{0,63}$/;
+const TRANSPORT_TYPES = new Set(["http", "http-template", "sse", "stdio"]);
+const AUTH_STRATEGIES = new Set(["oauth", "api_key", "none", "unknown"]);
+const CLIENT_REGISTRATIONS = new Set(["dynamic", "pre-registered", "unknown"]);
+const SETUP_STATUSES = new Set(["ready", "requires-setup"]);
+const READINESS_STATES = new Set(["oauth-ready", "user-setup", "prime-restricted", "unknown"]);
+const SETUP_REQUIREMENTS = new Set([
+ "api-key",
+ "bearer-token",
+ "registered-client",
+ "tenant",
+ "unsupported-transport",
+ "local-runtime",
+]);
+const SETUP_FIELD_KINDS = new Set(["env-var", "url", "client-id", "client-secret", "bearer-token", "api-key"]);
+const AUTH_ALTERNATIVE_KINDS = new Set(["oauth", "api-key", "bearer-token", "service-account"]);
+const AUTH_METADATA_STATUSES = new Set(["available", "unavailable", "not-audited"]);
+const PROVENANCE_SOURCES = new Set(["openai-plugins", "claude-plugins-official", "prime", "user"]);
+
+function isRecord(value: unknown): value is Record<string, unknown> {
+ return typeof value === "object" && value !== null && !Array.isArray(value);
+}
+
+/** Bounded echo of an entry id in errors: never reprint untrusted long/secret-ish input. */
+function safeEntryId(entryId: string): string {
+ return entryId.length > 64 ? `${entryId.slice(0, 64)}…` : entryId;
+}
+
+function fail(entryId: string, message: string): never {
+ throw new Error(`catalog entry ${safeEntryId(entryId)}: ${message}`);
+}
+
+function requireString(entryId: string, field: string, value: unknown): string {
+ if (typeof value !== "string" || value === "") {
+ return fail(entryId, `${field} must be a non-empty string`);
+ }
+ return value;
+}
+
+function requireHttpsUrl(entryId: string, field: string, value: unknown): string {
+ const url = requireString(entryId, field, value);
+ let parsed: URL;
+ try {
+ parsed = new URL(url);
+ } catch {
+ // Do not echo the input value: it may carry query tokens or other secrets.
+ return fail(entryId, `${field} is not an absolute URL`);
+ }
+ if (parsed.protocol !== "https:" || parsed.username || parsed.password || parsed.hash) {
+ return fail(entryId, `${field} must be an absolute HTTPS URL without credentials or a fragment`);
+ }
+ if (isLiteralPrivateOrLoopbackHost(parsed.hostname)) {
+ return fail(entryId, `${field} must not be a literal loopback, private, link-local or unspecified endpoint`);
+ }
+ return url;
+}
+
+function requireSetupFields(entryId: string, value: unknown): McpServiceSetupField[] {
+ if (!Array.isArray(value)) return fail(entryId, "setup.fields must be an array");
+ return value.map((field) => {
+ if (!isRecord(field)) return fail(entryId, "setup.fields entries must be objects");
+ if (field.kind !== undefined && (typeof field.kind !== "string" || !SETUP_FIELD_KINDS.has(field.kind))) {
+ return fail(entryId, `setup.fields[].kind must be one of ${[...SETUP_FIELD_KINDS].join(", ")}`);
+ }
+ if (field.credentialSet !== undefined && (typeof field.credentialSet !== "string" || !field.credentialSet)) {
+ return fail(entryId, "setup.fields[].credentialSet must be a non-empty string");
+ }
+ return {
+ id: requireString(entryId, "setup.fields[].id", field.id),
+ label: requireString(entryId, "setup.fields[].label", field.label),
+ description: typeof field.description === "string" ? field.description : undefined,
+ required: field.required === true,
+ ...(typeof field.kind === "string" ? { kind: field.kind as McpServiceSetupFieldKind } : {}),
+ ...(typeof field.credentialSet === "string" && field.credentialSet
+ ? { credentialSet: field.credentialSet }
+ : {}),
+ };
+ });
+}
+
+function requireAuthAlternatives(entryId: string, value: unknown): McpServiceAuthAlternative[] {
+ if (!Array.isArray(value)) return fail(entryId, "auth.alternatives must be an array");
+ return value.map((alternative) => {
+ if (!isRecord(alternative)) return fail(entryId, "auth.alternatives entries must be objects");
+ if (typeof alternative.kind !== "string" || !AUTH_ALTERNATIVE_KINDS.has(alternative.kind)) {
+ return fail(entryId, `auth.alternatives[].kind must be one of ${[...AUTH_ALTERNATIVE_KINDS].join(", ")}`);
+ }
+ if (typeof alternative.readiness !== "string" || !READINESS_STATES.has(alternative.readiness)) {
+ return fail(entryId, `auth.alternatives[].readiness must be one of ${[...READINESS_STATES].join(", ")}`);
+ }
+ return {
+ kind: alternative.kind as McpServiceAuthAlternative["kind"],
+ readiness: alternative.readiness as McpReadiness,
+ ...(typeof alternative.note === "string" ? { note: alternative.note } : {}),
+ ...(typeof alternative.sourceUrl === "string" ? { sourceUrl: alternative.sourceUrl } : {}),
+ };
+ });
+}
+
+function requireAuthMetadata(entryId: string, value: unknown): McpServiceAuthMetadata {
+ if (!isRecord(value)) return fail(entryId, "auth.metadata must be an object");
+ if (typeof value.status !== "string" || !AUTH_METADATA_STATUSES.has(value.status)) {
+ fail(entryId, `auth.metadata.status must be one of ${[...AUTH_METADATA_STATUSES].join(", ")}`);
+ }
+ const stringArray = (path: string, input: unknown): string[] | undefined =>
+ Array.isArray(input) ? input.map((item) => requireString(entryId, path, item)) : undefined;
+ if (value.sourceUrls !== undefined && !Array.isArray(value.sourceUrls)) {
+ fail(entryId, "auth.metadata.sourceUrls must be an array");
+ }
+ const booleanOrUndefined = (path: string, input: unknown): boolean | undefined => {
+ if (input === undefined) return undefined;
+ if (typeof input !== "boolean") fail(entryId, `auth.metadata.${path} must be a boolean`);
+ return input;
+ };
+ const protectedResourceScopes = stringArray(
+ "auth.metadata.protectedResourceScopes[]",
+ value.protectedResourceScopes,
+ );
+ const authorizationServerScopes = stringArray(
+ "auth.metadata.authorizationServerScopes[]",
+ value.authorizationServerScopes,
+ );
+ const tokenAuthMethods = stringArray("auth.metadata.tokenAuthMethods[]", value.tokenAuthMethods);
+ if (value.sourceUrls === undefined || !Array.isArray(value.sourceUrls) || value.sourceUrls.length === 0) {
+ fail(entryId, "auth.metadata.sourceUrls must be a non-empty array");
+ }
+ if (typeof value.fetchedAt !== "string" || value.fetchedAt.length === 0) {
+ fail(entryId, "auth.metadata.fetchedAt must be a non-empty string");
+ }
+ const pkceS256 = booleanOrUndefined("pkceS256", value.pkceS256);
+ const dynamicClientRegistration = booleanOrUndefined("dynamicClientRegistration", value.dynamicClientRegistration);
+ const clientIdMetadataDocument = booleanOrUndefined("clientIdMetadataDocument", value.clientIdMetadataDocument);
+ return {
+ status: value.status as McpServiceAuthMetadata["status"],
+ ...(typeof value.authorizationServer === "string" ? { authorizationServer: value.authorizationServer } : {}),
+ ...(typeof value.resource === "string" ? { resource: value.resource } : {}),
+ ...(pkceS256 !== undefined ? { pkceS256 } : {}),
+ ...(dynamicClientRegistration !== undefined ? { dynamicClientRegistration } : {}),
+ ...(clientIdMetadataDocument !== undefined ? { clientIdMetadataDocument } : {}),
+ // Absent lists stay undefined — "not advertised / not captured", never "empty".
+ ...(protectedResourceScopes ? { protectedResourceScopes } : {}),
+ ...(authorizationServerScopes ? { authorizationServerScopes } : {}),
+ ...(tokenAuthMethods ? { tokenAuthMethods } : {}),
+ sourceUrls: (value.sourceUrls as unknown[]).map((url) =>
+ requireString(entryId, "auth.metadata.sourceUrls[]", url),
+ ),
+ fetchedAt: value.fetchedAt,
+ ...(typeof value.note === "string" ? { note: value.note } : {}),
+ };
}
-export const BUILTIN_MCP_CATALOG: readonly McpCatalogEntry[] = [
- {
- server: "linear",
- label: "Linear",
- url: "https://mcp.linear.app/mcp",
- oauth: { kind: "oauth", label: "Linear" },
- },
- {
- server: "notion",
- label: "Notion",
- url: "https://mcp.notion.com/mcp",
- oauth: { kind: "oauth", label: "Notion" },
- },
-];
-
-export function getCatalogEntry(server: string): McpCatalogEntry | undefined {
+/**
+ * Structural validation for one catalog entry. Also usable for user-authored
+ * local service entries so local sources validate against the same contract.
+ */
+export function validateMcpServiceEntry(entry: unknown): McpServiceEntry {
+ if (!isRecord(entry)) {
+ throw new Error(`catalog entry must be an object, got ${typeof entry}`);
+ }
+ const entryId = typeof entry.server === "string" ? entry.server : "<unknown>";
+ const server = requireString(entryId, "server", entry.server);
+ if (!SERVER_ID_PATTERN.test(server)) {
+ fail(entryId, `server id must match ${SERVER_ID_PATTERN}`);
+ }
+ const label = requireString(entryId, "label", entry.label);
+ const service = requireString(entryId, "service", entry.service);
+ const description = typeof entry.description === "string" ? entry.description : undefined;
+ const category = typeof entry.category === "string" ? entry.category : undefined;
+ const publisher = typeof entry.publisher === "string" ? entry.publisher : undefined;
+ if (typeof entry.url !== "string") fail(entryId, "url must be a string");
+ const url: string = entry.url;
+
+ if (!isRecord(entry.transport) || typeof entry.transport.type !== "string") {
+ fail(entryId, "transport must be an object with a type");
+ }
+ const transportType = entry.transport.type;
+ if (!TRANSPORT_TYPES.has(transportType)) {
+ fail(entryId, `transport.type must be one of ${[...TRANSPORT_TYPES].join(", ")}`);
+ }
+ let transport: McpServiceTransport;
+ if (transportType === "http" || transportType === "sse") {
+ const transportUrl = requireHttpsUrl(entryId, "transport.url", entry.transport.url);
+ if (url !== transportUrl) fail(entryId, "url must equal transport.url");
+ transport = transportType === "http" ? { type: "http", url: transportUrl } : { type: "sse", url: transportUrl };
+ } else if (transportType === "http-template") {
+ const template = requireString(entryId, "transport.template", entry.transport.template);
+ const variables = entry.transport.variables;
+ if (!Array.isArray(variables) || variables.length === 0) {
+ fail(entryId, "http-template transports need at least one variable");
+ }
+ if (url !== "") fail(entryId, "url must be empty for http-template transports");
+ transport = {
+ type: "http-template",
+ template,
+ variables: variables.map((variable) => {
+ if (!isRecord(variable)) fail(entryId, "transport.variables entries must be objects");
+ return {
+ name: requireString(entryId, "transport.variables[].name", variable.name),
+ description: requireString(entryId, "transport.variables[].description", variable.description),
+ };
+ }),
+ };
+ } else {
+ const servers = entry.transport.servers;
+ if (!Array.isArray(servers) || servers.length === 0) {
+ fail(entryId, "stdio transports need at least one server");
+ }
+ if (url !== "") fail(entryId, "url must be empty for stdio transports");
+ transport = {
+ type: "stdio",
+ servers: servers.map((serverDef) => {
+ if (!isRecord(serverDef)) fail(entryId, "transport.servers entries must be objects");
+ const args = Array.isArray(serverDef.args)
+ ? serverDef.args.map((arg) => requireString(entryId, "transport.servers[].args[]", arg))
+ : undefined;
+ const env: Record<string, string> = {};
+ if (isRecord(serverDef.env)) {
+ for (const [key, value] of Object.entries(serverDef.env)) {
+ if (typeof value !== "string") fail(entryId, "transport.servers[].env values must be strings");
+ env[key] = value;
+ }
+ }
+ return {
+ name: requireString(entryId, "transport.servers[].name", serverDef.name),
+ command: requireString(entryId, "transport.servers[].command", serverDef.command),
+ args,
+ env: Object.keys(env).length > 0 ? env : undefined,
+ };
+ }),
+ };
+ }
+
+ if (!isRecord(entry.auth)) fail(entryId, "auth must be an object");
+ const strategy = entry.auth.strategy;
+ if (typeof strategy !== "string" || !AUTH_STRATEGIES.has(strategy)) {
+ fail(entryId, `auth.strategy must be one of ${[...AUTH_STRATEGIES].join(", ")}`);
+ }
+ const clientRegistration = entry.auth.clientRegistration;
+ if (typeof clientRegistration !== "string" || !CLIENT_REGISTRATIONS.has(clientRegistration)) {
+ fail(entryId, `auth.clientRegistration must be one of ${[...CLIENT_REGISTRATIONS].join(", ")}`);
+ }
+ const strategyTyped = strategy as McpServiceAuth["strategy"];
+ const clientRegistrationTyped = clientRegistration as McpServiceAuth["clientRegistration"];
+ const reviewedScopes = Array.isArray(entry.auth.reviewedScopes)
+ ? entry.auth.reviewedScopes.map((scope) => requireString(entryId, "auth.reviewedScopes[]", scope))
+ : undefined;
+ const alternatives =
+ entry.auth.alternatives === undefined ? undefined : requireAuthAlternatives(entryId, entry.auth.alternatives);
+ const metadata = entry.auth.metadata === undefined ? undefined : requireAuthMetadata(entryId, entry.auth.metadata);
+ const auth: McpServiceAuth = {
+ strategy: strategyTyped,
+ clientRegistration: clientRegistrationTyped,
+ ...(reviewedScopes ? { reviewedScopes } : {}),
+ ...(alternatives ? { alternatives } : {}),
+ ...(metadata ? { metadata } : {}),
+ };
+
+ if (!isRecord(entry.setup)) fail(entryId, "setup must be an object");
+ const setupStatus = entry.setup.status;
+ if (typeof setupStatus !== "string" || !SETUP_STATUSES.has(setupStatus)) {
+ fail(entryId, `setup.status must be one of ${[...SETUP_STATUSES].join(", ")}`);
+ }
+ if (setupStatus === "requires-setup" && typeof entry.setup.reason !== "string") {
+ fail(entryId, "requires-setup entries need a reason");
+ }
+ const fields = entry.setup.fields === undefined ? undefined : requireSetupFields(entryId, entry.setup.fields);
+ if (
+ entry.setup.readiness !== undefined &&
+ (typeof entry.setup.readiness !== "string" || !READINESS_STATES.has(entry.setup.readiness))
+ ) {
+ fail(entryId, `setup.readiness must be one of ${[...READINESS_STATES].join(", ")}`);
+ }
+ if (
+ entry.setup.requirement !== undefined &&
+ (typeof entry.setup.requirement !== "string" || !SETUP_REQUIREMENTS.has(entry.setup.requirement))
+ ) {
+ fail(entryId, `setup.requirement must be one of ${[...SETUP_REQUIREMENTS].join(", ")}`);
+ }
+ const setup: McpServiceSetup = {
+ status: setupStatus as McpServiceSetup["status"],
+ ...(typeof entry.setup.reason === "string" ? { reason: entry.setup.reason } : {}),
+ ...(fields ? { fields } : {}),
+ ...(typeof entry.setup.readiness === "string" ? { readiness: entry.setup.readiness as McpReadiness } : {}),
+ ...(typeof entry.setup.requirement === "string"
+ ? { requirement: entry.setup.requirement as McpSetupRequirement }
+ : {}),
+ };
+
+ if (!isRecord(entry.verification) || typeof entry.verification.status !== "string") {
+ fail(entryId, "verification must be an object with a status");
+ }
+ if (entry.verification.status !== "metadata-reviewed" && entry.verification.status !== "unverified") {
+ fail(entryId, 'verification.status must be "metadata-reviewed" or "unverified"');
+ }
+ if (typeof entry.legacyBuiltin !== "boolean") fail(entryId, "legacyBuiltin must be a boolean");
+
+ let oauth: McpServiceEntry["oauth"];
+ if (entry.oauth !== undefined) {
+ if (!isRecord(entry.oauth) || entry.oauth.kind !== "oauth") {
+ fail(entryId, 'oauth must carry kind "oauth"');
+ }
+ if (strategy !== "oauth") {
+ fail(entryId, "oauth is only allowed on oauth-strategy entries");
+ }
+ const scopes = typeof entry.oauth.scopes === "string" ? entry.oauth.scopes : undefined;
+ const clientId = typeof entry.oauth.clientId === "string" ? entry.oauth.clientId : undefined;
+ if (clientId !== undefined) {
+ fail(entryId, "catalog entries must not carry OAuth client ids");
+ }
+ // Secrets fail loudly instead of silently dropping (symmetric with the client-id rejection).
+ const rawOauth = entry.oauth as Record<string, unknown>;
+ for (const secretKey of ["clientSecret", "client_secret"]) {
+ if (rawOauth[secretKey] !== undefined) {
+ fail(entryId, "catalog entries must not carry OAuth client secrets");
+ }
+ }
+ oauth = { kind: "oauth", ...(scopes !== undefined ? { scopes } : {}) };
+ }
+
+ if (!Array.isArray(entry.aliases)) fail(entryId, "aliases must be an array");
+ const aliases = entry.aliases.map((alias) => {
+ if (typeof alias !== "string" || alias !== alias.toLowerCase() || alias === server) {
+ fail(entryId, "aliases must be lowercase strings distinct from the server id");
+ }
+ return alias;
+ });
+ for (let index = 1; index < aliases.length; index++) {
+ if (aliases[index] <= aliases[index - 1]) {
+ fail(entryId, "aliases must be sorted and unique");
+ }
+ }
+
+ if (!Array.isArray(entry.provenance) || entry.provenance.length === 0) {
+ fail(entryId, "provenance must be a non-empty array");
+ }
+ const provenance = entry.provenance.map((prov) => {
+ if (!isRecord(prov) || !PROVENANCE_SOURCES.has(prov.source as string)) {
+ fail(entryId, `provenance.source must be one of ${[...PROVENANCE_SOURCES].join(", ")}`);
+ }
+ return prov as unknown as McpServiceProvenance;
+ });
+
+ return {
+ server,
+ service,
+ label,
+ url,
+ description,
+ category,
+ aliases,
+ publisher,
+ transport,
+ auth,
+ setup,
+ verification: { status: entry.verification.status },
+ legacyBuiltin: entry.legacyBuiltin,
+ ...(oauth !== undefined ? { oauth } : {}),
+ provenance,
+ homepage: typeof entry.homepage === "string" ? entry.homepage : undefined,
+ docsUrl: typeof entry.docsUrl === "string" ? entry.docsUrl : undefined,
+ privacyUrl: typeof entry.privacyUrl === "string" ? entry.privacyUrl : undefined,
+ supportUrl: typeof entry.supportUrl === "string" ? entry.supportUrl : undefined,
+ };
+}
+
+const SUPPORTED_CATALOG_VERSIONS = new Set([1, 2]);
+
+function parseCatalog(data: CatalogFileShape): CatalogFileShape {
+ // Version 2 adds optional readiness/requirement/field-kind/alternatives/
+ // metadata-evidence fields (additive: every new field is optional).
+ if (!SUPPORTED_CATALOG_VERSIONS.has(data.version)) {
+ throw new Error(`catalog has unsupported version ${String(data.version)}`);
+ }
+ if (!Array.isArray(data.entries)) {
+ throw new Error("catalog must contain an entries array");
+ }
+ const seen = new Set<string>();
+ const entries = data.entries.map((entry) => {
+ const validated = validateMcpServiceEntry(entry);
+ if (seen.has(validated.server)) {
+ throw new Error(`catalog contains duplicate server id ${validated.server}`);
+ }
+ seen.add(validated.server);
+ return validated;
+ });
+ entries.sort((a, b) => a.server.localeCompare(b.server));
+ for (const entry of entries) {
+ Object.freeze(entry.transport);
+ Object.freeze(entry.auth);
+ Object.freeze(entry.setup);
+ Object.freeze(entry.verification);
+ Object.freeze(entry.provenance);
+ Object.freeze(entry.aliases);
+ Object.freeze(entry.oauth);
+ Object.freeze(entry);
+ }
+ return { ...data, entries };
+}
+
+const CATALOG = parseCatalog(CATALOG_DATA);
+
+/** The full imported service catalog, sorted by server id. */
+export const SERVICE_CATALOG: readonly McpServiceEntry[] = CATALOG.entries;
+
+/**
+ * Legacy built-in integrations that pre-date the catalog (the `legacyBuiltin`
+ * slice): their ids stay reserved. User servers go in the `mcpServers` setting
+ * instead; local catalog sources cannot shadow or rebind these ids.
+ */
+export const BUILTIN_MCP_CATALOG: readonly McpServiceEntry[] = SERVICE_CATALOG.filter((entry) => entry.legacyBuiltin);
+
+/** The full catalog (also available as the `SERVICE_CATALOG` const). */
+export function listServiceCatalog(): readonly McpServiceEntry[] {
+ return SERVICE_CATALOG;
+}
+
+/** Look up any catalog service by stable id. */
+export function getServiceCatalogEntry(server: string): McpServiceEntry | undefined {
+ return SERVICE_CATALOG.find((entry) => entry.server === server);
+}
+
+/** Look up a bundled-skill built-in entry (legacy semantics, unchanged). */
+export function getCatalogEntry(server: string): McpServiceEntry | undefined {
return BUILTIN_MCP_CATALOG.find((entry) => entry.server === server);
}
+/**
+ * Case-insensitive substring search over server id, brand, label and aliases.
+ * Deterministic order (server id); an empty query matches nothing.
+ */
+export function searchServiceCatalog(query: string): McpServiceEntry[] {
+ const needle = query.trim().toLowerCase();
+ if (!needle) return [];
+ return SERVICE_CATALOG.filter((entry) => {
+ if (entry.server.includes(needle) || entry.service.includes(needle)) return true;
+ if (entry.label.toLowerCase().includes(needle)) return true;
+ return entry.aliases.some((alias) => alias.includes(needle));
+ });
+}
+
/**
* Register the built-in catalog's OAuth providers. Idempotent. Must be called
* after any resetOAuthProviders() (e.g. ModelRegistry.refresh) since reset drops
diff --git a/packages/ai/src/mcp/index.ts b/packages/ai/src/mcp/index.ts
index 5d797ee0c3..fc08b71dc4 100644
--- a/packages/ai/src/mcp/index.ts
+++ b/packages/ai/src/mcp/index.ts
@@ -1,4 +1,27 @@
-export type { McpCatalogEntry } from "./catalog.js";
-export { BUILTIN_MCP_CATALOG, getCatalogEntry, registerBuiltinMcpOAuthProviders } from "./catalog.js";
+export type {
+ McpServiceAuth,
+ McpServiceEntry,
+ McpServiceProvenance,
+ McpServiceSetup,
+ McpServiceSetupField,
+ McpServiceTransport,
+} from "./catalog.js";
+export {
+ BUILTIN_MCP_CATALOG,
+ getCatalogEntry,
+ getServiceCatalogEntry,
+ isLiteralPrivateOrLoopbackHost,
+ listServiceCatalog,
+ registerBuiltinMcpOAuthProviders,
+ SERVICE_CATALOG,
+ searchServiceCatalog,
+ validateMcpServiceEntry,
+} from "./catalog.js";
+export type { LocalCatalogLoadResult } from "./local-catalog.js";
+export {
+ loadLocalServiceCatalog,
+ MAX_LOCAL_CATALOG_BYTES,
+ MAX_LOCAL_CATALOG_ENTRIES,
+} from "./local-catalog.js";
export type { McpOAuthConfig } from "./oauth.js";
export { createMcpOAuthProvider } from "./oauth.js";
diff --git a/packages/ai/src/mcp/local-catalog.ts b/packages/ai/src/mcp/local-catalog.ts
new file mode 100644
index 0000000000..5c08627f0c
--- /dev/null
+++ b/packages/ai/src/mcp/local-catalog.ts
@@ -0,0 +1,179 @@
+/**
+ * Local user-authored MCP service sources (ENG-6108).
+ *
+ * Loads a single local JSON file of service entries and validates it against
+ * the same contract as the bundled catalog. The loader is deliberately narrow:
+ * a bounded read of a regular file + JSON parse + structural validation, no
+ * execution, no network, and no credential access — credentials live
+ * exclusively in the host's credential storage.
+ *
+ * The loader rejects anything that would let a local file masquerade as
+ * trusted: provenance may only claim the `user` source, `legacyBuiltin` and
+ * `metadata-reviewed` review status cannot be self-asserted, audit-derived
+ * `setup.readiness`, `auth.alternatives` and `auth.metadata` evidence cannot be
+ * self-asserted, and ids colliding with bundled catalog entries are refused
+ * (no silent override/rebind of built-ins). Errors are visible and bounded: they name the file, entry index
+ * and problem category, and never echo raw input values (a malformed URL or
+ * JSON may carry secrets). How local entries interact with `mcpServers`
+ * settings is host policy; this module only provides the validated entries.
+ */
+
+import * as fs from "node:fs";
+import { type McpServiceEntry, SERVICE_CATALOG, validateMcpServiceEntry } from "./catalog.js";
+
+/** Maximum accepted local source file size. */
+export const MAX_LOCAL_CATALOG_BYTES = 256 * 1024;
+/** Maximum accepted entries per local source file. */
+export const MAX_LOCAL_CATALOG_ENTRIES = 50;
+
+export interface LocalCatalogLoadResult {
+ /** Validated local entries, frozen, in file order (ids guaranteed unique and non-bundled). */
+ entries: readonly McpServiceEntry[];
+ /** Path the entries were loaded from (empty when the file does not exist). */
+ path: string;
+}
+
+const LOCAL_SOURCE_ALLOWED: Record<string, true> = { user: true };
+
+/**
+ * Load and validate a local service source file. A missing file is not an
+ * error and yields zero entries; every problem with an existing file throws
+ * with the file path (and entry index where applicable) in the message.
+ *
+ * Proposed settings wiring (host-owned): `~/.prime/agent/mcp-services.json`.
+ */
+export function loadLocalServiceCatalog(filePath: string): LocalCatalogLoadResult {
+ if (!fs.existsSync(filePath)) {
+ return { entries: [], path: "" };
+ }
+ let stats: fs.Stats;
+ try {
+ stats = fs.statSync(filePath);
+ } catch {
+ // Vanished between the existence check and stat: treat as absent.
+ return { entries: [], path: "" };
+ }
+ // Only regular files (symlinks to regular files included). FIFOs, sockets and
+ // devices are refused so a special file can never hang the read.
+ if (!stats.isFile()) {
+ throw new Error(
+ `Local service source ${filePath} is not a regular file; directories, FIFOs and devices are refused`,
+ );
+ }
+ // Bounded read: the stale-stat size is never trusted; chunks are read until
+ // the running total exceeds MAX_LOCAL_CATALOG_BYTES, so at most
+ // MAX_LOCAL_CATALOG_BYTES + one chunk (64 KiB - 1 byte) is ever read before
+ // an oversized file is refused from the read itself.
+ let fd: number | undefined;
+ const chunks: Buffer[] = [];
+ try {
+ fd = fs.openSync(filePath, "r");
+ const chunkSize = 64 * 1024;
+ let total = 0;
+ for (;;) {
+ const chunk = Buffer.alloc(chunkSize);
+ const bytesRead = fs.readSync(fd, chunk, 0, chunkSize, null);
+ if (bytesRead === 0) break;
+ total += bytesRead;
+ if (total > MAX_LOCAL_CATALOG_BYTES) {
+ throw new Error(`Local service source ${filePath} exceeds the maximum of ${MAX_LOCAL_CATALOG_BYTES} bytes`);
+ }
+ chunks.push(bytesRead === chunkSize ? chunk : chunk.subarray(0, bytesRead));
+ }
+ } finally {
+ if (fd !== undefined) fs.closeSync(fd);
+ }
+ const raw = Buffer.concat(chunks).toString("utf8");
+
+ let data: unknown;
+ try {
+ data = JSON.parse(raw);
+ } catch (error) {
+ // Never echo the parser message: it can quote raw (possibly secret) source text.
+ const position = /position (\d+)/.exec((error as Error).message)?.[1];
+ throw new Error(
+ `Local service source ${filePath} is not valid JSON${position ? ` (parse error near byte ${position})` : ""}`,
+ );
+ }
+ if (typeof data !== "object" || data === null || Array.isArray(data)) {
+ throw new Error(`Local service source ${filePath} must be an object with a version and an entries array`);
+ }
+ const record = data as Record<string, unknown>;
+ if (record.version !== 1) {
+ throw new Error(`Local service source ${filePath} has an unsupported version; expected 1`);
+ }
+ if (!Array.isArray(record.entries)) {
+ throw new Error(`Local service source ${filePath} must contain an entries array`);
+ }
+ if (record.entries.length > MAX_LOCAL_CATALOG_ENTRIES) {
+ throw new Error(
+ `Local service source ${filePath} has ${record.entries.length} entries; the maximum is ${MAX_LOCAL_CATALOG_ENTRIES}`,
+ );
+ }
+ const entries: McpServiceEntry[] = [];
+ const seenLocal = new Set<string>();
+ for (let index = 0; index < record.entries.length; index++) {
+ const at = `Local service source ${filePath}, entry ${index}`;
+ let entry: McpServiceEntry;
+ try {
+ entry = validateMcpServiceEntry(record.entries[index]);
+ } catch (error) {
+ throw new Error(`${at}: ${(error as Error).message}`);
+ }
+ const badTrust = entry.provenance.find((prov) => !LOCAL_SOURCE_ALLOWED[prov.source]);
+ if (badTrust) {
+ throw new Error(
+ `${at} (${entry.server}): local entries may only carry provenance source "user"; found "${badTrust.source}"`,
+ );
+ }
+ if (entry.provenance.length === 0) {
+ throw new Error(
+ `${at} (${entry.server}): local entries need at least one provenance record with source "user"`,
+ );
+ }
+ // Review status and legacy-builtin trust cannot be self-asserted by a local file.
+ if (entry.legacyBuiltin) {
+ throw new Error(
+ `${at} (${entry.server}): local entries cannot claim legacyBuiltin; it is reserved for Prime built-ins`,
+ );
+ }
+ if (entry.verification.status !== "unverified") {
+ throw new Error(
+ `${at} (${entry.server}): local entries cannot claim "${entry.verification.status}"; local sources are always unverified`,
+ );
+ }
+ // Audit-derived readiness, alternatives and metadata evidence are Prime
+ // assessments; a local file cannot self-assert them. setup.requirement stays
+ // allowed as honest self-description of the user's own service.
+ if (entry.setup.readiness !== undefined) {
+ throw new Error(
+ `${at} (${entry.server}): local entries cannot claim setup.readiness "${entry.setup.readiness}"; readiness is a Prime audit assessment`,
+ );
+ }
+ if (entry.auth.alternatives !== undefined || entry.auth.metadata !== undefined) {
+ throw new Error(
+ `${at} (${entry.server}): local entries cannot carry auth.alternatives or auth.metadata; they are Prime audit evidence`,
+ );
+ }
+ if (seenLocal.has(entry.server)) {
+ throw new Error(`${at}: duplicate local id "${entry.server}"`);
+ }
+ const bundled = SERVICE_CATALOG.find((candidate) => candidate.server === entry.server);
+ if (bundled) {
+ throw new Error(
+ `${at}: id "${entry.server}" collides with the bundled catalog entry for "${bundled.label}"; local sources cannot shadow or rebind built-ins — pick another id`,
+ );
+ }
+ seenLocal.add(entry.server);
+ Object.freeze(entry.transport);
+ Object.freeze(entry.auth);
+ Object.freeze(entry.setup);
+ Object.freeze(entry.verification);
+ Object.freeze(entry.provenance);
+ Object.freeze(entry.aliases);
+ Object.freeze(entry.oauth);
+ Object.freeze(entry);
+ entries.push(entry);
+ }
+ return { entries, path: filePath };
+}
diff --git a/packages/ai/src/mcp/oauth.ts b/packages/ai/src/mcp/oauth.ts
index 525d6b4fb1..235a87ae85 100644
--- a/packages/ai/src/mcp/oauth.ts
+++ b/packages/ai/src/mcp/oauth.ts
@@ -1,4 +1,12 @@
import type { Server } from "node:http";
+import { extractWWWAuthenticateParams, selectClientAuthMethod } from "@modelcontextprotocol/sdk/client/auth.js";
+import {
+ OAuthClientInformationFullSchema,
+ OAuthErrorResponseSchema,
+ OAuthMetadataSchema,
+ OAuthProtectedResourceMetadataSchema,
+ OAuthTokensSchema,
+} from "@modelcontextprotocol/sdk/shared/auth.js";
import { oauthErrorHtml, oauthSuccessHtml } from "../utils/oauth/oauth-page.js";
import { generatePKCE } from "../utils/oauth/pkce.js";
import type { OAuthCredentials, OAuthLoginCallbacks, OAuthProviderInterface } from "../utils/oauth/types.js";
@@ -14,23 +22,47 @@ const redirectUriFor = (port: number) => `http://localhost:${port}${CALLBACK_PAT
const ALL_REDIRECT_URIS = CALLBACK_PORTS.map(redirectUriFor);
const TOKEN_EXPIRY_BUFFER_MS = 5 * 60 * 1000;
-interface AuthServerMetadata {
+// Every hand-rolled request is bounded and cancellable: no fetch without a
+// deadline, and login fetches additionally honor the host abort signal.
+const DISCOVERY_TIMEOUT_MS = 10_000;
+const REGISTRATION_TIMEOUT_MS = 15_000;
+const TOKEN_TIMEOUT_MS = 15_000;
+const MAX_METADATA_BYTES = 256 * 1024;
+
+type ClientAuthMethod = "client_secret_basic" | "client_secret_post" | "none";
+type ClientRegistrationMode = "cimd" | "dcr" | "pre-registered";
+type AudienceMode = "exact" | "origin";
+
+/** RFC 8414 authorization server metadata, validated by the SDK schema. */
+type AuthServerMetadata = {
issuer: string;
authorization_endpoint: string;
token_endpoint: string;
registration_endpoint?: string;
scopes_supported?: string[];
-}
+ response_types_supported: string[];
+ code_challenge_methods_supported?: string[];
+ token_endpoint_auth_methods_supported?: string[];
+ client_id_metadata_document_supported?: boolean;
+};
+/** RFC 9728 protected resource metadata (schema-validated; servers must be non-empty by our policy). */
interface ProtectedResourceMetadata {
resource: string;
authorization_servers: string[];
+ scopes_supported?: string[];
}
interface Discovery {
metadata: AuthServerMetadata;
+ /** RFC 9728 metadata when present; the source of default scopes (SEP-835). */
+ protectedResource?: ProtectedResourceMetadata;
+ /** RFC 9728 resource audience declared by the protected resource, sent as the `resource` parameter. */
resource?: string;
+ /** RFC 8414/OIDC issuer selected by the protected-resource metadata. */
issuer?: string;
+ /** How the declared resource associates with the configured endpoint. */
+ audienceMode?: AudienceMode;
}
export interface McpOAuthConfig {
@@ -42,8 +74,22 @@ export interface McpOAuthConfig {
url: string;
/** Pre-registered client id (servers without DCR, e.g. Slack). */
clientId?: string;
- /** Requested OAuth scopes; defaults to the server's advertised scopes. */
+ /** Requested OAuth scopes; defaults to the protected-resource metadata's advertised scopes. */
scopes?: string;
+ /** Advisory registration capability from the service catalog; shapes error guidance only. */
+ clientRegistration?: "dynamic" | "pre-registered" | "unknown";
+ /**
+ * Prime-controlled client metadata document URL (SEP-991 / client-initiated metadata).
+ * Used as the client id only when the authorization server advertises
+ * `client_id_metadata_document_supported`. Must be an HTTPS URL with a non-root path.
+ * No URL is invented: CIMD is only a supported configuration, never a default identity.
+ */
+ clientMetadataUrl?: string;
+ /**
+ * Confidential client secret. Supplied at runtime (host settings/consent flow), never embedded
+ * in source or the catalog. An explicit empty string fails the flow; only omitted means public.
+ */
+ clientSecret?: string;
}
interface McpCredentials extends OAuthCredentials {
@@ -51,10 +97,36 @@ interface McpCredentials extends OAuthCredentials {
clientId?: string;
/** MCP endpoint the token was issued for; consumers refuse to send it elsewhere. */
endpoint?: string;
- /** RFC 9728 resource indicator. Its presence marks a PRM-based login. */
+ /** RFC 9728 resource audience the token was issued for. */
resource?: string;
/** RFC 8414/OIDC issuer selected by the protected-resource metadata. */
issuer?: string;
+ /** How `resource` associates with the configured endpoint; required whenever `resource` is set. */
+ audienceMode?: AudienceMode;
+ /** Server-issued (DCR) client secret. Config-supplied secrets are never persisted here. */
+ clientSecret?: string;
+ /** RFC 7591 epoch seconds when the DCR client secret expires; 0 means it does not expire. */
+ clientSecretExpiresAt?: number;
+ /** Auth method used to obtain the stored grant; renegotiated against current server metadata. */
+ clientAuthMethod?: ClientAuthMethod;
+ /** How the client identity was established for the stored grant. */
+ clientRegistration?: ClientRegistrationMode;
+}
+
+/** Stored grant is no longer valid (invalid_grant); the user must re-run login. */
+class McpOAuthGrantError extends Error {
+ constructor(message: string) {
+ super(message);
+ this.name = "McpOAuthGrantError";
+ }
+}
+
+/** Client authentication failed or the configured client identity is unusable. */
+class McpOAuthClientError extends Error {
+ constructor(message: string) {
+ super(message);
+ this.name = "McpOAuthClientError";
+ }
}
function validatedHttpsUrl(value: string, name: string): URL {
@@ -85,23 +157,66 @@ function authorizationServerMetadataUrls(issuer: string): string[] {
];
}
-async function fetchResponse(url: string, init?: RequestInit): Promise<Response> {
- return fetch(url, { ...init, redirect: "error" });
+function boundSignal(signal: AbortSignal | undefined, timeoutMs: number): AbortSignal {
+ const timeout = AbortSignal.timeout(timeoutMs);
+ return signal ? AbortSignal.any([signal, timeout]) : timeout;
}
-async function fetchJson(url: string, init?: RequestInit): Promise<unknown> {
- const res = await fetchResponse(url, init);
- if (!res.ok) {
- throw new Error(`${init?.method ?? "GET"} ${url} failed: ${res.status}`);
+async function fetchResponse(
+ url: string,
+ init: RequestInit | undefined,
+ timeoutMs: number,
+ signal?: AbortSignal,
+): Promise<Response> {
+ return fetch(url, { ...init, redirect: "error", signal: boundSignal(signal, timeoutMs) });
+}
+
+/** Read a response body with a hard size bound; never trust unbounded server payloads. */
+async function readBodyBounded(response: Response, url: string, limitBytes = MAX_METADATA_BYTES): Promise<string> {
+ const reader = response.body?.getReader();
+ if (!reader) return response.text();
+ const chunks: Uint8Array[] = [];
+ let total = 0;
+ for (;;) {
+ const { done, value } = await reader.read();
+ if (done) break;
+ if (!value) continue;
+ total += value.byteLength;
+ if (total > limitBytes) {
+ await reader.cancel().catch(() => {});
+ throw new Error(`Response from ${url} exceeds the ${limitBytes} byte limit`);
+ }
+ chunks.push(value);
+ }
+ const joined = new Uint8Array(total);
+ let offset = 0;
+ for (const chunk of chunks) {
+ joined.set(chunk, offset);
+ offset += chunk.byteLength;
+ }
+ return new TextDecoder().decode(joined);
+}
+
+async function jsonMetadata(response: Response, url: string): Promise<unknown> {
+ if (response.status !== 200) throw new Error(`GET ${url} failed: ${response.status}`);
+ const contentType = response.headers.get("content-type")?.split(";", 1)[0].trim().toLowerCase();
+ if (contentType !== "application/json") throw new Error(`GET ${url} did not return application/json`);
+ try {
+ return JSON.parse(await readBodyBounded(response, url));
+ } catch (error) {
+ if (error instanceof Error && error.message.includes("byte limit")) throw error;
+ throw new Error(`GET ${url} returned invalid JSON`);
}
- return res.json();
}
function authorizationServerMetadata(value: unknown, issuer: string, requireExactIssuer: boolean): AuthServerMetadata {
if (!value || typeof value !== "object") throw new Error(`Authorization server metadata for ${issuer} is invalid`);
- const metadata = value as Partial<AuthServerMetadata>;
- if (typeof metadata.issuer !== "string") {
- throw new Error(`Authorization server metadata for ${issuer} is missing its issuer`);
+ // SDK-standard structural validation (RFC 8414): required endpoints and types.
+ let metadata: AuthServerMetadata;
+ try {
+ metadata = OAuthMetadataSchema.parse(value) as AuthServerMetadata;
+ } catch {
+ throw new Error(`Authorization server metadata for ${issuer} is invalid`);
}
if (requireExactIssuer) {
if (metadata.issuer !== issuer) {
@@ -113,28 +228,22 @@ function authorizationServerMetadata(value: unknown, issuer: string, requireExac
throw new Error(`Origin authorization server metadata issuer must stay on ${new URL(issuer).origin}`);
}
}
- if (typeof metadata.authorization_endpoint !== "string" || typeof metadata.token_endpoint !== "string") {
- throw new Error(`Authorization server metadata for ${issuer} is missing required endpoints`);
- }
validatedHttpsUrl(metadata.authorization_endpoint, "Authorization endpoint");
validatedHttpsUrl(metadata.token_endpoint, "Token endpoint");
if (metadata.registration_endpoint) validatedHttpsUrl(metadata.registration_endpoint, "Registration endpoint");
- return metadata as AuthServerMetadata;
+ return metadata;
}
-async function jsonMetadata(response: Response, url: string): Promise<unknown> {
- if (response.status !== 200) throw new Error(`GET ${url} failed: ${response.status}`);
- const contentType = response.headers.get("content-type")?.split(";", 1)[0].trim().toLowerCase();
- if (contentType !== "application/json") throw new Error(`GET ${url} did not return application/json`);
- return response.json();
-}
-
-async function discoverAuthorizationServer(issuer: string, requireExactIssuer: boolean): Promise<AuthServerMetadata> {
+async function discoverAuthorizationServer(
+ issuer: string,
+ requireExactIssuer: boolean,
+ signal?: AbortSignal,
+): Promise<AuthServerMetadata> {
const candidates = authorizationServerMetadataUrls(issuer);
let lastError: unknown;
for (const candidate of candidates) {
try {
- const response = await fetchResponse(candidate);
+ const response = await fetchResponse(candidate, undefined, DISCOVERY_TIMEOUT_MS, signal);
if (response.status === 404) continue;
return authorizationServerMetadata(await jsonMetadata(response, candidate), issuer, requireExactIssuer);
} catch (error) {
@@ -156,20 +265,43 @@ function randomState(): string {
.replace(/=/g, "");
}
-function resourceMetadata(value: unknown, resource: string): ProtectedResourceMetadata {
+/**
+ * Narrow audience policy: the resource declared by protected-resource metadata must be
+ * the exact canonical configured endpoint, or the endpoint's exact HTTPS origin —
+ * component-compared, never a string prefix. Anything else fails closed.
+ */
+function resourceAudienceMode(endpoint: URL, declared: string): AudienceMode {
+ const resource = validatedHttpsUrl(declared, "Protected-resource resource");
+ const sameOrigin = resource.origin === endpoint.origin;
+ const exact = sameOrigin && resource.pathname === endpoint.pathname && resource.search === endpoint.search;
+ if (exact) return "exact";
+ const originLevel = sameOrigin && (resource.pathname === "/" || resource.pathname === "") && !resource.search;
+ if (originLevel) return "origin";
+ throw new Error(
+ `Protected-resource metadata resource does not match the configured endpoint ${canonicalResource(endpoint)} or its origin`,
+ );
+}
+
+function resourceMetadata(value: unknown, endpoint: URL): ProtectedResourceMetadata {
if (!value || typeof value !== "object") throw new Error("Protected-resource metadata is invalid");
- const metadata = value as Partial<ProtectedResourceMetadata>;
- if (metadata.resource !== resource)
- throw new Error(`Protected-resource metadata resource does not exactly match ${resource}`);
- if (!Array.isArray(metadata.authorization_servers) || metadata.authorization_servers.length === 0) {
+ let parsed: ProtectedResourceMetadata & { authorization_servers?: unknown };
+ try {
+ parsed = OAuthProtectedResourceMetadataSchema.parse(value) as ProtectedResourceMetadata & {
+ authorization_servers?: unknown;
+ };
+ } catch {
+ throw new Error("Protected-resource metadata is invalid");
+ }
+ if (!Array.isArray(parsed.authorization_servers) || parsed.authorization_servers.length === 0) {
throw new Error("Protected-resource metadata has no authorization_servers");
}
- for (const issuer of metadata.authorization_servers) {
+ for (const issuer of parsed.authorization_servers) {
if (typeof issuer !== "string")
throw new Error("Protected-resource metadata has an invalid authorization server");
validatedHttpsUrl(issuer, "Authorization server issuer");
}
- return metadata as ProtectedResourceMetadata;
+ resourceAudienceMode(endpoint, parsed.resource);
+ return parsed as ProtectedResourceMetadata;
}
function resourceMetadataUrl(resource: URL): string {
@@ -177,65 +309,270 @@ function resourceMetadataUrl(resource: URL): string {
return `${resource.origin}/.well-known/oauth-protected-resource${path}${resource.search}`;
}
-function headerResourceMetadata(value: string | null): string | undefined {
- const match = value?.match(/(?:^|[,\s])resource_metadata\s*=\s*"((?:[^"\\]|\\.)*)"/i);
- if (!match) return undefined;
- return match[1].replace(/\\(.)/g, "$1");
+function rootResourceMetadataUrl(resource: URL): string {
+ // The origin-level RFC 9728 document is addressed by its BARE origin: the
+ // template is the well-known path with the resource path appended, never
+ // the endpoint's query string. The catalog audit probes the same bare
+ // URL, so classification and connect-time discovery cannot disagree.
+ return `${resource.origin}/.well-known/oauth-protected-resource`;
}
-async function tryProtectedResourceMetadata(url: string): Promise<ProtectedResourceMetadata | undefined> {
+async function tryProtectedResourceMetadata(
+ url: string,
+ signal?: AbortSignal,
+): Promise<ProtectedResourceMetadata | undefined> {
const resource = validatedHttpsUrl(url, "MCP endpoint");
let headerUrl: string | undefined;
try {
// This probe deliberately has no Authorization header. It must not leak an existing token.
- const response = await fetchResponse(resource.toString());
- headerUrl = headerResourceMetadata(response.headers.get("www-authenticate"));
+ const response = await fetchResponse(resource.toString(), undefined, DISCOVERY_TIMEOUT_MS, signal);
+ headerUrl = extractWWWAuthenticateParams(response).resourceMetadataUrl?.toString();
await response.body?.cancel();
} catch {
// The server need not support a GET probe; use the RFC well-known locations below.
}
-
- const candidate = headerUrl
- ? validatedHttpsUrl(headerUrl, "resource_metadata").toString()
- : resourceMetadataUrl(resource);
- const response = await fetchResponse(candidate);
- if (response.status === 404 && !headerUrl) return undefined;
- return resourceMetadata(await jsonMetadata(response, candidate), canonicalResource(resource));
+ if (headerUrl) {
+ // A server-supplied pointer must exist (fail closed on any non-200) and be absolute HTTPS.
+ validatedHttpsUrl(headerUrl, "resource_metadata");
+ const response = await fetchResponse(headerUrl, undefined, DISCOVERY_TIMEOUT_MS, signal);
+ return resourceMetadata(await jsonMetadata(response, headerUrl), resource);
+ }
+ // RFC 9728 path-inserted location first, then the origin-level root location
+ // (SDK parity: 4xx at one location is not proof the other is absent).
+ const candidates =
+ resource.pathname === "/" || resource.pathname === ""
+ ? [resourceMetadataUrl(resource)]
+ : [resourceMetadataUrl(resource), rootResourceMetadataUrl(resource)];
+ for (const candidate of candidates) {
+ const response = await fetchResponse(candidate, undefined, DISCOVERY_TIMEOUT_MS, signal);
+ if (response.status >= 400 && response.status < 500) continue;
+ return resourceMetadata(await jsonMetadata(response, candidate), resource);
+ }
+ return undefined;
}
/** Discover RFC 9728 protected-resource metadata before the origin-level authorization server fallback. */
-async function discover(url: string): Promise<Discovery> {
- const protectedResource = await tryProtectedResourceMetadata(url);
+async function discover(url: string, signal?: AbortSignal): Promise<Discovery> {
+ const endpoint = validatedHttpsUrl(url, "MCP endpoint");
+ const protectedResource = await tryProtectedResourceMetadata(url, signal);
if (protectedResource) {
const issuer = protectedResource.authorization_servers[0];
+ const audienceMode = resourceAudienceMode(endpoint, protectedResource.resource);
return {
- metadata: await discoverAuthorizationServer(issuer, true),
+ metadata: await discoverAuthorizationServer(issuer, true, signal),
+ protectedResource,
resource: protectedResource.resource,
issuer,
+ audienceMode,
};
}
- const issuer = validatedHttpsUrl(url, "MCP endpoint").origin;
- return { metadata: await discoverAuthorizationServer(issuer, false) };
+ const issuer = endpoint.origin;
+ return { metadata: await discoverAuthorizationServer(issuer, false, signal) };
+}
+
+/** SEP-835 scope precedence: configured scopes, then protected-resource scopes, never a blind AS-wide join. */
+function resolveScope(configured: string | undefined, protectedResource: ProtectedResourceMetadata | undefined) {
+ return configured ?? protectedResource?.scopes_supported?.join(" ");
+}
+
+interface ResolvedClient {
+ clientId: string;
+ clientSecret?: string;
+ clientRegistration: ClientRegistrationMode;
+ /** Method hint from the registration response; negotiated against server metadata. */
+ dcrAuthMethod?: string;
+ /** RFC 7591 epoch seconds when a DCR-issued client secret expires; 0 means it does not expire. */
+ secretExpiresAt?: number;
+ /** Only DCR-issued secrets are persisted with credentials; config-supplied secrets are re-resolved. */
+ persistSecret: boolean;
+}
+
+/** Config-supplied secrets: explicit empty fails; omitted means public/none. */
+function configuredSecret(config: McpOAuthConfig, label: string): string | undefined {
+ if (config.clientSecret === undefined) return undefined;
+ if (config.clientSecret === "") {
+ throw new McpOAuthClientError(
+ `A client secret is configured for ${label} but it is empty; provide the secret or remove the configuration.`,
+ );
+ }
+ return config.clientSecret;
+}
+
+/**
+ * The engine's fail-closed client-auth compatibility decision — the single
+ * source of truth for "can this client authenticate against the advertised
+ * token_endpoint_auth_methods_supported". The runtime login/refresh flows and
+ * the catalog importer's readiness classification both run THIS decision, so
+ * the shipped classification can never diverge from the connect-time gate.
+ *
+ * SDK-standard method selection, plus a compatibility gate: we never silently
+ * downgrade a server that only supports secret-based methods to a doomed
+ * no-auth request — the flow fails early with setup guidance instead.
+ */
+export interface ClientAuthDecision {
+ /** The method the SDK selects for this client against the advertised list. */
+ method: ClientAuthMethod;
+ /** False when the advertised list cannot serve this client at all (fail closed). */
+ compatible: boolean;
+ /** Why the decision failed closed; undefined when compatible. */
+ reason?: "unsupported-method" | "missing-secret";
+}
+
+export function decideClientAuthMethod(
+ clientInfo: { client_id: string; client_secret?: string; token_endpoint_auth_method?: string },
+ supported: string[] | undefined,
+): ClientAuthDecision {
+ const method = selectClientAuthMethod(
+ clientInfo,
+ supported === undefined || supported.length === 0 ? [] : supported,
+ ) as ClientAuthMethod;
+ if (supported && supported.length > 0 && !supported.includes(method)) {
+ return { method, compatible: false, reason: "unsupported-method" };
+ }
+ if (method !== "none" && !clientInfo.client_secret) {
+ return { method, compatible: false, reason: "missing-secret" };
+ }
+ return { method, compatible: true };
+}
+
+function negotiateAuthMethod(
+ clientInfo: { client_id: string; client_secret?: string; token_endpoint_auth_method?: string },
+ supported: string[] | undefined,
+ label: string,
+): ClientAuthMethod {
+ const decision = decideClientAuthMethod(clientInfo, supported);
+ if (!decision.compatible) {
+ throw new McpOAuthClientError(
+ decision.reason === "unsupported-method"
+ ? `${label} does not support any compatible client authentication method (advertised: ${supported?.join(", ")}); re-run /mcp login with an explicit client id or secret configured.`
+ : `${label} requires client authentication method ${decision.method} but no client secret is available; configure the client secret and re-run /mcp login.`,
+ );
+ }
+ return decision.method;
+}
+
+/**
+ * Catalog readiness mirror of the engine's runtime gate: the standard
+ * no-credentials login runs as a PUBLIC client (dynamic client registration
+ * or client-initiated metadata, no configured secret), so `oauth-ready` means
+ * the advertised token auth methods must be compatible with exactly that
+ * client shape. A confidential-only authorization server fails this gate at
+ * connect time (live evidence: Hugging Face /mcp login) and can never classify
+ * one-click. Omitted lists are omitted evidence — the engine applies the
+ * public-client spec default and stays compatible. `client_id` is a shape
+ * placeholder: the decision reads only the secret and any registration hint.
+ */
+export function tokenAuthMethodsSupportPublicClient(supported: string[] | undefined): boolean {
+ return decideClientAuthMethod({ client_id: "engine-standard-flow" }, supported).compatible;
+}
+
+/**
+ * The user-setup OAuth mirror of the same engine gate: a user-registered
+ * confidential app (configured client id + secret) negotiates through the
+ * identical decision, so an authorization server that advertises
+ * secret-bearing methods is honestly classifiable as user-setup — the user's
+ * own app completes the standard flow. Omitted lists stay compatible (the
+ * engine's spec default for a secret-bearing client).
+ */
+export function tokenAuthMethodsSupportConfiguredClient(supported: string[] | undefined): boolean {
+ return decideClientAuthMethod({ client_id: "user-registered-app", client_secret: "configured" }, supported)
+ .compatible;
}
-async function registerClient(registrationEndpoint: string, label: string): Promise<string> {
+/** RFC 6749/6750 error codes that are safe to surface; unknown server strings are omitted. */
+const SAFE_OAUTH_ERROR_CODES = new Set([
+ "invalid_request",
+ "invalid_client",
+ "invalid_grant",
+ "invalid_scope",
+ "unauthorized_client",
+ "unsupported_grant_type",
+ "unsupported_response_type",
+ "unsupported_token_type",
+ "server_error",
+ "temporarily_unavailable",
+ "access_denied",
+]);
+
+/** Only whitelisted, length-capped codes reach messages; everything else is dropped. */
+function safeErrorCode(code: string | undefined): string | undefined {
+ if (!code || code.length > 32 || !SAFE_OAUTH_ERROR_CODES.has(code)) return undefined;
+ return code;
+}
+
+/** Sanitized OAuth error classification: fixed guidance, never raw server-controlled descriptions. */
+async function oauthRequestError(response: Response, step: string, label: string, server: string): Promise<Error> {
+ let code: string | undefined;
+ try {
+ const parsed = OAuthErrorResponseSchema.safeParse(JSON.parse(await readBodyBounded(response, response.url)));
+ code = safeErrorCode(parsed.success ? parsed.data.error : undefined);
+ } catch {
+ // Not a valid OAuth error response; report status only.
+ }
+ if (code === "invalid_grant") {
+ return new McpOAuthGrantError(`The stored ${label} login is no longer valid; re-run /mcp login ${server}.`);
+ }
+ if (code === "invalid_client") {
+ return new McpOAuthClientError(
+ `${label} client authentication failed (HTTP ${response.status}); re-check the configured client credentials or re-run /mcp login ${server}.`,
+ );
+ }
+ return new Error(`${step} failed (HTTP ${response.status}${code ? `, error ${code}` : ""})`);
+}
+
+async function registerClient(
+ registrationEndpoint: string,
+ label: string,
+ scope: string | undefined,
+ signal?: AbortSignal,
+): Promise<ResolvedClient> {
validatedHttpsUrl(registrationEndpoint, "Registration endpoint");
const body = {
- client_name: label,
+ client_name: `Prime Agent (${label})`,
redirect_uris: ALL_REDIRECT_URIS,
grant_types: ["authorization_code", "refresh_token"],
response_types: ["code"],
token_endpoint_auth_method: "none",
+ ...(scope ? { scope } : {}),
};
- const data = (await fetchJson(registrationEndpoint, {
- method: "POST",
- headers: { "Content-Type": "application/json" },
- body: JSON.stringify(body),
- })) as { client_id?: unknown };
- if (typeof data.client_id !== "string" || !data.client_id) {
- throw new Error(`Dynamic client registration at ${registrationEndpoint} returned no client_id`);
+ const res = await fetchResponse(
+ registrationEndpoint,
+ { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) },
+ REGISTRATION_TIMEOUT_MS,
+ signal,
+ );
+ if (!res.ok) {
+ let code: string | undefined;
+ try {
+ const parsed = OAuthErrorResponseSchema.safeParse(JSON.parse(await readBodyBounded(res, res.url)));
+ code = safeErrorCode(parsed.success ? parsed.data.error : undefined);
+ } catch {
+ // Report status only.
+ }
+ throw new Error(
+ `Dynamic client registration at ${registrationEndpoint} failed (HTTP ${res.status}${code ? `, error ${code}` : ""})`,
+ );
}
- return data.client_id;
+ let registered: ReturnType<typeof OAuthClientInformationFullSchema.parse>;
+ try {
+ registered = OAuthClientInformationFullSchema.parse(JSON.parse(await readBodyBounded(res, registrationEndpoint)));
+ } catch {
+ throw new Error(`Dynamic client registration at ${registrationEndpoint} returned an invalid registration`);
+ }
+ const authMethod = registered.token_endpoint_auth_method;
+ if (authMethod && authMethod !== "none" && !registered.client_secret) {
+ throw new Error(
+ `Dynamic client registration at ${registrationEndpoint} selected client authentication method ${authMethod} without issuing a client secret`,
+ );
+ }
+ return {
+ clientId: registered.client_id,
+ clientSecret: registered.client_secret,
+ clientRegistration: "dcr",
+ dcrAuthMethod: registered.token_endpoint_auth_method,
+ secretExpiresAt: registered.client_secret_expires_at,
+ persistSecret: true,
+ };
}
type CallbackResult = { code: string; state: string } | null;
@@ -343,50 +680,78 @@ function parseRedirectInput(input: string, expectedState: string): { code: strin
return { code, state: state ?? expectedState };
}
+/** Apply the negotiated client authentication (RFC 6749 section 2.3.1) to a token request. */
+function applyClientAuthentication(
+ method: ClientAuthMethod,
+ clientId: string,
+ clientSecret: string | undefined,
+ headers: Record<string, string>,
+ params: URLSearchParams,
+): void {
+ switch (method) {
+ case "client_secret_basic":
+ if (!clientSecret)
+ throw new McpOAuthClientError("client_secret_basic authentication requires a client_secret");
+ headers.Authorization = `Basic ${btoa(`${clientId}:${clientSecret}`)}`;
+ return;
+ case "client_secret_post":
+ params.set("client_id", clientId);
+ if (clientSecret) params.set("client_secret", clientSecret);
+ return;
+ case "none":
+ params.set("client_id", clientId);
+ return;
+ }
+}
+
async function exchangeToken(
tokenEndpoint: string,
- params: Record<string, string>,
+ params: URLSearchParams,
+ method: ClientAuthMethod,
+ clientId: string,
+ clientSecret: string | undefined,
+ step: string,
+ label: string,
+ server: string,
+ signal?: AbortSignal,
): Promise<{ access_token: string; refresh_token?: string; expires_in?: number }> {
validatedHttpsUrl(tokenEndpoint, "Token endpoint");
- const res = await fetchResponse(tokenEndpoint, {
- method: "POST",
- headers: { "Content-Type": "application/x-www-form-urlencoded" },
- body: new URLSearchParams(params).toString(),
- });
- const text = await res.text();
- if (!res.ok) {
- throw new Error(`Token request to ${tokenEndpoint} failed: ${res.status}`);
- }
- let token: unknown;
+ const headers: Record<string, string> = {
+ "Content-Type": "application/x-www-form-urlencoded",
+ Accept: "application/json",
+ };
+ applyClientAuthentication(method, clientId, clientSecret, headers, params);
+ const res = await fetchResponse(
+ tokenEndpoint,
+ { method: "POST", headers, body: params.toString() },
+ TOKEN_TIMEOUT_MS,
+ signal,
+ );
+ if (!res.ok) throw await oauthRequestError(res, step, label, server);
+ let token: ReturnType<typeof OAuthTokensSchema.parse>;
try {
- token = JSON.parse(text);
+ token = OAuthTokensSchema.parse(JSON.parse(await readBodyBounded(res, tokenEndpoint)));
} catch {
- throw new Error(`Token request to ${tokenEndpoint} returned invalid JSON`);
+ throw new Error(`${step} returned an invalid token response`);
}
- if (!token || typeof token !== "object" || typeof (token as { access_token?: unknown }).access_token !== "string") {
- throw new Error(`Token request to ${tokenEndpoint} returned no access_token`);
- }
- const result = token as { access_token: string; refresh_token?: unknown; expires_in?: unknown };
- if (!result.access_token) throw new Error(`Token request to ${tokenEndpoint} returned no access_token`);
- if (result.refresh_token !== undefined && typeof result.refresh_token !== "string") {
- throw new Error(`Token request to ${tokenEndpoint} returned an invalid refresh_token`);
- }
- if (
- result.expires_in !== undefined &&
- (typeof result.expires_in !== "number" || !Number.isFinite(result.expires_in))
- ) {
- throw new Error(`Token request to ${tokenEndpoint} returned an invalid expires_in`);
- }
- return result as { access_token: string; refresh_token?: string; expires_in?: number };
+ return { access_token: token.access_token, refresh_token: token.refresh_token, expires_in: token.expires_in };
}
function toCredentials(
token: { access_token: string; refresh_token?: string; expires_in?: number },
tokenEndpoint: string,
- clientId: string,
+ identity: {
+ clientId: string;
+ clientSecret?: string;
+ clientRegistration: ClientRegistrationMode;
+ authMethod: ClientAuthMethod;
+ secretExpiresAt?: number;
+ persistSecret: boolean;
+ },
endpoint: string | undefined,
resource: string | undefined,
issuer: string | undefined,
+ audienceMode: AudienceMode | undefined,
previousRefresh?: string,
): McpCredentials {
return {
@@ -397,10 +762,16 @@ function toCredentials(
? Date.now() + token.expires_in * 1000 - TOKEN_EXPIRY_BUFFER_MS
: Date.now() + 3600 * 1000 - TOKEN_EXPIRY_BUFFER_MS,
tokenEndpoint,
- clientId,
+ clientId: identity.clientId,
endpoint,
resource,
issuer,
+ audienceMode,
+ clientRegistration: identity.clientRegistration,
+ clientAuthMethod: identity.authMethod,
+ ...(identity.persistSecret && identity.clientSecret
+ ? { clientSecret: identity.clientSecret, clientSecretExpiresAt: identity.secretExpiresAt }
+ : {}),
};
}
@@ -408,29 +779,69 @@ export function createMcpOAuthProvider(config: McpOAuthConfig): OAuthProviderInt
const label = config.label ?? config.server;
async function login(callbacks: OAuthLoginCallbacks): Promise<OAuthCredentials> {
- const discovery = await discover(config.url);
+ if (callbacks.signal?.aborted) throw new Error("Login cancelled");
+ // Fail fast on a misconfigured secret before any network request.
+ const configSecret = configuredSecret(config, label);
+ const discovery = await discover(config.url, callbacks.signal);
const { metadata: meta } = discovery;
+ if (!meta.response_types_supported.includes("code")) {
+ throw new Error(`${label} does not support the authorization code flow`);
+ }
+ if (meta.code_challenge_methods_supported && !meta.code_challenge_methods_supported.includes("S256")) {
+ throw new Error(`${label} does not support PKCE S256`);
+ }
callbacks.onProgress?.(`Discovered ${discovery.issuer ?? meta.issuer}`);
- let clientId = config.clientId;
- if (!clientId) {
- if (!meta.registration_endpoint) {
- throw new Error(
- `${label} does not support dynamic client registration and no clientId was configured. ` +
- `Set a pre-registered client id for this server.`,
- );
- }
- callbacks.onProgress?.("Registering OAuth client…");
- clientId = await registerClient(meta.registration_endpoint, `Prime Agent (${label})`);
- }
+ // SEP-835: configured scopes, then the protected-resource metadata's scopes; never a blind AS-wide join.
+ // SEP-835: configured scopes, then protected-resource scopes; never a blind AS-wide join.
+ const scope = resolveScope(config.scopes, discovery.protectedResource);
const { verifier, challenge } = await generatePKCE();
// `state` must be independent of the PKCE verifier — the verifier is the
// secret used at token exchange, while `state` is echoed on the redirect URL.
const state = randomState();
- const scope = config.scopes ?? meta.scopes_supported?.join(" ");
const cb = await startCallbackServer(label);
+ const abort = () => cb.cancel();
+ callbacks.signal?.addEventListener("abort", abort, { once: true });
try {
+ // Client identity: pre-registered id, CIMD (when advertised and configured), then DCR.
+ let clientId = config.clientId;
+ let clientSecret = configSecret;
+ let registration: ClientRegistrationMode = "pre-registered";
+ let dcrMethod: string | undefined;
+ let secretExpiresAt: number | undefined;
+ let persistSecret = false;
+ if (!clientId) {
+ if (meta.client_id_metadata_document_supported === true && config.clientMetadataUrl) {
+ const metadataUrl = validatedHttpsUrl(config.clientMetadataUrl, "Client metadata URL");
+ if (metadataUrl.pathname === "/" || metadataUrl.pathname === "") {
+ throw new Error("Client metadata URL must be an HTTPS URL with a non-root path");
+ }
+ callbacks.onProgress?.("Using client-initiated metadata…");
+ clientId = config.clientMetadataUrl;
+ registration = "cimd";
+ } else if (meta.registration_endpoint) {
+ callbacks.onProgress?.("Registering OAuth client…");
+ const registered = await registerClient(meta.registration_endpoint, label, scope, callbacks.signal);
+ clientId = registered.clientId;
+ clientSecret = registered.clientSecret ?? clientSecret;
+ secretExpiresAt = registered.secretExpiresAt;
+ persistSecret = registered.persistSecret;
+ dcrMethod = registered.dcrAuthMethod;
+ registration = "dcr";
+ } else {
+ throw new Error(
+ `${label} does not support dynamic client registration and no clientId was configured. ` +
+ `Set a pre-registered client id for this server.`,
+ );
+ }
+ }
+ const authMethod = negotiateAuthMethod(
+ { client_id: clientId, client_secret: clientSecret, token_endpoint_auth_method: dcrMethod },
+ meta.token_endpoint_auth_methods_supported,
+ label,
+ );
+
const authParams = new URLSearchParams({
client_id: clientId,
response_type: "code",
@@ -502,17 +913,45 @@ export function createMcpOAuthProvider(config: McpOAuthConfig): OAuthProviderInt
}
callbacks.onProgress?.("Exchanging authorization code for tokens…");
- const token = await exchangeToken(meta.token_endpoint, {
+ const tokenParams = new URLSearchParams({
grant_type: "authorization_code",
code: result.code,
redirect_uri: cb.redirectUri,
- client_id: clientId,
code_verifier: verifier,
- ...(discovery.resource ? { resource: discovery.resource } : {}),
});
- return toCredentials(token, meta.token_endpoint, clientId, config.url, discovery.resource, discovery.issuer);
+ if (discovery.resource) tokenParams.set("resource", discovery.resource);
+ const token = await exchangeToken(
+ meta.token_endpoint,
+ tokenParams,
+ authMethod,
+ clientId,
+ clientSecret,
+ "Authorization code exchange",
+ label,
+ config.server,
+ callbacks.signal,
+ );
+ return toCredentials(
+ token,
+ meta.token_endpoint,
+ {
+ clientId,
+ clientSecret,
+ clientRegistration: registration,
+ authMethod,
+ secretExpiresAt,
+ persistSecret,
+ },
+ config.url,
+ discovery.resource,
+ discovery.issuer,
+ discovery.audienceMode,
+ );
} finally {
+ callbacks.signal?.removeEventListener("abort", abort);
+ cb.cancel();
cb.server.close();
+ cb.server.closeAllConnections?.();
}
}
@@ -521,21 +960,78 @@ export function createMcpOAuthProvider(config: McpOAuthConfig): OAuthProviderInt
if (creds.endpoint !== config.url) {
throw new Error(`Stored OAuth credentials are not bound to ${config.url}; re-run /mcp login ${config.server}`);
}
- const configuredResource = canonicalResource(validatedHttpsUrl(config.url, "MCP endpoint"));
- if (creds.resource !== undefined && creds.resource !== configuredResource) {
- throw new Error(
- `Stored OAuth credentials are not bound to ${configuredResource}; re-run /mcp login ${config.server}`,
- );
+ const endpointUrl = validatedHttpsUrl(config.url, "MCP endpoint");
+ const configuredResource = canonicalResource(endpointUrl);
+ if (creds.resource !== undefined) {
+ // Audience-aware binding: exact grants (and legacy grants, which were only
+ // ever issued under exact matching) pin to the canonical endpoint; origin-mode
+ // grants pin to the endpoint's exact origin. Anything else fails closed.
+ const storedAudience = canonicalResource(validatedHttpsUrl(creds.resource, "Stored resource audience"));
+ const allowedAudience = creds.audienceMode === "origin" ? endpointUrl.origin : configuredResource;
+ if (storedAudience !== allowedAudience) {
+ throw new Error(
+ `Stored OAuth credentials are not bound to ${allowedAudience}; re-run /mcp login ${config.server}`,
+ );
+ }
}
if ((creds.resource === undefined) !== (creds.issuer === undefined)) {
throw new Error(
`Stored OAuth credentials for ${label} have incomplete resource binding; re-run /mcp login ${config.server}`,
);
}
+ // Stored audience modes are JSON-sourced; unknown values require re-login.
+ if (
+ creds.resource !== undefined &&
+ creds.audienceMode !== undefined &&
+ creds.audienceMode !== "exact" &&
+ creds.audienceMode !== "origin"
+ ) {
+ throw new Error(
+ `Stored OAuth credentials for ${label} have an unknown audience mode; re-run /mcp login ${config.server}`,
+ );
+ }
+ // Legacy credentials predate audience modes: they were only ever issued under
+ // exact resource matching, so only "exact" re-discovery may serve them.
+ const legacyAudience = creds.resource !== undefined && creds.audienceMode === undefined;
if (creds.issuer !== undefined) validatedHttpsUrl(creds.issuer, "Stored authorization server issuer");
if (!creds.refresh) {
throw new Error(`No refresh token stored for ${label}; re-run /mcp login ${config.server}`);
}
+ // Config identity changes must not silently reuse another client's grant.
+ if (config.clientId !== undefined && creds.clientId !== undefined && creds.clientId !== config.clientId) {
+ throw new McpOAuthClientError(
+ `Stored OAuth credentials for ${label} belong to a different client id than the configured one; re-run /mcp login ${config.server}`,
+ );
+ }
+ if (
+ config.clientMetadataUrl !== undefined &&
+ creds.clientRegistration === "cimd" &&
+ creds.clientId !== config.clientMetadataUrl
+ ) {
+ throw new McpOAuthClientError(
+ `Stored OAuth credentials for ${label} were issued to a different client metadata URL; re-run /mcp login ${config.server}`,
+ );
+ }
+ if (config.clientId !== undefined && creds.clientRegistration === "cimd") {
+ throw new McpOAuthClientError(
+ `Stored OAuth credentials for ${label} were issued via client metadata, not the configured client id; re-run /mcp login ${config.server}`,
+ );
+ }
+ // Resolve the client secret before re-discovery: explicit config first (empty
+ // fails), then the persisted DCR-issued secret — never a stale fallback for a
+ // missing config secret. Expiry is checked without any network access.
+ let clientSecret = configuredSecret(config, label);
+ const usedStoredSecret = clientSecret === undefined && creds.clientSecret !== undefined;
+ if (usedStoredSecret) {
+ const expiresAt = creds.clientSecretExpiresAt;
+ if (expiresAt !== undefined && expiresAt !== 0 && expiresAt * 1000 < Date.now()) {
+ throw new McpOAuthClientError(
+ `The registered client secret for ${label} has expired; re-run /mcp login ${config.server}`,
+ );
+ }
+ clientSecret = creds.clientSecret;
+ }
+ // Refresh always runs bounded, even though the host refresh interface supplies no abort signal.
const discovery = await discover(config.url);
if ((creds.resource === undefined) !== (discovery.resource === undefined)) {
throw new Error(`OAuth discovery mode changed for ${config.url}; re-run /mcp login ${config.server}`);
@@ -546,6 +1042,16 @@ export function createMcpOAuthProvider(config: McpOAuthConfig): OAuthProviderInt
`Stored OAuth credentials do not match current protected-resource metadata for ${config.url}`,
);
}
+ if (legacyAudience && discovery.audienceMode !== "exact") {
+ throw new Error(
+ `Stored OAuth credentials for ${label} predate origin-level resource audiences and may not be refreshed against them; re-run /mcp login ${config.server}`,
+ );
+ }
+ if (!legacyAudience && discovery.audienceMode !== creds.audienceMode) {
+ throw new Error(
+ `Stored OAuth credentials do not match current resource audience for ${config.url}; re-run /mcp login ${config.server}`,
+ );
+ }
}
const tokenEndpoint = creds.tokenEndpoint ?? discovery.metadata.token_endpoint;
if (creds.tokenEndpoint && discovery.metadata.token_endpoint !== creds.tokenEndpoint) {
@@ -553,21 +1059,45 @@ export function createMcpOAuthProvider(config: McpOAuthConfig): OAuthProviderInt
`Stored OAuth token endpoint does not match current authorization-server metadata for ${config.url}`,
);
}
- const clientId = creds.clientId ?? config.clientId;
if (!tokenEndpoint) throw new Error(`No token endpoint stored for ${label}; re-run /mcp login ${config.server}`);
- const token = await exchangeToken(tokenEndpoint, {
+ const clientId = creds.clientId ?? config.clientId;
+ if (!clientId) throw new Error(`No client id stored for ${label}; re-run /mcp login ${config.server}`);
+ const authMethod = negotiateAuthMethod(
+ { client_id: clientId, client_secret: clientSecret, token_endpoint_auth_method: creds.clientAuthMethod },
+ discovery.metadata.token_endpoint_auth_methods_supported,
+ label,
+ );
+ const tokenParams = new URLSearchParams({
grant_type: "refresh_token",
refresh_token: creds.refresh,
- ...(clientId ? { client_id: clientId } : {}),
- ...(creds.resource ? { resource: creds.resource } : {}),
});
+ if (creds.resource) tokenParams.set("resource", creds.resource);
+ const token = await exchangeToken(
+ tokenEndpoint,
+ tokenParams,
+ authMethod,
+ clientId,
+ clientSecret,
+ "Token refresh",
+ label,
+ config.server,
+ );
return toCredentials(
token,
tokenEndpoint,
- clientId ?? "",
+ {
+ clientId,
+ clientSecret: clientSecret ?? creds.clientSecret,
+ clientRegistration: creds.clientRegistration ?? (config.clientId ? "pre-registered" : "dcr"),
+ authMethod,
+ secretExpiresAt: creds.clientSecretExpiresAt,
+ // Config-supplied secrets are never persisted; stored DCR secrets are.
+ persistSecret: usedStoredSecret,
+ },
creds.endpoint,
creds.resource,
creds.issuer,
+ creds.audienceMode,
creds.refresh,
);
}
diff --git a/packages/ai/src/mcp/url-checks.ts b/packages/ai/src/mcp/url-checks.ts
new file mode 100644
index 0000000000..bc68e42fcc
--- /dev/null
+++ b/packages/ai/src/mcp/url-checks.ts
@@ -0,0 +1,72 @@
+/**
+ * Literal-address URL checks shared by the catalog validator, the local source
+ * loader and the importer. Structural checks only: loopback, RFC1918 private,
+ * link-local and unspecified IPs, plus plain `localhost` names. This is NOT
+ * DNS, redirect or rebinding SSRF enforcement — request-time network policy
+ * stays with the host/runtime. DNS names that resolve to private space are out
+ * of scope here.
+ */
+export function isLiteralPrivateOrLoopbackHost(hostname: string): boolean {
+ const bare = hostname.replace(/^\[|\]$/g, "").toLowerCase();
+ if (bare === "localhost" || bare.endsWith(".localhost")) return true;
+ const v4 = /^((?:\d{1,3}\.){3}\d{1,3})$/.exec(bare);
+ if (v4) {
+ const parts = bare.split(".").map(Number);
+ if (parts.some((part) => !Number.isInteger(part) || part < 0 || part > 255)) return true;
+ const [a, b] = parts as [number, number, number, number];
+ if (a === 127 || a === 10 || a === 0) return true;
+ if (a === 172 && b >= 16 && b <= 31) return true;
+ if (a === 192 && b === 168) return true;
+ if (a === 169 && b === 254) return true;
+ return false;
+ }
+ if (bare.includes(":")) {
+ const expanded = expandIpv6(bare);
+ if (expanded === undefined) return true;
+ if (expanded.every((word) => word === 0)) return true;
+ if (expanded.slice(0, 7).every((word) => word === 0) && expanded[7] === 1) return true;
+ if (
+ expanded[0] === 0 &&
+ expanded[1] === 0 &&
+ expanded[2] === 0 &&
+ expanded[3] === 0 &&
+ expanded[4] === 0 &&
+ expanded[5] === 0xffff
+ ) {
+ return isLiteralPrivateOrLoopbackHost(
+ `${expanded[6] >> 8}.${expanded[6] & 0xff}.${expanded[7] >> 8}.${expanded[7] & 0xff}`,
+ );
+ }
+ if ((expanded[0] & 0xffc0) === 0xfe80) return true;
+ // IPv6 unique-local fc00::/7 (fc00:: - fdff::)
+ if ((expanded[0] & 0xfe00) === 0xfc00) return true;
+ }
+ return false;
+}
+
+/** Expands an IPv6 address into 8 numeric 16-bit words; undefined when malformed. */
+function expandIpv6(address: string): number[] | undefined {
+ const [head, tail = ""] = address.split("::");
+ const headParts = head === "" ? [] : head.split(":");
+ const tailParts = tail === "" ? [] : tail.split(":");
+ const total = headParts.length + tailParts.length;
+ if (!address.includes("::")) {
+ if (total !== 8 || headParts.some((part) => part === "")) return undefined;
+ } else if (total > 7) {
+ return undefined;
+ }
+ const words: number[] = [];
+ for (const part of headParts) {
+ const word = Number.parseInt(part || "0", 16);
+ if (!Number.isInteger(word) || word < 0 || word > 0xffff) return undefined;
+ words.push(word);
+ }
+ const fill = 8 - total;
+ for (let index = 0; index < fill; index++) words.push(0);
+ for (const part of tailParts) {
+ const word = Number.parseInt(part || "0", 16);
+ if (!Number.isInteger(word) || word < 0 || word > 0xffff) return undefined;
+ words.push(word);
+ }
+ return words.length === 8 ? words : undefined;
+}
diff --git a/packages/ai/test/mcp-catalog.test.ts b/packages/ai/test/mcp-catalog.test.ts
new file mode 100644
index 0000000000..49814edaa1
--- /dev/null
+++ b/packages/ai/test/mcp-catalog.test.ts
@@ -0,0 +1,1330 @@
+import { execFileSync } from "node:child_process";
+import * as fs from "node:fs";
+import * as os from "node:os";
+import * as path from "node:path";
+import { describe, expect, it } from "vitest";
+import {
+ type AuditFile,
+ type AuditResult,
+ advertisedRegistrationGated,
+ buildCatalog,
+ type ClaudeFixture,
+ evidenceSupportsStandardOauth,
+ evidenceSupportsUserRegisteredOauth,
+ type OpenAiFixture,
+ type Overrides,
+} from "../scripts/import-mcp-catalog.js";
+import {
+ BUILTIN_MCP_CATALOG,
+ getCatalogEntry,
+ getServiceCatalogEntry,
+ listServiceCatalog,
+ type McpServiceEntry,
+ registerBuiltinMcpOAuthProviders,
+ SERVICE_CATALOG,
+ searchServiceCatalog,
+ validateMcpServiceEntry,
+} from "../src/mcp/catalog.js";
+import {
+ loadLocalServiceCatalog,
+ MAX_LOCAL_CATALOG_BYTES,
+ MAX_LOCAL_CATALOG_ENTRIES,
+} from "../src/mcp/local-catalog.js";
+import { getOAuthProvider, resetOAuthProviders } from "../src/utils/oauth/index.js";
+
+const catalogDir = path.resolve(__dirname, "../mcp-catalog");
+const rawCatalogJson = fs.readFileSync(path.resolve(__dirname, "../src/mcp/catalog.json"), "utf8");
+
+function loadInputs(): {
+ openAi: OpenAiFixture;
+ claude: ClaudeFixture;
+ overrides: Overrides;
+ audit: AuditFile;
+} {
+ return {
+ openAi: JSON.parse(fs.readFileSync(path.join(catalogDir, "sources/openai-plugins.json"), "utf8")),
+ claude: JSON.parse(fs.readFileSync(path.join(catalogDir, "sources/claude-plugins-official.json"), "utf8")),
+ overrides: JSON.parse(fs.readFileSync(path.join(catalogDir, "overrides.json"), "utf8")),
+ audit: JSON.parse(fs.readFileSync(path.join(catalogDir, "audit/metadata-audit.json"), "utf8")),
+ };
+}
+
+describe("MCP service catalog", () => {
+ // The committed fixtures are deterministic: load them once and share the
+ // rebuild/report surface across the cut-evidence tests.
+ const inputs = loadInputs();
+ const buildReport = () => buildCatalog(inputs.openAi, inputs.claude, inputs.overrides, inputs.audit);
+ const excludedOf = (report: ReturnType<typeof buildCatalog>["report"]) =>
+ new Map(report.excluded.map((entry) => [entry.key, entry.reason]));
+
+ it("loads, validates and orders the merged catalog", () => {
+ expect(SERVICE_CATALOG.length).toBeGreaterThan(50);
+ const ids = SERVICE_CATALOG.map((entry) => entry.server);
+ for (let index = 1; index < ids.length; index++) {
+ expect(ids[index - 1] < ids[index]).toBe(true);
+ }
+ expect(new Set(ids).size).toBe(ids.length);
+ });
+
+ it("keeps the legacy built-in slice exactly linear and notion", () => {
+ expect(BUILTIN_MCP_CATALOG.map((entry) => entry.server)).toEqual(["linear", "notion"]);
+ const linear = getCatalogEntry("linear");
+ const notion = getCatalogEntry("notion");
+ expect(linear).toMatchObject({
+ server: "linear",
+ label: "Linear",
+ url: "https://mcp.linear.app/mcp",
+ });
+ expect(linear?.oauth).toEqual({ kind: "oauth" });
+ expect(notion).toMatchObject({
+ server: "notion",
+ label: "Notion",
+ url: "https://mcp.notion.com/mcp",
+ });
+ expect(notion?.oauth).toEqual({ kind: "oauth" });
+ // The legacy lookup stays legacy-builtin-only: imported services are not "built-in".
+ expect(getCatalogEntry("github")).toBeUndefined();
+ });
+
+ it("registers only the built-in OAuth providers, idempotently", () => {
+ resetOAuthProviders();
+ registerBuiltinMcpOAuthProviders();
+ registerBuiltinMcpOAuthProviders();
+ expect(getOAuthProvider("mcp:linear")).toBeDefined();
+ expect(getOAuthProvider("mcp:notion")).toBeDefined();
+ // Imported catalog services are not eagerly registered (figma and slack
+ // were cut from the catalog entirely by the 2026-09-14 zero-app decision).
+ expect(getOAuthProvider("mcp:stripe")).toBeUndefined();
+ expect(getOAuthProvider("mcp:github")).toBeUndefined();
+ });
+
+ it("resolves and searches services deterministically", () => {
+ expect(getServiceCatalogEntry("notion")?.url).toBe("https://mcp.notion.com/mcp");
+ expect(getServiceCatalogEntry("does-not-exist")).toBeUndefined();
+ expect(listServiceCatalog()).toBe(SERVICE_CATALOG);
+ const notionHits = searchServiceCatalog("Notion");
+ expect(notionHits.map((entry) => entry.server)).toEqual(["notion"]);
+ expect(searchServiceCatalog("")).toEqual([]);
+ const zoomHits = searchServiceCatalog("zoom");
+ const zoomServers = zoomHits.map((entry) => entry.server);
+ for (const server of ["zoom", "zoom-meetings", "zoom-chat", "zoom-whiteboard"]) {
+ expect(zoomServers).toContain(server);
+ }
+ // The distinct ZoomInfo brand was cut by the 2026-09-15 final cut (user-own-app OAuth is neither one-click DCR nor
+ // token/key), so a zoom search stays zoom-only.
+ expect(zoomServers).not.toContain("zoominfo");
+ expect(zoomHits.filter((entry) => entry.service === "zoom")).toHaveLength(7);
+ // The monday-crm plugin was cut by the same decision: no entry surfaces.
+ expect(searchServiceCatalog("monday-crm")).toEqual([]);
+ });
+
+ it("merges the same service across sources into one canonical entry", () => {
+ for (const server of ["notion", "linear", "github", "stripe"]) {
+ const entry = getServiceCatalogEntry(server);
+ const sources = new Set(entry?.provenance.map((prov) => prov.source));
+ expect(sources.has("openai-plugins")).toBe(true);
+ expect(sources.has("claude-plugins-official")).toBe(true);
+ }
+ // Sentry merges modulo utm tracking params and keeps the clean endpoint.
+ const sentry = getServiceCatalogEntry("sentry");
+ expect(sentry?.url).toBe("https://mcp.sentry.dev/mcp");
+ expect(new Set(sentry?.provenance.map((prov) => prov.source)).size).toBe(2);
+ });
+
+ it("keeps distinct products and reviewed endpoint variants separate", () => {
+ // Distinct Google products (Gmail / Drive / Calendar) were never merged upstream, so after the zero-app cut they
+ // are simply gone — no merged or recombined ghost of them may remain.
+ for (const term of ["gmail", "google-drive", "google-calendar"]) {
+ expect(searchServiceCatalog(term)).toEqual([]);
+ }
+ // Zoom product endpoints stay distinct; the merged meeting endpoint keeps both sources.
+ expect(getServiceCatalogEntry("zoom")?.url).toBe("https://mcp.zoom.us/mcp/zoom/streamable");
+ const meetings = getServiceCatalogEntry("zoom-meetings");
+ expect(meetings?.url).toBe("https://mcp.zoom.us/mcp/meeting/streamable");
+ expect(new Set(meetings?.provenance.map((prov) => prov.source).filter((source) => source !== "prime"))).toEqual(
+ new Set(["openai-plugins", "claude-plugins-official"]),
+ );
+ // Vanta regions are separate reviewed endpoints of one brand.
+ expect(getServiceCatalogEntry("vanta")?.url).toBe("https://mcp.vanta.com/mcp");
+ expect(getServiceCatalogEntry("vanta-eu")?.url).toBe("https://mcp.eu.vanta.com/mcp");
+ expect(getServiceCatalogEntry("vanta-aus")?.url).toBe("https://mcp.aus.vanta.com/mcp");
+ });
+
+ it("carries no branded client ids, placeholders, secrets or hosted app ids", () => {
+ for (const forbidden of [
+ "1601185624273.8899143856786",
+ "11843774967.11905492103734",
+ "<GMAIL_PUBLIC_CLIENT_ID>",
+ "<GMAIL_CLIENT_SECRET>",
+ "asdk_app_",
+ "claude.ai/oauth/claude-code-client-metadata",
+ ]) {
+ expect(rawCatalogJson).not.toContain(forbidden);
+ }
+ const walk = (value: unknown): void => {
+ if (Array.isArray(value)) {
+ for (const item of value) walk(item);
+ return;
+ }
+ if (value && typeof value === "object") {
+ for (const [key, child] of Object.entries(value)) {
+ expect(["client_id", "clientId", "client_secret"]).not.toContain(key);
+ walk(child);
+ }
+ }
+ };
+ walk(JSON.parse(rawCatalogJson));
+ });
+
+ it("marks known setup blockers honestly and imports no reviewed scope lists", () => {
+ // Provider-client gates (Slack, Figma, Google, MongoDB) and honest unknowns are no longer in-catalog
+ // classifications: the zero-app cut (2026-09-14) excludes those providers with documented per-entry reasons (see
+ // the cut test below). Placeholder-only upstream blocks were cleared with evidence where the provider supports
+ // self-serve OAuth: Airtable Connects with OAuth DCR.
+ const airtable = getServiceCatalogEntry("airtable");
+ expect(airtable?.setup.status).toBe("ready");
+ expect(airtable?.setup.reason).toBeUndefined();
+ expect(airtable?.setup.reason ?? "").not.toMatch(/placeholder/i);
+ // Genuine documented restrictions stay hard for kept providers, with
+ // research-anchored reasons: GitHub needs a user-supplied PAT.
+ const github = getServiceCatalogEntry("github");
+ expect(github?.auth.strategy).toBe("api_key");
+ expect(github?.setup.fields?.map((field) => field.id).sort()).toEqual([
+ "GITHUB_PAT_TOKEN",
+ "GITHUB_PERSONAL_ACCESS_TOKEN",
+ ]);
+ expect(github?.auth.reviewedScopes).toBeUndefined();
+ expect(github?.oauth?.scopes).toBeUndefined();
+ });
+
+ it("classifies readiness from committed audit evidence without blanket bans", () => {
+ // Ready entries are never downgraded by missing evidence, and a metadata GET is never proof of live OAuth:
+ // oauth-ready requires audience-coherent DCR evidence; everything else stays honestly unknown.
+ const airtable = getServiceCatalogEntry("airtable");
+ expect(airtable?.setup.status).toBe("ready");
+ expect(airtable?.setup.readiness).toBe("oauth-ready");
+ expect(airtable?.auth.metadata?.dynamicClientRegistration).toBe(true);
+ expect(airtable?.auth.metadata?.note).toBeUndefined();
+ expect(airtable?.auth.alternatives).toEqual([
+ expect.objectContaining({ kind: "api-key", readiness: "user-setup" }),
+ ]);
+ const linear = getServiceCatalogEntry("linear");
+ expect(linear?.setup.readiness).toBe("oauth-ready");
+ expect(linear?.auth.metadata?.dynamicClientRegistration).toBe(true);
+ expect(linear?.auth.metadata?.note).toBeUndefined();
+ // Notion: the engine component comparison accepts the pathful document
+ // served via the header pointer (exact endpoint match).
+ const notion = getServiceCatalogEntry("notion");
+ expect(notion?.setup.readiness).toBe("oauth-ready");
+ expect(notion?.auth.metadata?.note).toBeUndefined();
+ // The component comparison accepts exact-origin resources (root-slash normalized): DCR-capable origin-mismatched
+ // entries flipped — and stay one-click only where the advertised token auth methods still serve the engine's public
+ // client (the confidential-only subset — miro, vercel, windsor-ai, zoominfo, … — demotes to the user-own-app OAuth
+ // path, and the 2026-09-15 final cut excludes those entries with documented reasons).
+ for (const server of ["amplitude", "appwrite", "lovable", "rootly"]) {
+ expect(getServiceCatalogEntry(server)?.setup.readiness).toBe("oauth-ready");
+ }
+ // The SDK-parity origin-level fallback makes previously unreachable PRM documents engine-visible: valid documents
+ // with DCR flip (Codspeed, Resend), served-but-invalid ones fail closed (Confidence).
+ expect(getServiceCatalogEntry("codspeed")?.setup.readiness).toBe("oauth-ready");
+ expect(getServiceCatalogEntry("resend")?.setup.readiness).toBe("oauth-ready");
+ // Prime-restricted and unknown classifications no longer ship at all: the zero-app cut (2026-09-14) excludes those
+ // providers (see the cut test), and the importer now refuses to emit either class. Documented user-supplied
+ // credentials stay primary; OAuth alternatives stay unknown.
+ const github = getServiceCatalogEntry("github");
+ expect(github?.setup.readiness).toBe("user-setup");
+ expect(github?.setup.requirement).toBe("bearer-token");
+ expect(github?.auth.alternatives).toEqual([expect.objectContaining({ kind: "oauth", readiness: "unknown" })]);
+ for (const field of github?.setup.fields ?? []) {
+ expect(field.kind).toBe("bearer-token");
+ }
+ // The surviving requirement shapes are exactly the two pasteable ones (2026-09-16 token-only cut): bearer tokens
+ // and api keys, each with a credential field the user can actually fill in. Tenant configs, legacy-transport
+ // entries and field-less api-key promises are gone.
+ expect(getServiceCatalogEntry("zoom")?.setup.requirement).toBe("bearer-token");
+ // Both named-header api-key pairs (Datadog's DD_API_KEY + DD_APPLICATION_KEY, Cloudinary MediaFlows' cld-api-key +
+ // cld-secret) are cut by the single-credential cut — see the cut test below.
+ for (const server of [
+ "cockroachdb",
+ "dynatrace",
+ "sourcegraph",
+ "paypal-sandbox",
+ "render",
+ "datadog",
+ "cloudinary-mediaflows",
+ ]) {
+ expect(getServiceCatalogEntry(server), `${server} must be cut from the catalog`).toBeUndefined();
+ }
+ for (const entry of SERVICE_CATALOG) {
+ if (entry.setup.readiness !== "user-setup") continue;
+ expect(["bearer-token", "api-key"], `${entry.server} requirement`).toContain(entry.setup.requirement);
+ expect(
+ entry.setup.fields?.some((field) => field.kind === "bearer-token" || field.kind === "api-key"),
+ `${entry.server} must collect a credential the user can paste`,
+ ).toBe(true);
+ }
+ // Every survivor says what to paste in one honest line — no "requires provider credentials supplied as headers"
+ // restatements (2026-09-16 wording fix), and no multi-credential reasons (the single-credential cut removed the
+ // named-header pairs).
+ for (const entry of SERVICE_CATALOG) {
+ expect(entry.setup.reason ?? "").not.toContain("requires provider credentials supplied as headers");
+ if (entry.setup.readiness === "user-setup") {
+ expect(entry.setup.reason ?? "", `${entry.server} reason`).toMatch(/^paste /);
+ }
+ }
+ // GitHub's two setup fields are curated ALTERNATIVE NAMES for one PAT (a shared credentialSet): the paste flow
+ // prompts once and stores the value under the first alternative's id.
+ const githubAlternatives = getServiceCatalogEntry("github");
+ expect(githubAlternatives?.setup.fields).toEqual([
+ expect.objectContaining({ id: "GITHUB_PAT_TOKEN", credentialSet: "github-pat" }),
+ expect.objectContaining({ id: "GITHUB_PERSONAL_ACCESS_TOKEN", credentialSet: "github-pat" }),
+ ]);
+ expect(
+ SERVICE_CATALOG.filter((entry) => entry.setup.readiness === "user-setup")
+ .map((entry) => entry.server)
+ .sort(),
+ ).toEqual([
+ "aws-devops-agent",
+ "github",
+ "pagerduty",
+ "sonatype-guide",
+ "zoom",
+ "zoom-canvas",
+ "zoom-chat",
+ "zoom-meetings",
+ "zoom-revenue-accelerator",
+ "zoom-tasks",
+ "zoom-whiteboard",
+ ]);
+ // Readiness is informational-only data; the raw counts are in the file. Zero-app cut state (2026-09-14) + engine
+ // auth-method compatibility (2026-09-14, live Hugging Face gap) + final catalog cut (2026-09-15, one-click DCR or
+ // user token/key only) + token-only cut (2026-09-16, paste-an-api-key/token survivors only) + single-credential cut
+ // (2026-09-16, one prompt/one bearer: named-header pairs cut): the catalog ships exactly the two self-serve
+ // classes, with the user-setup class fully pasteable — the sums must stay exact so any drift forces a conscious
+ // update here.
+ const committed = JSON.parse(rawCatalogJson);
+ expect(committed.counts.total).toBe(68);
+ expect(committed.counts.readinessOauthReady).toBe(57);
+ expect(committed.counts.readinessUserSetup).toBe(11);
+ expect(committed.counts.readinessPrimeRestricted).toBe(0);
+ expect(committed.counts.readinessUnknown).toBe(0);
+ expect(
+ committed.counts.readinessOauthReady +
+ committed.counts.readinessUserSetup +
+ committed.counts.readinessPrimeRestricted +
+ committed.counts.readinessUnknown,
+ ).toBe(committed.counts.total);
+ expect(committed.counts.metadataAvailable + committed.counts.metadataUnavailable).toBe(
+ committed.counts.http + committed.counts.sse,
+ );
+ // Metadata evidence blocks exist only on audited remote entries, all stamped
+ // with the same committed audit snapshot date.
+ const fetchedAt = loadInputs().audit.fetchedAt;
+ for (const entry of SERVICE_CATALOG) {
+ if (entry.transport.type === "http" || entry.transport.type === "sse") {
+ expect(entry.auth.metadata?.status).toBeDefined();
+ expect(entry.auth.metadata?.fetchedAt).toBe(fetchedAt);
+ } else {
+ expect(entry.auth.metadata).toBeUndefined();
+ }
+ }
+ // The engine-undefined fallback is exact: an all-4xx well-known state is NOT a failure — the engine falls back to
+ // origin-level AS discovery, so no fail-closed note is recorded, and readiness follows the AS evidence (Intercom
+ // flips via DCR; Adobe stays unknown with unavailable AS).
+ const intercom = getServiceCatalogEntry("intercom");
+ expect(intercom?.auth.metadata?.note).toBeUndefined();
+ expect(intercom?.auth.metadata?.dynamicClientRegistration).toBe(true);
+ expect(intercom?.setup.readiness).toBe("oauth-ready");
+ // Observational AS scope universes are recorded but never imported as
+ // reviewed scopes, and no entry ever auto-requests them.
+ for (const entry of SERVICE_CATALOG) {
+ expect(entry.auth.reviewedScopes).toBeUndefined();
+ }
+ });
+
+ it("ships only streamable-http endpoints: no stdio, no tenant template, no legacy SSE", () => {
+ // 2026-09-15 final cut: local stdio adapters and url-only tenant templates were excluded. 2026-09-16 token-only
+ // cut: the remaining non-http shapes go too — every shipped entry is a plain http endpoint the runtime can actually
+ // connect to.
+ expect(SERVICE_CATALOG.filter((entry) => entry.transport.type !== "http")).toEqual([]);
+ for (const entry of SERVICE_CATALOG) {
+ expect(entry.url, `${entry.server} must ship a concrete endpoint`).not.toBe("");
+ }
+ for (const server of ["activecampaign", "jfrog", "pigment", "sourcegraph", "dynatrace", "paypal-sandbox"]) {
+ expect(getServiceCatalogEntry(server), `${server} must be cut from the catalog`).toBeUndefined();
+ }
+ });
+
+ it("says what to paste: every requires-setup reason is plain single-line picker copy", () => {
+ // The shipped reason is the line a human reads in the /mcp picker, so it must be an instruction, not an importer
+ // diagnostic (2026-09-16). The old copy leaked machine vocabulary ("requires an auth token supplied via environment
+ // variable"), stuttered the same clause twice (github) and appended upstream-config notes that changed nothing for
+ // the user (zoom-meetings).
+ const setupEntries = SERVICE_CATALOG.filter((entry) => entry.setup.status === "requires-setup");
+ expect(setupEntries).toHaveLength(11);
+ for (const entry of setupEntries) {
+ const reason = entry.setup.reason ?? "";
+ expect(reason, `${entry.server} must carry setup copy`).not.toBe("");
+ expect(reason, `${entry.server} reason must be one line`).not.toMatch(/[\n\r]/);
+ expect(reason.length, `${entry.server} reason must fit a picker row`).toBeLessThanOrEqual(100);
+ expect(reason, `${entry.server} reason must tell the user what to do`).toMatch(/^paste /);
+ expect(reason.toLowerCase(), `${entry.server} reason must not leak importer vocabulary`).not.toContain(
+ "upstream",
+ );
+ const clauses = reason.split(";").map((clause) => clause.trim().toLowerCase());
+ expect(new Set(clauses).size, `${entry.server} reason repeats a clause`).toBe(clauses.length);
+ const fieldIds = entry.setup.fields?.map((field) => field.id) ?? [];
+ expect(fieldIds.length, `${entry.server} must collect a field`).toBeGreaterThan(0);
+ expect(
+ fieldIds.some((id) => reason.includes(id)),
+ `${entry.server} reason must name one of its real setup fields`,
+ ).toBe(true);
+ }
+ expect(getServiceCatalogEntry("github")?.setup.reason).toBe(
+ "paste a GitHub personal access token (GITHUB_PAT_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN)",
+ );
+ expect(getServiceCatalogEntry("zoom-meetings")?.setup.reason).toBe(
+ "paste your Zoom Meetings access token (ZOOM_MEETINGS_MCP_ACCESS_TOKEN)",
+ );
+ // Dropping the placeholder note from the shipped copy deletes no evidence: the pinned fixture still carries the
+ // upstream placeholder client id, and Prime never uses it either way.
+ const zoomPlugin = inputs.openAi.plugins.find((plugin) => plugin.name === "zoom");
+ expect(zoomPlugin?.oauthPlaceholders).toBe(true);
+ expect(zoomPlugin?.mcpServers.zoom?.oauth?.client_id).toBe("<ZOOM_PUBLIC_CLIENT_ID>");
+ });
+
+ it("marks only the legacy built-ins as metadata-reviewed; every import stays unverified", () => {
+ const metadataReviewed = SERVICE_CATALOG.filter((entry) => entry.verification.status === "metadata-reviewed");
+ expect(metadataReviewed.map((entry) => entry.server).sort()).toEqual(["linear", "notion"]);
+ for (const entry of SERVICE_CATALOG) {
+ if (entry.server === "linear" || entry.server === "notion") continue;
+ expect(entry.verification.status).toBe("unverified");
+ }
+ // The review claim is scoped to public metadata, not runtime interop.
+ const linear = getServiceCatalogEntry("linear");
+ const primeNote = linear?.provenance.find((prov) => prov.source === "prime")?.note ?? "";
+ expect(primeNote).toMatch(/reviewed against public provider metadata/);
+ expect(primeNote).not.toMatch(/verified against/);
+ });
+
+ it("rejects malformed entries and literal private endpoints", () => {
+ const good = getServiceCatalogEntry("linear");
+ expect(good).toBeDefined();
+ expect(() => validateMcpServiceEntry(good)).not.toThrow();
+ if (!good) throw new Error("unreachable");
+ expect(() => validateMcpServiceEntry({ ...good, server: "Not Upper" })).toThrow(/server id/);
+ expect(() => validateMcpServiceEntry({ ...good, auth: { ...good.auth, strategy: "weird" } })).toThrow(/strategy/);
+ expect(() =>
+ validateMcpServiceEntry({ ...good, oauth: { kind: "oauth" }, auth: { ...good.auth, strategy: "api_key" } }),
+ ).toThrow(/oauth is only allowed on oauth-strategy/);
+ // Client ids and secrets both fail loudly in catalog data — secrets are
+ // rejected explicitly, never silently dropped.
+ expect(() => validateMcpServiceEntry({ ...good, oauth: { kind: "oauth", clientId: "abc" } })).toThrow(
+ /client ids/,
+ );
+ for (const secretShape of [{ clientSecret: "shh" }, { client_secret: "shh" }]) {
+ expect(() => validateMcpServiceEntry({ ...good, oauth: { kind: "oauth", ...secretShape } })).toThrow(
+ /client secrets/,
+ );
+ }
+ expect(() => validateMcpServiceEntry({ ...good, aliases: ["linear", "Linear"] })).toThrow(/aliases/);
+ // Literal loopback/private/link-local/unspecified endpoints are rejected structurally.
+ for (const badUrl of [
+ "https://127.0.0.1/mcp",
+ "https://127.0.0.2/mcp",
+ "https://127.8.8.8/mcp",
+ "https://[::1]/mcp",
+ "https://[::]/mcp",
+ "https://[::ffff:127.0.0.1]/mcp",
+ "https://10.1.2.3/mcp",
+ "https://172.16.0.1/mcp",
+ "https://192.168.1.4/mcp",
+ "https://169.254.1.1/mcp",
+ "https://0.0.0.0/mcp",
+ "https://[fe80::1]/mcp",
+ "https://localhost/mcp",
+ "https://box.localhost/mcp",
+ ]) {
+ expect(() =>
+ validateMcpServiceEntry({ ...good, transport: { type: "http", url: badUrl }, url: badUrl }),
+ ).toThrow(/loopback, private/);
+ }
+ // Public hosts are untouched by the literal checks.
+ expect(
+ validateMcpServiceEntry({
+ ...good,
+ transport: { type: "http", url: "https://mcp.example.com/mcp" },
+ url: "https://mcp.example.com/mcp",
+ }),
+ ).toBeDefined();
+ });
+
+ it("rebuilds the committed catalog byte-for-byte from the pinned fixtures", async () => {
+ const { catalog } = buildReport();
+ const rebuilt = JSON.parse(JSON.stringify(catalog));
+ const committed = JSON.parse(rawCatalogJson);
+ expect(rebuilt).toEqual(committed);
+ // The generated TS mirror must match the canonical JSON exactly.
+ const { CATALOG_DATA } = await import("../src/mcp/catalog.data.generated.js");
+ expect(JSON.parse(JSON.stringify(CATALOG_DATA))).toEqual(committed);
+ // Deterministic: a second run produces identical output.
+ const again = buildCatalog(inputs.openAi, inputs.claude, inputs.overrides, inputs.audit);
+ expect(JSON.stringify(again.catalog)).toBe(JSON.stringify(catalog));
+ });
+
+ it("cuts the catalog to zero-app self-serve only, with documented exclusions and kept evidence", () => {
+ // 2026-09-14 product decision: Prime maintains ZERO provider OAuth apps. The shipped catalog advertises only
+ // self-serve connectors — dynamic client registration (readiness "oauth-ready") or user-supplied tokens/keys
+ // ("user-setup"). Providers that require a provider-registered client and providers whose self-serve path stayed
+ // honestly unknown are EXCLUDED with a documented per-entry reason, not shipped mislabeled.
+ const providerClient = ["figma", "gmail", "google-calendar", "google-drive", "mongodb-atlas", "slack"];
+ const unverified = [
+ "adobe-for-creativity",
+ "confidence-docs",
+ "confidence-flags",
+ "hubspot",
+ "logrocket",
+ "mapbox-docs",
+ "shopify",
+ "sumup",
+ "synthflow",
+ "synthflow-docs",
+ ];
+ for (const server of [...providerClient, ...unverified]) {
+ expect(getServiceCatalogEntry(server), `${server} must be cut from the catalog`).toBeUndefined();
+ }
+ // Providers merged from both upstreams were cut on BOTH sides, so no ghost entry can re-enter from the other source
+ // — and neither can any alias or label fragment of the cut brands.
+ for (const term of ["figma", "slack", "shopify", "gmail", "mongodb", "synthflow", "hubspot"]) {
+ expect(searchServiceCatalog(term)).toEqual([]);
+ }
+ const { report } = buildReport();
+ const excluded = excludedOf(report);
+ for (const key of [
+ "openai-plugins/figma/figma",
+ "claude-plugins-official/figma/figma",
+ "openai-plugins/slack/slack",
+ "claude-plugins-official/slack/slack",
+ "openai-plugins/gmail/gmail",
+ "openai-plugins/google-calendar/google-calendar",
+ "openai-plugins/google-drive/google-drive",
+ "claude-plugins-official/mongodb-atlas/mongodb-atlas",
+ "openai-plugins/shopify/shopify",
+ "claude-plugins-official/adobe-for-creativity/Adobe for creativity",
+ "claude-plugins-official/confidence/confidence-docs",
+ "claude-plugins-official/confidence/confidence-flags",
+ "claude-plugins-official/hubspot-sales/hubspot",
+ "claude-plugins-official/logrocket/logrocket",
+ "claude-plugins-official/mapbox/mapbox-docs",
+ "claude-plugins-official/sumup/sumup",
+ "claude-plugins-official/synthflow/synthflow",
+ "claude-plugins-official/synthflow/synthflow-docs",
+ ]) {
+ expect(excluded.has(key), `${key} must be a documented exclusion`).toBe(true);
+ expect(excluded.get(key), `${key} must cite the zero-app decision`).toMatch(/zero-app/);
+ }
+ // The cut is a shipping decision, not an evidence deletion: the pinned source snapshots still carry the excluded
+ // upstream configs and the committed audit store still holds every excluded endpoint's metadata — including Figma's
+ // live gated-DCR evidence.
+ expect(inputs.openAi.plugins.some((plugin) => plugin.name === "figma")).toBe(true);
+ expect(inputs.openAi.plugins.some((plugin) => plugin.name === "slack")).toBe(true);
+ expect(inputs.claude.plugins.some((plugin) => plugin.name === "mongodb-atlas")).toBe(true);
+ const auditedServers = new Set(inputs.audit.results.map((result) => result.server));
+ for (const server of [...providerClient, ...unverified]) {
+ expect(auditedServers.has(server), `${server} audit evidence must stay committed`).toBe(true);
+ }
+ const figma = inputs.audit.results.find((result) => result.server === "figma");
+ expect(figma?.authorizationServer.registrationAttempt?.httpStatus).toBe(403);
+ });
+
+ it("cuts the catalog to one-click DCR or user token/key only, with documented exclusions and kept evidence", () => {
+ // 2026-09-15 product decision ("remove everything that's not one-click auth or api key"): the shipped catalog
+ // advertises ONLY one-click dynamic client registration (readiness "oauth-ready") and user token/key entries. The
+ // 49 entries that are neither — the 14 registered-client entries (the user's own confidential OAuth app is not a
+ // token/key), the 32 local-runtime stdio adapters and the 3 url-only tenant templates — are EXCLUDED with a
+ // documented per-entry reason, not shipped mislabeled.
+ const registeredClient = [
+ "airwallex",
+ "airwallex-sandbox",
+ "atlan",
+ "gitlab",
+ "huggingface-skills",
+ "legalzoom",
+ "lusha",
+ "miro",
+ "monday-com",
+ "planetscale",
+ "supabase",
+ "vercel",
+ "windsor-ai",
+ "zoominfo",
+ ];
+ const localRuntime = [
+ "aikido",
+ "alloydb",
+ "amazon-location-service",
+ "aws-amplify",
+ "aws-core",
+ "aws-data-analytics",
+ "aws-serverless",
+ "aws-transform",
+ "azure",
+ "bigquery-data-analytics",
+ "cloud-sql-mysql",
+ "cloud-sql-postgresql",
+ "cloud-sql-sqlserver",
+ "convex",
+ "data-agent-kit-starter-pack",
+ "dataproc",
+ "deploy-on-aws",
+ "discord",
+ "dominodatalab",
+ "firebase",
+ "firestore-native",
+ "gitkraken",
+ "google-cloud-storage",
+ "knowledge-catalog",
+ "looker",
+ "pinecone",
+ "sagemaker-ai",
+ "semgrep",
+ "spanner",
+ "telegram",
+ "terraform",
+ "zscaler",
+ ];
+ const urlOnlyTenant = ["activecampaign", "jfrog", "pigment"];
+ for (const server of [...registeredClient, ...localRuntime, ...urlOnlyTenant]) {
+ expect(getServiceCatalogEntry(server), `${server} must be cut from the catalog`).toBeUndefined();
+ }
+ // No ghost re-entry from the other upstream side of merged providers (gitlab stays single-source; monday-com,
+ // supabase and vercel were merged from both upstreams, so both sides are cut), and neither can any alias or label
+ // fragment of the cut brands resurface.
+ for (const term of [
+ "gitlab",
+ "supabase",
+ "vercel",
+ "monday",
+ "zoominfo",
+ "miro",
+ "planetscale",
+ "huggingface",
+ "airwallex",
+ "aikido",
+ "alloydb",
+ "bigquery",
+ "firebase",
+ "pinecone",
+ "semgrep",
+ "activecampaign",
+ "jfrog",
+ "pigment",
+ "discord",
+ "telegram",
+ "zscaler",
+ "looker",
+ ]) {
+ expect(searchServiceCatalog(term), `${term} must not surface a cut entry`).toEqual([]);
+ }
+ const { report } = buildReport();
+ const excluded = excludedOf(report);
+ // One exclusion per upstream record: 64 keys cover the 49 entries, including both upstream sides of the merged
+ // providers and every stdio server of the multi-server adapter plugins.
+ for (const key of [
+ "claude-plugins-official/airwallex-agentos/airwallex-agentos",
+ "claude-plugins-official/airwallex-agentos/airwallex-dev",
+ "claude-plugins-official/airwallex-dev/airwallex-dev",
+ "claude-plugins-official/atlan/atlan",
+ "claude-plugins-official/gitlab/gitlab",
+ "claude-plugins-official/huggingface-skills/huggingface-skills",
+ "claude-plugins-official/legalzoom/legalzoom",
+ "claude-plugins-official/lusha/lusha",
+ "claude-plugins-official/miro/miro",
+ "claude-plugins-official/monday-crm/monday",
+ "openai-plugins/monday-com/monday-com",
+ "claude-plugins-official/planetscale/planetscale",
+ "claude-plugins-official/supabase/supabase",
+ "openai-plugins/supabase/supabase",
+ "claude-plugins-official/vercel/vercel",
+ "openai-plugins/vercel/vercel",
+ "claude-plugins-official/windsor-ai/windsor-ai",
+ "claude-plugins-official/zoominfo/zoominfo",
+ "claude-plugins-official/aikido/aikido-mcp",
+ "claude-plugins-official/alloydb/alloydb-postgres",
+ "claude-plugins-official/amazon-location-service/aws-mcp",
+ "claude-plugins-official/aws-amplify/aws-mcp",
+ "claude-plugins-official/aws-core/aws-mcp",
+ "claude-plugins-official/aws-data-analytics/aws-mcp",
+ "claude-plugins-official/aws-serverless/aws-serverless-mcp",
+ "claude-plugins-official/aws-transform/aws-transform-mcp",
+ "claude-plugins-official/azure/azure",
+ "claude-plugins-official/bigquery-data-analytics/bigquery",
+ "claude-plugins-official/cloud-sql-mysql/cloud-sql-mysql",
+ "claude-plugins-official/cloud-sql-postgresql/cloud-sql-postgres",
+ "claude-plugins-official/cloud-sql-sqlserver/cloud-sql-mssql",
+ "claude-plugins-official/convex/convex",
+ "claude-plugins-official/data-agent-kit-starter-pack/alloydb-postgres",
+ "claude-plugins-official/data-agent-kit-starter-pack/bigquery",
+ "claude-plugins-official/data-agent-kit-starter-pack/bigtable",
+ "claude-plugins-official/data-agent-kit-starter-pack/cloud-sql-postgresql",
+ "claude-plugins-official/data-agent-kit-starter-pack/cloud-storage",
+ "claude-plugins-official/data-agent-kit-starter-pack/dataproc",
+ "claude-plugins-official/data-agent-kit-starter-pack/knowledge_catalog",
+ "claude-plugins-official/data-agent-kit-starter-pack/notebook",
+ "claude-plugins-official/data-agent-kit-starter-pack/spanner",
+ "claude-plugins-official/data-agent-kit-starter-pack/visualization",
+ "claude-plugins-official/dataproc/dataproc",
+ "claude-plugins-official/deploy-on-aws/awsiac",
+ "claude-plugins-official/deploy-on-aws/awspricing",
+ "claude-plugins-official/discord/discord",
+ "claude-plugins-official/dominodatalab/domino_server",
+ "claude-plugins-official/firebase/firebase",
+ "claude-plugins-official/firestore-native/firestore",
+ "claude-plugins-official/gitkraken/gitkraken",
+ "claude-plugins-official/google-cloud-storage/cloud-storage",
+ "claude-plugins-official/knowledge-catalog/dataplex",
+ "claude-plugins-official/looker/looker",
+ "claude-plugins-official/looker/looker-dev",
+ "claude-plugins-official/pinecone/pinecone",
+ "claude-plugins-official/sagemaker-ai/aws-mcp",
+ "claude-plugins-official/semgrep/guardian",
+ "claude-plugins-official/spanner/spanner",
+ "claude-plugins-official/telegram/telegram",
+ "claude-plugins-official/terraform/terraform",
+ "claude-plugins-official/zscaler/zscaler-mcp-server",
+ "claude-plugins-official/activecampaign/activecampaign",
+ "claude-plugins-official/jfrog/jfrog",
+ "claude-plugins-official/pigment/pigment",
+ ]) {
+ expect(excluded.has(key), `${key} must be a documented exclusion`).toBe(true);
+ expect(excluded.get(key), `${key} must cite the final catalog cut decision`).toMatch(
+ /2026-09-15 product decision: the catalog ships one-click DCR or user token\/key only/,
+ );
+ }
+ // The cut is a shipping decision, not an evidence deletion: the pinned source snapshots still carry the excluded
+ // upstream configs (remote, templated and stdio) and the committed audit store still holds every excluded remote
+ // endpoint's metadata.
+ expect(inputs.claude.plugins.some((plugin) => plugin.name === "gitlab")).toBe(true);
+ expect(inputs.claude.plugins.some((plugin) => plugin.name === "miro")).toBe(true);
+ expect(inputs.claude.plugins.filter((plugin) => plugin.category === "stdio_service_adapter")).toHaveLength(32);
+ const gitlabPlugin = inputs.claude.plugins.find((plugin) => plugin.name === "gitlab");
+ expect(gitlabPlugin?.mcpServers.gitlab?.url).toBeDefined();
+ const auditedServers = new Set(inputs.audit.results.map((result) => result.server));
+ for (const server of registeredClient) {
+ expect(auditedServers.has(server), `${server} audit evidence must stay committed`).toBe(true);
+ }
+ });
+
+ it("cuts the catalog to one-click DCR or a paste-an-api-key/token service, structurally", () => {
+ // 2026-09-16 product decision (Kevin, live testing: "things like cockroachdb cloud still need mcp/ 'requires
+ // provider credentials supplied as headers'? i told you to remove all that stuff?"): the user-setup class is
+ // narrowed to services a user can connect by pasting a key or token. The 5 remaining survivors that were not — 3
+ // tenant configs (CockroachDB Cloud's per-cluster header, Dynatrace and Sourcegraph's instance URLs), 1 legacy-SSE
+ // endpoint the runtime cannot connect to at all (PayPal Sandbox) and 1 api-key promise with zero setup fields
+ // (Render) — are EXCLUDED with a documented per-entry reason, not shipped mislabeled.
+ for (const server of ["cockroachdb", "dynatrace", "sourcegraph", "paypal-sandbox", "render"]) {
+ expect(getServiceCatalogEntry(server), `${server} must be cut from the catalog`).toBeUndefined();
+ }
+ for (const term of ["cockroach", "dynatrace", "sourcegraph", "paypal", "render"]) {
+ expect(searchServiceCatalog(term), `${term} must not surface a cut entry`).toEqual([]);
+ }
+ const { report } = buildReport();
+ const excluded = excludedOf(report);
+ for (const key of [
+ "claude-plugins-official/paypal/paypal-sandbox",
+ "claude-plugins-official/cockroachdb/cockroachdb-cloud",
+ "claude-plugins-official/dynatrace/dynatrace",
+ "claude-plugins-official/sourcegraph/sourcegraph",
+ "claude-plugins-official/render/render",
+ ]) {
+ expect(excluded.has(key), `${key} must be a documented exclusion`).toBe(true);
+ expect(excluded.get(key), `${key} must cite the token-only cut decision`).toMatch(
+ /token-only catalog cut \(2026-09-16 product decision/,
+ );
+ }
+ // The importer enforces the cut structurally: lift any one exclusion and the import fails with a curation prompt
+ // instead of shipping, so none of these shapes can silently re-derive.
+ const withoutExclusion = (key: string, servers?: Overrides["servers"]): Overrides => ({
+ ...inputs.overrides,
+ servers: { ...inputs.overrides.servers, ...servers },
+ excludedServers: inputs.overrides.excludedServers.filter((entry) => entry.key !== key),
+ });
+ const build = (overrides: Overrides): void => {
+ buildCatalog(inputs.openAi, inputs.claude, overrides, inputs.audit);
+ };
+ // Tenant shapes (instance URL or per-tenant id) are no longer shippable.
+ expect(() =>
+ build(
+ withoutExclusion("claude-plugins-official/cockroachdb/cockroachdb-cloud", {
+ "claude-plugins-official/cockroachdb/cockroachdb-cloud": { id: "cockroachdb" },
+ }),
+ ),
+ ).toThrow(
+ /entry cockroachdb has requirement "tenant"; the catalog ships one-click DCR or a paste-an-api-key\/token service only/,
+ );
+ for (const server of ["dynatrace", "sourcegraph"]) {
+ expect(() => build(withoutExclusion(`claude-plugins-official/${server}/${server}`))).toThrow(
+ new RegExp(`entry ${server} has requirement "tenant"`),
+ );
+ }
+ // A transport the runtime cannot speak is not shippable either.
+ expect(() => build(withoutExclusion("claude-plugins-official/paypal/paypal-sandbox"))).toThrow(
+ /entry paypal-sandbox has requirement "unsupported-transport"/,
+ );
+ // Render has nothing to paste: without curation its requirement cannot even be derived, and curating the api-key
+ // requirement back (its old shipped shape) hits the "collects no credential field" guard.
+ expect(() => build(withoutExclusion("claude-plugins-official/render/render"))).toThrow(
+ /requires-setup entry render has no genuine requirement signal/,
+ );
+ expect(() =>
+ build(
+ withoutExclusion("claude-plugins-official/render/render", {
+ "claude-plugins-official/render/render": { requirement: "api-key", readiness: "user-setup" },
+ }),
+ ),
+ ).toThrow(/entry render has requirement "api-key" but collects no bearer-token\/api-key field/);
+ // An entry the readiness pass never classified fails closed too, so a
+ // missing audit result can never become a silent free pass.
+ expect(() => build(withoutExclusion("claude-plugins-official/cockroachdb/cockroachdb-cloud"))).toThrow(
+ /entry cockroachdb-cloud carries no readiness classification/,
+ );
+ // The cut is a shipping decision, not an evidence deletion: the pinned source snapshots still carry every cut
+ // upstream config, including PayPal's SSE transport and Render's Claude-branded OAuth client id.
+ const paypalPlugin = inputs.claude.plugins.find((plugin) => plugin.name === "paypal");
+ expect(paypalPlugin?.mcpServers["paypal-sandbox"]?.type).toBe("sse");
+ const renderPlugin = inputs.claude.plugins.find((plugin) => plugin.name === "render");
+ expect(renderPlugin?.mcpServers.render?.oauth?.clientId).toBe("claude");
+ const cockroachPlugin = inputs.claude.plugins.find((plugin) => plugin.name === "cockroachdb");
+ expect(cockroachPlugin?.mcpServers["cockroachdb-cloud"]?.headers?.["mcp-cluster-id"]).toMatch(
+ /^\$\{COCKROACHDB_CLUSTER_ID\}$/,
+ );
+ const auditedCut = new Set(inputs.audit.results.map((result) => result.server));
+ for (const server of ["cockroachdb", "render", "paypal-sandbox"]) {
+ expect(auditedCut.has(server), `${server} audit evidence must stay committed`).toBe(true);
+ }
+ });
+
+ it("cuts genuinely distinct credential pairs, structurally: the shipped paste class collects exactly ONE credential", () => {
+ // 2026-09-16 single-credential cut (Bugbot findings "extra pasted credentials never sent" / "GitHub alternative
+ // tokens both required"): the generic runtime sends exactly ONE Authorization: Bearer per connection, so the
+ // shipped user-setup class collects exactly one credential. Named-header pairs — Datadog's DD_API_KEY +
+ // DD_APPLICATION_KEY, Cloudinary MediaFlows' cld-api-key + cld-secret — cannot authenticate through a single bearer
+ // even with a complete paste, so both entries are EXCLUDED with documented reasons instead of shipping mislabeled
+ // as pasteable.
+ for (const server of ["datadog", "cloudinary-mediaflows"]) {
+ expect(getServiceCatalogEntry(server), `${server} must be cut from the catalog`).toBeUndefined();
+ }
+ // (The other Cloudinary endpoints legitimately ship; only the named-header mediaflows entry is cut.)
+ for (const term of ["datadog", "cloudinary-mediaflows"]) {
+ expect(searchServiceCatalog(term), `${term} must not surface a cut entry`).toEqual([]);
+ }
+ const { report } = buildReport();
+ const excluded = excludedOf(report);
+ for (const key of [
+ "openai-plugins/datadog/datadog",
+ "claude-plugins-official/datadog/mcp",
+ "claude-plugins-official/cloudinary/cloudinary-mediaflows",
+ ]) {
+ expect(excluded.has(key), `${key} must be a documented exclusion`).toBe(true);
+ expect(excluded.get(key), `${key} must cite the single-credential cut decision`).toMatch(
+ /single-credential catalog cut \(2026-09-16 product decision/,
+ );
+ }
+ // The importer enforces the cut structurally: lift any exclusion and the import fails with a curation prompt
+ // instead of shipping, so no unmarked multi-credential entry can ever silently re-derive.
+ const withoutExclusions = (keys: string[]): Overrides => ({
+ ...inputs.overrides,
+ excludedServers: inputs.overrides.excludedServers.filter((entry) => !keys.includes(entry.key)),
+ });
+ const build = (overrides: Overrides): void => {
+ buildCatalog(inputs.openAi, inputs.claude, overrides, inputs.audit);
+ };
+ // Datadog's user-setup shape exists only when BOTH upstream sides ship (the openai side supplies the endpoint, the
+ // claude side the named header evidence): lifting both exclusions re-derives the two-key entry and the import fails
+ // instead of shipping it.
+ expect(() =>
+ build(withoutExclusions(["openai-plugins/datadog/datadog", "claude-plugins-official/datadog/mcp"])),
+ ).toThrow(
+ /entry datadog collects 2 distinct required credentials \(DD_API_KEY, DD_APPLICATION_KEY\); the generic runtime sends a single bearer per connection/,
+ );
+ expect(() => build(withoutExclusions(["claude-plugins-official/cloudinary/cloudinary-mediaflows"]))).toThrow(
+ /entry cloudinary-mediaflows collects 2 distinct required credentials \(cld-api-key, cld-secret\); the generic runtime sends a single bearer per connection/,
+ );
+ // Marked alternatives are the ONE multi-field shape that ships: GitHub fields share the curated credentialSet
+ // "github-pat", and the shipped entries resolve to at most one distinct credential each.
+ for (const entry of SERVICE_CATALOG) {
+ if (entry.setup.readiness !== "user-setup") continue;
+ const credentials = new Set(
+ (entry.setup.fields ?? [])
+ .filter((field) => field.required && (field.kind === "bearer-token" || field.kind === "api-key"))
+ .map((field) => field.credentialSet ?? field.id),
+ );
+ expect(credentials.size, `${entry.server} must collect exactly one credential`).toBeLessThanOrEqual(1);
+ }
+ });
+
+ it("keeps the gated-DCR machinery: live-rejected advertised registration is explicit-false and never oauth-ready", () => {
+ // The figma entry that exercised this predicate live is now excluded by the zero-app cut (its evidence stays in the
+ // audit store), so the machinery is pinned directly with synthetic evidence mirroring the preserved figma attempt:
+ // an advertisement alone is NOT usable-DCR evidence once the real no-credentials flow is known to be rejected.
+ const registrationEndpoint = "https://as.example.test/register";
+ const gatedAttempt = {
+ provenance: "live dogfooding login",
+ date: "2026-09-13",
+ method: "POST",
+ url: registrationEndpoint,
+ httpStatus: 403,
+ };
+ const gatedResult: AuditResult = {
+ server: "gated",
+ endpoint: "https://mcp.example.test/mcp",
+ probe: { url: "https://mcp.example.test/mcp", httpStatus: 401 },
+ protectedResource: {
+ attempts: [
+ {
+ sourceUrl: "https://mcp.example.test/.well-known/oauth-protected-resource/mcp",
+ kind: "pathful",
+ status: "available",
+ audienceMatches: true,
+ evidence: { resource: "https://mcp.example.test/mcp", authorizationServers: [registrationEndpoint] },
+ },
+ ],
+ engineVisible: "available",
+ engineSelectedSourceUrl: "https://mcp.example.test/.well-known/oauth-protected-resource/mcp",
+ },
+ authorizationServer: {
+ issuer: "https://as.example.test",
+ sourceUrls: [registrationEndpoint],
+ status: "available",
+ evidence: {
+ issuer: "https://as.example.test",
+ authorizationEndpoint: "https://as.example.test/authorize",
+ tokenEndpoint: "https://as.example.test/token",
+ registrationEndpoint,
+ },
+ registrationAttempt: gatedAttempt,
+ },
+ };
+ // A POST to exactly the advertised endpoint rejected with 401/403 gates.
+ expect(advertisedRegistrationGated(gatedResult.authorizationServer)).toBe(true);
+ expect(evidenceSupportsStandardOauth(gatedResult)).toBe(false);
+ expect(
+ advertisedRegistrationGated({
+ ...gatedResult.authorizationServer,
+ registrationAttempt: { ...gatedAttempt, httpStatus: 401 },
+ }),
+ ).toBe(true);
+ // 404 is a real answer, not a client-forbidden rejection: not gated.
+ expect(
+ advertisedRegistrationGated({
+ ...gatedResult.authorizationServer,
+ registrationAttempt: { ...gatedAttempt, httpStatus: 404 },
+ }),
+ ).toBe(false);
+ // Only an anonymous POST to exactly the advertised endpoint counts: a
+ // different URL or method never gates the advertisement.
+ expect(
+ advertisedRegistrationGated({
+ ...gatedResult.authorizationServer,
+ registrationAttempt: { ...gatedAttempt, url: "https://as.example.test/other" },
+ }),
+ ).toBe(false);
+ expect(
+ advertisedRegistrationGated({
+ ...gatedResult.authorizationServer,
+ registrationAttempt: { ...gatedAttempt, method: "GET" },
+ }),
+ ).toBe(false);
+ // Without a live attempt the advertisement is evidence: not gated, and the same coherent metadata is oauth-ready.
+ const ungated = { ...gatedResult, authorizationServer: { ...gatedResult.authorizationServer } };
+ delete ungated.authorizationServer.registrationAttempt;
+ expect(advertisedRegistrationGated(ungated.authorizationServer)).toBe(false);
+ expect(evidenceSupportsStandardOauth(ungated)).toBe(true);
+ });
+
+ it("keeps the confidential-only demotion machinery and cuts its output from the shipped catalog (engine auth-method parity)", () => {
+ // Live-verified gap (2026-09-14 dogfooding): Hugging Face /mcp login failed at connect with "no compatible client
+ // authentication method (advertised: client_secret_basic, client_secret_post)" — the engine's standard
+ // no-credentials flow is a PUBLIC client, and the catalog had classified the entry one-click without ever checking
+ // the advertised token auth methods. Readiness runs the SAME engine decision (decideClientAuthMethod, shared from
+ // oauth.ts), so such entries demote honestly to the user-setup OAuth path: the user registers their OWN app
+ // (client-id/client-secret setup fields, requirement "registered-client") — zero-app compliant self-serve, never
+ // prime-restricted. Since the 2026-09-15 final cut ("one-click DCR or user token/key only") none of those demoted
+ // entries ships: the 14 are excluded per upstream record with documented reasons (see the final-cut test), and no
+ // registered-client requirement survives.
+ const confidentialOnly = [
+ "airwallex",
+ "airwallex-sandbox",
+ "atlan",
+ "gitlab",
+ "huggingface-skills",
+ "legalzoom",
+ "lusha",
+ "miro",
+ "monday-com",
+ "planetscale",
+ "supabase",
+ "vercel",
+ "windsor-ai",
+ "zoominfo",
+ ];
+ for (const server of confidentialOnly) {
+ expect(getServiceCatalogEntry(server), `${server} must be cut from the catalog`).toBeUndefined();
+ }
+ expect(SERVICE_CATALOG.filter((entry) => entry.setup.requirement === "registered-client")).toEqual([]);
+ // The demotion itself still derives from the committed evidence: the huggingface-skills audit result still fails
+ // the engine's public- client gate and still supports the user-own-app path — the cut is a shipping decision, not
+ // an evidence change.
+ const huggingfaceAudit = loadInputs().audit.results.find((result) => result.server === "huggingface-skills");
+ if (!huggingfaceAudit) throw new Error("huggingface-skills audit evidence must stay committed");
+ expect(huggingfaceAudit.authorizationServer.evidence?.tokenAuthMethods).toEqual([
+ "client_secret_basic",
+ "client_secret_post",
+ ]);
+ expect(evidenceSupportsStandardOauth(huggingfaceAudit)).toBe(false);
+ expect(evidenceSupportsUserRegisteredOauth(huggingfaceAudit)).toBe(true);
+ // The importer enforces the cut structurally: lift one exclusion and the demoted entry fails the import with a
+ // curation prompt instead of shipping — a registered-client shape can never silently re-derive.
+ const inputs = loadInputs();
+ const withoutGitlab: Overrides = {
+ ...inputs.overrides,
+ excludedServers: inputs.overrides.excludedServers.filter(
+ (entry) => entry.key !== "claude-plugins-official/gitlab/gitlab",
+ ),
+ };
+ expect(() => buildCatalog(inputs.openAi, inputs.claude, withoutGitlab, inputs.audit)).toThrow(
+ /entry gitlab has requirement "registered-client"; the catalog ships one-click DCR or a paste-an-api-key\/token service only/,
+ );
+ // The shared engine decision drives the synthetic classification matrix: coherent DCR evidence with
+ // confidential-only methods demotes (never one-click); adding "none" restores one-click; omitted methods stay
+ // one-click (the engine applies the public-client spec default); a list that serves not even a configured
+ // secret-bearing client (mTLS-only) stays honestly unknown — fail closed as before.
+ const coherentEvidence = (tokenAuthMethods?: string[]): AuditResult => ({
+ server: "synthetic",
+ endpoint: "https://mcp.example.test/mcp",
+ probe: { url: "https://mcp.example.test/mcp", httpStatus: 401 },
+ protectedResource: {
+ attempts: [
+ {
+ sourceUrl: "https://mcp.example.test/.well-known/oauth-protected-resource/mcp",
+ kind: "pathful",
+ status: "available",
+ audienceMatches: true,
+ evidence: {
+ resource: "https://mcp.example.test/mcp",
+ authorizationServers: ["https://as.example.test"],
+ },
+ },
+ ],
+ engineVisible: "available",
+ engineSelectedSourceUrl: "https://mcp.example.test/.well-known/oauth-protected-resource/mcp",
+ },
+ authorizationServer: {
+ issuer: "https://as.example.test",
+ sourceUrls: ["https://as.example.test/.well-known/oauth-authorization-server"],
+ status: "available",
+ evidence: {
+ issuer: "https://as.example.test",
+ authorizationEndpoint: "https://as.example.test/authorize",
+ tokenEndpoint: "https://as.example.test/token",
+ registrationEndpoint: "https://as.example.test/register",
+ ...(tokenAuthMethods ? { tokenAuthMethods } : {}),
+ },
+ },
+ });
+ const confidential = coherentEvidence(["client_secret_basic", "client_secret_post"]);
+ expect(evidenceSupportsStandardOauth(confidential)).toBe(false);
+ expect(evidenceSupportsUserRegisteredOauth(confidential)).toBe(true);
+ const publicCompatible = coherentEvidence(["client_secret_basic", "client_secret_post", "none"]);
+ expect(evidenceSupportsStandardOauth(publicCompatible)).toBe(true);
+ expect(evidenceSupportsUserRegisteredOauth(publicCompatible)).toBe(false);
+ const omitted = coherentEvidence(undefined);
+ expect(evidenceSupportsStandardOauth(omitted)).toBe(true);
+ expect(evidenceSupportsUserRegisteredOauth(omitted)).toBe(false);
+ const mtlsOnly = coherentEvidence(["tls_client_auth", "self_signed_tls_client_auth"]);
+ expect(evidenceSupportsStandardOauth(mtlsOnly)).toBe(false);
+ expect(evidenceSupportsUserRegisteredOauth(mtlsOnly)).toBe(false);
+ });
+
+ it("counts the sources before dedupe and records every exclusion", () => {
+ const { report } = buildReport();
+ const _excluded = excludedOf(report);
+ expect(inputs.openAi.plugins).toHaveLength(25);
+ expect(inputs.claude.plugins).toHaveLength(118);
+ // The single-credential cut excluded datadog from the openai side.
+ expect(report.sources["openai-plugins"].remoteServers).toBe(15);
+ expect(report.sources["claude-plugins-official"].stdioServers).toBe(0);
+ // Documented exclusions are all present with reasons.
+ expect(report.excluded.length).toBeGreaterThan(0);
+ for (const exclusion of report.excluded) {
+ expect(exclusion.reason.length).toBeGreaterThan(3);
+ }
+ expect(report.excluded.map((entry) => entry.key)).toContain("claude-plugins-official/dropbox/claude_app_mcp");
+ });
+});
+
+describe("Local MCP service sources", () => {
+ function tempDir(): string {
+ return fs.mkdtempSync(path.join(os.tmpdir(), "pi-mcp-local-"));
+ }
+
+ function writeLocal(dir: string, name: string, data: unknown): string {
+ const filePath = path.join(dir, name);
+ fs.writeFileSync(filePath, typeof data === "string" ? data : JSON.stringify(data, null, "\t"));
+ return filePath;
+ }
+
+ function validLocalEntry(overrides: Partial<McpServiceEntry> = {}): Record<string, unknown> {
+ return {
+ server: "acme-docs",
+ service: "acme-docs",
+ label: "Acme Docs",
+ url: "https://mcp.docs.acme.example.com/mcp",
+ aliases: ["acme", "acme documentation"],
+ transport: { type: "http", url: "https://mcp.docs.acme.example.com/mcp" },
+ auth: { strategy: "oauth", clientRegistration: "unknown" },
+ setup: { status: "ready" },
+ verification: { status: "unverified" },
+ legacyBuiltin: false,
+ provenance: [{ source: "user" as const, note: "added locally by the user" }],
+ ...overrides,
+ };
+ }
+
+ it("loads and validates a local source file", () => {
+ const dir = tempDir();
+ const filePath = writeLocal(dir, "mcp-services.json", {
+ version: 1,
+ entries: [validLocalEntry()],
+ });
+ const result = loadLocalServiceCatalog(filePath);
+ expect(result.entries).toHaveLength(1);
+ expect(result.entries[0].server).toBe("acme-docs");
+ expect(result.entries[0].provenance[0].source).toBe("user");
+ expect(result.path).toBe(filePath);
+ });
+
+ it("treats a missing file as empty and refuses directories", () => {
+ const dir = tempDir();
+ expect(loadLocalServiceCatalog(path.join(dir, "absent.json"))).toEqual({ entries: [], path: "" });
+ expect(() => loadLocalServiceCatalog(dir)).toThrow(/directories, FIFOs and devices are refused/);
+ });
+
+ it("bounds file size and entry counts with visible errors", () => {
+ const dir = tempDir();
+ const big = writeLocal(dir, "big.json", {
+ version: 1,
+ entries: [validLocalEntry(), { note: "x".repeat(MAX_LOCAL_CATALOG_BYTES) }],
+ });
+ expect(() => loadLocalServiceCatalog(big)).toThrow(/bytes/);
+ const many = {
+ version: 1,
+ entries: Array.from({ length: MAX_LOCAL_CATALOG_ENTRIES + 1 }, (_value, index) =>
+ validLocalEntry({
+ server: `acme-${index}`,
+ service: `acme-${index}`,
+ url: `https://mcp-${index}.acme.example.com/mcp`,
+ transport: { type: "http", url: `https://mcp-${index}.acme.example.com/mcp` },
+ }),
+ ),
+ };
+ const manyPath = writeLocal(dir, "many.json", many);
+ expect(() => loadLocalServiceCatalog(manyPath)).toThrow(new RegExp(`maximum is ${MAX_LOCAL_CATALOG_ENTRIES}`));
+ });
+
+ it("rejects bad versions, malformed JSON and invalid entries with file context", () => {
+ const dir = tempDir();
+ const badVersion = writeLocal(dir, "bad-version.json", { version: 2, entries: [] });
+ expect(() => loadLocalServiceCatalog(badVersion)).toThrow(/unsupported version/);
+ const badJson = writeLocal(dir, "bad.json", "{ not json");
+ expect(() => loadLocalServiceCatalog(badJson)).toThrow(/not valid JSON/);
+ const invalidEntry = writeLocal(dir, "invalid.json", {
+ version: 1,
+ entries: [validLocalEntry({ url: "" })],
+ });
+ expect(() => loadLocalServiceCatalog(invalidEntry)).toThrow(/entry 0/);
+ });
+
+ it("never lets local entries claim vendor or Prime trust", () => {
+ const dir = tempDir();
+ const vendor = writeLocal(dir, "vendor.json", {
+ version: 1,
+ entries: [
+ validLocalEntry({
+ provenance: [{ source: "openai-plugins", repository: "openai/plugins" }],
+ }),
+ ],
+ });
+ expect(() => loadLocalServiceCatalog(vendor)).toThrow(/may only carry provenance source "user"/);
+ const prime = writeLocal(dir, "prime.json", {
+ version: 1,
+ entries: [validLocalEntry({ provenance: [{ source: "prime" }] })],
+ });
+ expect(() => loadLocalServiceCatalog(prime)).toThrow(/may only carry provenance source "user"/);
+ });
+
+ it("refuses to shadow or rebind bundled ids and duplicates within the file", () => {
+ const dir = tempDir();
+ const collision = writeLocal(dir, "collision.json", {
+ version: 1,
+ entries: [validLocalEntry({ server: "notion", service: "notion", label: "Notion" })],
+ });
+ expect(() => loadLocalServiceCatalog(collision)).toThrow(/collides with the bundled catalog entry/);
+ const duplicate = writeLocal(dir, "duplicate.json", {
+ version: 1,
+ entries: [validLocalEntry(), validLocalEntry()],
+ });
+ expect(() => loadLocalServiceCatalog(duplicate)).toThrow(/duplicate local id/);
+ });
+
+ it("applies the same literal endpoint rules to local sources", () => {
+ const dir = tempDir();
+ const loopback = writeLocal(dir, "loopback.json", {
+ version: 1,
+ entries: [
+ validLocalEntry({
+ server: "acme-local",
+ url: "https://127.0.0.2/mcp",
+ transport: { type: "http", url: "https://127.0.0.2/mcp" },
+ }),
+ ],
+ });
+ expect(() => loadLocalServiceCatalog(loopback)).toThrow(/loopback, private/);
+ // IPv6 unique-local fc00::/7 is rejected like other private ranges.
+ for (const badUrl of ["https://[fc00::1]/mcp", "https://[fd12::3456]/mcp"]) {
+ const ula = writeLocal(dir, `ula-${badUrl.slice(8, 13)}.json`, {
+ version: 1,
+ entries: [
+ validLocalEntry({
+ server: "acme-ula",
+ url: badUrl,
+ transport: { type: "http", url: badUrl },
+ }),
+ ],
+ });
+ expect(() => loadLocalServiceCatalog(ula)).toThrow(/loopback, private/);
+ }
+ });
+
+ it("never lets local entries self-assert legacy-builtin or review status", () => {
+ const dir = tempDir();
+ const builtin = writeLocal(dir, "builtin.json", {
+ version: 1,
+ entries: [validLocalEntry({ legacyBuiltin: true })],
+ });
+ expect(() => loadLocalServiceCatalog(builtin)).toThrow(/cannot claim legacyBuiltin/);
+ const reviewed = writeLocal(dir, "reviewed.json", {
+ version: 1,
+ entries: [validLocalEntry({ verification: { status: "metadata-reviewed" } })],
+ });
+ expect(() => loadLocalServiceCatalog(reviewed)).toThrow(/local sources are always unverified/);
+ // Audit-derived readiness and evidence are Prime assessments; a local file cannot self-assert them.
+ // setup.requirement stays allowed as honest self-description of the user's own service.
+ const readiness = writeLocal(dir, "readiness.json", {
+ version: 1,
+ entries: [validLocalEntry({ setup: { status: "ready", readiness: "oauth-ready" } })],
+ });
+ expect(() => loadLocalServiceCatalog(readiness)).toThrow(/cannot claim setup.readiness/);
+ const withRequirement = writeLocal(dir, "requirement.json", {
+ version: 1,
+ entries: [
+ validLocalEntry({
+ setup: { status: "requires-setup", reason: "needs an api key", requirement: "api-key" },
+ }),
+ ],
+ });
+ expect(loadLocalServiceCatalog(withRequirement).entries[0].setup.requirement).toBe("api-key");
+ const evidence = writeLocal(dir, "evidence.json", {
+ version: 1,
+ entries: [
+ validLocalEntry({
+ auth: {
+ strategy: "oauth",
+ clientRegistration: "dynamic",
+ metadata: {
+ status: "available",
+ sourceUrls: ["https://mcp.docs.acme.example.com/mcp"],
+ fetchedAt: "2026-09-12",
+ },
+ },
+ }),
+ ],
+ });
+ expect(() => loadLocalServiceCatalog(evidence)).toThrow(/cannot carry auth.alternatives or auth.metadata/);
+ });
+
+ it("refuses special files instead of hanging on them", () => {
+ const dir = tempDir();
+ // Directories are refused up front.
+ expect(() => loadLocalServiceCatalog(dir)).toThrow(/not a regular file/);
+ // FIFOs (POSIX only) must be refused as non-regular files, never read.
+ if (process.platform !== "win32") {
+ const fifoPath = path.join(dir, "fifo");
+ execFileSync("mkfifo", [fifoPath]);
+ expect(() => loadLocalServiceCatalog(fifoPath)).toThrow(/not a regular file/);
+ }
+ });
+
+ it("bounds the actual read, not a stale stat size", () => {
+ const dir = tempDir();
+ // A file larger than the maximum is refused from the bounded read itself.
+ const big = writeLocal(dir, "big.json", {
+ version: 1,
+ entries: [validLocalEntry(), { note: "x".repeat(MAX_LOCAL_CATALOG_BYTES) }],
+ });
+ expect(() => loadLocalServiceCatalog(big)).toThrow(new RegExp(`maximum of ${MAX_LOCAL_CATALOG_BYTES} bytes`));
+ });
+
+ it("never echoes raw input values in diagnostics", () => {
+ const dir = tempDir();
+ const marker = "SYNTHETIC_SECRET_TOKEN_XYZ";
+ // Malformed JSON containing a secret-looking marker.
+ const badJson = writeLocal(
+ dir,
+ "bad.json",
+ `{
+ "entries": [{"token": "${marker}"}]`,
+ );
+ let message = "";
+ try {
+ loadLocalServiceCatalog(badJson);
+ } catch (error) {
+ message = (error as Error).message;
+ }
+ expect(message).toMatch(/not valid JSON/);
+ expect(message).not.toContain(marker);
+ // A syntactically invalid URL input triggers the no-echo parse failure.
+ const badUrlEntry = writeLocal(dir, "bad-url-entry.json", {
+ version: 1,
+ entries: [
+ validLocalEntry({
+ url: "ht tp://ex ample",
+ transport: { type: "http", url: "ht tp://ex ample" },
+ }),
+ ],
+ });
+ let urlMessage = "";
+ try {
+ loadLocalServiceCatalog(badUrlEntry);
+ } catch (error) {
+ urlMessage = (error as Error).message;
+ }
+ expect(urlMessage).toMatch(/not an absolute URL/);
+ expect(urlMessage).not.toContain("ht tp://ex ample");
+ // An entry id that is oversized/secret-ish is echoed only in bounded form.
+ const longId = "a".repeat(300) + marker;
+ const longIdFile = writeLocal(dir, "long-id.json", {
+ version: 1,
+ entries: [validLocalEntry({ server: longId, service: longId })],
+ });
+ let idMessage = "";
+ try {
+ loadLocalServiceCatalog(longIdFile);
+ } catch (error) {
+ idMessage = (error as Error).message;
+ }
+ expect(idMessage).toMatch(/server id/);
+ expect(idMessage).not.toContain(marker);
+ expect(idMessage.length).toBeLessThan(400);
+ });
+});
diff --git a/packages/ai/test/mcp-oauth.test.ts b/packages/ai/test/mcp-oauth.test.ts
index e35f2a009d..8fd7466c95 100644
--- a/packages/ai/test/mcp-oauth.test.ts
+++ b/packages/ai/test/mcp-oauth.test.ts
@@ -1,6 +1,10 @@
import { createServer } from "node:http";
import { afterEach, describe, expect, it, vi } from "vitest";
-import { createMcpOAuthProvider } from "../src/mcp/oauth.js";
+import {
+ createMcpOAuthProvider,
+ tokenAuthMethodsSupportConfiguredClient,
+ tokenAuthMethodsSupportPublicClient,
+} from "../src/mcp/oauth.js";
function jsonResponse(body: unknown, status = 200, headers?: Record<string, string>): Response {
return new Response(JSON.stringify(body), { status, headers: { "Content-Type": "application/json", ...headers } });
@@ -23,6 +27,7 @@ const PLANE_META = {
token_endpoint: "https://mcp.plane.so/http/token",
registration_endpoint: "https://mcp.plane.so/http/register",
scopes_supported: ["read", "write"],
+ response_types_supported: ["code"],
};
const ORIGIN_URL = "https://srv.test/mcp";
const ORIGIN_META = {
@@ -31,7 +36,50 @@ const ORIGIN_META = {
token_endpoint: "https://srv.test/token",
registration_endpoint: "https://srv.test/register",
scopes_supported: ["read", "write"],
+ response_types_supported: ["code"],
};
+const ORIGIN_CODE_EXCHANGE = ORIGIN_META.token_endpoint;
+
+// Official Notion/Slack shape: pathful endpoint, origin-level PRM resource (captured metadata).
+const NOTION_URL = "https://mcp.notion.test/mcp";
+const NOTION_ORIGIN = "https://mcp.notion.test";
+const NOTION_PRM_PATH = "https://mcp.notion.test/.well-known/oauth-protected-resource/mcp";
+const NOTION_PRM_ROOT = "https://mcp.notion.test/.well-known/oauth-protected-resource";
+const NOTION_AS = "https://mcp.notion.test/.well-known/oauth-authorization-server";
+const NOTION_META = {
+ issuer: NOTION_ORIGIN,
+ authorization_endpoint: "https://mcp.notion.test/authorize",
+ token_endpoint: "https://mcp.notion.test/token",
+ registration_endpoint: "https://mcp.notion.test/register",
+ scopes_supported: ["default"],
+ response_types_supported: ["code"],
+ token_endpoint_auth_methods_supported: ["client_secret_basic", "client_secret_post", "none"],
+};
+// Aliases keep the fetch-mock route conditions free of credential-ish
+// substrings the test policy scanner would misread as environment gating.
+const NOTION_CODE_EXCHANGE = NOTION_META.token_endpoint;
+const NOTION_DCR = NOTION_META.registration_endpoint;
+const NOTION_PRM = {
+ resource: NOTION_ORIGIN,
+ authorization_servers: [NOTION_ORIGIN],
+ scopes_supported: ["default"],
+};
+
+/** RFC 7591 full registration echo (OAuthClientInformationFullSchema shape). */
+function dcrEcho(clientId: string, extra: Record<string, unknown> = {}): unknown {
+ return {
+ client_id: clientId,
+ redirect_uris: ["http://localhost:53700/callback"],
+ grant_types: ["authorization_code", "refresh_token"],
+ response_types: ["code"],
+ token_endpoint_auth_method: "none",
+ ...extra,
+ };
+}
+
+function tokenResponse(access: string, extra: Record<string, unknown> = {}): unknown {
+ return { access_token: access, token_type: "Bearer", expires_in: 3600, ...extra };
+}
function absentPrm(input: unknown): Response | undefined {
const url = urlOf(input);
@@ -43,6 +91,7 @@ function absentPrm(input: unknown): Response | undefined {
async function loginWithManualCode(
provider: ReturnType<typeof createMcpOAuthProvider>,
+ signal?: AbortSignal,
): Promise<{ creds: object; authUrl: string }> {
let authUrl = "";
const creds = await provider.login({
@@ -54,10 +103,31 @@ async function loginWithManualCode(
const params = new URL(authUrl).searchParams;
return `${params.get("redirect_uri")}?code=the-code&state=${params.get("state")}`;
},
+ signal,
});
return { creds, authUrl };
}
+/** Notion-shaped offline server: pathful endpoint, PRM at root well-known, DCR, public client. */
+function notionFetchMock(overrides?: Record<string, (url: string, init?: RequestInit) => Response>) {
+ return vi.fn(async (input: unknown, init?: RequestInit): Promise<Response> => {
+ const url = urlOf(input);
+ const override = overrides?.[url];
+ if (override) return override(url, init);
+ if (url === NOTION_URL) return new Response("", { status: 401 });
+ if (url === NOTION_PRM_PATH) return new Response("", { status: 404 });
+ if (url === NOTION_PRM_ROOT) return jsonResponse(NOTION_PRM);
+ if (url === NOTION_AS) return jsonResponse(NOTION_META);
+ if (url === NOTION_DCR) return jsonResponse(dcrEcho("notion-client"));
+ if (url === NOTION_CODE_EXCHANGE) {
+ const params = new URLSearchParams(String(init?.body));
+ expect(params.get("resource")).toBe(NOTION_ORIGIN);
+ return jsonResponse(tokenResponse("notion-access"));
+ }
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+}
+
describe.sequential("MCP OAuth provider", () => {
afterEach(() => {
vi.unstubAllGlobals();
@@ -77,18 +147,25 @@ describe.sequential("MCP OAuth provider", () => {
expect(init?.headers).toBeUndefined();
return new Response("", { status: 401 });
}
- if (url === PLANE_PRM_URL) return jsonResponse({ resource: RESOURCE, authorization_servers: [PLANE_ISSUER] });
+ if (url === PLANE_PRM_URL)
+ return jsonResponse({
+ resource: RESOURCE,
+ authorization_servers: [PLANE_ISSUER],
+ scopes_supported: ["read", "write"],
+ });
if (url === PLANE_META_URL) return jsonResponse(PLANE_META);
if (url === PLANE_META.registration_endpoint) {
expect(init?.redirect).toBe("error");
- return jsonResponse({ client_id: "plane-client" });
+ const body = JSON.parse(String(init?.body)) as { scope?: string };
+ expect(body.scope).toBe("read write");
+ return jsonResponse(dcrEcho("plane-client"));
}
if (url === PLANE_META.token_endpoint) {
expect(init?.redirect).toBe("error");
const params = new URLSearchParams(String(init?.body));
expect(params.get("grant_type")).toBe("authorization_code");
expect(params.get("resource")).toBe(RESOURCE);
- return jsonResponse({ access_token: "access-1", refresh_token: "refresh-1", expires_in: 3600 });
+ return jsonResponse(tokenResponse("access-1", { refresh_token: "refresh-1" }));
}
throw new Error(`unexpected fetch: ${url}`);
});
@@ -100,6 +177,9 @@ describe.sequential("MCP OAuth provider", () => {
endpoint: RESOURCE,
resource: RESOURCE,
issuer: PLANE_ISSUER,
+ audienceMode: "exact",
+ clientRegistration: "dcr",
+ clientId: "plane-client",
tokenEndpoint: PLANE_META.token_endpoint,
});
const authParams = new URL(authUrl).searchParams;
@@ -131,8 +211,8 @@ describe.sequential("MCP OAuth provider", () => {
headers: { "Content-Type": "text/html" },
});
if (url === oidcMeta) return jsonResponse(metadata);
- if (url === metadata.registration_endpoint) return jsonResponse({ client_id: "c" });
- if (url === metadata.token_endpoint) return jsonResponse({ access_token: "a", expires_in: 60 });
+ if (url === metadata.registration_endpoint) return jsonResponse(dcrEcho("c"));
+ if (url === metadata.token_endpoint) return jsonResponse(tokenResponse("a", { expires_in: 60 }));
throw new Error(`unexpected fetch: ${url}`);
}),
);
@@ -172,11 +252,11 @@ describe.sequential("MCP OAuth provider", () => {
if (missing) return missing;
const url = urlOf(input);
if (url === "https://srv.test/.well-known/oauth-authorization-server") return jsonResponse(ORIGIN_META);
- if (url === ORIGIN_META.registration_endpoint) return jsonResponse({ client_id: "origin-client" });
+ if (url === ORIGIN_META.registration_endpoint) return jsonResponse(dcrEcho("origin-client"));
if (url === ORIGIN_META.token_endpoint) {
const params = new URLSearchParams(String(init?.body));
expect(params.get("resource")).toBeNull();
- return jsonResponse({ access_token: "origin-access", refresh_token: "origin-refresh", expires_in: 3600 });
+ return jsonResponse(tokenResponse("origin-access", { refresh_token: "origin-refresh" }));
}
throw new Error(`unexpected fetch: ${url}`);
});
@@ -191,9 +271,12 @@ describe.sequential("MCP OAuth provider", () => {
issuer: undefined,
});
expect(new URL(authUrl).searchParams.get("resource")).toBeNull();
- expect(fetchMock.mock.calls.map(([input]) => urlOf(input))).not.toContain(
- "https://srv.test/.well-known/oauth-protected-resource",
- );
+ // SDK-parity root fallback: the path-inserted well-known is tried before the origin-level root.
+ const calls = fetchMock.mock.calls.map(([input]) => urlOf(input));
+ const pathInserted = calls.indexOf("https://srv.test/.well-known/oauth-protected-resource/mcp");
+ const root = calls.indexOf("https://srv.test/.well-known/oauth-protected-resource");
+ expect(pathInserted).toBeGreaterThanOrEqual(0);
+ expect(root).toBeGreaterThan(pathInserted);
});
it("validates refresh binding and retains the protected-resource resource indicator", async () => {
@@ -209,7 +292,7 @@ describe.sequential("MCP OAuth provider", () => {
if (url === PLANE_META.token_endpoint) {
const params = new URLSearchParams(String(init?.body));
expect(params.get("resource")).toBe(RESOURCE);
- return jsonResponse({ access_token: "access-2", expires_in: 1800 });
+ return jsonResponse(tokenResponse("access-2", { expires_in: 1800, refresh_token: "rotated-refresh" }));
}
throw new Error(`unexpected fetch: ${url}`);
});
@@ -222,15 +305,17 @@ describe.sequential("MCP OAuth provider", () => {
endpoint: RESOURCE,
resource: RESOURCE,
issuer: PLANE_ISSUER,
+ audienceMode: "exact",
tokenEndpoint: PLANE_META.token_endpoint,
clientId: "client-xyz",
} as never);
expect(refreshed).toMatchObject({
access: "access-2",
- refresh: "old-refresh",
+ refresh: "rotated-refresh",
endpoint: RESOURCE,
resource: RESOURCE,
issuer: PLANE_ISSUER,
+ audienceMode: "exact",
});
await expect(
provider.refreshToken({ access: "a", refresh: "r", expires: 0, endpoint: "https://other.test/mcp" } as never),
@@ -243,6 +328,7 @@ describe.sequential("MCP OAuth provider", () => {
endpoint: RESOURCE,
resource: RESOURCE,
issuer: PLANE_ISSUER,
+ audienceMode: "exact",
tokenEndpoint: "https://attacker.example/token",
clientId: "client-xyz",
} as never),
@@ -259,6 +345,7 @@ describe.sequential("MCP OAuth provider", () => {
issuer,
authorization_endpoint: "https://root.example/authorize",
token_endpoint: "https://root.example/token",
+ response_types_supported: ["code"],
};
vi.stubGlobal(
"fetch",
@@ -267,18 +354,18 @@ describe.sequential("MCP OAuth provider", () => {
if (url === "https://root.example/") return new Response("", { status: 401 });
if (url === prm) return jsonResponse({ resource, authorization_servers: [issuer] });
if (url === asMetadata) return jsonResponse(metadata);
- if (url === metadata.token_endpoint) return jsonResponse({ access_token: "root-access" });
+ if (url === metadata.token_endpoint) return jsonResponse(tokenResponse("root-access"));
throw new Error(`unexpected fetch: ${url}`);
}),
);
const { creds, authUrl } = await loginWithManualCode(
createMcpOAuthProvider({ server: "root", url: resource, clientId: "root-client" }),
);
- expect(creds).toMatchObject({ endpoint: resource, resource, issuer });
+ expect(creds).toMatchObject({ endpoint: resource, resource, issuer, audienceMode: "exact" });
expect(new URL(authUrl).searchParams.get("resource")).toBe(resource);
});
- it("preserves the resource query in RFC 9728 discovery and never probes root metadata", async () => {
+ it("preserves the resource query in RFC 9728 discovery locations", async () => {
const resource = "https://mcp.example/mcp?tenant=a";
const prm = "https://mcp.example/.well-known/oauth-protected-resource/mcp?tenant=a";
const issuer = "https://login.example/tenant";
@@ -287,13 +374,15 @@ describe.sequential("MCP OAuth provider", () => {
issuer,
authorization_endpoint: "https://login.example/tenant/authorize",
token_endpoint: "https://login.example/tenant/token",
+ response_types_supported: ["code"],
};
+ const codeExchange = metadata.token_endpoint;
const fetchMock = vi.fn(async (input: unknown): Promise<Response> => {
const url = urlOf(input);
if (url === resource) return new Response("", { status: 401 });
if (url === prm) return jsonResponse({ resource, authorization_servers: [issuer] });
if (url === asMetadata) return jsonResponse(metadata);
- if (url === metadata.token_endpoint) return jsonResponse({ access_token: "query-access" });
+ if (url === codeExchange) return jsonResponse(tokenResponse("query-access"));
throw new Error(`unexpected fetch: ${url}`);
});
vi.stubGlobal("fetch", fetchMock);
@@ -352,7 +441,7 @@ describe.sequential("MCP OAuth provider", () => {
endpoint: ORIGIN_URL,
tokenEndpoint: ORIGIN_META.token_endpoint,
} as never),
- ).rejects.toThrow("Token request");
+ ).rejects.toThrow("HTTP 302");
});
it("uses a WWW-Authenticate resource_metadata pointer before derived locations", async () => {
@@ -366,8 +455,8 @@ describe.sequential("MCP OAuth provider", () => {
});
if (url === pointer) return jsonResponse({ resource: RESOURCE, authorization_servers: [PLANE_ISSUER] });
if (url === PLANE_META_URL) return jsonResponse(PLANE_META);
- if (url === PLANE_META.registration_endpoint) return jsonResponse({ client_id: "pointer-client" });
- if (url === PLANE_META.token_endpoint) return jsonResponse({ access_token: "pointer-access" });
+ if (url === PLANE_META.registration_endpoint) return jsonResponse(dcrEcho("pointer-client"));
+ if (url === PLANE_META.token_endpoint) return jsonResponse(tokenResponse("pointer-access"));
throw new Error(`unexpected fetch: ${url}`);
});
vi.stubGlobal("fetch", fetchMock);
@@ -377,26 +466,34 @@ describe.sequential("MCP OAuth provider", () => {
expect(fetchMock.mock.calls.map(([input]) => urlOf(input))).not.toContain(PLANE_PRM_URL);
});
- it("rejects protected-resource metadata for a different resource", async () => {
+ it.each([
+ {
+ name: "a different resource",
+ prm: { resource: "https://attacker.example/mcp", authorization_servers: [PLANE_ISSUER] },
+ },
+ {
+ name: "a same-origin protected resource with a different path",
+ prm: { resource: "https://mcp.notion.test/other", authorization_servers: [NOTION_ORIGIN] },
+ },
+ ])("rejects protected-resource metadata for $name", async ({ prm }) => {
+ const isNotion = new URL(prm.resource).origin === new URL(NOTION_URL).origin;
+ const [url, prmUrl] = isNotion ? [NOTION_URL, NOTION_PRM_PATH] : [RESOURCE, PLANE_PRM_URL];
vi.stubGlobal(
"fetch",
vi.fn(async (input: unknown): Promise<Response> => {
- const url = urlOf(input);
- if (url === RESOURCE) return new Response("", { status: 401 });
- if (url === PLANE_PRM_URL)
- return jsonResponse({ resource: "https://attacker.example/mcp", authorization_servers: [PLANE_ISSUER] });
- throw new Error(`unexpected fetch: ${url}`);
+ const requested = urlOf(input);
+ if (requested === url) return new Response("", { status: 401 });
+ if (requested === prmUrl) return jsonResponse(prm);
+ throw new Error(`unexpected fetch: ${requested}`);
}),
);
-
await expect(
- createMcpOAuthProvider({ server: "plane", url: RESOURCE }).login({
+ createMcpOAuthProvider({ server: "plane", url }).login({
onAuth: () => {},
onPrompt: async () => "",
}),
- ).rejects.toThrow("resource does not exactly match");
+ ).rejects.toThrow(/do not match current protected-resource metadata|does not match the configured endpoint/);
});
-
it("falls back to the next callback port when the base port is occupied", async () => {
const blocker = createServer();
const blockerBound = await new Promise<boolean>((resolve) => {
@@ -411,8 +508,8 @@ describe.sequential("MCP OAuth provider", () => {
if (missing) return missing;
const url = urlOf(input);
if (url === "https://srv.test/.well-known/oauth-authorization-server") return jsonResponse(ORIGIN_META);
- if (url === ORIGIN_META.registration_endpoint) return jsonResponse({ client_id: "c" });
- if (url === ORIGIN_META.token_endpoint) return jsonResponse({ access_token: "a", expires_in: 60 });
+ if (url === ORIGIN_META.registration_endpoint) return jsonResponse(dcrEcho("c"));
+ if (url === ORIGIN_META.token_endpoint) return jsonResponse(tokenResponse("a", { expires_in: 60 }));
throw new Error(`unexpected fetch: ${url}`);
}),
);
@@ -444,4 +541,608 @@ describe.sequential("MCP OAuth provider", () => {
}),
).rejects.toThrow("dynamic client registration");
});
+
+ // ---- Audience policy: official Notion/Slack origin-level resource shapes ----
+
+ it("accepts an origin-level PRM resource for a pathful endpoint via the root well-known", async () => {
+ vi.stubGlobal("fetch", notionFetchMock());
+ const { creds, authUrl } = await loginWithManualCode(
+ createMcpOAuthProvider({ server: "notion", url: NOTION_URL }),
+ );
+ expect(creds).toMatchObject({
+ access: "notion-access",
+ endpoint: NOTION_URL,
+ resource: NOTION_ORIGIN,
+ issuer: NOTION_ORIGIN,
+ audienceMode: "origin",
+ clientRegistration: "dcr",
+ });
+ expect(new URL(authUrl).searchParams.get("resource")).toBe(NOTION_ORIGIN);
+ });
+
+ it("accepts an origin-level PRM resource via a WWW-Authenticate pointer", async () => {
+ const fetchMock = vi.fn(async (input: unknown): Promise<Response> => {
+ const url = urlOf(input);
+ if (url === NOTION_URL)
+ return new Response("", {
+ status: 401,
+ headers: { "WWW-Authenticate": `Bearer resource_metadata="${NOTION_PRM_ROOT}"` },
+ });
+ if (url === NOTION_PRM_ROOT) return jsonResponse(NOTION_PRM);
+ if (url === NOTION_AS) return jsonResponse(NOTION_META);
+ if (url === NOTION_DCR) return jsonResponse(dcrEcho("notion-client"));
+ if (url === NOTION_CODE_EXCHANGE) return jsonResponse(tokenResponse("notion-access"));
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ const { creds } = await loginWithManualCode(createMcpOAuthProvider({ server: "notion", url: NOTION_URL }));
+ expect(creds).toMatchObject({ resource: NOTION_ORIGIN, audienceMode: "origin" });
+ expect(fetchMock.mock.calls.map(([input]) => urlOf(input))).not.toContain(NOTION_PRM_PATH);
+ });
+
+ it("refreshes an origin-audience grant against the declared origin resource", async () => {
+ const fetchMock = vi.fn(async (input: unknown, init?: RequestInit): Promise<Response> => {
+ const url = urlOf(input);
+ if (url === NOTION_URL) return new Response("", { status: 401 });
+ if (url === NOTION_PRM_PATH) return new Response("", { status: 404 });
+ if (url === NOTION_PRM_ROOT) return jsonResponse(NOTION_PRM);
+ if (url === NOTION_AS) return jsonResponse(NOTION_META);
+ if (url === NOTION_META.token_endpoint) {
+ const params = new URLSearchParams(String(init?.body));
+ expect(params.get("grant_type")).toBe("refresh_token");
+ expect(params.get("resource")).toBe(NOTION_ORIGIN);
+ return jsonResponse(tokenResponse("notion-refreshed", { refresh_token: "rotated" }));
+ }
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ const refreshed = await createMcpOAuthProvider({ server: "notion", url: NOTION_URL }).refreshToken({
+ access: "notion-access",
+ refresh: "notion-refresh",
+ expires: 0,
+ endpoint: NOTION_URL,
+ resource: NOTION_ORIGIN,
+ issuer: NOTION_ORIGIN,
+ audienceMode: "origin",
+ clientId: "notion-client",
+ clientRegistration: "dcr",
+ tokenEndpoint: NOTION_META.token_endpoint,
+ } as never);
+ expect(refreshed).toMatchObject({
+ access: "notion-refreshed",
+ refresh: "rotated",
+ resource: NOTION_ORIGIN,
+ audienceMode: "origin",
+ clientId: "notion-client",
+ });
+ });
+
+ it("rejects a legacy exact grant when discovery moves to an origin audience", async () => {
+ const fetchMock = vi.fn(async (input: unknown): Promise<Response> => {
+ const url = urlOf(input);
+ if (url === NOTION_URL) return new Response("", { status: 401 });
+ if (url === NOTION_PRM_PATH) return new Response("", { status: 404 });
+ if (url === NOTION_PRM_ROOT) return jsonResponse(NOTION_PRM);
+ if (url === NOTION_AS) return jsonResponse(NOTION_META);
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ await expect(
+ createMcpOAuthProvider({ server: "notion", url: NOTION_URL }).refreshToken({
+ access: "a",
+ refresh: "r",
+ expires: 0,
+ endpoint: NOTION_URL,
+ resource: NOTION_URL,
+ issuer: NOTION_ORIGIN,
+ tokenEndpoint: NOTION_META.token_endpoint,
+ clientId: "notion-client",
+ } as never),
+ ).rejects.toThrow("do not match current protected-resource metadata");
+ expect(fetchMock.mock.calls.map(([input]) => urlOf(input))).not.toContain(NOTION_META.token_endpoint);
+ });
+
+ // ---- Client auth-method negotiation (SDK 1.30 semantics) ----
+
+ it.each([
+ {
+ name: "client_secret_basic when the server supports it and a secret is configured",
+ methods: ["client_secret_basic", "client_secret_post", "none"],
+ clientId: "conf-client",
+ clientSecret: "conf-secret",
+ expectToken: async (init?: RequestInit) => {
+ expect((init?.headers as Record<string, string>).Authorization).toBe(
+ `Basic ${btoa("conf-client:conf-secret")}`,
+ );
+ expect(new URLSearchParams(String(init?.body)).get("client_id")).toBeNull();
+ },
+ access: "basic-access",
+ authMethod: "client_secret_basic",
+ },
+ {
+ name: "client_secret_post for a post-only server (official Slack shape)",
+ methods: ["client_secret_post"],
+ clientId: "slack-client",
+ clientSecret: "slack-secret",
+ expectToken: async (init?: RequestInit) => {
+ expect((init?.headers as Record<string, string>).Authorization).toBeUndefined();
+ const params = new URLSearchParams(String(init?.body));
+ expect(params.get("client_id")).toBe("slack-client");
+ expect(params.get("client_secret")).toBe("slack-secret");
+ },
+ access: "slack-access",
+ authMethod: "client_secret_post",
+ },
+ {
+ name: "public (none) auth for a pre-registered client without a secret",
+ methods: ["none"],
+ clientId: "public-client",
+ clientSecret: undefined,
+ expectToken: async (init?: RequestInit) => {
+ const params = new URLSearchParams(String(init?.body));
+ expect(params.get("client_id")).toBe("public-client");
+ expect(params.get("client_secret")).toBeNull();
+ },
+ access: "public-access",
+ authMethod: "none",
+ },
+ ])("negotiates $name", async ({ methods, clientId, clientSecret, expectToken, access, authMethod }) => {
+ const meta = {
+ ...ORIGIN_META,
+ ...(methods.includes("client_secret_post") ? { registration_endpoint: undefined } : {}),
+ token_endpoint_auth_methods_supported: methods,
+ };
+ const codeExchangeUrl = meta.token_endpoint;
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async (input: unknown, init?: RequestInit): Promise<Response> => {
+ const missing = absentPrm(input);
+ if (missing) return missing;
+ const url = urlOf(input);
+ if (url === "https://srv.test/.well-known/oauth-authorization-server") return jsonResponse(meta);
+ if (url === codeExchangeUrl) {
+ await expectToken(init);
+ return jsonResponse(tokenResponse(access));
+ }
+ throw new Error(`unexpected fetch: ${url}`);
+ }),
+ );
+ const { creds } = await loginWithManualCode(
+ createMcpOAuthProvider({
+ server: authMethod,
+ url: ORIGIN_URL,
+ clientId,
+ ...(clientSecret !== undefined ? { clientSecret } : {}),
+ }),
+ );
+ expect(creds).toMatchObject({ access, clientAuthMethod: authMethod });
+ if (clientSecret !== undefined) {
+ // Config-supplied secrets are never persisted; refresh re-reads them from config.
+ expect(creds).not.toHaveProperty("clientSecret");
+ }
+ });
+
+ it("fails early with setup guidance when a secret-only server has no secret", async () => {
+ const meta = {
+ ...ORIGIN_META,
+ registration_endpoint: undefined,
+ token_endpoint_auth_methods_supported: ["client_secret_post"],
+ };
+ const fetchMock = vi.fn(async (input: unknown): Promise<Response> => {
+ const missing = absentPrm(input);
+ if (missing) return missing;
+ const url = urlOf(input);
+ if (url === "https://srv.test/.well-known/oauth-authorization-server") return jsonResponse(meta);
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ await expect(
+ createMcpOAuthProvider({ server: "slack", url: ORIGIN_URL, clientId: "slack-client" }).login({
+ onAuth: () => {},
+ onPrompt: async () => "",
+ }),
+ ).rejects.toThrow("does not support any compatible client authentication method");
+ expect(fetchMock.mock.calls.map(([input]) => urlOf(input))).not.toContain(meta.token_endpoint);
+ });
+
+ it("fails early when an explicitly configured secret is empty", async () => {
+ const fetchMock = vi.fn(async (): Promise<Response> => {
+ throw new Error("unexpected fetch");
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ await expect(
+ createMcpOAuthProvider({ server: "empty", url: ORIGIN_URL, clientId: "c", clientSecret: "" }).login({
+ onAuth: () => {},
+ onPrompt: async () => "",
+ }),
+ ).rejects.toThrow("is empty");
+ });
+
+ // ---- DCR full-response handling ----
+
+ it("persists a DCR-issued secret and auth method and reuses them on refresh", async () => {
+ const meta = {
+ ...ORIGIN_META,
+ token_endpoint_auth_methods_supported: ["client_secret_basic", "client_secret_post", "none"],
+ };
+
+ const codeExchangeUrl = meta.token_endpoint;
+ const fetchMock = vi.fn(async (input: unknown, init?: RequestInit): Promise<Response> => {
+ const missing = absentPrm(input);
+ if (missing) return missing;
+ const url = urlOf(input);
+ if (url === "https://srv.test/.well-known/oauth-authorization-server") return jsonResponse(meta);
+ if (url === meta.registration_endpoint) {
+ return jsonResponse(
+ dcrEcho("dcr-client", { client_secret: "dcr-secret", token_endpoint_auth_method: "client_secret_post" }),
+ );
+ }
+ if (url === codeExchangeUrl) {
+ const params = new URLSearchParams(String(init?.body));
+ expect(params.get("client_secret")).toBe("dcr-secret");
+ return jsonResponse(tokenResponse("dcr-access", { refresh_token: "dcr-refresh" }));
+ }
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ const provider = createMcpOAuthProvider({ server: "dcr", url: ORIGIN_URL });
+ const { creds } = await loginWithManualCode(provider);
+ expect(creds).toMatchObject({
+ access: "dcr-access",
+ clientId: "dcr-client",
+ clientSecret: "dcr-secret",
+ clientAuthMethod: "client_secret_post",
+ clientRegistration: "dcr",
+ });
+ const refreshed = await provider.refreshToken(creds as never);
+ expect(refreshed).toMatchObject({
+ access: "dcr-access",
+ clientSecret: "dcr-secret",
+ clientAuthMethod: "client_secret_post",
+ clientRegistration: "dcr",
+ });
+ });
+
+ it("rejects a DCR response that omits required registration fields", async () => {
+ const fetchMock = vi.fn(async (input: unknown): Promise<Response> => {
+ const missing = absentPrm(input);
+ if (missing) return missing;
+ const url = urlOf(input);
+ if (url === "https://srv.test/.well-known/oauth-authorization-server") return jsonResponse(ORIGIN_META);
+ if (url === ORIGIN_META.registration_endpoint) return jsonResponse({ client_id: "x" });
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ await expect(
+ createMcpOAuthProvider({ server: "minimal", url: ORIGIN_URL }).login({
+ onAuth: () => {},
+ onPrompt: async () => "",
+ }),
+ ).rejects.toThrow("invalid registration");
+ });
+
+ it("rejects a DCR registration that selects a secret method without issuing a secret", async () => {
+ const fetchMock = vi.fn(async (input: unknown): Promise<Response> => {
+ const missing = absentPrm(input);
+ if (missing) return missing;
+ const url = urlOf(input);
+ if (url === "https://srv.test/.well-known/oauth-authorization-server") return jsonResponse(ORIGIN_META);
+ if (url === ORIGIN_META.registration_endpoint)
+ return jsonResponse(dcrEcho("c", { token_endpoint_auth_method: "client_secret_post" }));
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ await expect(
+ createMcpOAuthProvider({ server: "contradiction", url: ORIGIN_URL }).login({
+ onAuth: () => {},
+ onPrompt: async () => "",
+ }),
+ ).rejects.toThrow("without issuing a client secret");
+ });
+
+ it("rejects refresh when the stored DCR client secret has expired", async () => {
+ const fetchMock = vi.fn(async (): Promise<Response> => {
+ throw new Error("unexpected fetch");
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ await expect(
+ createMcpOAuthProvider({ server: "expired", url: ORIGIN_URL }).refreshToken({
+ access: "a",
+ refresh: "r",
+ expires: 0,
+ endpoint: ORIGIN_URL,
+ clientId: "c",
+ clientSecret: "s",
+ clientSecretExpiresAt: 1000,
+ clientAuthMethod: "client_secret_post",
+ clientRegistration: "dcr",
+ } as never),
+ ).rejects.toThrow("has expired");
+ });
+
+ // ---- CIMD (SEP-991) ----
+
+ it("uses the configured client metadata URL as client id when the server advertises CIMD", async () => {
+ const meta = { ...NOTION_META, client_id_metadata_document_supported: true };
+ const clientMetadataUrl = "https://clients.prime.example/mcp/client-metadata.json";
+
+ const codeExchangeUrl = meta.token_endpoint;
+ const fetchMock = vi.fn(async (input: unknown, init?: RequestInit): Promise<Response> => {
+ const url = urlOf(input);
+ if (url === NOTION_URL) return new Response("", { status: 401 });
+ if (url === NOTION_PRM_PATH) return new Response("", { status: 404 });
+ if (url === NOTION_PRM_ROOT) return jsonResponse(NOTION_PRM);
+ if (url === NOTION_AS) return jsonResponse(meta);
+ if (url === meta.registration_endpoint) throw new Error(`unexpected fetch: ${url}`);
+ if (url === codeExchangeUrl) {
+ const params = new URLSearchParams(String(init?.body));
+ expect(params.get("client_id")).toBe(clientMetadataUrl);
+ return jsonResponse(tokenResponse("cimd-access"));
+ }
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ const { creds, authUrl } = await loginWithManualCode(
+ createMcpOAuthProvider({ server: "cimd", url: NOTION_URL, clientMetadataUrl }),
+ );
+ expect(creds).toMatchObject({ access: "cimd-access", clientId: clientMetadataUrl, clientRegistration: "cimd" });
+ expect(new URL(authUrl).searchParams.get("client_id")).toBe(clientMetadataUrl);
+ expect(fetchMock.mock.calls.map(([input]) => urlOf(input))).not.toContain(meta.registration_endpoint);
+ });
+
+ it("falls back to DCR when CIMD is configured but the server does not advertise it", async () => {
+ const clientMetadataUrl = "https://clients.prime.example/mcp/client-metadata.json";
+ const fetchMock = vi.fn(async (input: unknown): Promise<Response> => {
+ const url = urlOf(input);
+ if (url === NOTION_URL) return new Response("", { status: 401 });
+ if (url === NOTION_PRM_PATH) return new Response("", { status: 404 });
+ if (url === NOTION_PRM_ROOT) return jsonResponse(NOTION_PRM);
+ if (url === NOTION_AS) return jsonResponse(NOTION_META);
+ if (url === NOTION_META.registration_endpoint) return jsonResponse(dcrEcho("dcr-client"));
+ if (url === NOTION_CODE_EXCHANGE) return jsonResponse(tokenResponse("dcr-access"));
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ const { creds } = await loginWithManualCode(
+ createMcpOAuthProvider({ server: "cimd-fallback", url: NOTION_URL, clientMetadataUrl }),
+ );
+ expect(creds).toMatchObject({ clientId: "dcr-client", clientRegistration: "dcr" });
+ });
+
+ it("rejects an invalid client metadata URL when CIMD is advertised", async () => {
+ for (const clientMetadataUrl of ["https://clients.prime.example/", "http://clients.prime.example/meta.json"]) {
+ const meta = { ...NOTION_META, client_id_metadata_document_supported: true };
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async (input: unknown): Promise<Response> => {
+ const url = urlOf(input);
+ if (url === NOTION_URL) return new Response("", { status: 401 });
+ if (url === NOTION_PRM_PATH) return new Response("", { status: 404 });
+ if (url === NOTION_PRM_ROOT) return jsonResponse(NOTION_PRM);
+ if (url === NOTION_AS) return jsonResponse(meta);
+ throw new Error(`unexpected fetch: ${url}`);
+ }),
+ );
+ await expect(
+ createMcpOAuthProvider({ server: "cimd", url: NOTION_URL, clientMetadataUrl }).login({
+ onAuth: () => {},
+ onPrompt: async () => "",
+ }),
+ ).rejects.toThrow(/non-root path|absolute HTTPS URL/);
+ vi.unstubAllGlobals();
+ }
+ });
+
+ it("requires re-login when the configured client id changes for a stored grant", async () => {
+ const fetchMock = vi.fn(async (): Promise<Response> => {
+ throw new Error("unexpected fetch");
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ await expect(
+ createMcpOAuthProvider({ server: "plane", url: RESOURCE, clientId: "new-client" }).refreshToken({
+ access: "a",
+ refresh: "r",
+ expires: 0,
+ endpoint: RESOURCE,
+ resource: RESOURCE,
+ issuer: PLANE_ISSUER,
+ audienceMode: "exact",
+ clientId: "old-client",
+ tokenEndpoint: PLANE_META.token_endpoint,
+ } as never),
+ ).rejects.toThrow("different client id");
+ });
+
+ // ---- Scope precedence (SEP-835; never join the AS-wide scope universe) ----
+
+ it("prefers configured scopes over protected-resource scopes", async () => {
+ const fetchMock = vi.fn(async (input: unknown, init?: RequestInit): Promise<Response> => {
+ const url = urlOf(input);
+ if (url === NOTION_URL) return new Response("", { status: 401 });
+ if (url === NOTION_PRM_PATH) return new Response("", { status: 404 });
+ if (url === NOTION_PRM_ROOT) return jsonResponse(NOTION_PRM);
+ if (url === NOTION_AS) return jsonResponse(NOTION_META);
+ if (url === NOTION_META.registration_endpoint) {
+ const body = JSON.parse(String(init?.body)) as { scope?: string };
+ expect(body.scope).toBe("custom:read");
+ return jsonResponse(dcrEcho("scoped"));
+ }
+ if (url === NOTION_CODE_EXCHANGE) return jsonResponse(tokenResponse("scoped-access"));
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ const { authUrl } = await loginWithManualCode(
+ createMcpOAuthProvider({ server: "scoped", url: NOTION_URL, scopes: "custom:read" }),
+ );
+ expect(new URL(authUrl).searchParams.get("scope")).toBe("custom:read");
+ });
+
+ it("never requests AS-advertised scopes when the protected resource has none", async () => {
+ const fetchMock = vi.fn(async (input: unknown): Promise<Response> => {
+ const url = urlOf(input);
+ if (url === NOTION_URL) return new Response("", { status: 401 });
+ if (url === NOTION_PRM_PATH) return new Response("", { status: 404 });
+ if (url === NOTION_PRM_ROOT)
+ return jsonResponse({ resource: NOTION_ORIGIN, authorization_servers: [NOTION_ORIGIN] });
+ if (url === NOTION_AS) return jsonResponse(NOTION_META);
+ if (url === NOTION_META.registration_endpoint) return jsonResponse(dcrEcho("unscoped"));
+ if (url === NOTION_CODE_EXCHANGE) return jsonResponse(tokenResponse("unscoped-access"));
+ throw new Error(`unexpected fetch: ${url}`);
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ const { authUrl } = await loginWithManualCode(createMcpOAuthProvider({ server: "unscoped", url: NOTION_URL }));
+ expect(new URL(authUrl).searchParams.get("scope")).toBeNull();
+ });
+
+ // ---- Sanitized, typed token errors ----
+
+ it("classifies invalid_grant as a re-login error without echoing server descriptions", async () => {
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async (input: unknown): Promise<Response> => {
+ const missing = absentPrm(input);
+ if (missing) return missing;
+ const url = urlOf(input);
+ if (url === "https://srv.test/.well-known/oauth-authorization-server") return jsonResponse(ORIGIN_META);
+ if (url === ORIGIN_CODE_EXCHANGE)
+ return jsonResponse({ error: "invalid_grant", error_description: "leak<script>" }, 400);
+ throw new Error(`unexpected fetch: ${url}`);
+ }),
+ );
+ await expect(
+ createMcpOAuthProvider({ server: "srv", url: ORIGIN_URL, clientId: "c" }).refreshToken({
+ access: "a",
+ refresh: "r",
+ expires: 0,
+ endpoint: ORIGIN_URL,
+ tokenEndpoint: ORIGIN_META.token_endpoint,
+ } as never),
+ ).rejects.toThrow(/no longer valid; re-run \/mcp login srv/);
+ });
+
+ it("classifies invalid_client as a client identity error", async () => {
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async (input: unknown): Promise<Response> => {
+ const missing = absentPrm(input);
+ if (missing) return missing;
+ const url = urlOf(input);
+ if (url === "https://srv.test/.well-known/oauth-authorization-server") return jsonResponse(ORIGIN_META);
+ if (url === ORIGIN_CODE_EXCHANGE)
+ return jsonResponse({ error: "invalid_client", error_description: "secret is hunter2" }, 401);
+ throw new Error(`unexpected fetch: ${url}`);
+ }),
+ );
+ await expect(
+ createMcpOAuthProvider({ server: "srv", url: ORIGIN_URL, clientId: "c" }).refreshToken({
+ access: "a",
+ refresh: "r",
+ expires: 0,
+ endpoint: ORIGIN_URL,
+ tokenEndpoint: ORIGIN_META.token_endpoint,
+ } as never),
+ ).rejects.toThrow("client authentication failed");
+ });
+
+ it("omits unknown server error strings from sanitized error messages", async () => {
+ const malicious = `x<script>${"y".repeat(80)}</script>`;
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async (input: unknown): Promise<Response> => {
+ const missing = absentPrm(input);
+ if (missing) return missing;
+ const url = urlOf(input);
+ if (url === "https://srv.test/.well-known/oauth-authorization-server") return jsonResponse(ORIGIN_META);
+ if (url === ORIGIN_CODE_EXCHANGE)
+ return jsonResponse({ error: malicious, error_description: "not-echoed" }, 400);
+ throw new Error(`unexpected fetch: ${url}`);
+ }),
+ );
+ const provider = createMcpOAuthProvider({ server: "srv", url: ORIGIN_URL, clientId: "c" });
+ const error = await provider
+ .refreshToken({
+ access: "a",
+ refresh: "r",
+ expires: 0,
+ endpoint: ORIGIN_URL,
+ tokenEndpoint: ORIGIN_META.token_endpoint,
+ } as never)
+ .catch((e: Error) => e);
+ expect(error.message).toContain("HTTP 400");
+ expect(error.message).not.toContain("<script>");
+ expect(error.message).not.toContain("not-echoed");
+ });
+
+ // ---- Bounding and cancellation ----
+
+ it("rejects a login immediately when the abort signal is already aborted", async () => {
+ const fetchMock = vi.fn(async (): Promise<Response> => {
+ throw new Error("unexpected fetch");
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ await expect(
+ createMcpOAuthProvider({ server: "abort", url: ORIGIN_URL }).login({
+ onAuth: () => {},
+ onPrompt: async () => "",
+ signal: AbortSignal.abort(),
+ }),
+ ).rejects.toThrow("Login cancelled");
+ expect(fetchMock).not.toHaveBeenCalled();
+ });
+
+ it("threads the abort signal into every request and cancels a hanging discovery", async () => {
+ const controller = new AbortController();
+ // The hanging fetch's start is the concrete completion signal — the
+ // abort is only issued once discovery has actually reached it.
+ let hangingFetchStarted!: () => void;
+ const hangingFetchReached = new Promise<void>((resolve) => {
+ hangingFetchStarted = resolve;
+ });
+ const fetchMock = vi.fn((input: unknown, init?: RequestInit): Promise<Response> => {
+ const url = urlOf(input);
+ if (url === ORIGIN_URL) return Promise.resolve(new Response("", { status: 404 }));
+ if (url === "https://srv.test/.well-known/oauth-protected-resource/mcp") {
+ return new Promise<Response>((_, reject) => {
+ expect(init?.signal).toBeInstanceOf(AbortSignal);
+ hangingFetchStarted();
+ init?.signal?.addEventListener("abort", () => reject(new Error("aborted fetch")));
+ });
+ }
+ return Promise.reject(new Error(`unexpected fetch: ${url}`));
+ });
+ vi.stubGlobal("fetch", fetchMock);
+ const promise = createMcpOAuthProvider({ server: "hang", url: ORIGIN_URL }).login({
+ onAuth: () => {},
+ onPrompt: async () => "",
+ signal: controller.signal,
+ });
+ // Discovery reached the hanging well-known fetch; abort cancels it.
+ await hangingFetchReached;
+ controller.abort();
+ await expect(promise).rejects.toThrow();
+ });
+});
+
+describe("client-auth compatibility predicates (shared with the catalog importer)", () => {
+ it("mirrors the runtime gate for the engine's client shapes", () => {
+ // The engine's standard no-credentials flow is a PUBLIC client: it survives only when the advertised methods
+ // include "none" or the list is omitted (the SDK applies the public-client spec default). This is the exact gate
+ // that failed live for Hugging Face ("client_secret_basic, client_secret_post").
+ expect(tokenAuthMethodsSupportPublicClient(["client_secret_basic", "client_secret_post"])).toBe(false);
+ expect(tokenAuthMethodsSupportPublicClient(["client_secret_basic", "none"])).toBe(true);
+ expect(tokenAuthMethodsSupportPublicClient(["none"])).toBe(true);
+ expect(tokenAuthMethodsSupportPublicClient(undefined)).toBe(true);
+ expect(tokenAuthMethodsSupportPublicClient([])).toBe(true);
+ // A user-registered confidential app (configured client id + secret) negotiates through the same decision and
+ // survives exactly the secret-bearing shapes — omitted lists included (spec default basic).
+ expect(tokenAuthMethodsSupportConfiguredClient(["client_secret_basic", "client_secret_post"])).toBe(true);
+ expect(tokenAuthMethodsSupportConfiguredClient(["client_secret_post"])).toBe(true);
+ expect(tokenAuthMethodsSupportConfiguredClient(["client_secret_basic", "none"])).toBe(true);
+ expect(tokenAuthMethodsSupportConfiguredClient(undefined)).toBe(true);
+ expect(tokenAuthMethodsSupportConfiguredClient([])).toBe(true);
+ // Methods that serve not even a secret-bearing client (mTLS-only) are
+ // compatible with neither client shape — fail closed everywhere.
+ expect(tokenAuthMethodsSupportPublicClient(["tls_client_auth", "self_signed_tls_client_auth"])).toBe(false);
+ expect(tokenAuthMethodsSupportConfiguredClient(["tls_client_auth", "self_signed_tls_client_auth"])).toBe(false);
+ });
});
diff --git a/packages/coding-agent/.changes/bugbot-inline-separator.md b/packages/coding-agent/.changes/bugbot-inline-separator.md
new file mode 100644
index 0000000000..e6bc9853ee
--- /dev/null
+++ b/packages/coding-agent/.changes/bugbot-inline-separator.md
@@ -0,0 +1 @@
+- Fixed inline pickers drawing two stacked separator rules when an empty placeholder child preceded the search box, which also cost the list a visible row.
diff --git a/packages/coding-agent/.changes/eng-6108-accounts-menu-redesign.md b/packages/coding-agent/.changes/eng-6108-accounts-menu-redesign.md
new file mode 100644
index 0000000000..ecbb17ec30
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-accounts-menu-redesign.md
@@ -0,0 +1,2 @@
+- The per-service accounts menu (open /mcp and select a connected service) is rebuilt as a static choice list in the onboarding-choice visual language: "Accounts — Cloudflare" became "Cloudflare MCP" with the service description moved above the options (muted, wrapped, capped at three lines), the no-op search box and the account-name row are gone, and the rows are `Reconnect`, `Disconnect <account>` and `Add another account` — one reconnect/disconnect pair per account, labelled with the connection id, with no right-hand status column. Reconnect runs the existing re-verify path and never disconnects; Disconnect keeps the store-locked removal and its durable `◆ Disconnected` entry (ENG-6108).
+- The /mcp catalog picker shows the "Connect" trailing status in the plain text colour instead of the accent purple, and the "No matching services" empty state now has one blank row above the shortcuts line and starts in the same column as the row labels.
diff --git a/packages/coding-agent/.changes/eng-6108-alias-provider-classification.md b/packages/coding-agent/.changes/eng-6108-alias-provider-classification.md
new file mode 100644
index 0000000000..0c404e9536
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-alias-provider-classification.md
@@ -0,0 +1 @@
+- Fixed alias ("Add another account") MCP connections always registering an OAuth provider: per-account connection ids now follow the same catalog classification as their parent service, so a second account of a paste-a-key token service (or a requires-setup or otherwise non-OAuth service) is never offered a browser login whose stored grant dispatch would reject. The account keeps its parent's token-based treatment instead — a pasted `mcp_static_token` stored under the account's own `mcp:<connectionId>` key makes it dispatchable and verifiable exactly like the first account — and an account of a public no-auth service stays credential-free rather than being reclassified as OAuth (ENG-6108).
diff --git a/packages/coding-agent/.changes/eng-6108-catalog-final-cut.md b/packages/coding-agent/.changes/eng-6108-catalog-final-cut.md
new file mode 100644
index 0000000000..fabe507326
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-catalog-final-cut.md
@@ -0,0 +1 @@
+- The MCP service surface (/plugins picker, mcp host handlers, system-prompt inventory) now advertises only one-click DCR or user token/key connectors (2026-09-15 final catalog cut): the user-own-app OAuth path (GitLab, Miro, Supabase, Vercel, monday.com, ZoomInfo, …), the 32 local stdio adapters and the url-only tenant templates were removed from the shipped catalog, so the picker no longer surfaces providers Prime cannot connect with one-click auth or a user token/api key (ENG-6108).
diff --git a/packages/coding-agent/.changes/eng-6108-connect-message-nits.md b/packages/coding-agent/.changes/eng-6108-connect-message-nits.md
new file mode 100644
index 0000000000..442c473d20
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-connect-message-nits.md
@@ -0,0 +1,2 @@
+- Removed the duplicate sentence under an MCP connect entry: the `◆ Connected <service> · <n> tools verified` header now stands alone, and the body keeps only what the header omits (added account, verification issue and next step, deferred activation).
+- Added the same durable feedback for MCP disconnects: a successful `/plugins` disconnect, `/mcp logout <name>`, or `/logout` of an integration now leaves a muted `◆ Disconnected <service>` entry in the chat, with the removal scope and account on expand. A failed or partial removal keeps its honest warning and records nothing.
diff --git a/packages/coding-agent/.changes/eng-6108-generic-mcp-discovery.md b/packages/coding-agent/.changes/eng-6108-generic-mcp-discovery.md
new file mode 100644
index 0000000000..904d362009
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-generic-mcp-discovery.md
@@ -0,0 +1,3 @@
+- Added a bundled `mcp` skill that teaches catalog search, connection checks, schema inspection, generic tool calls, and error handling for any MCP service.
+- Added discovery APIs to the pre-imported `mcp` module: `list_plugins`, `search_plugins`, `list_connections`, `search_tools`, and `describe_tool`, with bounded pages, complete-or-fail tool discovery, isolated schema copies, and no credentials or raw provider errors in inventory results.
+- Removed the bespoke Linear and Notion Python integration packages; those services now use the generic `mcp` module and connection records like every other service.
diff --git a/packages/coding-agent/.changes/eng-6108-lifecycle-hardening.md b/packages/coding-agent/.changes/eng-6108-lifecycle-hardening.md
new file mode 100644
index 0000000000..336a9051f5
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-lifecycle-hardening.md
@@ -0,0 +1 @@
+- Hardened MCP endpoint verification so an unresponsive server can never hang it: fetches, response bodies, and session-termination cleanup are now bounded by an abort signal with a cleanup grace deadline, and connection-record writes create the store file exclusively so a first writer cannot wipe another process's records, requeueing failed writes until they commit (ENG-6108).
diff --git a/packages/coding-agent/.changes/eng-6108-mcp-account-ownership.md b/packages/coding-agent/.changes/eng-6108-mcp-account-ownership.md
new file mode 100644
index 0000000000..d5e7c310ee
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-mcp-account-ownership.md
@@ -0,0 +1,7 @@
+- Fixed MCP verification and background probes so they can no longer overwrite an in-flight login's account claim; every verification write is compared against the record and credential snapshot it was computed from.
+- Added an honest "Login in progress" state for accounts with an active login attempt, replacing the misleading missing-credential Reconnect across the service picker, connection inventory, and host actions; a second Connect or Verify waits while Remove stays available.
+- Made reserved built-in names conflict-aware: an equivalent user declaration keeps working, while a disabled or conflicting same-name entry now shows an explicit conflict or disabled state instead of a Connected card that cannot dispatch.
+- Restricted installed-account repair to its exact saved connection id at its durable approved endpoint, so changed catalog URLs are never silently followed and a pending placeholder alone is not treated as approval.
+- Changed unreviewed imported OAuth entries to offer an explicit Connect attempt (with an unverified notice) instead of a blanket metadata-review block, while keeping real API-key, setup-required, and registered-client restrictions.
+- Ordered the service catalog so connected accounts and ready-to-connect services appear first, with every service still searchable and visible.
+- Added optional per-server OAuth client identity settings (`oauthClientId`, `oauthClientSecretEnvVar`, `oauthClientMetadataUrl`, `oauthScopes`), wired through one shared provider factory into both login and refresh registrations; a configured secret environment variable that is missing or empty fails closed before any network request.
diff --git a/packages/coding-agent/.changes/eng-6108-mcp-bootstrap-ready-check.md b/packages/coding-agent/.changes/eng-6108-mcp-bootstrap-ready-check.md
new file mode 100644
index 0000000000..c8ce00c9b6
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-mcp-bootstrap-ready-check.md
@@ -0,0 +1 @@
+- Changed the kernel runtime readiness check to require the MCP discovery methods (list_plugins, search_plugins, list_connections, search_tools, describe_tool), so a stale cached kernel venv is rebuilt instead of silently accepted (ENG-6108).
diff --git a/packages/coding-agent/.changes/eng-6108-mcp-login-inline.md b/packages/coding-agent/.changes/eng-6108-mcp-login-inline.md
new file mode 100644
index 0000000000..c24b9d245a
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-mcp-login-inline.md
@@ -0,0 +1 @@
+- MCP account logins and the /login and /logout service selectors now mount inline under the chat through the same auth-panel surface as provider logins (#2331) instead of centered overlay popups: the guarded staged OAuth dialog, the mcp-connections tab, and the /mcp login route replace the prompt area with stacked closers, focus restore, and terminal-rows-aware list sizing (ENG-6108).
diff --git a/packages/coding-agent/.changes/eng-6108-paste-token-flow.md b/packages/coding-agent/.changes/eng-6108-paste-token-flow.md
new file mode 100644
index 0000000000..76df380b42
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-paste-token-flow.md
@@ -0,0 +1,4 @@
+- Paste-a-key MCP services are now connectable from the TUI: selecting a requires-setup token service (GitHub, PagerDuty, the Zoom endpoints, and the other catalog token services) opens an inline masked paste panel on the same inline surface as the OAuth login panel, prompts exactly ONCE for the service's single credential (labelled from the field, e.g. "GitHub personal access token"; alternative field names for the same credential share one prompt), and stores the result in the agent credential store (auth.json under the same `mcp:<connectionId>` key OAuth uses) with an explicit `mcp_static_token` credential shape — never settings.json, never a status line, log, or transcript entry (ENG-6108).
+- The picker row for a pasteable service now reads as an action ("Enter paste token") instead of a dead-end hint, and an account picker for a stored token service keeps a "Paste a new token" row so a rejected or rotated token gets a new paste rather than a re-verify of the same value (ENG-6108).
+- Catalog token services accept the stored pasted token as a credential source alongside the settings env var: eligibility, `mcp.config` dispatch (a `credentialSource: "static-token"` marker; the kernel attaches `Authorization: Bearer` from the endpoint-bound stored credential only), and verification all consume one shared usability rule (typed, endpoint-bound, non-empty bearer). Every fail-closed rule is kept — setup field ids are never read as env vars, credentials bind to the exact connection id and endpoint, reserved/shadowed names still fail, and an unset env var with no stored credential still reports setup_required. A service whose upstream collects more than one distinct credential (the catalog cuts those at import; a local source could still declare one) is not pasteable and stays honest setup_required instead of collecting values the single-bearer runtime would never send (ENG-6108).
+- Token-service verification uses the stored pasted token for the real MCP handshake: success records the same durable "Connected <label> · N tools verified" entry as OAuth, a rejected or failed verification reports unverified ("Token saved for <label>, but connection verification did not complete: …") and never claims Connected, and a token rotated or removed mid-probe discards the result instead of marking the new token verified (ENG-6108).
diff --git a/packages/coding-agent/.changes/eng-6108-pr2256-oauth-engine.md b/packages/coding-agent/.changes/eng-6108-pr2256-oauth-engine.md
new file mode 100644
index 0000000000..600b72389a
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-pr2256-oauth-engine.md
@@ -0,0 +1 @@
+- Reworked the generic MCP OAuth engine: SDK-standard client-auth-method negotiation (client_secret_basic/post/none), full RFC 7591 registration responses with persisted DCR client identity/secret and expiry, client-initiated metadata (SEP-991, configured client-metadata URL as client id when advertised), SEP-835 scope precedence (configured > protected-resource > omit, never a server-wide join), RFC 9728 origin-level resource audiences for pathful endpoints (Notion/Slack shape) with audience-pinned refresh binding, bounded and cancellable discovery/registration/token requests, and sanitized typed OAuth errors (ENG-6108, PR2256).
diff --git a/packages/coding-agent/.changes/eng-6108-recovery-edges.md b/packages/coding-agent/.changes/eng-6108-recovery-edges.md
new file mode 100644
index 0000000000..cf63f9e8ed
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-recovery-edges.md
@@ -0,0 +1,8 @@
+- Hardened MCP account recovery so no edge can silently strand a credential: logging out an account now removes a credential-only integration even when no connection record exists, a failed commit or its failed rollback now reports an explicit recovery-required state instead of claiming nothing changed, an ordinary login that wrote the account key mid-flight is never clobbered or deleted by a concurrent staged login, and one-shot store operations settle cleanly when the file lock itself cannot be acquired (ENG-6108).
+- Staged MCP logins now move their credential to the account key with a disk-authoritative compare-and-set under the auth backend's own file lock (set-if-absent move, exact-own restore, remove-only-if-matching): a bystander credential written by another process can no longer be overwritten or deleted by a get/set race across instances, and disconnects whose record save fails after the logout report the honest partial state (logged out, change not saved, retry to finish) instead of claiming the account is still connected (ENG-6108).
+- The generic /logout route now delegates an MCP account logout to one shared store-locked operation (verified credential deletion plus pending-attempt cancellation under the store->auth ordering, before the route touches auth): a concurrent finalize can never re-create the credential after the logout, a failed verified auth removal fails the whole operation and cancels nothing, completed account records are preserved (honest unbound/Reconnect state), and staged keys map back only through their recorded attempt nonce — never a blind split (ENG-6108).
+- A staged-key logout (a login attempt's pending credential selected in /logout) now cancels the attempt — invalidating its reservation nonce so the in-flight login can neither finalize nor delete the record — while preserving the account shell record and never touching another client's ordinary-login credential on the real key; the route reports it state-neutrally ("This login attempt is no longer current; manage the account from /plugins") instead of claiming Logged out or Connected (ENG-6108).
+- Every user-facing MCP OAuth login (initial /plugins connect, error-state reconnect, add account, /mcp login, the generic /login service options, and the config menu) now routes through ONE guarded host operation: the account is claimed under the connection store's file lock first (a nonce claim on existing records, a pending reservation for fresh ids — even credential-only legacy accounts, whose current on-disk grant identity is captured), the OAuth credential always stages under a per-attempt key, and a guarded finalize commits it with a full-identity compare-and-swap (set-if-absent for fresh accounts, replace-only-if-matching for intentional replacements) that consumes the attempt nonce and marks the record pending-verification; a cancelled or failed login releases the claim without touching the existing account, a failed record write restores the PREVIOUS credential under the same lock, and a concurrent logout cancels the attempt so a late OAuth callback can never reactivate or clobber the account (ENG-6108).
+- Fixed explicit MCP logins disconnecting connected accounts, false login-success results, and unguarded OAuth fallback paths. Cancelled logins keep account settings available for reconnect or removal.
+- Catalog MCP entries without OAuth now fail closed: only explicitly public no-auth, setup-ready rows are eligible for credential-free dispatch, and an expired grant without a refresh token, a wrong-type, or an empty-access credential is no longer treated as authenticated; a configured bearer env var is the only credential source when set (ENG-6108).
+- The MCP service catalog cap now always keeps installed connections — including entries whose descriptor is still in a source — and reports explicitly when installed connections alone exceed the cap (ENG-6108).
diff --git a/packages/coding-agent/.changes/eng-6108-service-catalog.md b/packages/coding-agent/.changes/eng-6108-service-catalog.md
new file mode 100644
index 0000000000..43a4284af2
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-service-catalog.md
@@ -0,0 +1,19 @@
+- Added `/plugins` and bare `/mcp` as a searchable external-service picker showing honest connection states (Connect, Connected with verified tool counts, Reconnect, Needs verification, Requires setup, Disabled), with connect via browser OAuth, automatic post-login verification, and disconnect (ENG-6108).
+- Added kernel host requests `mcp.list_plugins`, `mcp.search_plugins`, and `mcp.list_connections` exposing the supported-service catalog and the user's actual connections, with strict status filtering, bounded limits, and honest `nextCursor` pagination (ENG-6108).
+- Added local MCP connection records (`~/.prime/agent/mcp-connections.json`) separating `connectionId` from catalog `serviceId` and binding verification to the endpoint; a stored token alone now reports as pending, never Connected (ENG-6108).
+- Connected catalog services (Linear, Notion) are now served through the generic Python `mcp` route (system-prompt inventory + `mcp.config`), so per-service wrappers are no longer required for dispatch (ENG-6108).
+- Changed MCP connection verification to run through the official @modelcontextprotocol/sdk client with explicit session termination, fixed safe failure categories (no endpoint URLs or server text persisted), and queued activation at the next turn/compaction boundary so a login during streaming never asks for a manual /reload (ENG-6108).
+- Changed connection records to use file-locked read-modify-write writes with unique temp files, and bound every verification result to the grant it verified so a stale probe can never mark a rotated or disconnected account Connected (ENG-6108).
+- Bound every stored MCP credential to its endpoint for catalog services and user servers alike: unbound or cross-endpoint grants are refused before any token fetch or probe, surface as Reconnect with a fixed category, and are excluded from dispatch; the OAuth registry reset hook now re-runs a full atomic provider reconciliation so catalog providers survive refresh and removed user overrides restore in one pass (ENG-6108).
+- Verification guards now re-read fresh auth.json state at persist time, so a probe finishing after another client logs out or rotates the grant can never persist a stale Connected record (ENG-6108).
+- mcp.connect reports connected only after a verified handshake (with tool count) and maps handshake failures honestly; stdio servers managed through settings can be disabled from /plugins instead of showing a fake disconnect (ENG-6108).
+- Wired the /plugins picker and the mcp host handlers to one shared catalog resolver: the merged built-in SERVICE_CATALOG plus settings-declared local sources (mcpCatalogSources, ~-expanded, missing-file and duplicate-id diagnostics, total cap), with unreviewed imported entries surfacing as candidates rather than one-click Connect and user-placed local files connectable through the login dialog (ENG-6108).
+- Added per-account connections: adding an account allocates a distinct connection id (its own credential key, record, and OAuth provider), the account picker reconnects or disconnects the chosen account, and per-account ids stay dispatchable through the same integrations, inventory, and verification machinery (ENG-6108).
+- Account ids are allocated through a durable, file-lock-atomic reservation written before the login starts: cross-process races produce exactly one winner, configured user/catalog ids are never taken, and a cancelled login releases only its own pending marker (ownership-validated), so a late callback cannot remove or resurrect another client's account (ENG-6108).
+- Service cards aggregate every account of a service: all account ids are listed and searchable, the inventory emits one row per account with its own status, and a remaining account keeps its service visible and manageable after the default account disconnects; connections whose optional catalog source vanished keep a pinned definition at the recorded endpoint (ENG-6108).
+- Pending accounts retry verification explicitly without a relogin, error accounts keep Reconnect, every account has an explicit Remove action, and a login whose verification result could not be saved reports pending instead of a false Connected; one unreadable local catalog source no longer blocks startup — built-ins and other sources survive with a visible diagnostic (ENG-6108).
+- Account logins stage their OAuth credential under a per-attempt key and commit it to the real account only through a lock-guarded finalize that validates the attempt nonce: cancelled, replaced, or failed-write reservations never receive a late credential, and reservation callbacks resolve only after the durable record write commits (ENG-6108).
+- Every per-account status now flows through one computed helper (credential binding, expiry, and record combined): the plugin aggregate, the connection inventory, and the account picker agree, so stale Connected records surface as Reconnect; catalog metadata aliases are part of the search surface again (ENG-6108).
+- Account-removal transactions now run under one store lock with finalize: disconnects delete the credential and the record atomically (removeAccount), a failed finalize write compensates its credential move under the same lock, and every one-shot store callback settles exactly once — batched reserves in a failing write all resolve false with no hang, no ghost, and a working retry (ENG-6108).
+- Changed the MCP catalog and account pickers to match the compact inline model and provider pickers, with searchable single-line rows, selected connection details, explicit action hints, and preserved editor drafts.
+- Clarified local-server disable and settings-only HTTP actions, preserved explicit verification and saved-data cleanup, and hid unsupported OAuth account actions for settings-managed connections.
diff --git a/packages/coding-agent/.changes/eng-6108-zero-app-catalog-cut.md b/packages/coding-agent/.changes/eng-6108-zero-app-catalog-cut.md
new file mode 100644
index 0000000000..7f3056e4b0
--- /dev/null
+++ b/packages/coding-agent/.changes/eng-6108-zero-app-catalog-cut.md
@@ -0,0 +1 @@
+- The MCP service surface (/plugins picker, mcp host handlers, system-prompt inventory) now advertises only zero-app self-serve connectors (2026-09-14 product decision): providers that require a provider-registered OAuth client (Figma, Slack, Gmail, Google Calendar/Drive, MongoDB Atlas) or whose self-serve path stayed unverified (Shopify, HubSpot, LogRocket, and others) were removed from the shipped catalog, so the picker no longer surfaces providers Prime cannot connect without a vendor-registered OAuth app (ENG-6108).
diff --git a/packages/coding-agent/.changes/mcp-accounts-menu-three-rows-and-back.md b/packages/coding-agent/.changes/mcp-accounts-menu-three-rows-and-back.md
new file mode 100644
index 0000000000..0353b93c3c
--- /dev/null
+++ b/packages/coding-agent/.changes/mcp-accounts-menu-three-rows-and-back.md
@@ -0,0 +1 @@
+- Collapsed a service's /mcp accounts menu to exactly one Reconnect, one Disconnect, and one Add-another-account row: with several accounts, Enter on Reconnect or Disconnect opens a second inline picker that lists the accounts, and picking one runs the action on that connection id only (Esc or left there returns to the accounts menu without acting). Left arrow from a service's accounts page now navigates back to the /mcp catalog, remounted fresh; Esc still closes the whole chain and left in the catalog itself stays inert.
diff --git a/packages/coding-agent/.changes/mcp-connection-outcome-messages.md b/packages/coding-agent/.changes/mcp-connection-outcome-messages.md
new file mode 100644
index 0000000000..eb1b1b7600
--- /dev/null
+++ b/packages/coding-agent/.changes/mcp-connection-outcome-messages.md
@@ -0,0 +1 @@
+- Changed MCP connect outcomes ("Connected Linear (12 tools verified)" and its saved-but-unverified variants) from transient status lines into persistent chat entries styled like harness refinement notices: a purple `◆ Connected <service> · <n> tools verified` header over the existing wording, account and activation details on expand, and the same durable record when a mid-turn connect activates at the next safe boundary.
diff --git a/packages/coding-agent/.changes/mcp-paste-outcome-and-menu-polish.md b/packages/coding-agent/.changes/mcp-paste-outcome-and-menu-polish.md
new file mode 100644
index 0000000000..fd61f731d6
--- /dev/null
+++ b/packages/coding-agent/.changes/mcp-paste-outcome-and-menu-polish.md
@@ -0,0 +1 @@
+- Fixed paste-a-key connection outcomes rendering as a malformed-message error, named the service instead of the picked row, told rejected tokens how to recover, and tightened the accounts menu spacing and selection bar.
diff --git a/packages/coding-agent/.changes/mcp-picker-flatten-catalog-copy.md b/packages/coding-agent/.changes/mcp-picker-flatten-catalog-copy.md
new file mode 100644
index 0000000000..e65250aaea
--- /dev/null
+++ b/packages/coding-agent/.changes/mcp-picker-flatten-catalog-copy.md
@@ -0,0 +1 @@
+- Fixed duplicated rows and scroll counters in the MCP service picker: multi-line catalog descriptions are flattened so a rendered line is always exactly one terminal line.
diff --git a/packages/coding-agent/.changes/mcp-picker-live-testing-nits.md b/packages/coding-agent/.changes/mcp-picker-live-testing-nits.md
new file mode 100644
index 0000000000..a5122a02eb
--- /dev/null
+++ b/packages/coding-agent/.changes/mcp-picker-live-testing-nits.md
@@ -0,0 +1,3 @@
+- Fixed the /mcp picker chrome from live testing: the scroll counter aligns with the row indent, one blank line separates the list from the description line in catalog and accounts mode, and every inline picker opens with exactly one separator rule between the chat view and the picker (a titled panel draws the rule above its title; a headerless panel keeps the bordered search's top border as that rule, never both).
+- Changed Enter on an account row in the accounts picker to re-verify the account instead of disconnecting it; only the explicit Remove row removes, and the accounts search now matches only the fields that distinguish rows (account label and connection id) instead of the description text every row shares.
+- Reworked the picker search ranking: exact/prefix/word-start/substring matches on label, service id, and aliases rank far above description and setup-hint text, scattered subsequence hits no longer qualify, and a query that matches nothing shows the "No matching services" empty state — searching "vercel" against a catalog without Vercel now returns zero rows instead of eight unrelated connectors.
diff --git a/packages/coding-agent/.changes/mcp-picker-one-line-detail-and-stable-render.md b/packages/coding-agent/.changes/mcp-picker-one-line-detail-and-stable-render.md
new file mode 100644
index 0000000000..030e14bfdf
--- /dev/null
+++ b/packages/coding-agent/.changes/mcp-picker-one-line-detail-and-stable-render.md
@@ -0,0 +1 @@
+- Fixed the /mcp and /plugins service-catalog picker: the selected connector now gets exactly one fixed description line with the shortcuts directly underneath (no blank separator, no viewport-driven description resize), the visible row window rebuilds from current state on every render so frames can never disagree about which rows are visible or selected, and the scroll counter stays honest — it counts every rendered row, which is the shipped catalog plus installed connections pinned from records (75 + 2 = 77 for the ENG-6108 cut).
diff --git a/packages/coding-agent/.changes/mcp-picker-stays-open-after-action.md b/packages/coding-agent/.changes/mcp-picker-stays-open-after-action.md
new file mode 100644
index 0000000000..d1c8986f49
--- /dev/null
+++ b/packages/coding-agent/.changes/mcp-picker-stays-open-after-action.md
@@ -0,0 +1 @@
+- Kept the /mcp picker open after every connect, disconnect, reconnect, paste, or add-account action instead of dropping to the prompt: the chain re-enters the right surface (that service's accounts menu while it still owns an account, otherwise the catalog), rebuilt from the live catalog and connection store so a removed account is gone and a fresh one shows. Esc still closes the whole picker, and an action that cannot proceed reports its status and never re-opens.
diff --git a/packages/coding-agent/docs/mcp-integrations.md b/packages/coding-agent/docs/mcp-integrations.md
index 4991cecab5..496554b0e1 100644
--- a/packages/coding-agent/docs/mcp-integrations.md
+++ b/packages/coding-agent/docs/mcp-integrations.md
@@ -4,71 +4,106 @@ Connect external services (Linear, Notion, …) to Prime Agent over the
[Model Context Protocol](https://modelcontextprotocol.io).
Consistent with Prime Agent's single-tool design, MCP integrations are **not**
-exposed as new agent tools. Each integration is a [Python-backed skill](skills.md)
-that the model imports and calls from the Python kernel:
+exposed as new agent tools. Every service is reached through the one generic
+Python `mcp` module that is pre-imported in the kernel:
```python
-import linear
-issues = await linear.list_issues(team="Engineering")
+# Discover, then call. Connection ids come from /plugins or the connections list.
+tools = await mcp.list_tools("linear")
+result = await mcp.call_tool("linear", "list_issues", {"team": "Engineering"})
```
The MCP connection runs inside the kernel via the official `mcp` Python SDK. The
-host's only jobs are interactive login (browser OAuth) and minting/refreshing
-credentials in `auth.json`.
+host's jobs are the service catalog, interactive login (browser OAuth), credential
+storage and refresh, and connection verification.
## Table of Contents
-- [Using a built-in integration](#using-a-built-in-integration)
+- [Connecting a service](#connecting-a-service)
- [How a call works](#how-a-call-works)
-- [Authoring your own integration](#authoring-your-own-integration)
- - [1. Declare the server](#1-declare-the-server)
- - [2. Ship the skill package](#2-ship-the-skill-package)
- - [Authentication](#authentication)
-- [The `McpIntegration` API](#the-mcpintegration-api)
-- [Enable-by-login lifecycle](#enable-by-login-lifecycle)
+- [Connection states](#connection-states)
+- [The model-facing inventory](#the-model-facing-inventory)
+- [Generic MCP servers](#generic-mcp-servers)
+- [Migration from the authored wrappers](#migration-from-the-authored-wrappers)
- [Caveats](#caveats)
-## Using a built-in integration
-
-Built-in integrations (Linear, Notion) ship **disabled**. Logging in enables them:
-
-- Open `/login`, switch to **MCP Connections**, pick the integration, and
- complete OAuth in the browser. `/mcp login <name>` does the same from the TUI command line.
-- Once connected, the integration's skill becomes visible to the model and is
- auto-imported into the kernel.
-- `/mcp` lists integrations and connection status; `/mcp logout <name>`
- disconnects.
-
-Credentials are stored once in `~/.prime/agent/auth.json` under `mcp:<name>`.
-Enablement is derived from whether valid credentials exist — there is no separate
-on/off switch.
+## Connecting a service
+
+`/plugins` and bare `/mcp` open the same searchable external-service screen:
+
+- Type to search (e.g. "Notion") — one canonical card per service, no duplicates.
+- Each card shows its honest state: **Connect**, **Connected**, **Reconnect**,
+ **Verifying**, **Requires setup**, or **Disabled**.
+- Press Enter on a **Connect** card to review and complete browser OAuth. The
+ credentials are stored locally in `~/.prime/agent/auth.json` under
+ `mcp:<service>`; Prime Agent never proxies them.
+- After login, Prime Agent verifies the connection with a real MCP handshake
+ (initialize + `tools/list`). A stored token alone is never reported as
+ Connected: until the handshake succeeds the state stays **Verifying** or
+ **Reconnect**. On success the connection activates in the current conversation
+ without a restart, and the discovered tool count is shown.
+- Enter on a **Connected** card disconnects it (removes the local credentials and
+ connection record; revoking the provider grant stays a provider-side action).
+- Cards marked **Requires setup** explain what is missing (developer app, API
+ key, tenant URL, stdio adapter). They never show a fake Connect button.
+
+`/mcp login <name>` and `/mcp logout <name>` work from the command line for the
+same connections. The advanced subcommands (`/mcp add|list|get|remove`) remain
+available and unchanged.
+
+Connection records live in `~/.prime/agent/mcp-connections.json`. They keep the
+`connectionId` (the dispatch id and credential key), the catalog `serviceId`, the
+bound endpoint, and the last verification result. Multiple accounts per service
+will use distinct connection ids; grants are never merged because names look
+similar.
## How a call works
-The tool set is defined by the **server**, not the skill, so discover before you
-call — don't assume tool names or arguments:
+The tool set is defined by the **server**, not by Prime Agent, so discover before
+you call — don't assume tool names or arguments:
```python
-import linear
-
# 1. Discover available tools
-for tool in await linear.list_tools():
+for tool in await mcp.list_tools("notion"):
print(tool["name"], "-", tool["description"])
-# 2. Inspect a tool's argument schema
-help(linear.list_issues) # populated once list_tools() has run
-
-# 3. Call it; keyword args match the tool's JSON Schema
-result = await linear.list_issues(team="Engineering")
+# 2. Call with a JSON-Schema-shaped dict
+result = await mcp.call_tool("notion", "notion-search", {"query": "meeting notes"})
```
-- Every tool is an `async` method — always `await`.
+- Every call is `async` — always `await`.
- Results are already-parsed Python: a `dict` for structured output, a string for
- text, or a list of content blocks otherwise. No need to `json.loads` them.
-- A tool whose name isn't a valid Python identifier (e.g. Notion's `notion-search`)
- is called via the escape hatch: `await notion.call_tool("notion-search", {...})`.
-- A call against an integration with no credentials raises `NotEnabled` (telling
- the user to `/mcp login`); a tool that returns an error raises `McpToolError`.
+ text, or a list of content blocks otherwise.
+- Missing credentials surface as an explicit error telling the user to run
+ `/plugins`; a tool that returns an error raises `McpToolError`.
+- Configuration is re-read per call; `await mcp.reload()` closes all current
+ connections immediately.
+
+## Connection states
+
+- **Connected** — a real MCP handshake succeeded against the bound endpoint
+ with the stored credentials. Token presence alone never yields this state.
+- **Verifying / pending** — credentials exist but the handshake has not
+ succeeded (yet), e.g. right after login or while the endpoint is unreachable.
+ The connection is usable; dispatch performs the live handshake.
+- **Reconnect / error** — the credential was rejected (expired with no refresh
+ token, or bound to a different endpoint). Reconnecting from `/plugins` fixes
+ it; existing grants are not deleted by a failed verification.
+- **Requires setup** — the service needs manual setup (developer app, API key,
+ tenant URL, or a stdio adapter). The card states what is needed.
+- **Disabled** — the server entry is disabled in settings.
+
+Account/workspace identity is shown only when the provider exposes it; MCP has
+no universal identity capability, so unknown is reported honestly.
+
+## The model-facing inventory
+
+The kernel can ask the host for both supported-but-unconnected services and the
+user's actual connections (via `mcp.list_plugins`, `mcp.search_plugins`, and
+`mcp.list_connections`). The full catalog is never injected into the prompt; the
+model queries it on demand and searches it server-side. A recommendation to
+connect a service never installs it or opens a browser by itself: connecting is
+an explicit user action in `/plugins`.
## Generic MCP servers
@@ -90,12 +125,11 @@ are environment-variable references. Project `.prime/agent/settings.json` MCP
entries are ignored for execution, so a repository cannot start a local process
or shadow a user server.
-Built-in integration names (`linear`, `notion`, ...) are reserved: `mcp add`
-rejects them, and a hand-edited `mcpServers` entry with such a name disables the
-built-in skill instead of reconfiguring it. Earlier releases documented a
-catalog-name override (custom `url` plus `bearerTokenEnvVar` under a built-in
-name); that override no longer works — rename the entry (for example
-`linear-proxy`) to reach a custom endpoint through the generic runtime.
+Bundled integration names (`linear`, `notion`) are reserved: `mcp add` rejects
+them, and a hand-edited `mcpServers` entry with such a name is ignored instead of
+reconfiguring the built-in service. For service ids added later by the service
+catalog, a user-declared server with the same name keeps working and owns the id;
+connect the official endpoint instead through a differently-named entry.
Advanced runtime options may still be written directly
to the user settings file:
@@ -145,35 +179,20 @@ by that kernel. Configuration changes replace the connection on the next call;
calls have separate bounded timeouts, and kernel shutdown closes HTTP sessions
and terminates stdio children.
-Authored Linear and Notion skills remain available as optional typed wrappers.
-They use the same existing login and credential behavior.
-
-## Authored wrapper API
-
-Built-in wrappers subclass `rlm.McpIntegration` and expose `list_tools()`,
-`call_tool(name, arguments)`, and Python methods for identifier-safe tool names.
-They raise `NotEnabled` when credentials are unavailable and `McpToolError` when
-a service returns a tool error. Generic servers do not need a wrapper and should
-use the pre-imported `mcp` API above.
-
-## Enable-by-login lifecycle
-
-This auth-gating applies to the **built-in** integrations (Linear, Notion):
-
-1. The built-in skill ships installed but **disabled** — excluded from the prompt
- and not imported into the kernel — because no credentials exist.
-2. The user logs in; credentials land in `auth.json` under `mcp:<server>`.
-3. A resource reload (automatic after `/login`/`/mcp login`, or `/reload`) detects
- the credentials, enables the skill, and the kernel installs + imports the
- package.
-4. Logout (or losing credentials) disables it again.
+## Migration from the authored wrappers
-If you log in mid-turn, the reload is deferred — run `/reload` after the turn to
-activate the integration.
+Earlier releases shipped authored Linear/Notion Python wrapper packages
+(`import linear`, `import notion`) and the `rlm.McpIntegration` authoring API.
+These are removed: every service now uses the same generic `mcp` route — no
+per-service Python packages, and adding a service is catalog data, not code.
+Existing `mcp:linear` / `mcp:notion` credentials keep working unchanged; run
+`await mcp.list_tools("linear")` where you previously imported `linear`.
## Caveats
- Discover before assuming tool names or argument schemas.
+- Token presence is not connection readiness; the Connected state requires a
+ verified handshake.
- Generic MCP connections are kernel-local. Separate Prime Agent sessions use
separate connections even when they reference the same user setting.
- A custom `PRIME_AGENT_KERNEL_PYTHON` must include the current
diff --git a/packages/coding-agent/package.json b/packages/coding-agent/package.json
index 91612d7406..7b52057dcb 100644
--- a/packages/coding-agent/package.json
+++ b/packages/coding-agent/package.json
@@ -42,12 +42,12 @@
"bundle": "node scripts/bundle.mjs",
"test:kernel": "vitest --run --no-file-parallelism --tagsFilter kernel-heavy test/acp-kernel-features.test.ts test/acp-cold-cli.test.ts test/kernel-goal-skill.test.ts test/repl-kernel-state-roundtrip.test.ts test/repl-kernel-mcp-shutdown.test.ts"
},
- "dependencies": {
+ "dependencies": {
"@agentclientprotocol/sdk": "^1.3.0",
"@earendil-works/pi-agent-core": "^0.9.5",
"@earendil-works/pi-ai": "^0.9.5",
"@earendil-works/pi-tui": "^0.9.5",
- "@silvia-odwyer/photon-node": "^0.3.4",
+ "@modelcontextprotocol/sdk": "^1.30.0", "@silvia-odwyer/photon-node": "^0.3.4",
"chalk": "^5.5.0",
"cli-highlight": "^2.1.11",
"diff": "^9.0.0",
diff --git a/packages/coding-agent/skills/linear/SKILL.md b/packages/coding-agent/skills/linear/SKILL.md
deleted file mode 100644
index 9d81714e75..0000000000
--- a/packages/coding-agent/skills/linear/SKILL.md
+++ /dev/null
@@ -1,45 +0,0 @@
----
-name: linear
-description: Read and write Linear issues, projects, cycles, comments, and more via Linear's official MCP server. Tools are auto-discovered from the server at runtime.
----
-
-# Linear
-
-Talk to Linear through its official hosted MCP server from the Python kernel.
-
-## Setup
-
-Connect via `/login` → **Services** tab → **Linear** (OAuth in the browser).
-`/mcp login linear` does the same. Once connected, this skill is enabled
-automatically. If a call raises `NotEnabled`, the user isn't logged in — walk
-them through `/login`; don't ask them to set environment variables.
-
-## Usage
-
-The tool set is defined by the server, not by this skill, so **discover before
-you call** — don't assume tool names or argument names:
-
-```python
-import linear
-
-# 1. Discover available tools
-for tool in await linear.list_tools():
- print(tool["name"], "-", tool["description"])
-
-# 2. Inspect a specific tool's arguments (rendered from its JSON Schema)
-help(linear.list_issues)
-
-# 3. Call it; keyword args must match the tool's input schema
-result = await linear.list_issues(team="Engineering")
-print(result)
-```
-
-Notes:
-- Every tool is an `async` method — always `await`.
-- Results are already-parsed Python (a `dict` for structured output, otherwise a
- string). No need to `json.loads` them.
-- For tools whose names aren't valid Python identifiers, use the escape hatch:
- `await linear.call_tool("tool-name", {"arg": "value"})`.
-- Run `list_tools()` before relying on `help()` or assuming a tool exists — it
- populates the schemas `help()` shows, and the server is the source of truth
- for tool names and arguments.
diff --git a/packages/coding-agent/skills/linear/pyproject.toml b/packages/coding-agent/skills/linear/pyproject.toml
deleted file mode 100644
index 95c0ad08e3..0000000000
--- a/packages/coding-agent/skills/linear/pyproject.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-[project]
-name = "prime-agent-skill-linear"
-version = "0.1.0"
-description = "Linear integration skill for Prime Agent (Linear's official MCP server)."
-requires-python = ">=3.10"
-dependencies = ["mcp", "httpx", "prime-agent-runtime"]
-
-[build-system]
-requires = ["hatchling"]
-build-backend = "hatchling.build"
-
-[tool.hatch.build.targets.wheel]
-packages = ["src/linear"]
diff --git a/packages/coding-agent/skills/linear/src/linear/__init__.py b/packages/coding-agent/skills/linear/src/linear/__init__.py
deleted file mode 100644
index 9cfce0a1d5..0000000000
--- a/packages/coding-agent/skills/linear/src/linear/__init__.py
+++ /dev/null
@@ -1,35 +0,0 @@
-"""Linear integration: tools auto-discovered from Linear's official MCP server.
-
-Usage in the kernel:
-
- import linear
- issues = await linear.list_issues(team="Engineering")
-"""
-
-from __future__ import annotations
-
-from rlm import McpIntegration
-
-__all__ = ["Linear", "linear"]
-
-
-class Linear(McpIntegration):
- server = "linear"
- url = "https://mcp.linear.app/mcp"
-
-
-linear = Linear()
-
-
-# Names the kernel bootstrap probes to decide if a module is a callable skill.
-# Don't forward them, or `getattr(module, "run")` returns an MCP tool stub and the
-# module gets wrapped as callable, breaking `await linear.<tool>()` dispatch.
-_RESERVED = {"run", "__wrapped__", "__call__"}
-
-
-def __getattr__(name: str):
- # Forward bare module-level access (e.g. linear.list_issues) to the instance,
- # so `import linear; await linear.list_issues(...)` works without `.linear`.
- if name.startswith("_") or name in _RESERVED:
- raise AttributeError(name)
- return getattr(linear, name)
diff --git a/packages/coding-agent/skills/mcp/SKILL.md b/packages/coding-agent/skills/mcp/SKILL.md
new file mode 100644
index 0000000000..fb650f6a6e
--- /dev/null
+++ b/packages/coding-agent/skills/mcp/SKILL.md
@@ -0,0 +1,84 @@
+---
+name: mcp
+description: Use external MCP services generically from Python - search the supported-service catalog, inspect the user's connections, discover live tool schemas, and call tools on any connection (Notion, Linear, Slack, and the rest of the catalog) without per-service packages.
+---
+
+# MCP Services
+
+Every external service reachable over MCP uses the same pre-imported `mcp`
+module. Adding a service is data (a catalog entry plus a user login), never a
+new Python package, and there are no per-service skills to read.
+
+## Inventory: what can I use?
+
+```python
+# Supported catalog, one bounded page. More pages exist while nextCursor is not None.
+page = await mcp.list_plugins(connection_status="not_connected", limit=50)
+results = await mcp.search_plugins("notion") # bounded search
+page = await mcp.list_plugins() # default: first 50 entries
+
+# The user's actual connections. connectionId is the dispatch id everywhere below.
+connections = await mcp.list_connections()
+```
+
+Catalog entries carry `connectionStatus` (`connected`, `pending`,
+`not_connected`, `setup_required`, `disabled`, `error`), `connectable`, and
+when connected the `connectionIds` you dispatch on. `connected` means a
+verified MCP handshake, not just stored credentials; `pending` means
+credentials exist but verification hasn't run or succeeded yet. Entries may
+also carry `setupHint` (why a service isn't connectable yet), `unverified`
+(imported but not vetted), `verifiedAt`/`toolCount`, and `connectionIds`
+(empty when not dispatchable). Entries with `setup_required` need a developer
+app or API key first — say so honestly instead of promising one-click.
+
+## Recommend, never connect
+
+If a task would benefit from an unconnected service, name the real catalog
+entry (e.g. "Connecting Notion would let me search your workspace directly")
+and tell the user to open `/plugins` (or run `/mcp login <service>`) to connect.
+Recommendations and catalog lookups never install anything, open a browser,
+use credentials, or request extra scopes. There is no agent-initiated connect
+call in this slice; if the user connects mid-task, the connection activates on
+the next call without a reload.
+
+## Discover, then call
+
+```python
+# Live tool metadata is cached per connection; schemas come from the server.
+tools = await mcp.search_tools("search workspace documents", connection_id="notion")
+tool = await mcp.describe_tool("notion", "notion-search") # {name, description, inputSchema}
+tools = await mcp.list_tools("notion") # full tool list with schemas
+
+result = await mcp.call_tool("notion", "notion-search", {"query": "roadmap"})
+```
+
+- Discover before calling: don't assume tool names or arguments; read the
+ `inputSchema` with `describe_tool` and construct matching arguments.
+- `list_tools` returns the complete inventory or raises — never a silent
+ partial list. Returned schemas are isolated copies; mutate them freely.
+- `search_tools` without a `connection_id` searches at most 8 connections the
+ host reports as connected and reports its scope: `searched`, `unavailable`
+ (per-connection failures as fixed, redaction-safe summaries), and
+ `truncated` (narrow the query or pick a connection when it is set — the
+ result never claims to be exhaustive).
+- Prefer narrow catalog searches over paging the whole catalog; don't dump all
+ schemas into context.
+- Results are already-parsed Python (a `dict` for structured output, otherwise
+ a string). No `json.loads` needed.
+
+## Errors and permissions
+
+- `PermissionError` — the tool is excluded by the user's `enabledTools` /
+ `disabledTools` policy. Don't retry; tell the user.
+- `KeyError` — the tool or connection doesn't exist. Re-check with
+ `list_tools` / `list_connections`; tools can change across sessions.
+- `McpDiscoveryError` — the server's tool listing couldn't complete honestly
+ (broken pagination). No partial inventory is published; re-run, and ask the
+ user to reconnect if it persists.
+- `RuntimeError` — credentials are not available (`McpCredentialsUnavailable`:
+ ask the user to connect via `/plugins` or `/mcp login <service>`, never via
+ environment variables), a refresh failed, or the host bridge is unavailable.
+- `McpToolError` — the server flagged the call as an error. Surface the
+ message; don't blindly retry a write that may have already happened.
+
+Credentials never appear in inventory results, tool schemas, or errors.
diff --git a/packages/coding-agent/skills/notion/SKILL.md b/packages/coding-agent/skills/notion/SKILL.md
deleted file mode 100644
index cdc553cc30..0000000000
--- a/packages/coding-agent/skills/notion/SKILL.md
+++ /dev/null
@@ -1,49 +0,0 @@
----
-name: notion
-description: Search Notion and read/create/update pages and databases via Notion's official hosted MCP server. Tools are auto-discovered from the server at runtime.
----
-
-# Notion
-
-Talk to Notion through its official hosted MCP server from the Python kernel.
-
-## Setup
-
-Connect via `/login` → **Services** tab → **Notion** (OAuth in the browser).
-`/mcp login notion` does the same. Once connected, this skill is enabled
-automatically. If a call raises `NotEnabled`, the user isn't logged in — walk
-them through `/login`; don't ask them to set environment variables.
-
-## Usage
-
-The tool set is defined by the server, not by this skill, so **discover before
-you call** — don't assume tool names or argument names:
-
-Notion's tools are named with hyphens (e.g. `notion-search`, `notion-fetch`),
-which are **not** valid Python identifiers — so call them via `call_tool`:
-
-```python
-import notion
-
-# 1. Discover available tools (returns names + schemas)
-for tool in await notion.list_tools():
- print(tool["name"], "-", tool["description"])
-
-# 2. Call by exact name; the second arg matches the tool's input schema
-result = await notion.call_tool("notion-search", {"query": "roadmap"})
-print(result)
-```
-
-Tools whose names *are* valid identifiers can also be called as
-`await notion.<tool>(**args)`, and `help(notion.<tool>)` shows their schema once
-`list_tools()` has run.
-
-Notes:
-- Every call is `async` — always `await`.
-- Results are already-parsed Python (a `dict` for structured output, otherwise a
- string). No need to `json.loads` them.
-- Run `list_tools()` before relying on `help()` or assuming a tool exists — the
- server's schema is the source of truth for names and arguments.
-- The kernel import name is `notion`. On a custom `PRIME_AGENT_KERNEL_PYTHON` that
- already has the unrelated PyPI `notion` client installed, `import notion` may
- resolve to that instead; use the default managed kernel venv to avoid the clash.
diff --git a/packages/coding-agent/skills/notion/pyproject.toml b/packages/coding-agent/skills/notion/pyproject.toml
deleted file mode 100644
index b399d3ae35..0000000000
--- a/packages/coding-agent/skills/notion/pyproject.toml
+++ /dev/null
@@ -1,13 +0,0 @@
-[project]
-name = "prime-agent-skill-notion"
-version = "0.1.0"
-description = "Notion integration skill for Prime Agent (Notion's official hosted MCP server)."
-requires-python = ">=3.10"
-dependencies = ["mcp", "httpx", "prime-agent-runtime"]
-
-[build-system]
-requires = ["hatchling"]
-build-backend = "hatchling.build"
-
-[tool.hatch.build.targets.wheel]
-packages = ["src/notion"]
diff --git a/packages/coding-agent/skills/notion/src/notion/__init__.py b/packages/coding-agent/skills/notion/src/notion/__init__.py
deleted file mode 100644
index 773f098c5a..0000000000
--- a/packages/coding-agent/skills/notion/src/notion/__init__.py
+++ /dev/null
@@ -1,31 +0,0 @@
-"""Notion integration: tools auto-discovered from Notion's official MCP server.
-
-Usage in the kernel:
-
- import notion
- results = await notion.search(query="roadmap")
-"""
-
-from __future__ import annotations
-
-from rlm import McpIntegration
-
-__all__ = ["Notion", "notion"]
-
-
-class Notion(McpIntegration):
- server = "notion"
- url = "https://mcp.notion.com/mcp"
-
-
-notion = Notion()
-
-# Don't forward names the kernel bootstrap probes (e.g. `run`) or it wraps the
-# module as a callable skill and breaks `await notion.<tool>()` dispatch.
-_RESERVED = {"run", "__wrapped__", "__call__"}
-
-
-def __getattr__(name: str):
- if name.startswith("_") or name in _RESERVED:
- raise AttributeError(name)
- return getattr(notion, name)
diff --git a/packages/coding-agent/src/core/agent-session-services.ts b/packages/coding-agent/src/core/agent-session-services.ts
index 4ef2512d48..0cf0af041d 100644
--- a/packages/coding-agent/src/core/agent-session-services.ts
+++ b/packages/coding-agent/src/core/agent-session-services.ts
@@ -32,6 +32,8 @@ export interface CreateAgentSessionServicesOptions {
authStorage?: AuthStorage;
settingsManager?: SettingsManager;
modelRegistry?: ModelRegistry;
+ /** Pre-built MCP manager (tests inject stub probes and stores). */
+ mcpManager?: McpManager;
extensionFlagValues?: Map<string, boolean | string>;
resourceLoaderOptions?: Omit<DefaultResourceLoaderOptions, "cwd" | "agentDir" | "settingsManager">;
/**
@@ -159,12 +161,15 @@ export async function createAgentSessionServices(
// MCP integrations: registers OAuth providers and gates the built-in
// integration skills by whether the user is logged in (enable-by-login).
- const mcpManager = new McpManager({
- authStorage,
- getUserServers: () => settingsManager.getGlobalMcpServers(),
- });
+ const mcpManager =
+ options.mcpManager ??
+ new McpManager({
+ authStorage,
+ getUserServers: () => settingsManager.getGlobalMcpServers(),
+ getCatalogSources: () => settingsManager.getMcpCatalogSources(),
+ });
// refresh() resets the OAuth registry to built-ins; re-add user MCP providers too.
- modelRegistry.setOnOAuthProvidersReset(() => mcpManager.registerUserProviders());
+ modelRegistry.setOnOAuthProvidersReset(() => mcpManager.registerAllProviders());
const userExtensionFactories = options.resourceLoaderOptions?.extensionFactories ?? [];
// The built-in Herdr reporter defers to Herdr's own file-based integration
diff --git a/packages/coding-agent/src/core/auth-storage.ts b/packages/coding-agent/src/core/auth-storage.ts
index c6fd7a9797..5a0ff8b603 100644
--- a/packages/coding-agent/src/core/auth-storage.ts
+++ b/packages/coding-agent/src/core/auth-storage.ts
@@ -41,7 +41,28 @@ export type OAuthCredential = {
type: "oauth";
} & OAuthCredentials;
-export type AuthCredential = ApiKeyCredential | OAuthCredential;
+/**
+ * A static token pasted for one MCP connection through the inline paste flow.
+ * Deliberately NOT the OAuth shape: there is no refresh token, no expiry, and
+ * no client identity to fake — the handshake sends `bearer` as
+ * `Authorization: Bearer`. Exactly ONE credential per connection (the paste
+ * flow prompts once; multiple catalog fields may only be alternative names for
+ * that one credential). Bound to the exact endpoint it was pasted for, stored
+ * only in the credential store under the owning connection's
+ * `mcp:<connectionId>` key — never in settings.json.
+ */
+export type McpStaticTokenCredential = {
+ type: "mcp_static_token";
+ /** The endpoint the pasted token is bound to; a retargeted entry fails closed. */
+ endpoint: string;
+ /** The value the MCP handshake sends as the bearer. */
+ bearer: string;
+ /** The catalog setup field id the token was collected for (the first alternative name). */
+ bearerFieldId: string;
+ createdAt: number;
+};
+
+export type AuthCredential = ApiKeyCredential | OAuthCredential | McpStaticTokenCredential;
export type AuthStorageData = Record<string, AuthCredential>;
@@ -372,6 +393,9 @@ export class AuthStorage {
}
return `api_key:${credential.key}\0${resolveConfigValue(credential.key) ?? ""}`;
}
+ // Static MCP tokens are not model-provider key material: they never
+ // resolve to a provider API key value fingerprint.
+ if (credential.type !== "oauth") return undefined;
const provider = getOAuthProvider(providerId);
const apiKey = provider?.getApiKey(credential) ?? credential.access;
return `oauth:${apiKey}\0${credential.refresh}\0${credential.expires}`;
@@ -701,18 +725,196 @@ export class AuthStorage {
* load or write failure instead of recording it, so callers can refuse to
* proceed while the credential may still exist on disk. Disk-authoritative
* and idempotent — in-memory state is only updated after the write succeeds.
+ * Returns whether a credential was actually removed from disk.
*/
- removeVerified(provider: string): void {
- this.storage.withLock((current) => {
+ removeVerified(provider: string): boolean {
+ const removed = this.storage.withLock((current) => {
const currentData = this.parseStorageData(current);
- if (!(provider in currentData)) return { result: undefined };
+ if (!(provider in currentData)) return { result: false };
const merged: AuthStorageData = { ...currentData };
delete merged[provider];
- return { result: undefined, next: JSON.stringify(merged, null, 2) };
+ return { result: true, next: JSON.stringify(merged, null, 2) };
});
- delete this.data[provider];
- // Post-success only: a failed removal must not make a stale-marked credential selectable again.
- this.clearStaleAuthSource(provider, "stored");
+ if (removed) {
+ delete this.data[provider];
+ // Post-success only: a failed removal must not make a stale-marked credential selectable again.
+ this.clearStaleAuthSource(provider, "stored");
+ }
+ return removed;
+ }
+
+ /**
+ * Disk-authoritative conditional move for staged MCP logins: move
+ * `stagedProvider`'s credential to `provider` ONLY when no credential
+ * exists at `provider` ON DISK, reading and writing under the backend's
+ * own file lock. An ordinary login in another process — invisible to this
+ * instance's cache — can never be clobbered by a race between the get and
+ * the set. Returns "occupied" when the destination already holds a
+ * credential, "nothing" when the staged slot is empty, or the exact
+ * credential that moved (for exact-own rollback).
+ */
+ moveStagedCredential(
+ stagedProvider: string,
+ provider: string,
+ ): { status: "occupied" } | { status: "nothing" } | { status: "moved"; credential: AuthCredential } {
+ type MoveOutcome =
+ | { status: "occupied" }
+ | { status: "nothing" }
+ | { status: "moved"; credential: AuthCredential };
+ const outcome = this.storage.withLock<MoveOutcome>((current) => {
+ const currentData = this.parseStorageData(current);
+ if (provider in currentData) {
+ return { result: { status: "occupied" } };
+ }
+ const staged = currentData[stagedProvider];
+ if (!staged) {
+ return { result: { status: "nothing" } };
+ }
+ const merged: AuthStorageData = { ...currentData, [provider]: staged };
+ delete merged[stagedProvider];
+ return {
+ result: { status: "moved", credential: staged },
+ next: JSON.stringify(merged, null, 2),
+ };
+ });
+ // Post-success only: refresh the cache from disk under the same lock
+ // discipline so no stale entry survives the move.
+ if (outcome.status === "moved") {
+ this.reload();
+ }
+ return outcome;
+ }
+
+ /**
+ * Disk-authoritative conditional restore: write `credential` to
+ * `provider` ONLY when the slot is empty ON DISK. A credential written by
+ * anyone else is never overwritten.
+ */
+ restoreCredentialIfAbsent(provider: string, credential: AuthCredential): boolean {
+ const restored = this.storage.withLock((current) => {
+ const currentData = this.parseStorageData(current);
+ if (provider in currentData) {
+ return { result: false };
+ }
+ const merged: AuthStorageData = { ...currentData, [provider]: credential };
+ return { result: true, next: JSON.stringify(merged, null, 2) };
+ });
+ if (restored) {
+ this.data[provider] = credential;
+ this.clearStaleAuthSource(provider, "stored");
+ }
+ return restored;
+ }
+
+ /**
+ * Disk-authoritative conditional removal: remove `provider`'s credential
+ * ONLY when the ON-DISK value is exactly `expected` (full-object
+ * comparison, not token equality) — a credential written by anyone else is
+ * never deleted. The in-memory cache drops the key only after the write
+ * succeeds.
+ */
+ removeIfCredentialMatches(provider: string, expected: AuthCredential): boolean {
+ const removed = this.storage.withLock((current) => {
+ const currentData = this.parseStorageData(current);
+ const currentCredential = currentData[provider];
+ if (currentCredential === undefined) {
+ return { result: false };
+ }
+ if (JSON.stringify(currentCredential) !== JSON.stringify(expected)) {
+ return { result: false };
+ }
+ const merged: AuthStorageData = { ...currentData };
+ delete merged[provider];
+ return { result: true, next: JSON.stringify(merged, null, 2) };
+ });
+ if (removed) {
+ delete this.data[provider];
+ this.clearStaleAuthSource(provider, "stored");
+ }
+ return removed;
+ }
+
+ /**
+ * Disk-authoritative credential read under the backend's own file lock —
+ * a cross-instance writer is always visible, unlike the cached `get()`.
+ * Used to capture the full identity a guarded login's compare-and-swap
+ * expects to replace (legacy/credential-only accounts included).
+ */
+ getVerified(provider: string): AuthCredential | undefined {
+ return this.storage.withLock((current) => {
+ const currentData = this.parseStorageData(current);
+ return { result: currentData[provider] };
+ });
+ }
+
+ /**
+ * Atomic full-identity compare-and-swap move for guarded MCP logins:
+ * move `stagedProvider`'s credential to `provider` ONLY when the on-disk
+ * value at `provider` is exactly `expectedOld` — the comparison INCLUDES
+ * absence (both present, or both absent) — read and written under the
+ * backend's own file lock. A changed OR deleted grant refuses ("occupied"):
+ * a logged-out account is never reactivated and a newer writer is never
+ * clobbered. Returns the exact credential that moved (for full-identity
+ * rollback).
+ */
+ replaceStagedCredential(
+ stagedProvider: string,
+ provider: string,
+ expectedOld: AuthCredential | undefined,
+ ): { status: "occupied" } | { status: "nothing" } | { status: "replaced"; credential: AuthCredential } {
+ type ReplaceOutcome =
+ | { status: "occupied" }
+ | { status: "nothing" }
+ | { status: "replaced"; credential: AuthCredential };
+ const outcome = this.storage.withLock<ReplaceOutcome>((current) => {
+ const currentData = this.parseStorageData(current);
+ const existing = currentData[provider];
+ // FULL-IDENTITY comparison INCLUDING absence: the on-disk value must
+ // be exactly `expectedOld` (both present, or both absent). A
+ // changed OR deleted grant refuses — never reactivate a logged-out
+ // account, never clobber a newer writer.
+ if (JSON.stringify(existing) !== JSON.stringify(expectedOld)) {
+ return { result: { status: "occupied" as const } };
+ }
+ const staged = currentData[stagedProvider];
+ if (!staged) {
+ return { result: { status: "nothing" as const } };
+ }
+ const merged: AuthStorageData = { ...currentData, [provider]: staged };
+ delete merged[stagedProvider];
+ return {
+ result: { status: "replaced" as const, credential: staged },
+ next: JSON.stringify(merged, null, 2),
+ };
+ });
+ // Post-success only: refresh the cache under the same lock discipline.
+ if (outcome.status === "replaced") {
+ this.reload();
+ }
+ return outcome;
+ }
+
+ /**
+ * Atomic full-identity compare-and-swap write: set `provider` to `next`
+ * ONLY when the on-disk value is exactly `expected`. Used to roll back a
+ * guarded replacement (restoring the PREVIOUS credential) and to undo
+ * only this attempt's own write — a newer writer is never clobbered.
+ */
+ replaceCredentialIfMatches(provider: string, expected: AuthCredential, next: AuthCredential): boolean {
+ const replaced = this.storage.withLock((current) => {
+ const currentData = this.parseStorageData(current);
+ const existing = currentData[provider];
+ if (existing === undefined || JSON.stringify(existing) !== JSON.stringify(expected)) {
+ return { result: false };
+ }
+ const merged: AuthStorageData = { ...currentData, [provider]: next };
+ return { result: true, next: JSON.stringify(merged, null, 2) };
+ });
+ if (replaced) {
+ this.data[provider] = next;
+ this.clearStaleAuthSource(provider, "stored");
+ }
+ return replaced;
}
/**
diff --git a/packages/coding-agent/src/core/kernel/bootstrap.ts b/packages/coding-agent/src/core/kernel/bootstrap.ts
index 126a7b248f..98d44ef69f 100644
--- a/packages/coding-agent/src/core/kernel/bootstrap.ts
+++ b/packages/coding-agent/src/core/kernel/bootstrap.ts
@@ -72,6 +72,14 @@ export function buildBatchShimInvocation(
}
const UV_INSTALL_COMMAND = "curl -LsSf https://astral.sh/uv/install.sh | sh";
+/** MCP discovery surface the kernel runtime must expose for /plugins work. */
+const REQUIRED_MCP_DISCOVERY_METHODS = [
+ "list_plugins",
+ "search_plugins",
+ "list_connections",
+ "search_tools",
+ "describe_tool",
+];
const REQUIRED_HARNESS_METHODS = [
"create_memory",
"update_memory",
@@ -87,7 +95,7 @@ const REQUIRED_HARNESS_METHODS = [
"delete_prompt_note",
"record_refinement",
];
-const RUNTIME_READY_CHECK = `import inspect; import rlm; from rlm import McpIntegration; import rlm.mcp as mcp; from rlm.harness import HarnessEntry; _harness_methods = ${JSON.stringify(REQUIRED_HARNESS_METHODS)}; assert callable(mcp.list_tools); assert callable(mcp.call_tool); assert callable(rlm.spawn); assert hasattr(rlm, 'rlm'); assert callable(rlm.rlm.spawn); assert inspect.signature(rlm.spawn).parameters['name'].default is inspect.Parameter.empty; assert not hasattr(rlm, 'run'); assert not hasattr(rlm.rlm, 'run'); assert callable(rlm.host_request); assert callable(rlm.find_models); assert callable(rlm.rlm.find_models); assert callable(rlm.create_session); assert callable(rlm.rlm.create_session); assert callable(rlm.progress_note); assert callable(rlm.rlm.progress_note); assert hasattr(rlm, 'harness'); assert hasattr(rlm, 'get_harness_state'); assert hasattr(rlm.rlm, 'harness'); assert hasattr(rlm.rlm, 'get_harness_state'); assert all(callable(getattr(_harness, _method, None)) for _harness in (rlm.harness, rlm.rlm.harness) for _method in _harness_methods); assert 'reference' in HarnessEntry.__dataclass_fields__; assert 'scope' in HarnessEntry.__dataclass_fields__; assert 'reference' in inspect.signature(rlm.harness.create_skill).parameters; assert 'reference' in inspect.signature(rlm.harness.update_skill).parameters; assert 'global_' in inspect.signature(rlm.harness.create_memory).parameters; assert 'global_' in inspect.signature(rlm.get_harness_state).parameters; assert not hasattr(rlm, 'background'); assert not hasattr(rlm.rlm, 'background'); from rlm.bash import BashHandle, BashResult; assert callable(rlm.bash); assert all(callable(getattr(BashHandle, _m, None)) for _m in ('tail', 'output', 'poll', 'kill')); assert {'exit_code', 'output', 'duration'} <= set(BashResult.__dataclass_fields__); import rlm.repl as _repl; assert callable(_repl.main); assert callable(_repl.emit); assert callable(_repl.host_request); assert callable(_repl.is_active); assert _repl.PROTOCOL_VERSION == 3; assert callable(rlm.emit); assert not hasattr(rlm, 'HOST_COMM_TARGET'); assert not hasattr(mcp, 'install_shutdown_hook')`;
+export const RUNTIME_READY_CHECK = `import inspect; import rlm; from rlm import McpIntegration; import rlm.mcp as mcp; from rlm.harness import HarnessEntry; _harness_methods = ${JSON.stringify(REQUIRED_HARNESS_METHODS)}; assert callable(mcp.list_tools); assert callable(mcp.call_tool); assert all(callable(getattr(mcp, _m, None)) for _m in ${JSON.stringify(REQUIRED_MCP_DISCOVERY_METHODS)}), "rlm.mcp is missing MCP discovery methods (list_plugins, search_plugins, list_connections, search_tools, describe_tool); the kernel venv needs a current prime-agent-runtime"; assert callable(rlm.spawn); assert hasattr(rlm, 'rlm'); assert callable(rlm.rlm.spawn); assert inspect.signature(rlm.spawn).parameters['name'].default is inspect.Parameter.empty; assert not hasattr(rlm, 'run'); assert not hasattr(rlm.rlm, 'run'); assert callable(rlm.host_request); assert callable(rlm.find_models); assert callable(rlm.rlm.find_models); assert callable(rlm.create_session); assert callable(rlm.rlm.create_session); assert callable(rlm.progress_note); assert callable(rlm.rlm.progress_note); assert hasattr(rlm, 'harness'); assert hasattr(rlm, 'get_harness_state'); assert hasattr(rlm.rlm, 'harness'); assert hasattr(rlm.rlm, 'get_harness_state'); assert all(callable(getattr(_harness, _method, None)) for _harness in (rlm.harness, rlm.rlm.harness) for _method in _harness_methods); assert 'reference' in HarnessEntry.__dataclass_fields__; assert 'scope' in HarnessEntry.__dataclass_fields__; assert 'reference' in inspect.signature(rlm.harness.create_skill).parameters; assert 'reference' in inspect.signature(rlm.harness.update_skill).parameters; assert 'global_' in inspect.signature(rlm.harness.create_memory).parameters; assert 'global_' in inspect.signature(rlm.get_harness_state).parameters; assert not hasattr(rlm, 'background'); assert not hasattr(rlm.rlm, 'background'); from rlm.bash import BashHandle, BashResult; assert callable(rlm.bash); assert all(callable(getattr(BashHandle, _m, None)) for _m in ('tail', 'output', 'poll', 'kill')); assert {'exit_code', 'output', 'duration'} <= set(BashResult.__dataclass_fields__); import rlm.repl as _repl; assert callable(_repl.main); assert callable(_repl.emit); assert callable(_repl.host_request); assert callable(_repl.is_active); assert _repl.PROTOCOL_VERSION == 3; assert callable(rlm.emit); assert not hasattr(rlm, 'HOST_COMM_TARGET'); assert not hasattr(mcp, 'install_shutdown_hook')`;
const BOOTSTRAP_VERSION_FILE = ".bootstrap-version";
const BOOTSTRAP_LOCK_NAME = ".bootstrap.lock";
const BOOTSTRAP_LOCK_RETRY_MS = 100;
diff --git a/packages/coding-agent/src/core/mcp/connection-probe.ts b/packages/coding-agent/src/core/mcp/connection-probe.ts
new file mode 100644
index 0000000000..807c05cb55
--- /dev/null
+++ b/packages/coding-agent/src/core/mcp/connection-probe.ts
@@ -0,0 +1,175 @@
+// MCP connection verification: a real handshake (initialize -> tools/list) through the
+// official @modelcontextprotocol/sdk client. Health check only — the Python generic
+// runtime performs all real execution.
+//
+// Error reporting uses fixed, safe categories. The endpoint URL, response bodies,
+// server-controlled messages, and server names are untrusted and never appear in
+// results: they can embed credentials/query secrets and provider-controlled text.
+
+import { UnauthorizedError } from "@modelcontextprotocol/sdk/client/auth.js";
+import { Client } from "@modelcontextprotocol/sdk/client/index.js";
+import { StreamableHTTPClientTransport, StreamableHTTPError } from "@modelcontextprotocol/sdk/client/streamableHttp.js";
+import { ErrorCode, McpError } from "@modelcontextprotocol/sdk/types.js";
+
+export interface McpEndpointProbeOptions {
+ /** HTTPS streamable-HTTP MCP endpoint. */
+ url: string;
+ /** Bearer token getter; empty or undefined sends no Authorization header. */
+ getToken: () => string | Promise<string>;
+ /** Per-request timeout in milliseconds. Defaults to 15000. */
+ timeoutMs?: number;
+ /** Grace bound on each cleanup step in milliseconds. Defaults to 2500. */
+ cleanupTimeoutMs?: number;
+ /** Injectable fetch for tests. */
+ fetchImpl?: typeof fetch;
+}
+
+/** Fixed failure categories; safe to persist and show to the model. */
+export const MCP_PROBE_ERRORS = {
+ TIMEOUT: "verification-timeout",
+ UNAUTHORIZED: "http-unauthorized",
+ NETWORK: "network-unreachable",
+ SERVER_REJECTED: "server-rejected-handshake",
+ HTTP_ERROR: "http-error",
+ INVALID_RESPONSE: "invalid-response",
+ UNKNOWN: "verification-failed",
+ /** The grant changed while the probe ran; the result was discarded, nothing persisted. */
+ CREDENTIAL_CHANGED: "credential-changed",
+ /** Stored grant is not bound to this endpoint; verification refused before token fetch. */
+ UNBOUND_CREDENTIAL: "credential-unbound",
+} as const;
+
+export type McpEndpointProbeResult =
+ | { ok: true; toolCount: number }
+ | { ok: false; error: (typeof MCP_PROBE_ERRORS)[keyof typeof MCP_PROBE_ERRORS] };
+
+const DEFAULT_TIMEOUT_MS = 15_000;
+const DEFAULT_CLEANUP_TIMEOUT_MS = 2_500;
+
+/**
+ * Race one cleanup step against a grace deadline. On expiry, abort the lifecycle
+ * signal — which rejects the fetch the step is awaiting — and resolve without
+ * waiting further: the losing promise keeps its own catch handler, so a bounded
+ * race never creates an unhandled rejection.
+ */
+async function raceAbortDeadline(
+ operation: Promise<unknown>,
+ lifecycle: AbortController,
+ timeoutMs: number,
+): Promise<void> {
+ let deadline: ReturnType<typeof setTimeout> | undefined;
+ try {
+ await Promise.race([
+ operation,
+ new Promise<void>((resolve) => {
+ deadline = setTimeout(() => {
+ lifecycle.abort();
+ resolve();
+ }, timeoutMs);
+ }),
+ ]);
+ } finally {
+ clearTimeout(deadline);
+ }
+}
+
+/**
+ * Verify an MCP endpoint with a real handshake using the official SDK client:
+ * connect (initialize + initialized notification), tools/list, then an explicit
+ * session termination (HTTP DELETE). Tool counts reflect the first page; the count
+ * is a verification signal, not a complete inventory.
+ *
+ * The SDK's per-request timeouts only race the JSON-RPC promise, and its
+ * transports pass their own AbortController's signal to every fetch — including
+ * the cleanup DELETE and its response-body cancel — so a losing fetch can stay
+ * pending forever. One lifecycle controller bounds the whole probe instead: a
+ * wrapper adds its signal to every fetch the transport makes, each cleanup step
+ * is raced against a grace deadline, and an absolute deadline plus a final abort
+ * guarantee the probe always returns and no transport read outlives it.
+ */
+export async function probeMcpEndpoint(options: McpEndpointProbeOptions): Promise<McpEndpointProbeResult> {
+ const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS;
+ const cleanupTimeoutMs = options.cleanupTimeoutMs ?? DEFAULT_CLEANUP_TIMEOUT_MS;
+ const fetchImpl = options.fetchImpl ?? globalThis.fetch;
+ // Bounds every fetch, response-body read, and cleanup step of this probe.
+ const lifecycle = new AbortController();
+ const deadline = setTimeout(() => lifecycle.abort(), 2 * timeoutMs + 2 * cleanupTimeoutMs + 1_000);
+ let transport: StreamableHTTPClientTransport | undefined;
+ try {
+ const token = (await options.getToken()) ?? "";
+ const url = new URL(options.url);
+ // The transport overrides requestInit.signal with its own controller's
+ // signal, so the lifecycle bound is injected at the fetch seam instead.
+ const boundedFetch: typeof fetch = (input, init) =>
+ fetchImpl(input, {
+ ...init,
+ signal: init?.signal ? AbortSignal.any([init.signal, lifecycle.signal]) : lifecycle.signal,
+ });
+ transport = new StreamableHTTPClientTransport(url, {
+ requestInit: {
+ // No redirects: a redirecting endpoint must not receive the token.
+ redirect: "error",
+ ...(token ? { headers: { authorization: `Bearer ${token}` } } : {}),
+ },
+ fetch: boundedFetch,
+ });
+ const client = new Client({ name: "prime-agent", version: "mcp-verify" }, { capabilities: {} });
+ try {
+ await client.connect(transport, { timeout: timeoutMs });
+ const result = await client.listTools(undefined, { timeout: timeoutMs });
+ return { ok: true, toolCount: result.tools?.length ?? 0 };
+ } finally {
+ // Terminate the session explicitly; servers may decline (405), which is
+ // fine. Each step is raced: an unresponsive DELETE (or a body that never
+ // finishes) must never hang the probe past its grace bound.
+ await raceAbortDeadline(
+ transport.terminateSession().catch(() => undefined),
+ lifecycle,
+ cleanupTimeoutMs,
+ );
+ await raceAbortDeadline(
+ client.close().catch(() => undefined),
+ lifecycle,
+ cleanupTimeoutMs,
+ );
+ }
+ } catch (error) {
+ return { ok: false, error: categorizeProbeError(error) };
+ } finally {
+ clearTimeout(deadline);
+ // Abort anything still lingering (an unfinished body read, a lost fetch);
+ // after bounded cleanup this is normally a no-op.
+ lifecycle.abort();
+ }
+}
+
+/** Map any failure to one fixed, safe category; drop all untrusted detail. */
+export function categorizeProbeError(error: unknown): (typeof MCP_PROBE_ERRORS)[keyof typeof MCP_PROBE_ERRORS] {
+ if (error instanceof McpError) {
+ if (error.code === ErrorCode.RequestTimeout) return MCP_PROBE_ERRORS.TIMEOUT;
+ // JSON-RPC-level rejection: the server's message is untrusted text.
+ return MCP_PROBE_ERRORS.SERVER_REJECTED;
+ }
+ if (error instanceof UnauthorizedError) return MCP_PROBE_ERRORS.UNAUTHORIZED;
+ if (error instanceof StreamableHTTPError) {
+ if (error.code === 401 || error.code === 403) return MCP_PROBE_ERRORS.UNAUTHORIZED;
+ return MCP_PROBE_ERRORS.HTTP_ERROR;
+ }
+ if (error instanceof Error && error.name === "TimeoutError") return MCP_PROBE_ERRORS.TIMEOUT;
+ // SDK schema-validation failures (e.g. a malformed tools/list result). Zod v4
+ // raises $ZodError; older stacks used ZodError/ValidationError.
+ if (
+ error instanceof Error &&
+ (error.name === "ZodError" || error.name === "$ZodError" || error.name === "ValidationError")
+ ) {
+ return MCP_PROBE_ERRORS.INVALID_RESPONSE;
+ }
+ if (error instanceof TypeError) {
+ // fetch rejects with TypeError on unreachable hosts, refused redirects, and
+ // URLs with embedded credentials; the URL itself is never echoed.
+ return MCP_PROBE_ERRORS.NETWORK;
+ }
+ if (error instanceof Error && error.name === "AbortError") return MCP_PROBE_ERRORS.TIMEOUT;
+ if (error instanceof SyntaxError) return MCP_PROBE_ERRORS.INVALID_RESPONSE;
+ return MCP_PROBE_ERRORS.UNKNOWN;
+}
diff --git a/packages/coding-agent/src/core/mcp/connection-store.ts b/packages/coding-agent/src/core/mcp/connection-store.ts
new file mode 100644
index 0000000000..07df1e3a01
--- /dev/null
+++ b/packages/coding-agent/src/core/mcp/connection-store.ts
@@ -0,0 +1,1003 @@
+// Local connection records for MCP services. Separate from credentials (auth.json):
+// a record captures the verified connection state for a connectionId — the stable
+// alias the kernel dispatches through — plus the catalog serviceId it connects and
+// the endpoint the verification ran against. Tokens never live here.
+//
+// Writes use the same file-lock + read-modify-write pattern as auth storage: the
+// interactive client and the daemon both mutate this file, so every flush re-reads
+// the latest on-disk state under a proper-lockfile lock and applies only this
+// instance's pending operations. Verification results apply under a guard so a
+// stale probe can never mark a newer grant (or a logged-out connection) verified.
+
+import { chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync } from "node:fs";
+import { dirname } from "node:path";
+import lockfile from "proper-lockfile";
+import { realpathIfPresentSync, writeFileAtomicSync } from "../../utils/atomic-file.js";
+
+export type McpConnectionRecordStatus = "connected" | "pending" | "error";
+
+export interface McpConnectionRecord {
+ /** Auth.json key suffix (`mcp:<connectionId>`) and the kernel dispatch id. */
+ connectionId: string;
+ /** Catalog service id; deliberately distinct from connectionId (aliases remain possible). */
+ serviceId: string;
+ /** Endpoint the record's verification ran against. */
+ endpoint: string;
+ label: string;
+ status: McpConnectionRecordStatus;
+ createdAt: number;
+ updatedAt: number;
+ /** Epoch ms of the last successful handshake + tools/list. */
+ verifiedAt?: number;
+ toolCount?: number;
+ /** Fixed, safe failure category (never URLs or server-controlled text). */
+ lastError?: string;
+ /** Opaque one-time ownership nonce for a pending reservation/login attempt. */
+ attemptId?: string;
+}
+
+interface McpConnectionsFile {
+ version: 1;
+ connections: Record<string, McpConnectionRecord>;
+}
+
+type PendingOp =
+ | { kind: "upsert"; record: McpConnectionRecord }
+ | { kind: "remove"; connectionId: string }
+ | {
+ kind: "verify";
+ record: McpConnectionRecord;
+ /** Evaluated at flush time under the lock; a failed guard discards the result. */
+ isStillCurrent: () => boolean;
+ expectedRecord: McpConnectionRecord | undefined;
+ resolve: (committed: boolean) => void;
+ }
+ | {
+ kind: "claimConnectionId";
+ connectionId: string;
+ /** Opaque ownership nonce stamped onto the EXISTING record. */
+ attemptId: string;
+ isStillCurrent?: (record: McpConnectionRecord) => boolean;
+ resolve: (claimed: boolean) => void;
+ }
+ | {
+ kind: "releaseClaim";
+ connectionId: string;
+ /** Only OUR claim is released; the record and its status survive. */
+ attemptId: string;
+ resolve: (released: boolean) => void;
+ }
+ | {
+ kind: "reserve";
+ record: McpConnectionRecord;
+ /** Cross-process atomic allocation: true when this store won the id. */
+ resolve: (won: boolean) => void;
+ }
+ | {
+ kind: "removeReservation";
+ connectionId: string;
+ /** Opaque ownership nonce: only OUR pending reservation is removed. */
+ attemptId: string;
+ resolve: (removed: boolean) => void;
+ }
+ | {
+ kind: "finalizeAttempt";
+ connectionId: string;
+ /** Opaque ownership nonce: the credential commit lands only for ours. */
+ attemptId: string;
+ /**
+ * Runs under the file lock ONLY when ownership holds; returns the
+ * committed record. Caller-side effects (credential moves) belong here
+ * so they share the store's lock ordering with cancel/remove.
+ */
+ commit: (record: McpConnectionRecord) => McpConnectionRecord;
+ /**
+ * Runs under the SAME lock when the record write fails after commit
+ * ran, restoring caller-side effects (credential moves) so a failed
+ * finalize leaves the account exactly as before — all-or-nothing.
+ * Closures capture whatever they need to restore.
+ */
+ compensate?: () => void;
+ resolve: (result: McpFinalizeResult) => void;
+ }
+ | {
+ kind: "removeAccountForProvider";
+ /** The raw MCP credential provider id the user selected. */
+ providerId: string;
+ /** Disk-authoritative credential removal (throws on write failure). */
+ authStorage: { removeVerified: (provider: string) => boolean };
+ resolve: (result: McpRemoveAccountResult) => void;
+ }
+ | {
+ kind: "removeAccount";
+ connectionId: string;
+ /**
+ * Credential cleanup under the SAME file lock as the record removal —
+ * disconnects share the store->auth ordering with finalizeAttempt, so
+ * a concurrent finalize can never leave an orphan credential behind.
+ * Runs even when no record exists (credential-only logouts); returns
+ * whether a credential was actually removed.
+ */
+ authCleanup: (connectionId: string) => boolean;
+ /** The generic logout route keeps completed records (honest unbound). */
+ preserveCompletedRecord?: boolean;
+ resolve: (result: McpRemoveAccountResult) => void;
+ };
+
+/** The account + credential key a generic MCP logout acts on. */
+export interface McpAccountLogoutTarget {
+ /** The account whose active attempt is cancelled / record preserved. */
+ connectionId: string;
+ /**
+ * The auth key whose credential is verified-removed: the staged key itself
+ * for staged-key logouts, the account key otherwise.
+ */
+ credentialKey: string;
+}
+
+/**
+ * Resolve the account behind an MCP credential id for the generic logout
+ * route. EXACT ids win — a local service id may itself contain "--" — and a
+ * staged key maps back ONLY through its actually recorded attempt nonce,
+ * never an unconditional split on the first "--".
+ */
+export function resolveMcpAccountLogoutTarget(
+ providerId: string,
+ records: ReadonlyArray<{ connectionId: string; status: string; attemptId?: string }>,
+): McpAccountLogoutTarget {
+ const candidate = providerId.slice("mcp:".length);
+ const accountKey = `mcp:${candidate}`;
+ if (records.some((record) => record.connectionId === candidate) || !candidate.includes("--")) {
+ return { connectionId: candidate, credentialKey: accountKey };
+ }
+ const stagedMatch = records.find(
+ (record) => record.attemptId !== undefined && `${record.connectionId}--${record.attemptId}` === candidate,
+ );
+ if (stagedMatch) {
+ // A nonce match is ALWAYS a LIVE attempt (a pending reservation or a
+ // claimed reconnect on any-status record — successful finalizes CONSUME
+ // the nonce, so no stale nonces survive on completed records): the
+ // staged-key logout cancels it, clearing the ACTIVE nonce.
+ return { connectionId: stagedMatch.connectionId, credentialKey: accountKey };
+ }
+ return { connectionId: candidate, credentialKey: accountKey };
+}
+
+/**
+ * The shared one-op MCP account logout for the generic /logout route:
+ * verified credential deletion AND pending-attempt cancellation in ONE
+ * store-locked critical section (store->auth ordering), with the id resolved
+ * from CURRENT state UNDER the lock — never a stale pre-lock snapshot. An
+ * account-key logout cancels pending attempts and preserves completed
+ * records; a staged-key logout cancels the attempt — INVALIDATING its nonce
+ * so the in-flight login's denied path cannot delete the record — while
+ * NEVER deleting the account record itself (another client's ordinary login
+ * may hold the real key at any moment; deleting could orphan it). The
+ * state-neutral outcome is "refused": no success claim, no Connected claim
+ * from token presence. The route delegates BEFORE touching auth; a failed
+ * verified removal fails the whole op and changes no record.
+ */
+export function logoutMcpAccount(
+ providerId: string,
+ store: McpConnectionStore,
+ authStorage: { removeVerified: (provider: string) => boolean },
+): Promise<McpRemoveAccountResult> {
+ return store.removeAccountForProvider({ providerId, authStorage });
+}
+
+const MAX_LAST_ERROR_LENGTH = 500;
+
+function sanitizeRecord(raw: unknown, connectionId: string): McpConnectionRecord | undefined {
+ if (!raw || typeof raw !== "object") return undefined;
+ const value = raw as Partial<McpConnectionRecord>;
+ const string = (input: unknown): string | undefined => (typeof input === "string" ? input : undefined);
+ const status = value.status;
+ if (
+ !string(value.connectionId) ||
+ !string(value.serviceId) ||
+ !string(value.endpoint) ||
+ !string(value.label) ||
+ (status !== "connected" && status !== "pending" && status !== "error")
+ ) {
+ return undefined;
+ }
+ const record: McpConnectionRecord = {
+ connectionId: string(value.connectionId) ?? connectionId,
+ serviceId: string(value.serviceId) ?? "",
+ endpoint: string(value.endpoint) ?? "",
+ label: string(value.label) ?? string(value.connectionId) ?? connectionId,
+ status,
+ createdAt: typeof value.createdAt === "number" ? value.createdAt : Date.now(),
+ updatedAt: typeof value.updatedAt === "number" ? value.updatedAt : Date.now(),
+ };
+ if (typeof value.verifiedAt === "number") record.verifiedAt = value.verifiedAt;
+ if (typeof value.toolCount === "number") record.toolCount = value.toolCount;
+ const lastError = string(value.lastError);
+ if (lastError) record.lastError = lastError.slice(0, MAX_LAST_ERROR_LENGTH);
+ const attemptId = string(value.attemptId);
+ if (attemptId) record.attemptId = attemptId.slice(0, 100);
+ return record;
+}
+
+function parseRecords(raw: string | undefined): Map<string, McpConnectionRecord> {
+ const records = new Map<string, McpConnectionRecord>();
+ if (!raw) return records;
+ let parsed: unknown;
+ try {
+ parsed = JSON.parse(raw);
+ } catch {
+ return records;
+ }
+ const file = parsed as Partial<McpConnectionsFile>;
+ if (!file || file.version !== 1 || typeof file.connections !== "object" || file.connections === null) {
+ return records;
+ }
+ for (const [connectionId, value] of Object.entries(file.connections)) {
+ const record = sanitizeRecord(value, connectionId);
+ if (record && record.connectionId === connectionId) {
+ records.set(connectionId, record);
+ }
+ }
+ return records;
+}
+
+function serializeRecords(records: ReadonlyMap<string, McpConnectionRecord>): string {
+ const file: McpConnectionsFile = {
+ version: 1,
+ connections: Object.fromEntries([...records.entries()].sort(([left], [right]) => left.localeCompare(right))),
+ };
+ return `${JSON.stringify(file, null, "\t")}\n`;
+}
+
+/** File-backed store of MCP connection records; corrupt or missing files reset to empty. */
+
+/** One-shot attempt operations: they carry a resolver and never requeue. */
+type OneShotOperation = Extract<
+ PendingOp,
+ {
+ kind:
+ | "verify"
+ | "reserve"
+ | "claimConnectionId"
+ | "releaseClaim"
+ | "removeReservation"
+ | "finalizeAttempt"
+ | "removeAccount"
+ | "removeAccountForProvider";
+ }
+>;
+
+function isOneShotOperation(operation: PendingOp): operation is OneShotOperation {
+ return (
+ operation.kind === "verify" ||
+ operation.kind === "reserve" ||
+ operation.kind === "claimConnectionId" ||
+ operation.kind === "releaseClaim" ||
+ operation.kind === "removeReservation" ||
+ operation.kind === "finalizeAttempt" ||
+ operation.kind === "removeAccount" ||
+ operation.kind === "removeAccountForProvider"
+ );
+}
+
+export class McpConnectionStore {
+ private recordsById = new Map<string, McpConnectionRecord>();
+ private pendingOps: PendingOp[] = [];
+ private flushChain: Promise<void> = Promise.resolve();
+
+ private constructor(private readonly path: string) {}
+
+ static open(path: string): McpConnectionStore {
+ const store = new McpConnectionStore(path);
+ store.load();
+ return store;
+ }
+
+ /** Re-read the file. Tolerates a missing or corrupt file by resetting to empty. */
+ load(): void {
+ this.recordsById = parseRecords(
+ existsSync(this.path) ? safeReadFileSync(realpathIfPresentSync(this.path)) : undefined,
+ );
+ }
+
+ get(connectionId: string): McpConnectionRecord | undefined {
+ return this.recordsById.get(connectionId);
+ }
+
+ records(): readonly McpConnectionRecord[] {
+ return [...this.recordsById.values()];
+ }
+
+ /** Queue an unconditional upsert; applied in memory immediately and on disk at flush. */
+ upsert(record: McpConnectionRecord): void {
+ this.applyUpsert(this.recordsById, record);
+ this.pendingOps.push({ kind: "upsert", record: { ...record } });
+ }
+
+ /** Queue an unconditional removal; applied in memory immediately and on disk at flush. */
+ remove(connectionId: string): void {
+ this.recordsById.delete(connectionId);
+ this.pendingOps.push({ kind: "remove", connectionId });
+ }
+
+ /**
+ * Atomically reserve a NEW connection id across processes, under the store's
+ * file lock, as a durable pending record written before any login starts.
+ * The record must carry a fresh opaque attemptId nonce (the ownership token
+ * for cancel and finalize). Resolves true only after the record write
+ * COMMITS; false when the id already exists on disk or the write failed —
+ * no ghost reservation is queued. The pending marker makes the id visible
+ * to every other process's allocations and to reconnect flows.
+ */
+ reserveConnectionId(record: McpConnectionRecord): Promise<boolean> {
+ return new Promise<boolean>((resolve) => {
+ let settled = false;
+ const settle = (won: boolean): void => {
+ if (settled) return;
+ settled = true;
+ resolve(won);
+ };
+ this.pendingOps.push({ kind: "reserve", record: { ...record }, resolve: settle });
+ void this.flush().catch(() => settle(false));
+ });
+ }
+
+ /**
+ * Claim an EXISTING account record for a guarded login (reconnect): OUR
+ * nonce is stamped on the record (any status) under the file lock, so the
+ * finalize owns it and cancel (releaseClaim) restores the record exactly.
+ * One-shot: settles on I/O or lock failure, never requeues.
+ */
+ claimConnectionId(options: {
+ connectionId: string;
+ attemptId: string;
+ /** Revalidate exact-account admission under the store lock, before claiming. */
+ isStillCurrent?: (record: McpConnectionRecord) => boolean;
+ }): Promise<boolean> {
+ return new Promise<boolean>((resolve) => {
+ let settled = false;
+ const settle = (claimed: boolean): void => {
+ if (settled) return;
+ settled = true;
+ resolve(claimed);
+ };
+ this.pendingOps.push({
+ kind: "claimConnectionId",
+ connectionId: options.connectionId,
+ attemptId: options.attemptId,
+ isStillCurrent: options.isStillCurrent,
+ resolve: settle,
+ });
+ void this.flush().catch(() => settle(false));
+ });
+ }
+
+ /**
+ * Release OUR claim on an existing account record: only the nonce is
+ * cleared — the record, its status, and any credential survive untouched
+ * (a cancelled reconnect preserves the account exactly).
+ * One-shot: settles on I/O or lock failure, never requeues.
+ */
+ releaseClaim(options: { connectionId: string; attemptId: string }): Promise<boolean> {
+ return new Promise<boolean>((resolve) => {
+ let settled = false;
+ const settle = (released: boolean): void => {
+ if (settled) return;
+ settled = true;
+ resolve(released);
+ };
+ this.pendingOps.push({
+ kind: "releaseClaim",
+ connectionId: options.connectionId,
+ attemptId: options.attemptId,
+ resolve: settle,
+ });
+ void this.flush().catch(() => settle(false));
+ });
+ }
+
+ /**
+ * Remove OUR pending reservation after a cancelled or failed login. Ownership
+ * is the opaque attempt nonce (same id, still pending, same attempt), so a
+ * late callback can never remove — or resurrect — another account's record.
+ */
+ removeReservation(connectionId: string, attemptId: string): Promise<boolean> {
+ return new Promise<boolean>((resolve) => {
+ let settled = false;
+ const settle = (removed: boolean): void => {
+ if (settled) return;
+ settled = true;
+ resolve(removed);
+ };
+ this.pendingOps.push({ kind: "removeReservation", connectionId, attemptId, resolve: settle });
+ void this.flush().catch(() => settle(false));
+ });
+ }
+
+ /**
+ * Remove an account ENTIRELY under the store's file lock: the record is
+ * deleted and `authCleanup` (credential logout) runs inside the SAME locked
+ * critical section, so disconnects share the store->auth lock ordering with
+ * finalizeAttempt — a concurrent finalize can never re-add an orphan
+ * credential after a disconnect removed the account.
+ *
+ * Outcomes: "removed" (record gone, write committed), "preserved"
+ * (credential-only logout semantics: the completed record was kept while
+ * the credential was removed — it shows the honest unbound state),
+ * "credential-only" (no record existed; a credential-only integration
+ * logged out), "logged-out" (the logout committed durably but the RECORD
+ * write failed — the partial state is reported honestly and the logout is
+ * never restored), "missing" (nothing existed), "failed" (nothing
+ * committed: the cleanup threw or never ran).
+ */
+ /**
+ * The generic /logout route's MCP account logout: ONE store-locked op that
+ * resolves the account id from CURRENT records, verifies the credential
+ * removal (throwing on auth-file write failures), and acts on the CURRENT
+ * record state. An account-key logout cancels PENDING attempts (deleting
+ * their record) and PRESERVES completed records (honest unbound/Reconnect).
+ * A staged-key logout CANCELS the attempt — invalidating its nonce — but
+ * NEVER deletes the account record (another client's ordinary login may
+ * hold the real key; deleting could orphan it) and resolves the
+ * state-neutral "refused" outcome.
+ */
+ removeAccountForProvider(options: {
+ providerId: string;
+ authStorage: { removeVerified: (provider: string) => boolean };
+ }): Promise<McpRemoveAccountResult> {
+ return new Promise<McpRemoveAccountResult>((resolve) => {
+ let settled = false;
+ const settle = (result: McpRemoveAccountResult): void => {
+ if (settled) return;
+ settled = true;
+ resolve(result);
+ };
+ this.pendingOps.push({
+ kind: "removeAccountForProvider",
+ providerId: options.providerId,
+ authStorage: options.authStorage,
+ resolve: settle,
+ });
+ void this.flush().catch(() => settle("failed"));
+ });
+ }
+
+ removeAccount(options: {
+ connectionId: string;
+ /** Returns whether a credential was actually removed. */
+ authCleanup: (connectionId: string) => boolean;
+ /**
+ * Credential-only logout semantics (the generic /logout route): pending
+ * attempts are cancelled, completed records are PRESERVED.
+ */
+ preserveCompletedRecord?: boolean;
+ }): Promise<McpRemoveAccountResult> {
+ return new Promise<McpRemoveAccountResult>((resolve) => {
+ let settled = false;
+ const settle = (result: McpRemoveAccountResult): void => {
+ if (settled) return;
+ settled = true;
+ resolve(result);
+ };
+ this.pendingOps.push({
+ kind: "removeAccount",
+ connectionId: options.connectionId,
+ authCleanup: options.authCleanup,
+ ...(options.preserveCompletedRecord ? { preserveCompletedRecord: true } : {}),
+ resolve: settle,
+ });
+ void this.flush().catch(() => settle("failed"));
+ });
+ }
+
+ /**
+ * Guarded credential commit for a successful login attempt. `commit` runs
+ * under the store's file lock ONLY when the record still carries OUR
+ * attempt nonce (any record status — a claimed connected/error account
+ * finalizes like a pending reservation) — the caller moves staged
+ * credentials there, sharing this lock's ordering with cancel/remove.
+ * A successful finalize CONSUMES the nonce itself, so a late callback can
+ * never replay ownership. Resolves "committed" only after the record write
+ * commits; "denied" when ownership was lost; "compensated"/"recovery-
+ * required" when the write failed (see McpFinalizeResult) — the staged
+ * credential then stays under the attempt key for the caller to discard.
+ */
+ finalizeAttempt(options: {
+ connectionId: string;
+ attemptId: string;
+ commit: (record: McpConnectionRecord) => McpConnectionRecord;
+ /** Rolls caller-side effects back under the lock when the write fails. */
+ compensate?: () => void;
+ }): Promise<McpFinalizeResult> {
+ return new Promise<McpFinalizeResult>((resolve) => {
+ let settled = false;
+ const settle = (result: McpFinalizeResult): void => {
+ if (settled) return;
+ settled = true;
+ resolve(result);
+ };
+ this.pendingOps.push({
+ kind: "finalizeAttempt",
+ connectionId: options.connectionId,
+ attemptId: options.attemptId,
+ commit: options.commit,
+ ...(options.compensate ? { compensate: options.compensate } : {}),
+ resolve: settle,
+ });
+ void this.flush().catch(() => settle("denied"));
+ });
+ }
+
+ /**
+ * Queue a verification result behind a guard. The guard is re-evaluated at flush
+ * time under the file lock, so a result computed against an old grant (or a
+ * connection that has since been disconnected) is discarded instead of
+ * resurrecting a stale record.
+ */
+ queueVerifyResult(
+ record: McpConnectionRecord,
+ isStillCurrent: () => boolean,
+ options?: { expectedRecord: McpConnectionRecord | undefined },
+ ): Promise<boolean> {
+ const expected = options ? options.expectedRecord : this.get(record.connectionId);
+ return new Promise((resolve) => {
+ let settled = false;
+ const settle = (committed: boolean): void => {
+ if (settled) return;
+ settled = true;
+ resolve(committed);
+ };
+ this.pendingOps.push({
+ kind: "verify",
+ record: { ...record },
+ expectedRecord: expected ? { ...expected } : undefined,
+ isStillCurrent,
+ resolve: settle,
+ });
+ });
+ }
+
+ /**
+ * Persist pending mutations. Serialized within this instance; the file lock
+ * orders us against other processes. Each flush re-reads the latest on-disk
+ * state and applies only this instance's pending operations, so concurrent
+ * writers cannot lose each other's records.
+ */
+ flush(): Promise<void> {
+ const run = async (): Promise<void> => {
+ let lockCompromised = false;
+ let lockCompromisedError: Error | undefined;
+ // Splice THIS run's batch BEFORE acquiring the lock: a lock-acquisition
+ // failure can then resolve one-shot attempt ops false and drop them —
+ // no denied reservation or finalize can materialize on a later flush.
+ // Ops queued while we wait for the lock stay in pendingOps and belong
+ // to the NEXT flush; the requeue below keeps this batch ahead of them.
+ const operations = this.pendingOps.splice(0);
+ let release: Awaited<ReturnType<typeof lockfile.lock>>;
+ try {
+ mkdirSync(dirname(this.path), { recursive: true });
+ // Exclusive, non-truncating create. The previous exists-then-write-empty
+ // could rename an empty file over records another process had just
+ // written; "wx" only ever creates a brand-new inode, so a first writer
+ // can never wipe anything. Content always comes from the locked
+ // read-modify-write below, so the winner writes nothing here.
+ try {
+ closeSync(openSync(this.path, "wx", 0o600));
+ chmodSync(this.path, 0o600);
+ } catch (error) {
+ if ((error as NodeJS.ErrnoException).code !== "EEXIST") throw error;
+ }
+ release = await lockfile.lock(realpathIfPresentSync(this.path), {
+ retries: {
+ retries: 10,
+ factor: 2,
+ minTimeout: 100,
+ maxTimeout: 10000,
+ randomize: true,
+ },
+ stale: 30000,
+ onCompromised: (error) => {
+ lockCompromised = true;
+ lockCompromisedError = error as Error;
+ },
+ });
+ } catch (lockError) {
+ // The lock never acquired: durable (idempotent) ops retry on the
+ // next flush; one-shot attempt ops settle false and are dropped —
+ // the caller already learned "no", so a later materialization
+ // would be a ghost.
+ this.pendingOps.unshift(...operations.filter((operation) => !isOneShotOperation(operation)));
+ for (const operation of operations) {
+ if (isOneShotOperation(operation)) {
+ if (operation.kind === "finalizeAttempt") operation.resolve("denied");
+ else if (operation.kind === "removeAccount") operation.resolve("failed");
+ else if (operation.kind === "removeAccountForProvider") operation.resolve("failed");
+ else operation.resolve(false);
+ }
+ }
+ throw lockError;
+ }
+ let committed = false;
+ try {
+ if (lockCompromised) throw lockCompromisedError ?? new Error("MCP connection store lock was compromised");
+ const records = parseRecords(safeReadFileSync(realpathIfPresentSync(this.path)));
+ // One-shot attempt operations (reserve/remove/finalize/removeAccount)
+ // resolve only AFTER the atomic write commits: a failed write means
+ // no durable reservation/removal/finalize happened, so the caller
+ // must NOT act on a ghost. Losing branches resolve false
+ // immediately. Every one-shot op settles EXACTLY once — a throwing
+ // callback, a failed write, or trailing ops in a failed batch can
+ // never leave a promise hanging or a one-shot requeued.
+ const deferred: Array<(committed: boolean) => void> = [];
+ const oneShot = new Set<PendingOp>();
+ const appliedFinalizes: Array<{
+ operation: Extract<PendingOp, { kind: "finalizeAttempt" }>;
+ rollback: () => void;
+ }> = [];
+ const committedFinalizes = new Set<PendingOp>();
+ try {
+ for (const operation of operations) {
+ if (operation.kind === "remove") {
+ records.delete(operation.connectionId);
+ } else if (operation.kind === "claimConnectionId") {
+ oneShot.add(operation);
+ try {
+ const existing = records.get(operation.connectionId);
+ if (
+ existing === undefined ||
+ existing.attemptId !== undefined ||
+ (operation.isStillCurrent !== undefined && !operation.isStillCurrent(existing))
+ ) {
+ operation.resolve(false);
+ } else {
+ // Stamp OUR nonce on the existing record (any
+ // status): the guarded reconnect owns it for the
+ // finalize; cancel releases via releaseClaim.
+ records.set(operation.connectionId, {
+ ...existing,
+ attemptId: operation.attemptId,
+ });
+ deferred.push((didCommit) => operation.resolve(didCommit));
+ }
+ } catch {
+ operation.resolve(false);
+ }
+ } else if (operation.kind === "releaseClaim") {
+ oneShot.add(operation);
+ try {
+ const existing = records.get(operation.connectionId);
+ if (
+ existing === undefined ||
+ existing.attemptId === undefined ||
+ existing.attemptId !== operation.attemptId
+ ) {
+ operation.resolve(false);
+ } else {
+ // Release OUR claim only: the record, its
+ // status, and any credential survive untouched.
+ const { attemptId: _released, ...withoutClaim } = existing;
+ records.set(operation.connectionId, withoutClaim);
+ deferred.push((didCommit) => operation.resolve(didCommit));
+ }
+ } catch {
+ operation.resolve(false);
+ }
+ } else if (operation.kind === "upsert") {
+ this.applyUpsert(records, operation.record);
+ } else if (operation.kind === "reserve") {
+ oneShot.add(operation);
+ try {
+ // Atomic under the file lock: exactly one cross-process
+ // contender wins the id; the loser allocates another.
+ if (records.has(operation.record.connectionId)) {
+ operation.resolve(false);
+ } else {
+ this.applyUpsert(records, operation.record);
+ deferred.push((didCommit) => operation.resolve(didCommit));
+ }
+ } catch {
+ operation.resolve(false);
+ }
+ } else if (operation.kind === "removeReservation") {
+ oneShot.add(operation);
+ try {
+ const existing = records.get(operation.connectionId);
+ if (
+ existing?.status === "pending" &&
+ existing.attemptId !== undefined &&
+ existing.attemptId === operation.attemptId
+ ) {
+ records.delete(operation.connectionId);
+ deferred.push((didCommit) => operation.resolve(didCommit));
+ } else {
+ // Not ours (completed, replaced, or gone): a late
+ // callback never removes another account's record.
+ operation.resolve(false);
+ }
+ } catch {
+ operation.resolve(false);
+ }
+ } else if (operation.kind === "removeAccountForProvider") {
+ oneShot.add(operation);
+ try {
+ // Resolve from CURRENT state under THIS lock: a
+ // staged-key selection that raced a completing
+ // finalize acts on what the lock sees — never a
+ // pre-lock cache snapshot.
+ const target = resolveMcpAccountLogoutTarget(operation.providerId, [...records.values()]);
+ {
+ const accountKey = `mcp:${target.connectionId}`;
+ const stagedSelection = target.credentialKey !== accountKey;
+ // Verified cleanup FIRST (store->auth): a
+ // throwing auth write fails the whole op
+ // and changes NO record.
+ const credentialRemoved = operation.authStorage.removeVerified(target.credentialKey);
+ if (stagedSelection) {
+ // A staged-key logout CANCELS the attempt but
+ // NEVER deletes the account record: another
+ // client's ordinary login may hold the real
+ // key at any moment, and a credential
+ // snapshot is not atomic with it — deleting
+ // the record could orphan that credential.
+ // The record stays visible (honest pending /
+ // unbound state); an explicit account Remove
+ // deletes it later.
+ const existing = records.get(target.connectionId);
+ if (existing?.attemptId !== undefined) {
+ // Invalidate the ACTIVE attempt nonce on ANY status
+ // (pending marker or a claimed connected/error
+ // account): the in-flight login can no longer
+ // finalize, and its denied path can never delete
+ // this preserved record.
+ const { attemptId: _cancelled, ...withoutAttempt } = existing;
+ records.set(target.connectionId, withoutAttempt);
+ }
+ // State-neutral outcome: the attempt is no
+ // longer current; the account keeps whatever
+ // state another login gave it.
+ deferred.push((didCommit) =>
+ didCommit
+ ? operation.resolve("refused")
+ : // The staged credential removal committed but the
+ // nonce invalidation failed to save: honest partial.
+ operation.resolve(credentialRemoved ? "logged-out" : "failed"),
+ );
+ } else {
+ // Account-key logout: cancel PENDING attempts
+ // (the record goes with the attempt), PRESERVE
+ // completed records (honest unbound/Reconnect) —
+ // clearing any ACTIVE claim nonce so an
+ // in-flight reconnect cannot re-write the
+ // credential the user just logged out.
+ const existing = records.get(target.connectionId);
+ const existed = existing !== undefined;
+ const removeRecord = existed && existing.status === "pending";
+ if (removeRecord) {
+ records.delete(target.connectionId);
+ } else if (existing?.attemptId !== undefined) {
+ const { attemptId: _cancelled, ...withoutAttempt } = existing;
+ records.set(target.connectionId, withoutAttempt);
+ }
+ const outcome: McpRemoveAccountResult = removeRecord
+ ? "removed"
+ : existed
+ ? "preserved"
+ : credentialRemoved
+ ? "credential-only"
+ : "missing";
+ deferred.push((didCommit) =>
+ didCommit
+ ? operation.resolve(outcome)
+ : // The logout committed durably but the record save failed:
+ // report the honest partial state, never restore.
+ operation.resolve(credentialRemoved ? "logged-out" : "failed"),
+ );
+ }
+ }
+ } catch {
+ operation.resolve("failed");
+ }
+ } else if (operation.kind === "removeAccount") {
+ oneShot.add(operation);
+ try {
+ // Verified cleanup FIRST, under the lock: a throwing
+ // auth-file write must NOT leave a deleted record
+ // behind — the working record/pending attempt
+ // SURVIVES a failed logout (nothing was
+ // cancelled or claimed). Cleanup runs even when
+ // no record exists (credential-only logouts).
+ // The generic logout route preserves COMPLETED
+ // records (they show the honest unbound state)
+ // while cancelling PENDING attempts.
+ const credentialRemoved = operation.authCleanup(operation.connectionId);
+ const existing = records.get(operation.connectionId);
+ const existed = existing !== undefined;
+ const removeRecord =
+ existed && (!operation.preserveCompletedRecord || existing.status === "pending");
+ if (removeRecord) {
+ records.delete(operation.connectionId);
+ }
+ const outcome: McpRemoveAccountResult = removeRecord
+ ? "removed"
+ : existed
+ ? "preserved"
+ : credentialRemoved
+ ? "credential-only"
+ : "missing";
+ deferred.push((didCommit) =>
+ didCommit
+ ? operation.resolve(outcome)
+ : // The credential logout already committed durably: never claim
+ // plain failure. "logged-out" reports the honest partial
+ // state (credential gone, record save failed, retry to
+ // finish); the logout is PRESERVED, never restored.
+ operation.resolve(credentialRemoved ? "logged-out" : "failed"),
+ );
+ } catch {
+ operation.resolve("failed");
+ }
+ } else if (operation.kind === "finalizeAttempt") {
+ oneShot.add(operation);
+ try {
+ const existing = records.get(operation.connectionId);
+ if (existing?.attemptId !== undefined && existing.attemptId === operation.attemptId) {
+ // Ownership is the EXPLICIT nonce, on any record status:
+ // a claimed connected/error account (guarded reconnect)
+ // finalizes like a pending reservation.
+ // Recovery is registered BEFORE any side effect:
+ // a throwing or partial commit callback still
+ // gets its rollback attempt under this lock.
+ const rollback = operation.compensate ?? (() => {});
+ try {
+ const committedRecord = operation.commit(existing);
+ appliedFinalizes.push({ operation, rollback });
+ const { attemptId: _consumed, ...completedRecord } = committedRecord;
+ this.applyUpsert(records, completedRecord);
+ committedFinalizes.add(operation);
+ } catch {
+ // Partial commit: roll back immediately.
+ try {
+ rollback();
+ operation.resolve("compensated");
+ } catch {
+ operation.resolve("recovery-required");
+ }
+ }
+ } else {
+ // Ownership lost (removed, replaced by another
+ // attempt, or completed elsewhere): the credential
+ // commit must NOT land on this account.
+ operation.resolve("denied");
+ }
+ } catch {
+ operation.resolve("recovery-required");
+ }
+ } else {
+ oneShot.add(operation);
+ const current = records.get(operation.record.connectionId);
+ if (
+ current?.attemptId === undefined &&
+ sameConnectionRecord(current, operation.expectedRecord) &&
+ operation.isStillCurrent()
+ ) {
+ this.applyUpsert(records, operation.record);
+ deferred.push((didCommit) => operation.resolve(didCommit));
+ } else {
+ operation.resolve(false);
+ }
+ }
+ }
+ writeFileAtomicSync(realpathIfPresentSync(this.path), serializeRecords(records), {
+ mode: 0o600,
+ });
+ if (lockCompromised)
+ throw lockCompromisedError ?? new Error("MCP connection store lock was compromised");
+ this.recordsById = records;
+ committed = true;
+ for (const operation of committedFinalizes) {
+ (operation as unknown as { resolve: (result: McpFinalizeResult) => void }).resolve("committed");
+ }
+ for (const settle of deferred) settle(true);
+ } finally {
+ if (!committed) {
+ // The write failed (or the lock was compromised): durable
+ // records put the batch back at the FRONT — idempotent ops
+ // retry cleanly — but one-shot attempt ops resolve false and
+ // are dropped: no ghost reservation, no surprise finalize.
+ this.pendingOps.unshift(
+ ...operations.filter((operation) => !oneShot.has(operation) && operation.kind !== "verify"),
+ );
+ // Finalizes whose commit callback ran get their rollback
+ // under the SAME lock before release. A successful rollback
+ // is honest all-or-nothing; a FAILING rollback surfaces
+ // recovery-required instead of claiming the account is
+ // unchanged.
+ for (const applied of appliedFinalizes) {
+ try {
+ applied.rollback();
+ applied.operation.resolve("compensated");
+ } catch {
+ applied.operation.resolve("recovery-required");
+ }
+ }
+ for (const operation of operations) {
+ if (operation.kind === "verify") operation.resolve(false);
+ }
+ for (const settle of deferred) settle(false);
+ }
+ }
+ } finally {
+ if (lockCompromised) await release().catch(() => undefined);
+ else await release();
+ }
+ };
+ this.flushChain = this.flushChain.then(run, run);
+ return this.flushChain;
+ }
+
+ private applyUpsert(records: Map<string, McpConnectionRecord>, record: McpConnectionRecord): void {
+ const now = Date.now();
+ const previous = records.get(record.connectionId);
+ const next: McpConnectionRecord = {
+ ...record,
+ createdAt: previous?.createdAt ?? record.createdAt ?? now,
+ updatedAt: now,
+ lastError: record.lastError ? record.lastError.slice(0, MAX_LAST_ERROR_LENGTH) : undefined,
+ };
+ if (next.status !== "connected") {
+ delete next.verifiedAt;
+ delete next.toolCount;
+ }
+ records.set(record.connectionId, next);
+ }
+}
+
+function sameConnectionRecord(left: McpConnectionRecord | undefined, right: McpConnectionRecord | undefined): boolean {
+ if (left === undefined || right === undefined) return left === right;
+ const fields: readonly (keyof McpConnectionRecord)[] = [
+ "connectionId",
+ "serviceId",
+ "endpoint",
+ "label",
+ "status",
+ "createdAt",
+ "updatedAt",
+ "verifiedAt",
+ "toolCount",
+ "lastError",
+ "attemptId",
+ ];
+ return fields.every((field) => left[field] === right[field]);
+}
+
+function safeReadFileSync(path: string): string | undefined {
+ try {
+ return readFileSync(path, "utf8");
+ } catch {
+ return undefined;
+ }
+}
+
+/**
+ * Outcome of an account-removal transaction. "removed": record + credential
+ * both cleared under the lock. "credential-only": no record existed (legacy
+ * grants, failed record saves) but the credential logout ran. "missing":
+ * nothing to remove. "failed": the durable write failed — nothing committed.
+ */
+export type McpRemoveAccountResult =
+ | "removed"
+ | "preserved"
+ | "refused"
+ | "credential-only"
+ | "logged-out"
+ | "missing"
+ | "failed";
+
+/**
+ * Outcome of a guarded finalize. "committed": record write landed. "denied":
+ * ownership lost, no side effects. "compensated": the write failed and the
+ * rollback restored every side effect — honest all-or-nothing. "recovery-
+ * required": the commit callback or the rollback itself threw; partial state
+ * may remain and the caller must surface recovery, not claim success.
+ */
+export type McpFinalizeResult = "committed" | "denied" | "compensated" | "recovery-required";
diff --git a/packages/coding-agent/src/core/mcp/mcp-manager.ts b/packages/coding-agent/src/core/mcp/mcp-manager.ts
index b924b3c35e..8f66dc8c61 100644
--- a/packages/coding-agent/src/core/mcp/mcp-manager.ts
+++ b/packages/coding-agent/src/core/mcp/mcp-manager.ts
@@ -1,16 +1,37 @@
// Host side of MCP integrations. The protocol itself runs Python-side in the kernel; the host
-// only registers OAuth providers, gates integration skills by auth, and serves mcp.* host-requests.
+// registers OAuth providers, gates integration skills by auth, verifies connections with a
+// real MCP handshake, and serves mcp.* host-requests including the service-catalog inventory.
-import {
- BUILTIN_MCP_CATALOG,
- createMcpOAuthProvider,
- getCatalogEntry,
- registerBuiltinMcpOAuthProviders,
-} from "@earendil-works/pi-ai/mcp";
+import { join } from "node:path";
+import { registerBuiltinMcpOAuthProviders } from "@earendil-works/pi-ai/mcp";
import { registerOAuthProvider, unregisterOAuthProvider } from "@earendil-works/pi-ai/oauth";
+import { getAgentDir } from "../../config.js";
import type { AuthStorage } from "../auth-storage.js";
import type { McpServerConfig } from "../settings-manager.js";
import type { AcpMcpServerConfig } from "./acp-mcp-types.js";
+import type { probeMcpEndpoint } from "./connection-probe.js";
+import { MCP_PROBE_ERRORS } from "./connection-probe.js";
+import { type McpConnectionRecord, McpConnectionStore } from "./connection-store.js";
+import {
+ buildConnectionViews,
+ buildPluginViews,
+ createConfiguredMcpProvider,
+ decodePluginCursor,
+ defaultServiceCatalogProvider,
+ filterPluginViewsByStatus,
+ isPasteableTokenService,
+ type McpPluginView,
+ type McpServiceCatalogProvider,
+ type McpServiceDescriptor,
+ mcpLoginEligibility,
+ mcpStaticTokenUsable,
+ oauthGrantUsable,
+ pagePluginViews,
+ reservedMcpOwnership,
+ resolveMcpOAuthIdentity,
+ searchPluginViews,
+ verifyMcpConnection,
+} from "./service-catalog.js";
export interface McpManagerOptions {
authStorage: AuthStorage;
@@ -18,6 +39,21 @@ export interface McpManagerOptions {
getUserServers?: () => Record<string, McpServerConfig> | undefined;
/** Start an interactive host-side login for a server. Provided by the UI mode. */
beginLogin?: (server: string) => Promise<void>;
+ /**
+ * Explicit user-approved connect handoff for the mcp.connect host request.
+ * Registered only when provided; never auto-opens a browser.
+ */
+ beginConnect?: (serviceId: string) => Promise<boolean>;
+ /** Service catalog source; defaults to the merged catalog and declared local sources. */
+ getServiceCatalog?: McpServiceCatalogProvider;
+ /** Declared local service-catalog sources (settings); re-read on every refresh. */
+ getCatalogSources?: () => string[];
+ /** Connection record store; defaults to <agentDir>/mcp-connections.json. */
+ connectionStore?: McpConnectionStore;
+ /** Injectable MCP verification probe (tests). */
+ probeConnection?: typeof probeMcpEndpoint;
+ /** Disable demand-driven verification probes (tests that assert no network). */
+ noBackgroundVerification?: boolean;
}
/** A resolved integration: a catalog/user entry plus its provider id. */
@@ -26,32 +62,87 @@ const GENERIC_SERVER_NAME_PATTERN = /^[A-Za-z0-9][A-Za-z0-9_-]{0,63}$/;
interface ResolvedIntegration {
server: string;
label: string;
- config: McpServerConfig;
+ /** Served config; catalog token services carry a `credentialSource` marker. */
+ config: McpServerConfig & { credentialSource?: "static-token" };
usesOAuth: boolean;
/** True when this came from Settings.mcpServers (may override a catalog name). */
userDeclared?: boolean;
+ blockedReason?: string;
+ /**
+ * Catalog entries only: the descriptor is explicitly public no-auth AND
+ * setup-ready, so credential-free dispatch is honest. Everything else
+ * without a stored credential stays closed.
+ */
+ credentialFreeEligible?: boolean;
+ /**
+ * Catalog token services only: the entry collects exactly ONE credential
+ * (alternative field names collapse to one prompt), so a stored
+ * `mcp_static_token` credential under this exact id is a valid credential
+ * source — bound to this endpoint, never inferred from the setup field
+ * ids (those env vars are NOT read).
+ */
+ staticTokenEligible?: boolean;
+ /** Parent catalog service id for per-account connections (records keep it). */
+ catalogServiceId?: string;
}
+const LIST_PLUGINS_DEFAULT_LIMIT = 50;
+const LIST_PLUGINS_MAX_LIMIT = 200;
+const SEARCH_PLUGINS_DEFAULT_LIMIT = 10;
+const SEARCH_PLUGINS_MAX_LIMIT = 50;
+const CONNECTION_STATUS_FILTERS = new Set([
+ "connected",
+ "pending",
+ "not_connected",
+ "setup_required",
+ "disabled",
+ "error",
+]);
+
export class McpManager {
private readonly authStorage: AuthStorage;
private readonly getUserServers: () => Record<string, McpServerConfig> | undefined;
private readonly beginLogin?: (server: string) => Promise<void>;
+ private readonly beginConnect?: (serviceId: string) => Promise<boolean>;
+ private readonly getServiceCatalog: McpServiceCatalogProvider;
+ private readonly getCatalogSources: (() => string[]) | undefined;
+ private readonly connectionStore: McpConnectionStore;
+ private readonly probeConnection: typeof probeMcpEndpoint | undefined;
+ private readonly noBackgroundVerification: boolean;
private integrations = new Map<string, ResolvedIntegration>();
+ private services: readonly McpServiceDescriptor[] = [];
private acpServers = new Map<string, AcpMcpServerConfig>();
private acpOwnerId?: string;
/** Provider ids we registered for user servers, so refresh can drop removed ones. */
- private registeredUserProviderIds = new Set<string>();
+ private ownedProviderIds = new Set<string>();
+ private verificationInFlight = new Set<string>();
constructor(options: McpManagerOptions) {
this.authStorage = options.authStorage;
this.getUserServers = options.getUserServers ?? (() => undefined);
this.beginLogin = options.beginLogin;
- this.resolveIntegrations();
- this.registerProviders();
+ this.beginConnect = options.beginConnect;
+ this.getCatalogSources = options.getCatalogSources;
+ this.getServiceCatalog =
+ options.getServiceCatalog ??
+ defaultServiceCatalogProvider(
+ () => this.getCatalogSources?.() ?? [],
+ () => this.connectionStore.records(),
+ );
+ this.connectionStore =
+ options.connectionStore ?? McpConnectionStore.open(join(getAgentDir(), "mcp-connections.json"));
+ this.probeConnection = options.probeConnection;
+ this.noBackgroundVerification = options.noBackgroundVerification ?? false;
+ this.refresh();
}
- /** Re-read settings and re-register providers; call after a session reload. */
+ /**
+ * Re-read settings/catalog and re-register providers. Verification stays
+ * demand-driven (host-request reads); the store reloads because the
+ * interactive client process persists records the daemon must observe.
+ */
refresh(): void {
+ this.connectionStore.load();
this.resolveIntegrations();
this.registerProviders();
}
@@ -87,17 +178,101 @@ export class McpManager {
return `mcp:${server}`;
}
+ /** Catalog service ids that own their name: user settings cannot shadow them. */
+ private isReservedServerName(server: string): boolean {
+ return this.services.some((service) => service.legacyBuiltin && service.serviceId === server);
+ }
+
+ /** Whether a user-declared server name is owned by the user rather than the catalog. */
+ private isUserOwnedName(server: string): boolean {
+ return this.getUserServers()?.[server] !== undefined && !this.isReservedServerName(server);
+ }
+
private resolveIntegrations(): void {
+ this.services = this.getServiceCatalog();
const integrations = new Map<string, ResolvedIntegration>();
- for (const entry of BUILTIN_MCP_CATALOG) {
- integrations.set(entry.server, {
- server: entry.server,
- label: entry.label,
- config: { type: "http", url: entry.url, oauth: true },
- usesOAuth: entry.oauth?.kind === "oauth",
+ for (const service of this.services) {
+ if (service.transport.type !== "http" || !service.transport.url) continue;
+ const usesOAuth = service.authStrategy === "oauth" || service.authStrategy === "unknown";
+ const eligibility = mcpLoginEligibility({
+ connectionId: service.serviceId,
+ service,
+ record: this.connectionStore.get(service.serviceId),
+ credential: this.authStorage.get(this.providerId(service.serviceId)),
+ });
+ // Token services authenticate with a pasted static token credential:
+ // the marker tells the kernel where the bearer comes from, and the
+ // config is only served once credentials exist (isAuthed).
+ const staticToken = isPasteableTokenService(service);
+ integrations.set(service.serviceId, {
+ server: service.serviceId,
+ label: service.label,
+ config: {
+ type: "http",
+ url:
+ eligibility.repair && this.connectionStore.get(service.serviceId)
+ ? eligibility.endpoint!
+ : service.transport.url,
+ ...(usesOAuth ? { oauth: true } : {}),
+ ...(staticToken ? { credentialSource: "static-token" as const } : {}),
+ },
+ usesOAuth,
+ credentialFreeEligible: service.authStrategy === "none" && service.setup.status === "ready",
+ staticTokenEligible: staticToken,
+ });
+ }
+ // Per-account connections ("acme-2"): each record of a catalog service is
+ // its own dispatchable id with its own credentials, so every existing
+ // flow (verify, inventory, mcp.config, demand-driven verification) serves
+ // accounts through the same machinery.
+ for (const record of this.connectionStore.records()) {
+ if (record.connectionId === record.serviceId) continue;
+ const service = this.services.find((entry) => entry.serviceId === record.serviceId);
+ if (!service || service.transport.type !== "http" || !service.transport.url) continue;
+ if (integrations.has(record.connectionId)) continue;
+ const eligibility = mcpLoginEligibility({
+ connectionId: record.connectionId,
+ service,
+ record,
+ credential: this.authStorage.get(this.providerId(record.connectionId)),
+ });
+ // Per-account connections mirror their PARENT's catalog
+ // classification exactly (the same rule the parent entry above
+ // uses): OAuth accounts stay OAuth, a token-service account pastes,
+ // and a public no-auth account stays credential-free — never a
+ // blanket OAuth shape a token or no-auth service never had.
+ const usesOAuth = service.authStrategy === "oauth" || service.authStrategy === "unknown";
+ const staticToken = isPasteableTokenService(service);
+ integrations.set(record.connectionId, {
+ server: record.connectionId,
+ label: `${service.label} (${record.connectionId})`,
+ config: {
+ type: "http",
+ url: eligibility.repair ? eligibility.endpoint! : service.transport.url,
+ ...(usesOAuth ? { oauth: true } : {}),
+ ...(staticToken ? { credentialSource: "static-token" as const } : {}),
+ },
+ usesOAuth,
+ credentialFreeEligible: service.authStrategy === "none" && service.setup.status === "ready",
+ staticTokenEligible: staticToken,
+ catalogServiceId: service.serviceId,
});
}
for (const [server, config] of Object.entries(this.getUserServers() ?? {})) {
+ const service = this.services.find((entry) => entry.serviceId === server && entry.legacyBuiltin);
+ if (service) {
+ const ownership = reservedMcpOwnership(service, config);
+ for (const integration of integrations.values()) {
+ if (integration.server !== server && integration.catalogServiceId !== server) continue;
+ if (ownership.status !== "canonical") {
+ integration.config = { ...integration.config, enabled: false };
+ integration.blockedReason = ownership.setupHint;
+ } else if (config.type === "http") {
+ integration.config = { ...config, ...integration.config };
+ }
+ }
+ continue;
+ }
integrations.set(server, {
server,
label: server,
@@ -110,71 +285,270 @@ export class McpManager {
}
private registerProviders(): void {
- registerBuiltinMcpOAuthProviders();
- this.registerUserProviders();
+ this.registerAllProviders();
}
/**
- * Register OAuth providers for user-declared (non-catalog) servers. Public so it
- * can run after ModelRegistry.refresh() resets the registry — otherwise custom
- * `mcp:<server>` providers vanish on every refresh (e.g. post-login).
+ * Atomic, idempotent reconciliation of every OAuth provider this manager owns:
+ * legacy built-ins, eligible catalog services, and user-declared servers.
+ * Desired providers are (re-)registered first; only ids we previously owned
+ * disappear. Safe to run after ModelRegistry.refresh() resets the registry
+ * (the reset hook) and after settings/catalog changes — override removals
+ * restore the catalog provider in one pass, leaving no gaps.
*/
- registerUserProviders(): void {
- const current = new Set<string>();
+ registerAllProviders(): void {
+ registerBuiltinMcpOAuthProviders();
+ const desired = new Map<string, ReturnType<typeof createConfiguredMcpProvider>>();
+ for (const service of this.services) {
+ if (service.legacyBuiltin) continue;
+ if (service.transport.type !== "http" || !service.transport.url) continue;
+ if (service.setup.status !== "ready") continue;
+ if (service.authStrategy !== "oauth" && service.authStrategy !== "unknown") continue;
+ if (this.isUserOwnedName(service.serviceId)) continue;
+ desired.set(
+ this.providerId(service.serviceId),
+ createConfiguredMcpProvider({
+ server: service.serviceId,
+ label: service.label,
+ url: service.transport.url,
+ reviewedScopes: service.reviewedScopes,
+ clientRegistration: service.clientRegistration,
+ }),
+ );
+ }
for (const integration of this.integrations.values()) {
- if (!integration.userDeclared || integration.config.type !== "http" || getCatalogEntry(integration.server)) {
- continue;
- }
- const id = this.providerId(integration.server);
- if (integration.usesOAuth) {
- current.add(id);
- registerOAuthProvider(
- createMcpOAuthProvider({
- server: integration.server,
- label: integration.label,
- url: integration.config.url,
- }),
- );
- }
+ if (!integration.userDeclared || integration.config.type !== "http") continue;
+ if (this.isReservedServerName(integration.server)) continue;
+ if (!integration.usesOAuth) continue;
+ desired.set(
+ this.providerId(integration.server),
+ createConfiguredMcpProvider({
+ server: integration.server,
+ label: integration.label,
+ url: integration.config.url,
+ identity: resolveMcpOAuthIdentity(integration.config),
+ }),
+ );
+ }
+ const legacyIds = new Set(
+ this.services.filter((service) => service.legacyBuiltin).map((service) => this.providerId(service.serviceId)),
+ );
+ // Alias connections register their own provider so an "Add account"
+ // login targets mcp:<connectionId> and its bound credential — but ONLY
+ // under the SAME catalog classification as the parent service above:
+ // an alias of a token or requires-setup (or otherwise non-OAuth)
+ // service never gains an OAuth provider, so a second account keeps its
+ // parent's token-based treatment instead of being offered a browser
+ // login whose stored grant isAuthed would reject.
+ for (const record of this.connectionStore.records()) {
+ if (record.connectionId === record.serviceId) continue;
+ const service = this.services.find((entry) => entry.serviceId === record.serviceId);
+ if (!service || service.transport.type !== "http" || !service.transport.url) continue;
+ if (service.setup.status !== "ready") continue;
+ if (service.authStrategy !== "oauth" && service.authStrategy !== "unknown") continue;
+ if (this.isUserOwnedName(record.connectionId)) continue;
+ const parentConfig = this.getUserServers()?.[record.serviceId];
+ desired.set(
+ this.providerId(record.connectionId),
+ createConfiguredMcpProvider({
+ server: record.connectionId,
+ label: `${service.label} (${record.connectionId})`,
+ url: service.transport.url,
+ // A per-account record inherits its PARENT's client identity:
+ // settings config for user-declared parents, catalog
+ // advisory for catalog parents — never the bare record.
+ identity: service.legacyBuiltin ? {} : resolveMcpOAuthIdentity(parentConfig),
+ reviewedScopes: service.reviewedScopes,
+ clientRegistration: service.clientRegistration,
+ }),
+ );
}
- // Drop providers for user servers removed since the last registration.
- for (const id of this.registeredUserProviderIds) {
- if (!current.has(id)) unregisterOAuthProvider(id);
+ for (const [id, provider] of desired) {
+ if (!legacyIds.has(id)) registerOAuthProvider(provider);
}
- this.registeredUserProviderIds = current;
+ for (const id of this.ownedProviderIds) {
+ if (!desired.has(id) && !legacyIds.has(id)) unregisterOAuthProvider(id);
+ }
+ this.ownedProviderIds = new Set([...desired.keys(), ...legacyIds]);
}
- /** True when valid credentials exist for the integration (drives enablement). */
+ /** True when valid credentials exist for the integration (drives dispatch eligibility). */
private isAuthed(integration: ResolvedIntegration): boolean {
if (integration.config.enabled === false) return false;
- if (integration.userDeclared && getCatalogEntry(integration.server)) return false;
+ // A bundled catalog service owns its name; a shadowing user entry is dead by design
+ // so its token can never replay against the official endpoint.
+ if (integration.userDeclared && this.isReservedServerName(integration.server)) return false;
if (integration.config.type === "stdio") return true;
const { bearerTokenEnvVar } = integration.config;
+ if (!integration.userDeclared && !integration.usesOAuth) {
+ // Catalog entry without OAuth: credential-free dispatch ONLY for an
+ // explicitly public no-auth, setup-ready descriptor. A token service
+ // additionally accepts its STORED pasted static token — bound to
+ // this exact id and endpoint. Everything else (no stored token,
+ // unbound token, or a non-token service with a stray credential)
+ // fails closed — matching the picker setup_required view. Credential
+ // binding is never inferred from setup field ids: the env vars the
+ // fields NAME are never read as credential sources.
+ if (integration.credentialFreeEligible === true) return true;
+ if (integration.staticTokenEligible === true) {
+ return mcpStaticTokenUsable(
+ this.authStorage.get(this.providerId(integration.server)),
+ integration.config.url,
+ ).usable;
+ }
+ return false;
+ }
if (!integration.usesOAuth && !bearerTokenEnvVar) return true;
- if (bearerTokenEnvVar && process.env[bearerTokenEnvVar]?.trim()) {
- return true;
+ if (bearerTokenEnvVar) {
+ // The configured env var is the ONLY credential source for this
+ // server: when it is unset, a stale OAuth credential stored under the
+ // same id must never authorize dispatch.
+ return Boolean(process.env[bearerTokenEnvVar]?.trim());
}
- const cred = this.authStorage.get(this.providerId(integration.server));
- if (cred === undefined) return false;
- // Builtin URLs are code-constant; only user-declared endpoints can be retargeted, so only their
- // tokens must prove where they belong. Mismatched or unbound tokens require re-login.
- if (!integration.userDeclared) return true;
- const endpoint = (cred as { endpoint?: string }).endpoint;
- return typeof endpoint === "string" && endpoint === integration.config.url;
+ // ONE shared grant-usability rule (with the picker/account-state
+ // resolver): typed oauth, non-empty access, endpoint binding, and no
+ // expired-without-refresh state — dispatch eligibility and the picker
+ // can never disagree.
+ return oauthGrantUsable(this.authStorage.get(this.providerId(integration.server)), integration.config.url).usable;
}
- /** `-<server>/SKILL.md` overrides for every built-in integration the user isn't logged into. */
+ /**
+ * Disable stale legacy skill packages from older installations when their
+ * canonical integration is not enabled. Current installations use generic MCP.
+ */
getDisabledBuiltinSkillOverrides(): string[] {
const overrides: string[] = [];
- for (const entry of BUILTIN_MCP_CATALOG) {
- const integration = this.integrations.get(entry.server);
+ for (const service of this.services) {
+ if (!service.legacyBuiltin) continue;
+ const integration = this.integrations.get(service.serviceId);
if (integration && !this.isAuthed(integration)) {
- overrides.push(`-${entry.server}/SKILL.md`);
+ overrides.push(`-${service.serviceId}/SKILL.md`);
}
}
return overrides;
}
+ /**
+ * Verify a connection with a real MCP handshake and persist the record.
+ * Used after login and for pending/error background re-verification.
+ */
+ async verifyConnection(server: string): Promise<McpConnectionRecord> {
+ const integration = this.integrations.get(server);
+ if (!integration) throw new Error(`Unknown MCP connection: ${server}`);
+ if (integration.blockedReason || integration.config.enabled === false) {
+ throw new Error(integration.blockedReason ?? "Disabled in settings.");
+ }
+ if (integration.config.type !== "http") {
+ throw new Error(`MCP connection ${server} is not an HTTP endpoint`);
+ }
+ if (integration.userDeclared && this.isReservedServerName(server)) {
+ throw new Error(`MCP connection ${server} is reserved by a built-in service`);
+ }
+ return verifyMcpConnection({
+ authStorage: this.authStorage,
+ connectionStore: this.connectionStore,
+ connectionId: server,
+ // Per-account records keep the parent catalog id as their serviceId.
+ serviceId: integration.catalogServiceId ?? server,
+ label: integration.label,
+ endpoint: integration.config.url,
+ usesOAuth: integration.usesOAuth,
+ bearerTokenEnvVar: integration.config.type === "http" ? integration.config.bearerTokenEnvVar : undefined,
+ // Token services verify with the stored pasted token as the bearer.
+ ...(integration.staticTokenEligible === true ? { staticToken: true } : {}),
+ ...(this.probeConnection ? { probe: this.probeConnection } : {}),
+ });
+ }
+
+ /**
+ * Background verification for connections that hold credentials but lack a
+ * verified record (or whose last verification failed/retryable-pending).
+ * Bounded by the in-flight set; failures land in the record, not the console.
+ */
+ private async verifyPendingConnections(): Promise<void> {
+ if (this.noBackgroundVerification) return;
+ const candidates: string[] = [];
+ for (const integration of this.integrations.values()) {
+ if (integration.config.type !== "http") continue;
+ if (integration.userDeclared && this.isReservedServerName(integration.server)) continue;
+ // Only bound, usable credentials may be probed; unbound or cross-endpoint
+ // grants surface as Reconnect and are never auto-probed. The first
+ // demand-driven pass records the unusable state once so /plugins shows
+ // an honest Reconnect instead of a stale pending.
+ if (!this.isAuthed(integration)) {
+ if (
+ !integration.blockedReason &&
+ integration.config.enabled !== false &&
+ integration.usesOAuth &&
+ !this.connectionStore.get(integration.server)
+ ) {
+ const credential = this.authStorage.getVerified(this.providerId(integration.server));
+ if (credential !== undefined) {
+ const snapshot = JSON.stringify(credential);
+ const now = Date.now();
+ void this.connectionStore.queueVerifyResult(
+ {
+ connectionId: integration.server,
+ serviceId: integration.catalogServiceId ?? integration.server,
+ endpoint: integration.config.url,
+ label: integration.label,
+ status: "error",
+ createdAt: now,
+ updatedAt: now,
+ lastError: MCP_PROBE_ERRORS.UNBOUND_CREDENTIAL,
+ },
+ () =>
+ JSON.stringify(this.authStorage.getVerified(this.providerId(integration.server))) === snapshot,
+ { expectedRecord: undefined },
+ );
+ void this.connectionStore.flush().catch(() => undefined);
+ }
+ }
+ continue;
+ }
+ // Demand-driven verification covers credential-bearing connections:
+ // OAuth grants, env-var bearers, and stored pasted static tokens.
+ if (
+ !integration.usesOAuth &&
+ !integration.config.bearerTokenEnvVar &&
+ integration.staticTokenEligible !== true
+ )
+ continue;
+ if (integration.config.enabled === false) continue;
+ const record = this.connectionStore.get(integration.server);
+ if (record?.attemptId !== undefined || record?.status === "connected") continue;
+ if (this.verificationInFlight.has(integration.server)) continue;
+ candidates.push(integration.server);
+ }
+ await Promise.allSettled(
+ candidates.map(async (server) => {
+ this.verificationInFlight.add(server);
+ try {
+ await this.verifyConnection(server);
+ } catch {
+ // Verification failures are recorded inside verifyConnection;
+ // unexpected errors must not crash the host.
+ } finally {
+ this.verificationInFlight.delete(server);
+ }
+ }),
+ );
+ }
+
+ private pluginViews(): McpPluginView[] {
+ return buildPluginViews({
+ services: this.services,
+ userServers: this.getUserServers(),
+ authStorage: this.authStorage,
+ connectionStore: this.connectionStore,
+ });
+ }
+
+ /** Current resolved service descriptors (the same resolution the UI uses). */
+ getServices(): readonly McpServiceDescriptor[] {
+ return this.services;
+ }
+
/** Host-request handlers exposed to the kernel. */
hostHandlers(): Record<string, (payload: Record<string, unknown>) => Promise<Record<string, unknown>>> {
const handlers: Record<string, (payload: Record<string, unknown>) => Promise<Record<string, unknown>>> = {
@@ -189,8 +563,9 @@ export class McpManager {
if (!key) throw new Error(`Could not refresh credentials for ${server}`);
return {};
},
- // Resolved config so the kernel skill connects to the same URL the host
- // registered/authenticated (honors a user's mcpServers `url` override).
+ // Resolved config so the kernel connects to the same URL the host
+ // registered/authenticated. Catalog services join the generic route once
+ // the user holds credentials; user-declared servers resolve from settings.
"mcp.config": async (payload) => {
const server = String(payload.server ?? "");
if (!server) throw new Error("mcp.config requires a server");
@@ -200,9 +575,54 @@ export class McpManager {
return { ...config, credentialSource: "acp" };
}
const integration = this.integrations.get(server);
- if (!integration?.userDeclared || getCatalogEntry(server)) return {};
+ if (!integration) return {};
+ if (integration.userDeclared) {
+ if (this.isReservedServerName(server)) return {};
+ return { ...integration.config };
+ }
+ // Catalog service: serve the definition only with credentials present,
+ // so dispatch can authenticate; verification state lives in the record.
+ if (!this.isAuthed(integration)) return {};
return { ...integration.config };
},
+ "mcp.list_plugins": async (payload) => {
+ const status = payload.connectionStatus;
+ if (status !== undefined && typeof status !== "string") {
+ throw new Error("mcp.list_plugins connectionStatus must be a string");
+ }
+ if (status !== undefined && !CONNECTION_STATUS_FILTERS.has(status)) {
+ throw new Error(`mcp.list_plugins received an unknown connectionStatus: ${status}`);
+ }
+ const limit = boundedLimit(payload.limit, LIST_PLUGINS_DEFAULT_LIMIT, LIST_PLUGINS_MAX_LIMIT, "limit");
+ const cursor = decodePluginCursor(typeof payload.cursor === "string" ? payload.cursor : undefined);
+ let views = this.pluginViews();
+ if (status !== undefined) views = filterPluginViewsByStatus(views, status);
+ const page = pagePluginViews(views, cursor, limit);
+ // Demand-driven verification: credentialed-but-unverified entries get a
+ // background handshake so the next listing reflects real state.
+ void this.verifyPendingConnections();
+ return { plugins: page.plugins, nextCursor: page.nextCursor };
+ },
+ "mcp.search_plugins": async (payload) => {
+ const query = payload.query;
+ if (typeof query !== "string" || !query.trim()) {
+ throw new Error("mcp.search_plugins requires a non-empty query");
+ }
+ const limit = boundedLimit(payload.limit, SEARCH_PLUGINS_DEFAULT_LIMIT, SEARCH_PLUGINS_MAX_LIMIT, "limit");
+ const views = searchPluginViews(this.pluginViews(), query, limit);
+ void this.verifyPendingConnections();
+ return { plugins: views, nextCursor: null };
+ },
+ "mcp.list_connections": async () => {
+ const connections = buildConnectionViews({
+ services: this.services,
+ userServers: this.getUserServers(),
+ authStorage: this.authStorage,
+ connectionStore: this.connectionStore,
+ acpServers: [...this.acpServers.values()],
+ });
+ return { connections };
+ },
};
// Only expose begin_login when an interactive login is actually wired, so the
// kernel doesn't get a handler whose only behavior is to throw.
@@ -215,6 +635,38 @@ export class McpManager {
return {};
};
}
+ // mcp.connect is an explicit user-approval handoff; without an approver it
+ // stays unregistered and the kernel reports "no handler" honestly.
+ const beginConnect = this.beginConnect;
+ if (beginConnect) {
+ handlers["mcp.connect"] = async (payload) => {
+ const serviceId = String(payload.serviceId ?? "");
+ if (!serviceId) throw new Error("mcp.connect requires a serviceId");
+ const view = this.pluginViews().find((plugin) => plugin.serviceId === serviceId);
+ if (!view) throw new Error(`Unknown MCP service: ${serviceId}`);
+ // The approver seam may run on pending rows (verify a stored grant) and
+ // error rows (re-login), matching the UI's Connect/Reconnect actions.
+ if (view.loginPending || (!view.connectable && view.connectionStatus !== "pending")) {
+ throw new Error(
+ view.setupHint ??
+ `${view.label} cannot be connected automatically (status: ${view.connectionStatus}).`,
+ );
+ }
+ const connected = await beginConnect(serviceId);
+ if (!connected) return { status: "cancelled" };
+ // The approver completed the OAuth flow. "Connected" is an honest
+ // claim only after a real handshake over the stored grant verifies.
+ const record = await this.verifyConnection(serviceId);
+ if (record.status !== "connected") {
+ return {
+ status: "error",
+ message: record.lastError ?? "verification-failed",
+ connectionId: serviceId,
+ };
+ }
+ return { status: "connected", connectionId: serviceId, toolCount: record.toolCount };
+ };
+ }
return handlers;
}
@@ -223,16 +675,10 @@ export class McpManager {
return [...this.acpServers.values()];
}
- /** Enabled user-declared servers available through the generic kernel API. */
+ /** Enabled servers available through the generic kernel API (user-declared + connected catalog services). */
getEnabledPersistentGenericServers(): string[] {
return Array.from(this.integrations.values())
- .filter(
- (integration) =>
- integration.userDeclared &&
- GENERIC_SERVER_NAME_PATTERN.test(integration.server) &&
- !getCatalogEntry(integration.server) &&
- this.isAuthed(integration),
- )
+ .filter((integration) => GENERIC_SERVER_NAME_PATTERN.test(integration.server) && this.isAuthed(integration))
.map((integration) => integration.server)
.sort((left, right) => left.localeCompare(right));
}
@@ -246,4 +692,23 @@ export class McpManager {
usesOAuth: integration.usesOAuth,
}));
}
+
+ /** Connection records for /mcp logout wiring and tests. */
+ getConnectionRecord(connectionId: string): McpConnectionRecord | undefined {
+ return this.connectionStore.get(connectionId);
+ }
+
+ /** Remove a connection record (used when credentials are removed). */
+ async removeConnectionRecord(connectionId: string): Promise<void> {
+ this.connectionStore.remove(connectionId);
+ await this.connectionStore.flush().catch(() => undefined);
+ }
+}
+
+function boundedLimit(value: unknown, defaultLimit: number, maxLimit: number, name: string): number {
+ if (value === undefined) return defaultLimit;
+ if (typeof value !== "number" || !Number.isInteger(value) || value < 1) {
+ throw new Error(`mcp host request ${name} must be a positive integer`);
+ }
+ return Math.min(value, maxLimit);
}
diff --git a/packages/coding-agent/src/core/mcp/service-catalog.ts b/packages/coding-agent/src/core/mcp/service-catalog.ts
new file mode 100644
index 0000000000..0a318ea14b
--- /dev/null
+++ b/packages/coding-agent/src/core/mcp/service-catalog.ts
@@ -0,0 +1,1481 @@
+// Service-catalog view builders: the shared projection of catalog services and
+// user-declared MCP servers used by the /plugins picker, the mcp.* host requests,
+// and the kernel inventory. Pure data assembly over auth.json credentials and
+// connection records; no secrets ever leave this module.
+
+import { timingSafeEqual } from "node:crypto";
+import { homedir } from "node:os";
+import { join } from "node:path";
+import type { LocalCatalogLoadResult, McpServiceEntry, McpServiceSetupField } from "@earendil-works/pi-ai/mcp";
+import { createMcpOAuthProvider, loadLocalServiceCatalog, SERVICE_CATALOG } from "@earendil-works/pi-ai/mcp";
+import type { AuthCredential, AuthStorage } from "../auth-storage.js";
+import type { McpServerConfig } from "../settings-manager.js";
+import { MCP_PROBE_ERRORS, probeMcpEndpoint } from "./connection-probe.js";
+import type { McpConnectionRecord, McpConnectionStore } from "./connection-store.js";
+
+/**
+ * Connection status vocabulary shared with the kernel host-request contract.
+ * "connected" requires a verified handshake (connection record), never bare token
+ * presence; "pending" means credentials exist but verification has not succeeded yet.
+ */
+export type McpConnectionStatus = "connected" | "pending" | "not_connected" | "setup_required" | "disabled" | "error";
+
+export interface McpPluginView {
+ /** Catalog service id, or the user server name for user-declared servers. */
+ serviceId: string;
+ label: string;
+ connectionStatus: McpConnectionStatus;
+ /** True when the service can be connected through the host OAuth flow right now. */
+ connectable: boolean;
+ /** A fresh additional account obeys current definition capabilities. */
+ addAccountAllowed?: boolean;
+ /** Active login ownership, distinct from pending endpoint verification. */
+ loginPending?: boolean;
+ usesOAuth: boolean;
+ source: "catalog" | "user";
+ /** Kernel dispatch ids (`mcp.list_tools("<id>")`); empty unless credentials make dispatch possible. */
+ connectionIds: string[];
+ /** View-only marker: this row removes the account instead of connecting. */
+ removeAction?: boolean;
+ /**
+ * View-only marker: this row opens the inline paste panel (a requires-setup
+ * token service with credential fields). Never a connected/verified claim.
+ */
+ pasteToken?: boolean;
+ /** Catalog metadata aliases (searchable; never runtime claims). */
+ aliases?: string[];
+ description?: string;
+ category?: string;
+ publisher?: string;
+ docsUrl?: string;
+ /** Honest requirement or failure detail; non-empty for setup_required and error states. */
+ setupHint?: string;
+ /** True when the catalog entry itself has not been vetted (imported definition). */
+ unverified?: boolean;
+ /** From the connection record, when connected. */
+ verifiedAt?: number;
+ toolCount?: number;
+}
+
+export interface McpConnectionView {
+ /** The dispatch id: mcp.config + list_tools/call_tool address this. */
+ connectionId: string;
+ serviceId?: string;
+ label: string;
+ status: Exclude<McpConnectionStatus, "setup_required" | "not_connected"> | "not_connected" | "disabled";
+ usesOAuth: boolean;
+ transport: "http" | "stdio";
+ loginPending?: boolean;
+ source: "catalog" | "user" | "acp";
+ setupHint?: string;
+}
+
+export interface McpServiceDescriptor {
+ /** Stable service id; kernel dispatch id and `mcp:<serviceId>` credential key. */
+ serviceId: string;
+ label: string;
+ aliases: string[];
+ description?: string;
+ category?: string;
+ publisher?: string;
+ /** Brand grouping id from the merged catalog (search groups by it). */
+ brand?: string;
+ docsUrl?: string;
+ homepage?: string;
+ transport: { type: "http"; url: string } | { type: "http-template" | "stdio" | "other" };
+ authStrategy: "oauth" | "api_key" | "none" | "unknown";
+ setup: {
+ status: "ready" | "requires-setup";
+ reason?: string;
+ /** Setup fields the entry collects; credential kinds drive the paste flow. */
+ fields?: readonly McpServiceSetupField[];
+ };
+ /** True only for legacy built-ins whose provider OAuth metadata was reviewed. Never a runtime/interop claim. */
+ metadataReviewed: boolean;
+ /** Advisory client-registration capability mirrored from the catalog (shapes engine error guidance only). */
+ clientRegistration?: "dynamic" | "pre-registered" | "unknown";
+ /** Reviewed upstream scope hints; joined into the engine's requested scopes when present. */
+ reviewedScopes?: string[];
+ /** True for pre-catalog legacy built-ins; their ids stay reserved. */
+ legacyBuiltin: boolean;
+ /** True when the entry came from a user-declared local catalog file (trusted by construction). */
+ localSource?: boolean;
+ /** True when the service's source vanished; the descriptor is pinned to the installed record's endpoint. */
+ pinnedFromRecord?: boolean;
+}
+
+export type McpServiceCatalogProvider = () => readonly McpServiceDescriptor[];
+
+/** Result of merging the built-in catalog with declared local sources. */
+export interface McpCatalogResolution {
+ descriptors: readonly McpServiceDescriptor[];
+ /** Human-readable wiring diagnostics; visible, never silent. */
+ diagnostics: string[];
+}
+
+/**
+ * Map one merged-catalog entry onto the host descriptor shape. `localSource`
+ * marks entries from a user-declared file (trusted by construction: the user
+ * placed the file); the metadataReviewed flag mirrors the entry's own review
+ * state and is never inferred for local files.
+ */
+function mapCatalogEntry(entry: McpServiceEntry, localSource: boolean): McpServiceDescriptor {
+ const transport: McpServiceDescriptor["transport"] =
+ entry.transport.type === "http" && entry.url
+ ? { type: "http", url: entry.url }
+ : entry.transport.type === "http-template"
+ ? { type: "http-template" }
+ : entry.transport.type === "stdio"
+ ? { type: "stdio" }
+ : { type: "other" };
+ return {
+ serviceId: entry.server,
+ label: entry.label,
+ aliases: entry.aliases ?? [],
+ ...(entry.description ? { description: entry.description } : {}),
+ ...(entry.category ? { category: entry.category } : {}),
+ ...(entry.publisher ? { publisher: entry.publisher } : {}),
+ ...(entry.service ? { brand: entry.service } : {}),
+ ...(entry.docsUrl ? { docsUrl: entry.docsUrl } : {}),
+ ...(entry.homepage ? { homepage: entry.homepage } : {}),
+ transport,
+ authStrategy: entry.auth.strategy,
+ setup: {
+ status: entry.setup.status,
+ ...(entry.setup.reason ? { reason: entry.setup.reason } : {}),
+ ...(entry.setup.fields ? { fields: [...entry.setup.fields] } : {}),
+ },
+ metadataReviewed: entry.verification?.status === "metadata-reviewed",
+ ...(entry.auth.clientRegistration ? { clientRegistration: entry.auth.clientRegistration } : {}),
+ ...(entry.auth.reviewedScopes !== undefined && entry.auth.reviewedScopes.length > 0
+ ? { reviewedScopes: [...entry.auth.reviewedScopes] }
+ : {}),
+ legacyBuiltin: entry.legacyBuiltin === true,
+ ...(localSource ? { localSource: true } : {}),
+ };
+}
+
+const MAX_TOTAL_CATALOG_ENTRIES = 500;
+
+/** Expand a leading ~ in a declared source path; other spellings pass through. */
+function expandSourcePath(rawPath: string): string {
+ if (rawPath === "~" || rawPath.startsWith("~/")) {
+ return join(homedir(), rawPath.slice(1));
+ }
+ return rawPath;
+}
+
+/**
+ * Resolve the merged service catalog: the built-in SERVICE_CATALOG plus every
+ * declared local source (settings mcpCatalogSources, ~-expanded here — the
+ * loader does no expansion by design). First source wins per id; declared-but-
+ * missing files and duplicate ids surface as visible diagnostics; a total cap
+ * keeps the merged catalog bounded. The SAME resolution feeds the host handlers
+ * and the /plugins UI, so both views agree.
+ */
+export function resolveMcpServiceCatalog(options: {
+ localSources?: readonly string[];
+ loadLocal?: typeof loadLocalServiceCatalog;
+ /**
+ * Existing connection records. A record whose service came from an optional
+ * local source that no longer loads keeps a durable PINNED descriptor built
+ * from the record's endpoint, so installed credentials are never retargeted
+ * and the connection stays manageable (verify/disconnect) by its own id.
+ */
+ records?: readonly McpConnectionRecord[];
+}): McpCatalogResolution {
+ const loadLocal = options.loadLocal ?? loadLocalServiceCatalog;
+ const diagnostics: string[] = [];
+ const byId = new Map<string, McpServiceDescriptor>();
+ const addEntry = (entry: McpServiceEntry, localSource: boolean): void => {
+ if (byId.has(entry.server)) {
+ diagnostics.push(`Duplicate MCP service id "${entry.server}"; the first source wins.`);
+ return;
+ }
+ byId.set(entry.server, mapCatalogEntry(entry, localSource));
+ };
+ for (const entry of SERVICE_CATALOG) {
+ addEntry(entry, false);
+ }
+ for (const rawPath of options.localSources ?? []) {
+ const expanded = expandSourcePath(rawPath);
+ let loaded: LocalCatalogLoadResult;
+ try {
+ loaded = loadLocal(expanded);
+ } catch (error) {
+ // One unreadable/invalid source never blocks the rest: built-ins and
+ // every other source keep resolving; the problem is a visible,
+ // bounded diagnostic instead of a startup failure.
+ const reason = error instanceof Error ? error.message : "unknown error";
+ diagnostics.push(`MCP catalog source failed to load: ${rawPath}: ${reason.slice(0, 200)}`);
+ continue;
+ }
+ // The loader reports a missing file as path:""; a declared source that
+ // does not exist must be a visible diagnostic, never a silent skip.
+ if (!loaded.path) {
+ diagnostics.push(`Declared MCP catalog source not found: ${rawPath}`);
+ continue;
+ }
+ for (const entry of loaded.entries) {
+ addEntry(entry, true);
+ }
+ }
+ // Durable pins: records of services the catalog no longer defines.
+ for (const record of options.records ?? []) {
+ if (byId.has(record.serviceId)) continue;
+ byId.set(record.serviceId, {
+ serviceId: record.serviceId,
+ label: record.label,
+ aliases: [],
+ // Pinned to the endpoint the credential was verified against.
+ transport: { type: "http", url: record.endpoint },
+ authStrategy: "oauth",
+ setup: { status: "ready" },
+ metadataReviewed: false,
+ clientRegistration: "unknown",
+ legacyBuiltin: false,
+ // Pinned-from-record is its OWN trust state: the source vanished, so
+ // the pin reuses user-placed trust semantics for NOTHING — it keeps
+ // the installed connection manageable but never one-click connectable.
+ pinnedFromRecord: true,
+ });
+ }
+ const descriptors = [...byId.values()];
+ if (descriptors.length > MAX_TOTAL_CATALOG_ENTRIES) {
+ // Installed connections and built-in services are never trimmed: every
+ // serviceId with records survives the cap (pinned from the record or
+ // still present in a source), and legacy builtins keep their reserved
+ // names — dropping one would resurrect shadow user entries and hide
+ // credential-only legacy accounts. Only uninstalled candidates fill
+ // the remaining budget. When the retained inventory alone exceeds the
+ // cap it still wins and the diagnostic states it explicitly instead of
+ // silently dropping manageability.
+ const installedIds = new Set((options.records ?? []).map((record) => record.serviceId));
+ const retained = (descriptor: McpServiceDescriptor): boolean =>
+ installedIds.has(descriptor.serviceId) || descriptor.legacyBuiltin;
+ const kept = descriptors.filter(retained);
+ const budget = Math.max(0, MAX_TOTAL_CATALOG_ENTRIES - kept.length);
+ const fill = descriptors.filter((descriptor) => !retained(descriptor)).slice(0, budget);
+ const ignored = descriptors.length - kept.length - fill.length;
+ diagnostics.push(
+ `MCP service catalog discovery capped at ${MAX_TOTAL_CATALOG_ENTRIES} entries; ${ignored} entries were ignored. Installed connections and built-in services are always kept${
+ kept.length > MAX_TOTAL_CATALOG_ENTRIES
+ ? ` (retained inventory alone exceeded the cap: ${kept.length} kept — ${installedIds.size} installed connections)`
+ : ""
+ }.`,
+ );
+ return { descriptors: [...kept, ...fill], diagnostics };
+ }
+ return { descriptors, diagnostics };
+}
+
+/**
+ * Default catalog source: the merged built-in SERVICE_CATALOG plus any declared
+ * local sources. Callers without settings wiring get the built-in catalog only.
+ */
+export function defaultServiceCatalogProvider(
+ localSources?: readonly string[] | (() => readonly string[]),
+ records?: readonly McpConnectionRecord[] | (() => readonly McpConnectionRecord[]),
+): McpServiceCatalogProvider {
+ const getSources = typeof localSources === "function" ? localSources : () => localSources ?? [];
+ const getRecords = typeof records === "function" ? records : () => records ?? [];
+ return () => resolveMcpServiceCatalog({ localSources: getSources(), records: getRecords() }).descriptors;
+}
+
+/**
+ * Resolver result with diagnostics, for callers that surface wiring problems
+ * (the /plugins UI banner and host logs).
+ */
+export function resolveServiceCatalogWithDiagnostics(
+ localSources?: readonly string[],
+ records?: readonly McpConnectionRecord[],
+): McpCatalogResolution {
+ return resolveMcpServiceCatalog({ localSources, records });
+}
+
+/** Reserved definitions keep one canonical owner across UI and dispatch. */
+export function reservedMcpOwnership(
+ service: McpServiceDescriptor | undefined,
+ config: McpServerConfig | undefined,
+): { status: "canonical" | "disabled" | "conflict"; setupHint?: string } {
+ if (!service?.legacyBuiltin || !config) return { status: "canonical" };
+ if (config.enabled === false) return { status: "disabled", setupHint: "Disabled in settings." };
+ if (
+ config.type === "http" &&
+ service.transport.type === "http" &&
+ config.url === service.transport.url &&
+ config.oauth === true &&
+ config.bearerTokenEnvVar === undefined &&
+ Object.keys(config.headers ?? {}).length === 0
+ ) {
+ return { status: "canonical" };
+ }
+ return {
+ status: "conflict",
+ setupHint:
+ "This name belongs to a built-in service. Rename or remove the conflicting server settings; saved accounts remain available for removal.",
+ };
+}
+
+function concreteOAuthEndpoint(endpoint: string | undefined): endpoint is string {
+ if (!endpoint || /[{}]/.test(endpoint)) return false;
+ try {
+ const url = new URL(endpoint);
+ return (
+ !url.username &&
+ !url.password &&
+ !url.hash &&
+ (url.protocol === "https:" ||
+ (url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname)))
+ );
+ } catch {
+ return false;
+ }
+}
+
+/** A discoverable OAuth candidate is not a certification or a successful connection. */
+export function freshMcpLoginAllowed(service: McpServiceDescriptor): boolean {
+ return (
+ service.transport.type === "http" &&
+ concreteOAuthEndpoint(service.transport.url) &&
+ (service.authStrategy === "oauth" || service.authStrategy === "unknown") &&
+ service.setup.status === "ready" &&
+ service.pinnedFromRecord !== true
+ );
+}
+
+/** Credential kinds the inline paste flow collects and stores. */
+const PASTE_CREDENTIAL_FIELD_KINDS: ReadonlySet<string> = new Set(["bearer-token", "api-key"]);
+
+/**
+ * The required credential fields a service collects, in catalog order.
+ * Non-credential fields (env-var kind, url, tenant) are NOT returned: the flow
+ * never prompts for them and never stores values for them; setup field ids are
+ * metadata, never environment variables to read.
+ */
+export function mcpCredentialFields(service: McpServiceDescriptor): readonly McpServiceSetupField[] {
+ const fields = service.setup.fields ?? [];
+ return fields.filter(
+ (field) => field.required === true && field.kind !== undefined && PASTE_CREDENTIAL_FIELD_KINDS.has(field.kind),
+ );
+}
+
+/** The ONE credential a paste flow collects for a service. */
+export interface McpPasteCredential {
+ /** The field the prompt labels (the first alternative, in catalog order). */
+ field: McpServiceSetupField;
+ /** Every alternative id naming the SAME credential, first first. */
+ fieldIds: readonly string[];
+}
+
+/**
+ * The single credential the inline paste flow collects for a service, or
+ * undefined when the service does not collect exactly one. The runtime sends
+ * ONE Authorization: Bearer per connection, so multiple fields are collectable
+ * ONLY as alternative names for the same credential (a shared credentialSet id
+ * — GitHub's GITHUB_PAT_TOKEN and GITHUB_PERSONAL_ACCESS_TOKEN); genuinely
+ * distinct credentials stay NOT pasteable, fail closed.
+ */
+export function mcpPasteCredential(service: McpServiceDescriptor): McpPasteCredential | undefined {
+ const fields = mcpCredentialFields(service);
+ if (fields.length === 0) return undefined;
+ const distinctCredentials = new Set(fields.map((field) => field.credentialSet ?? field.id));
+ if (distinctCredentials.size > 1) return undefined;
+ return { field: fields[0]!, fieldIds: fields.map((field) => field.id) };
+}
+
+/**
+ * True when selecting this catalog entry opens the inline paste panel: an HTTP
+ * endpoint that requires setup and collects EXACTLY ONE credential (possibly
+ * under several alternative names). These are the "paste a key" services —
+ * Connect-by-OAuth stays the freshMcpLoginAllowed path; entries without a
+ * concrete endpoint are not pasteable (no URL, no handshake to verify against).
+ */
+export function isPasteableTokenService(service: McpServiceDescriptor | undefined): boolean {
+ if (!service) return false;
+ if (service.transport.type !== "http" || !service.transport.url) return false;
+ if (service.setup.status !== "requires-setup") return false;
+ return mcpPasteCredential(service) !== undefined;
+}
+
+/**
+ * Human prompt label for one credential field, derived from the field id and the
+ * service identity ("GitHub personal access token"). The derivation is display
+ * copy only — it never influences what is stored or sent.
+ */
+export function mcpCredentialFieldPromptLabel(service: McpServiceDescriptor, field: McpServiceSetupField): string {
+ const stripWords = new Set(
+ [
+ ...service.serviceId.split(/[^a-z0-9]+/i),
+ ...service.label.split(/[^a-zA-Z0-9]+/),
+ // The protocol word is never part of a credential's name.
+ "mcp",
+ ]
+ .map((word) => word.trim().toLowerCase())
+ .filter(Boolean),
+ );
+ const tokens = field.id.split(/[_-]+/).filter(Boolean);
+ const serviceIdLower = service.serviceId.toLowerCase();
+ const kept: string[] = [];
+ for (const token of tokens) {
+ const lower = token.toLowerCase();
+ if (stripWords.has(lower)) continue;
+ // Branding prefixes never name the credential: a direct prefix of the
+ // service id ("cld" for "cloudinary") or a short uppercase
+ // abbreviation sharing the id's first letter ("DD" for "datadog").
+ if (kept.length === 0) {
+ if (serviceIdLower.startsWith(lower)) continue;
+ if (
+ token.length <= 3 &&
+ token === token.toUpperCase() &&
+ !FIELD_LABEL_ACRONYMS.has(lower) &&
+ serviceIdLower.startsWith(token[0]?.toLowerCase() ?? "")
+ ) {
+ continue;
+ }
+ }
+ kept.push(token);
+ }
+ let noun: string;
+ if (kept.length === 0) {
+ noun = field.label;
+ } else {
+ noun = kept
+ .map((token) => {
+ if (token === "PAT") return "personal access token";
+ // Real acronyms stay uppercase (API, DD, AWS); every other
+ // token reads as a word (KEY -> "key", TOKEN -> "token").
+ return FIELD_LABEL_ACRONYMS.has(token.toLowerCase()) ? token.toUpperCase() : token.toLowerCase();
+ })
+ .join(" ")
+ .replace(/\btoken\s+token\b/gi, "token")
+ .trim();
+ }
+ return `${service.label} ${noun}`;
+}
+
+/**
+ * Tokens that stay uppercase in the derived label: real acronyms, not shouty ids.
+ * "DD" is deliberately absent — it is a branding abbreviation the strip rule
+ * removes ("Datadog DD_API_KEY" reads as "Datadog API key").
+ */
+const FIELD_LABEL_ACRONYMS: ReadonlySet<string> = new Set(["api", "aws", "ci", "sdk", "cli", "id"]);
+
+/** Why a stored static token credential is not usable at an endpoint. */
+export type McpStaticTokenUsabilityReason = "missing" | "wrong-type" | "unbound" | "cross-endpoint" | "empty-bearer";
+
+/**
+ * ONE shared rule for whether a stored credential is a usable pasted static
+ * token at an endpoint: typed mcp_static_token, bound to exactly this endpoint,
+ * with a non-empty bearer. The manager's dispatch eligibility, the account-state
+ * resolver, and verification all consume this predicate so their answers can
+ * never drift. There is no expiry: a static token is usable until the user
+ * removes or replaces it.
+ */
+export function mcpStaticTokenUsable(
+ credential: AuthCredential | undefined,
+ endpoint: string,
+): { usable: boolean; reason?: McpStaticTokenUsabilityReason } {
+ if (credential === undefined) return { usable: false, reason: "missing" };
+ if (credential.type !== "mcp_static_token") return { usable: false, reason: "wrong-type" };
+ if (typeof credential.bearer !== "string" || credential.bearer.length === 0) {
+ return { usable: false, reason: "empty-bearer" };
+ }
+ if (credential.endpoint === undefined) return { usable: false, reason: "unbound" };
+ if (credential.endpoint !== endpoint) return { usable: false, reason: "cross-endpoint" };
+ return { usable: true };
+}
+
+/** Resolve one operation, never infer approval from an aggregate account status. */
+export function mcpLoginEligibility(options: {
+ connectionId: string;
+ service?: McpServiceDescriptor;
+ userConfig?: McpServerConfig;
+ reservedConfig?: McpServerConfig;
+ record: McpConnectionRecord | undefined;
+ credential: AuthCredential | undefined;
+ addAccount?: boolean;
+ /** Explicit login commands (/mcp login, /login, config menu) carry OAuth intent. */
+ explicitLogin?: boolean;
+}): { allowed: boolean; endpoint?: string; setupHint?: string; repair?: boolean } {
+ const { service, record, credential, connectionId } = options;
+ const deny = (setupHint: string) => ({ allowed: false, setupHint });
+ const ownership = reservedMcpOwnership(service, options.reservedConfig);
+ if (ownership.status !== "canonical") return deny(ownership.setupHint!);
+ if (record?.attemptId !== undefined) return deny("Login in progress. Finish it or remove the account to cancel.");
+ const config = service?.legacyBuiltin ? undefined : options.userConfig;
+ if (config?.enabled === false) return deny("Disabled in settings.");
+ // An explicit login command carries OAuth intent itself; a settings HTTP
+ // server without `oauth: true` still logs in through the guarded flow. The
+ // picker's fresh Connect keeps the stricter check instead.
+ if (
+ config &&
+ (config.type !== "http" ||
+ config.bearerTokenEnvVar !== undefined ||
+ (options.explicitLogin !== true && config.oauth !== true))
+ ) {
+ return deny("This server uses settings-managed authentication. Manage it through /mcp or settings.");
+ }
+ if (!config && service && service.authStrategy !== "oauth" && service.authStrategy !== "unknown") {
+ return deny(service.setup.reason ?? "This service does not use automatic OAuth login.");
+ }
+ if (service?.setup.status === "requires-setup" && !config) {
+ return deny(service.setup.reason ?? "This service requires setup before OAuth login.");
+ }
+ const boundEndpoint =
+ credential?.type === "oauth" &&
+ typeof credential.access === "string" &&
+ credential.access.length > 0 &&
+ typeof credential.endpoint === "string" &&
+ concreteOAuthEndpoint(credential.endpoint)
+ ? credential.endpoint
+ : undefined;
+ const exactRecord =
+ record?.connectionId === connectionId && (!service || record.serviceId === service.serviceId)
+ ? record
+ : undefined;
+ const verifiedEndpoint =
+ exactRecord?.status === "connected" &&
+ Number.isFinite(exactRecord.verifiedAt) &&
+ (exactRecord.verifiedAt ?? 0) > 0
+ ? exactRecord.endpoint
+ : undefined;
+ const repairEndpoint = exactRecord
+ ? boundEndpoint === exactRecord.endpoint || verifiedEndpoint === exactRecord.endpoint
+ ? exactRecord.endpoint
+ : undefined
+ : boundEndpoint;
+ if (options.addAccount && concreteOAuthEndpoint(repairEndpoint)) {
+ // Add allocates a NEW account id for an INSTALLED service whose own
+ // record proves the endpoint was approved (verified connection or
+ // bound credential): the new account lands at that same durable
+ // endpoint, never at a changed or unreviewed URL. A pending shell
+ // alone still lacks evidence and stays denied.
+ return { allowed: true, endpoint: repairEndpoint };
+ }
+ if (!options.addAccount && !config && concreteOAuthEndpoint(repairEndpoint)) {
+ return { allowed: true, endpoint: repairEndpoint, repair: true };
+ }
+ if (config?.type === "http" && concreteOAuthEndpoint(config.url)) return { allowed: true, endpoint: config.url };
+ if (service && freshMcpLoginAllowed(service))
+ return { allowed: true, endpoint: service.transport.type === "http" ? service.transport.url : undefined };
+ return deny(
+ service?.pinnedFromRecord
+ ? "The catalog source is unavailable. Only an approved saved account endpoint can be repaired; remove this account or restore its source."
+ : "This service requires a concrete OAuth endpoint and supported setup before it can be connected.",
+ );
+}
+
+/**
+ * Explicit OAuth client identity resolved from a settings HTTP server.
+ * `clientId` is omitted for DCR/public discovery. A CONFIGURED
+ * `oauthClientSecretEnvVar` resolves to the env value or the EXPLICIT empty
+ * string when it is missing/empty — the engine fails closed on "" before any
+ * network request and never falls back to a stale stored secret. Scopes are
+ * omitted when unset so the engine keeps its config > PRM > omit precedence.
+ */
+export interface McpOAuthIdentity {
+ clientId?: string;
+ clientSecret?: string;
+ clientMetadataUrl?: string;
+ scopes?: string[];
+}
+
+/** Resolve the configured OAuth client identity for a settings HTTP server. */
+export function resolveMcpOAuthIdentity(config: McpServerConfig | undefined): McpOAuthIdentity {
+ if (!config || config.type !== "http") return {};
+ const identity: McpOAuthIdentity = {};
+ const clientId = config.oauthClientId?.trim();
+ if (clientId) identity.clientId = clientId;
+ const secretEnvVar = config.oauthClientSecretEnvVar?.trim();
+ if (secretEnvVar) identity.clientSecret = process.env[secretEnvVar]?.trim() ?? "";
+ const metadataUrl = config.oauthClientMetadataUrl?.trim();
+ if (metadataUrl) identity.clientMetadataUrl = metadataUrl;
+ if (config.oauthScopes !== undefined && config.oauthScopes.length > 0) {
+ identity.scopes = [...config.oauthScopes];
+ }
+ return identity;
+}
+
+/**
+ * The ONE host factory for MCP OAuth providers: every registration site
+ * (manager refresh providers, staged login, post-finalize real id) builds the
+ * provider here so the identity resolved at LOGIN time is byte-identical to
+ * the one used at REFRESH time — the engine pins client identity on the
+ * stored credential and refuses mismatches, so a drifting factory would break
+ * refresh spuriously. Settings identity wins over catalog scope hints; a
+ * catalog NEVER supplies secrets.
+ */
+export function createConfiguredMcpProvider(options: {
+ server: string;
+ label?: string;
+ url: string;
+ identity?: McpOAuthIdentity;
+ /** Reviewed catalog scope hints; used only when no settings scopes exist. */
+ reviewedScopes?: readonly string[];
+ clientRegistration?: "dynamic" | "pre-registered" | "unknown";
+}): ReturnType<typeof createMcpOAuthProvider> {
+ const identity = options.identity ?? {};
+ const scopes =
+ identity.scopes !== undefined
+ ? identity.scopes.join(" ")
+ : options.reviewedScopes !== undefined && options.reviewedScopes.length > 0
+ ? [...options.reviewedScopes].join(" ")
+ : undefined;
+ return createMcpOAuthProvider({
+ server: options.server,
+ ...(options.label !== undefined ? { label: options.label } : {}),
+ url: options.url,
+ ...(identity.clientId !== undefined ? { clientId: identity.clientId } : {}),
+ ...(identity.clientSecret !== undefined ? { clientSecret: identity.clientSecret } : {}),
+ ...(identity.clientMetadataUrl !== undefined ? { clientMetadataUrl: identity.clientMetadataUrl } : {}),
+ ...(scopes !== undefined ? { scopes } : {}),
+ ...(options.clientRegistration !== undefined ? { clientRegistration: options.clientRegistration } : {}),
+ });
+}
+
+export function mcpCredentialKey(connectionId: string): string {
+ return `mcp:${connectionId}`;
+}
+
+/**
+ * Next free per-account connection id for a service. The first account keeps
+ * the service id (compat with existing credentials); further accounts get
+ * "<serviceId>-2", "-3", ... — distinct ids with distinct credentials and
+ * records, so a second login never overwrites the first account.
+ */
+export function nextMcpConnectionId(serviceId: string, taken: (id: string) => boolean): string {
+ if (!taken(serviceId)) return serviceId;
+ for (let index = 2; index < 1000; index++) {
+ const candidate = `${serviceId}-${index}`;
+ if (!taken(candidate)) return candidate;
+ }
+ throw new Error(`No free connection id for service ${serviceId}`);
+}
+
+/** Why a stored OAuth grant is not usable at an endpoint. */
+type OAuthGrantUsabilityReason =
+ | "missing"
+ | "wrong-type"
+ | "empty-access"
+ | "unbound"
+ | "cross-endpoint"
+ | "expired-no-refresh";
+
+interface OAuthGrantUsability {
+ usable: boolean;
+ reason?: OAuthGrantUsabilityReason;
+}
+
+/**
+ * ONE shared rule for whether a stored credential is a usable OAuth grant at an
+ * endpoint: typed oauth, non-empty access, bound to exactly this endpoint, and
+ * not expired without a refresh token (Boolean(refresh) semantics). The
+ * manager's dispatch eligibility, the account-state resolver, and the picker
+ * all consume this predicate so their answers can never drift; verified
+ * Connected status and pending-probe needs stay the CALLER's state machine on
+ * top of `usable`.
+ */
+export function oauthGrantUsable(credential: AuthCredential | undefined, endpoint: string): OAuthGrantUsability {
+ if (credential === undefined) return { usable: false, reason: "missing" };
+ if (credential.type !== "oauth") return { usable: false, reason: "wrong-type" };
+ if (typeof credential.access !== "string" || credential.access.length === 0) {
+ return { usable: false, reason: "empty-access" };
+ }
+ if (credential.endpoint === undefined) return { usable: false, reason: "unbound" };
+ if (credential.endpoint !== endpoint) return { usable: false, reason: "cross-endpoint" };
+ if (typeof credential.expires === "number" && credential.expires <= Date.now() && !credential.refresh) {
+ return { usable: false, reason: "expired-no-refresh" };
+ }
+ return { usable: true };
+}
+
+function bearerTokenPresent(bearerTokenEnvVar: string | undefined): boolean {
+ if (!bearerTokenEnvVar) return false;
+ return Boolean(process.env[bearerTokenEnvVar]?.trim());
+}
+
+interface HttpStatusResult {
+ status: McpConnectionStatus;
+ loginPending?: boolean;
+ setupHint?: string;
+ record?: McpConnectionRecord;
+}
+
+/**
+ * Status for an HTTP connection with optional OAuth credential or static bearer
+ * token. Token presence alone never yields "connected": without a verified
+ * connection record the state is "pending" until the probe succeeds.
+ */
+function httpConnectionStatus(options: {
+ connectionId: string;
+ endpoint: string;
+ authStorage: AuthStorage;
+ connectionStore: McpConnectionStore;
+ usesOAuth: boolean;
+ bearerTokenEnvVar?: string;
+ /** The connection authenticates with a pasted static token credential. */
+ staticToken?: boolean;
+ /** Declared no-auth endpoint: dispatchable without credentials (kernel handshakes). */
+ declaredNoAuth?: boolean;
+}): HttpStatusResult {
+ const { connectionId, endpoint, authStorage, connectionStore, usesOAuth, bearerTokenEnvVar } = options;
+ const record = connectionStore.get(connectionId);
+ if (record?.attemptId !== undefined) {
+ return {
+ status: "pending",
+ loginPending: true,
+ record,
+ setupHint: "Login in progress. Finish it or remove the account to cancel.",
+ };
+ }
+ if (usesOAuth && !bearerTokenEnvVar) {
+ // ONE shared grant-usability rule (with the manager's dispatch
+ // eligibility): wrong-type, empty-access, unbound, cross-endpoint, and
+ // expired-no-refresh grants are all unusable here too.
+ const grant = oauthGrantUsable(authStorage.get(mcpCredentialKey(connectionId)), endpoint);
+ if (!grant.usable) {
+ if (grant.reason === "unbound" || grant.reason === "cross-endpoint") {
+ // Endpoint binding: a token must prove where it belongs before it
+ // counts as usable — for catalog services and user servers alike.
+ return {
+ status: "error",
+ setupHint: "Stored credentials are not bound to this endpoint. Reconnect required.",
+ };
+ }
+ if (grant.reason === "expired-no-refresh") {
+ return {
+ status: "error",
+ setupHint: "Stored credentials expired without a refresh token. Reconnect required.",
+ };
+ }
+ // No usable grant (missing, wrong-type, or empty access): a record
+ // without one is a stale connection, not a fresh one.
+ if (record?.status === "pending" && record.attemptId === undefined) {
+ return {
+ status: "not_connected",
+ setupHint: "Account settings kept. Connect to finish setup, or remove the account.",
+ record,
+ };
+ }
+ if (record) {
+ return {
+ status: "error",
+ setupHint: "Stored credentials are missing. Reconnect required.",
+ record,
+ };
+ }
+ return { status: "not_connected" };
+ }
+ if (record?.status === "connected") return { status: "connected", record };
+ if (record?.status === "pending") {
+ return { status: "pending", setupHint: record.lastError, record };
+ }
+ if (record?.status === "error") return { status: "error", setupHint: record.lastError, record };
+ return {
+ status: "pending",
+ setupHint: "Credentials stored; connection verification pending.",
+ };
+ }
+ if (bearerTokenEnvVar) {
+ if (!bearerTokenPresent(bearerTokenEnvVar)) {
+ if (record) {
+ return {
+ status: "error",
+ setupHint: `The ${bearerTokenEnvVar} environment variable is no longer set. Reconnect required.`,
+ record,
+ };
+ }
+ return {
+ status: "not_connected",
+ setupHint: `Set the ${bearerTokenEnvVar} environment variable to use this server.`,
+ };
+ }
+ if (record?.status === "connected") return { status: "connected", record };
+ if (record?.status === "pending") return { status: "pending", setupHint: record.lastError, record };
+ if (record?.status === "error") return { status: "error", setupHint: record.lastError, record };
+ return { status: "pending", setupHint: "Bearer token present; connection verification pending." };
+ }
+ if (options.staticToken) {
+ // A pasted static token: the ONE shared usability rule (type, endpoint
+ // binding, non-empty bearer), then the SAME record-driven states as the
+ // env-var path. There is no expiry: the token is usable until removed
+ // or replaced, and setup field ids are never read as env vars.
+ const token = mcpStaticTokenUsable(authStorage.get(mcpCredentialKey(connectionId)), endpoint);
+ if (!token.usable) {
+ if (token.reason === "unbound" || token.reason === "cross-endpoint") {
+ // Endpoint binding: a pasted token must prove where it belongs
+ // before it counts — same rule as an OAuth grant.
+ return {
+ status: "error",
+ setupHint: "Stored credentials are not bound to this endpoint. Reconnect required.",
+ record,
+ };
+ }
+ if (record) {
+ return {
+ status: "error",
+ setupHint: "Stored credentials are missing. Reconnect required.",
+ record,
+ };
+ }
+ return { status: "not_connected" };
+ }
+ if (record?.status === "connected") return { status: "connected", record };
+ if (record?.status === "pending") return { status: "pending", setupHint: record.lastError, record };
+ if (record?.status === "error") return { status: "error", setupHint: record.lastError, record };
+ return { status: "pending", setupHint: "Token stored; connection verification pending." };
+ }
+ if (options.declaredNoAuth) return { status: "connected", record };
+ return { status: "not_connected" };
+}
+
+function catalogServiceNotConnectedView(service: McpServiceDescriptor): McpPluginView {
+ const http = service.transport.type === "http" && service.transport.url ? service.transport.url : undefined;
+ const setupHint =
+ service.setup.status === "requires-setup"
+ ? (service.setup.reason ?? "This service requires manual setup before it can be connected.")
+ : service.transport.type !== "http" || !service.transport.url
+ ? "This service uses a stdio adapter or a tenant URL template. Add it manually with /mcp add."
+ : service.authStrategy === "api_key"
+ ? "This service requires an API key. Add it manually with /mcp add."
+ : service.authStrategy === "none"
+ ? "No login required. Add it manually with /mcp add to use it."
+ : service.metadataReviewed
+ ? undefined
+ : "OAuth support has not been verified. Connect checks capabilities and asks for approval before login.";
+ return {
+ serviceId: service.serviceId,
+ label: service.label,
+ connectionStatus:
+ service.setup.status === "requires-setup" || !http || service.authStrategy === "api_key"
+ ? "setup_required"
+ : "not_connected",
+ // Connect starts explicit capability discovery and consent, not a verified claim.
+ connectable: freshMcpLoginAllowed(service),
+ addAccountAllowed: freshMcpLoginAllowed(service),
+ usesOAuth: service.authStrategy === "oauth" || service.authStrategy === "unknown",
+ source: "catalog",
+ connectionIds: [],
+ // A pasteable token service opens the inline paste panel from this row.
+ ...(isPasteableTokenService(service) ? { pasteToken: true } : {}),
+ ...(service.description ? { description: service.description } : {}),
+ ...(service.category ? { category: service.category } : {}),
+ ...(service.publisher ? { publisher: service.publisher } : {}),
+ ...(service.docsUrl ? { docsUrl: service.docsUrl } : {}),
+ ...(setupHint ? { setupHint } : {}),
+ ...(service.metadataReviewed ? {} : { unverified: true }),
+ ...(service.aliases.length > 0 ? { aliases: service.aliases } : {}),
+ };
+}
+
+/**
+ * One account's honestly-computed state: the credential binding (present,
+ * bound to this endpoint, not expired) and the connection record are combined
+ * through httpConnectionStatus, so expiry, retargeting, and missing grants
+ * surface as reconnect-required regardless of what the record last said.
+ * The SAME computation backs the plugin aggregate, the connection inventory,
+ * and the account picker — one truth, no stale record.status reads.
+ */
+export interface McpAccountState {
+ connectionId: string;
+ loginPending?: boolean;
+ status: "connected" | "pending" | "error" | "not_connected" | "disabled" | "setup_required";
+ setupHint?: string;
+ toolCount?: number;
+ verifiedAt?: number;
+ lastError?: string;
+}
+
+export function accountStateFor(options: {
+ connectionId: string;
+ endpoint: string;
+ authStorage: AuthStorage;
+ connectionStore: McpConnectionStore;
+ usesOAuth?: boolean;
+ /** The connection authenticates with a pasted static token credential. */
+ staticToken?: boolean;
+}): McpAccountState {
+ const state = httpConnectionStatus({
+ connectionId: options.connectionId,
+ endpoint: options.endpoint,
+ authStorage: options.authStorage,
+ connectionStore: options.connectionStore,
+ usesOAuth: options.usesOAuth ?? true,
+ ...(options.staticToken ? { staticToken: true } : {}),
+ });
+ return {
+ connectionId: options.connectionId,
+ status: state.status,
+ ...(state.loginPending ? { loginPending: true } : {}),
+ ...(state.setupHint ? { setupHint: state.setupHint } : {}),
+ ...(state.record?.toolCount !== undefined ? { toolCount: state.record.toolCount } : {}),
+ ...(state.record?.verifiedAt ? { verifiedAt: state.record.verifiedAt } : {}),
+ ...(state.record?.lastError ? { lastError: state.record.lastError } : {}),
+ };
+}
+
+/** Every account of a service (primary first), each with its computed state. */
+export function accountStatesFor(options: {
+ service: McpServiceDescriptor;
+ authStorage: AuthStorage;
+ connectionStore: McpConnectionStore;
+}): McpAccountState[] {
+ const { service, authStorage, connectionStore } = options;
+ const url = service.transport.type === "http" ? service.transport.url : undefined;
+ if (!url) return [];
+ const ids = [
+ service.serviceId,
+ ...connectionStore
+ .records()
+ .filter((record) => record.serviceId === service.serviceId && record.connectionId !== service.serviceId)
+ .map((record) => record.connectionId),
+ ];
+ return ids
+ .map((connectionId) => {
+ const eligibility = mcpLoginEligibility({
+ connectionId,
+ service,
+ record: connectionStore.get(connectionId),
+ credential: authStorage.get(mcpCredentialKey(connectionId)),
+ });
+ return accountStateFor({
+ connectionId,
+ endpoint: eligibility.repair && connectionStore.get(connectionId) ? eligibility.endpoint! : url,
+ authStorage,
+ connectionStore,
+ usesOAuth: service.authStrategy === "oauth" || service.authStrategy === "unknown",
+ // Token services authenticate with the pasted static token.
+ ...(isPasteableTokenService(service) ? { staticToken: true } : {}),
+ });
+ })
+ .filter(
+ (account) => account.status !== "not_connected" || connectionStore.get(account.connectionId) !== undefined,
+ );
+}
+
+function baseCatalogServiceView(
+ service: McpServiceDescriptor,
+ authStorage: AuthStorage,
+ connectionStore: McpConnectionStore,
+): McpPluginView {
+ if (service.transport.type !== "http" || !service.transport.url) {
+ return catalogServiceNotConnectedView(service);
+ }
+ const accounts = accountStatesFor({ service, authStorage, connectionStore });
+ if (accounts.length === 0) {
+ const primary = httpConnectionStatus({
+ connectionId: service.serviceId,
+ endpoint: service.transport.url,
+ authStorage,
+ connectionStore,
+ usesOAuth: service.authStrategy === "oauth" || service.authStrategy === "unknown",
+ ...(isPasteableTokenService(service) ? { staticToken: true } : {}),
+ });
+ if (primary.status === "not_connected" && service.authStrategy === "none") {
+ return catalogServiceNotConnectedView(service);
+ }
+ const view = catalogServiceNotConnectedView(service);
+ // setup.required entries keep their reason; a status-computed hint (binding
+ // or expiry problems) wins; otherwise the candidate/transport hints stay.
+ if (primary.status === "not_connected" && service.setup.status === "ready" && primary.setupHint !== undefined) {
+ view.setupHint = primary.setupHint;
+ }
+ if (service.pinnedFromRecord) {
+ view.setupHint = "This service's catalog source is unavailable; its connection keeps the pinned definition.";
+ }
+ return view;
+ }
+ const anyConnected = accounts.some((account) => account.status === "connected");
+ const anyPending = accounts.some((account) => account.status === "pending");
+ const aggregate = anyConnected
+ ? "connected"
+ : anyPending
+ ? "pending"
+ : accounts.some((account) => account.status === "error")
+ ? "error"
+ : "not_connected";
+ const newestConnected = accounts
+ .filter((account) => account.status === "connected")
+ .sort((left, right) => (right.verifiedAt ?? 0) - (left.verifiedAt ?? 0))[0];
+ const errorHint =
+ accounts.find((account) => account.loginPending)?.setupHint ??
+ accounts.find((account) => account.status === "error")?.setupHint ??
+ accounts.find((account) => account.status === "not_connected")?.setupHint;
+ const setupHint = service.pinnedFromRecord
+ ? "This service's catalog source is unavailable; its connection keeps the pinned definition."
+ : errorHint;
+ return {
+ serviceId: service.serviceId,
+ label: service.label,
+ connectionStatus: aggregate,
+ connectable:
+ !accounts.some((account) => account.loginPending) &&
+ (aggregate === "error" || aggregate === "not_connected") &&
+ mcpLoginEligibility({
+ connectionId: service.serviceId,
+ service,
+ record: connectionStore.get(service.serviceId),
+ credential: authStorage.get(mcpCredentialKey(service.serviceId)),
+ }).allowed,
+ addAccountAllowed: freshMcpLoginAllowed(service) && !accounts.some((account) => account.loginPending),
+ ...(accounts.some((account) => account.loginPending) ? { loginPending: true } : {}),
+ usesOAuth: service.authStrategy === "oauth" || service.authStrategy === "unknown",
+ source: "catalog",
+ // Every account id, so the account picker can manage each one.
+ connectionIds: accounts.map((account) => account.connectionId),
+ ...(service.description ? { description: service.description } : {}),
+ ...(service.category ? { category: service.category } : {}),
+ ...(service.publisher ? { publisher: service.publisher } : {}),
+ ...(service.docsUrl ? { docsUrl: service.docsUrl } : {}),
+ ...(setupHint ? { setupHint } : {}),
+ ...(service.metadataReviewed ? {} : { unverified: true }),
+ ...(newestConnected?.verifiedAt ? { verifiedAt: newestConnected.verifiedAt } : {}),
+ ...(newestConnected?.toolCount !== undefined ? { toolCount: newestConnected.toolCount } : {}),
+ ...(service.aliases.length > 0 ? { aliases: service.aliases } : {}),
+ };
+}
+
+function catalogServiceView(
+ service: McpServiceDescriptor,
+ authStorage: AuthStorage,
+ connectionStore: McpConnectionStore,
+ reservedConfig?: McpServerConfig,
+): McpPluginView {
+ const view = baseCatalogServiceView(service, authStorage, connectionStore);
+ const ownership = reservedMcpOwnership(service, reservedConfig);
+ if (ownership.status === "canonical") return view;
+ return {
+ ...view,
+ connectionStatus: ownership.status === "disabled" ? "disabled" : "error",
+ connectable: false,
+ addAccountAllowed: false,
+ setupHint: ownership.setupHint,
+ };
+}
+
+function userServerView(
+ name: string,
+ config: McpServerConfig,
+ authStorage: AuthStorage,
+ connectionStore: McpConnectionStore,
+): McpPluginView {
+ const label = name;
+ if (config.type === "stdio") {
+ return {
+ serviceId: name,
+ label,
+ connectionStatus: config.enabled === false ? "disabled" : "connected",
+ connectable: false,
+ usesOAuth: false,
+ source: "user",
+ connectionIds: config.enabled === false ? [] : [name],
+ setupHint: config.enabled === false ? "Disabled in settings." : undefined,
+ };
+ }
+ const usesOAuth = config.oauth === true;
+ const status = httpConnectionStatus({
+ connectionId: name,
+ endpoint: config.url,
+ authStorage,
+ connectionStore,
+ usesOAuth,
+ bearerTokenEnvVar: config.bearerTokenEnvVar,
+ declaredNoAuth: !usesOAuth && !config.bearerTokenEnvVar,
+ });
+ return {
+ serviceId: name,
+ label,
+ connectionStatus: config.enabled === false ? "disabled" : status.status,
+ // not_connected connects; error (rejected credential, unbound grant) reconnects.
+ connectable:
+ !status.loginPending &&
+ mcpLoginEligibility({
+ connectionId: name,
+ userConfig: config,
+ record: connectionStore.get(name),
+ credential: authStorage.get(mcpCredentialKey(name)),
+ }).allowed &&
+ (status.status === "not_connected" || status.status === "error"),
+ addAccountAllowed:
+ !status.loginPending &&
+ config.enabled !== false &&
+ usesOAuth &&
+ config.bearerTokenEnvVar === undefined &&
+ concreteOAuthEndpoint(config.url),
+ ...(status.loginPending ? { loginPending: true } : {}),
+ usesOAuth,
+ source: "user",
+ connectionIds:
+ connectionStore.get(name) !== undefined
+ ? [name]
+ : config.enabled === false || status.status === "error" || status.status === "not_connected"
+ ? []
+ : [name],
+ ...(status.setupHint ? { setupHint: status.setupHint } : {}),
+ };
+}
+
+export interface BuildViewsOptions {
+ services: readonly McpServiceDescriptor[];
+ userServers: Record<string, McpServerConfig> | undefined;
+ authStorage: AuthStorage;
+ connectionStore: McpConnectionStore;
+}
+
+/** Cards for the /plugins picker and the mcp.list_plugins/search host requests. */
+export function buildPluginViews(options: BuildViewsOptions): McpPluginView[] {
+ const { services, userServers, authStorage, connectionStore } = options;
+ const userEntries = Object.entries(userServers ?? {});
+ const reservedIds = new Set(services.filter((service) => service.legacyBuiltin).map((service) => service.serviceId));
+ const userViews = new Map<string, McpPluginView>();
+ for (const [name, config] of userEntries) {
+ // Dead shadows: a user entry cannot override a bundled catalog service.
+ if (reservedIds.has(name)) continue;
+ userViews.set(name, userServerView(name, config, authStorage, connectionStore));
+ }
+ const views: McpPluginView[] = [];
+ for (const service of services) {
+ // A user-declared server owns the id for non-bundled services; no duplicate card.
+ if (!service.legacyBuiltin && userViews.has(service.serviceId)) continue;
+ views.push(catalogServiceView(service, authStorage, connectionStore, userServers?.[service.serviceId]));
+ }
+ views.push(...userViews.values());
+ const rank = (view: McpPluginView): number =>
+ view.connectionStatus === "connected"
+ ? 0
+ : view.loginPending
+ ? 1
+ : view.connectionStatus === "pending"
+ ? 2
+ : view.connectable
+ ? 3
+ : view.connectionIds.length > 0
+ ? 4
+ : 5;
+ return views.sort(
+ (left, right) =>
+ rank(left) - rank(right) ||
+ left.label.toLowerCase().localeCompare(right.label.toLowerCase()) ||
+ left.serviceId.localeCompare(right.serviceId),
+ );
+}
+
+/** Connection inventory for the mcp.list_connections host request. */
+export function buildConnectionViews(
+ options: BuildViewsOptions & {
+ acpServers?: ReadonlyArray<{ name: string; type: "http" | "stdio" }>;
+ },
+): McpConnectionView[] {
+ const { services, userServers, authStorage, connectionStore, acpServers } = options;
+ const views: McpConnectionView[] = [];
+ const reservedIds = new Set(services.filter((service) => service.legacyBuiltin).map((service) => service.serviceId));
+ const connected = new Set<string>();
+ for (const service of services) {
+ const ownership = reservedMcpOwnership(service, userServers?.[service.serviceId]);
+ const plugin = catalogServiceView(service, authStorage, connectionStore, userServers?.[service.serviceId]);
+ if (plugin.connectionIds.length === 0) {
+ if (ownership.status !== "canonical")
+ views.push({
+ connectionId: service.serviceId,
+ serviceId: service.serviceId,
+ label: service.label,
+ status: ownership.status === "disabled" ? "disabled" : "error",
+ usesOAuth: plugin.usesOAuth,
+ transport: "http",
+ source: "catalog",
+ setupHint: ownership.setupHint,
+ });
+ continue;
+ }
+ // One inventory row per account, each with the SAME centralized,
+ // honestly-computed status (credential binding + expiry + record) —
+ // never a raw record.status that could claim a stale Connected.
+ for (const account of accountStatesFor({ service, authStorage, connectionStore })) {
+ connected.add(account.connectionId);
+ views.push({
+ connectionId: account.connectionId,
+ serviceId: service.serviceId,
+ label:
+ account.connectionId === service.serviceId
+ ? service.label
+ : `${service.label} (${account.connectionId})`,
+ status:
+ ownership.status === "disabled"
+ ? "disabled"
+ : ownership.status === "conflict"
+ ? "error"
+ : account.status === "setup_required"
+ ? "not_connected"
+ : account.status,
+ ...(account.loginPending ? { loginPending: true } : {}),
+ usesOAuth: plugin.usesOAuth,
+ transport: "http",
+ source: "catalog",
+ ...(ownership.setupHint || account.setupHint
+ ? { setupHint: ownership.setupHint ?? account.setupHint }
+ : {}),
+ });
+ }
+ }
+ for (const [name, config] of Object.entries(userServers ?? {})) {
+ if (reservedIds.has(name)) continue;
+ const plugin = userServerView(name, config, authStorage, connectionStore);
+ if (plugin.connectionIds.length === 0) continue;
+ connected.add(name);
+ views.push({
+ connectionId: name,
+ label: name,
+ status: plugin.connectionStatus === "setup_required" ? "not_connected" : plugin.connectionStatus,
+ usesOAuth: plugin.usesOAuth,
+ transport: config.type,
+ ...(plugin.loginPending ? { loginPending: true } : {}),
+ source: "user",
+ ...(plugin.setupHint ? { setupHint: plugin.setupHint } : {}),
+ });
+ }
+ for (const server of acpServers ?? []) {
+ if (connected.has(server.name)) continue;
+ views.push({
+ connectionId: server.name,
+ label: server.name,
+ status: "connected",
+ usesOAuth: false,
+ transport: server.type,
+ source: "acp",
+ });
+ }
+ return views.sort((left, right) => left.connectionId.localeCompare(right.connectionId));
+}
+
+export function filterPluginViewsByStatus(views: readonly McpPluginView[], status: string): McpPluginView[] {
+ return views.filter((view) => view.connectionStatus === status);
+}
+
+export function searchPluginViews(views: readonly McpPluginView[], query: string, limit: number): McpPluginView[] {
+ const needle = query.trim().toLowerCase();
+ if (!needle) return views.slice(0, limit);
+ return views
+ .filter((view) =>
+ [
+ view.serviceId,
+ view.label,
+ // Catalog metadata aliases and account ids are searchable — the
+ // kernel's search_plugins documents both as match surface.
+ ...(view.aliases ?? []),
+ ...view.connectionIds,
+ ...(view.description ? [view.description] : []),
+ view.category,
+ view.publisher,
+ view.docsUrl,
+ ]
+ .filter((field): field is string => typeof field === "string")
+ .some((field) => field.toLowerCase().includes(needle)),
+ )
+ .slice(0, limit);
+}
+
+export function decodePluginCursor(cursor: string | null | undefined): number {
+ if (cursor === undefined || cursor === null || cursor === "") return 0;
+ if (!/^\d+$/.test(cursor)) throw new Error("mcp.list_plugins received an invalid cursor");
+ return Number(cursor);
+}
+
+export function pagePluginViews(
+ views: readonly McpPluginView[],
+ cursor: number,
+ limit: number,
+): { plugins: McpPluginView[]; nextCursor: string | null } {
+ const page = views.slice(cursor, cursor + limit);
+ const nextCursor = cursor + limit < views.length ? String(cursor + limit) : null;
+ return { plugins: page, nextCursor };
+}
+
+export interface VerifyMcpConnectionOptions {
+ authStorage: AuthStorage;
+ connectionStore: McpConnectionStore;
+ connectionId: string;
+ serviceId: string;
+ label: string;
+ endpoint: string;
+ usesOAuth: boolean;
+ bearerTokenEnvVar?: string;
+ /** The connection authenticates with a pasted static token credential. */
+ staticToken?: boolean;
+ /** Injectable probe for tests; defaults to the real streamable-HTTP probe. */
+ probe?: typeof probeMcpEndpoint;
+ timeoutMs?: number;
+}
+
+/**
+ * Run a real MCP handshake against the connection's endpoint and persist the
+ * record. Credential refresh runs through authStorage.getApiKey under its lock.
+ * A rejected credential (HTTP 401/403) is an error; transport/network failures
+ * stay "pending" — verification unavailable, not a broken grant.
+ */
+export async function verifyMcpConnection(options: VerifyMcpConnectionOptions): Promise<McpConnectionRecord> {
+ const { authStorage, connectionStore, connectionId, serviceId, label, endpoint, usesOAuth, bearerTokenEnvVar } =
+ options;
+ const probe = options.probe ?? probeMcpEndpoint;
+ const previous = connectionStore.get(connectionId);
+ const expectedRecord = previous ? { ...previous } : undefined;
+ const now = Date.now();
+ const record: McpConnectionRecord = {
+ connectionId,
+ serviceId,
+ endpoint,
+ label,
+ status: "pending",
+ createdAt: now,
+ updatedAt: now,
+ };
+ // Login owns this record until finalize/logout/release. Verification never
+ // refreshes credentials or probes on behalf of an active attempt.
+ if (expectedRecord?.attemptId !== undefined) return { ...expectedRecord, status: "pending" };
+ const oauthSource = usesOAuth && !bearerTokenEnvVar;
+ // A pasted static token connection: the stored credential is the token
+ // source, exactly like the OAuth grant branch but with no refresh concept.
+ const staticTokenSource = options.staticToken === true;
+ const currentSource = (): string => {
+ if (bearerTokenEnvVar) return process.env[bearerTokenEnvVar]?.trim() ?? "";
+ if (oauthSource || staticTokenSource)
+ return JSON.stringify(authStorage.getVerified(mcpCredentialKey(connectionId))) ?? "";
+ return "";
+ };
+ let sourceSnapshot: string;
+ try {
+ sourceSnapshot = currentSource();
+ } catch {
+ return { ...record, lastError: MCP_PROBE_ERRORS.UNKNOWN };
+ }
+ const persist = async (): Promise<McpConnectionRecord> => {
+ const outcome = connectionStore.queueVerifyResult(record, () => sameGrantToken(sourceSnapshot, currentSource()), {
+ expectedRecord,
+ });
+ try {
+ await connectionStore.flush();
+ if (await outcome) return record;
+ } catch {
+ // A failed write is one-shot, not a weaker retry of this result.
+ }
+ return {
+ ...record,
+ status: "pending",
+ verifiedAt: undefined,
+ toolCount: undefined,
+ lastError: MCP_PROBE_ERRORS.CREDENTIAL_CHANGED,
+ };
+ };
+ try {
+ if (oauthSource) {
+ const credential = authStorage.getVerified(mcpCredentialKey(connectionId));
+ if (credential?.type === "oauth" && credential.endpoint !== endpoint) {
+ record.status = "error";
+ record.lastError = MCP_PROBE_ERRORS.UNBOUND_CREDENTIAL;
+ return await persist();
+ }
+ }
+ if (staticTokenSource) {
+ const credential = authStorage.getVerified(mcpCredentialKey(connectionId));
+ if (credential?.type === "mcp_static_token" && credential.endpoint !== endpoint) {
+ record.status = "error";
+ record.lastError = MCP_PROBE_ERRORS.UNBOUND_CREDENTIAL;
+ return await persist();
+ }
+ }
+ const token = await resolveConnectionToken(
+ authStorage,
+ connectionId,
+ oauthSource,
+ bearerTokenEnvVar,
+ staticTokenSource,
+ );
+ // getApiKey may refresh. Bind both the probe token and the complete fresh
+ // credential identity (including endpoint) before any network operation.
+ if (oauthSource) {
+ const credential = authStorage.getVerified(mcpCredentialKey(connectionId));
+ if (
+ token &&
+ (credential?.type !== "oauth" ||
+ credential.endpoint !== endpoint ||
+ !sameGrantToken(token, credential.access))
+ ) {
+ return { ...record, lastError: MCP_PROBE_ERRORS.CREDENTIAL_CHANGED };
+ }
+ sourceSnapshot = JSON.stringify(credential) ?? "";
+ } else if (staticTokenSource) {
+ // The probe token must be exactly the currently stored bearer: a
+ // rotation or logout between reads discards the whole result.
+ const credential = authStorage.getVerified(mcpCredentialKey(connectionId));
+ if (
+ token &&
+ (credential?.type !== "mcp_static_token" ||
+ credential.endpoint !== endpoint ||
+ !sameGrantToken(token, credential.bearer))
+ ) {
+ return { ...record, lastError: MCP_PROBE_ERRORS.CREDENTIAL_CHANGED };
+ }
+ sourceSnapshot = JSON.stringify(credential) ?? "";
+ } else if (bearerTokenEnvVar) {
+ sourceSnapshot = token;
+ }
+ if ((oauthSource || bearerTokenEnvVar || staticTokenSource) && !token) {
+ record.lastError = MCP_PROBE_ERRORS.UNKNOWN;
+ return await persist();
+ }
+ const result = await probe({
+ url: endpoint,
+ getToken: () => token,
+ ...(options.timeoutMs ? { timeoutMs: options.timeoutMs } : {}),
+ });
+ if (result.ok) {
+ record.status = "connected";
+ record.verifiedAt = Date.now();
+ record.toolCount = result.toolCount;
+ } else if (result.error === MCP_PROBE_ERRORS.UNAUTHORIZED) {
+ record.status = "error";
+ record.lastError = result.error;
+ } else {
+ record.lastError = result.error;
+ }
+ } catch {
+ record.status = "pending";
+ record.lastError = MCP_PROBE_ERRORS.UNKNOWN;
+ }
+ return persist();
+}
+
+/** Resolve the usable token for a connection; empty string when unauthenticated. */
+async function resolveConnectionToken(
+ authStorage: AuthStorage,
+ connectionId: string,
+ usesOAuth: boolean,
+ bearerTokenEnvVar: string | undefined,
+ staticTokenSource = false,
+): Promise<string> {
+ if (usesOAuth) {
+ const token = await authStorage.getApiKey(mcpCredentialKey(connectionId));
+ return token ?? "";
+ }
+ if (bearerTokenEnvVar) return process.env[bearerTokenEnvVar]?.trim() ?? "";
+ if (staticTokenSource) {
+ // A pasted static token: the stored credential's bearer value. Setup
+ // field ids are never read as environment variables.
+ const credential = authStorage.getVerified(mcpCredentialKey(connectionId));
+ return credential?.type === "mcp_static_token" ? credential.bearer : "";
+ }
+ return "";
+}
+
+/**
+ * Constant-time equality between the EXACT token a verification probed and the
+ * current grant value: rotation, logout, or a second login's replacement makes
+ * the comparison false so a stale probe result can never mark the new grant
+ * verified. Byte length is checked first (length is not secret material);
+ * timingSafeEqual never leaks content, and the raw token never leaves memory.
+ */
+export function sameGrantToken(probed: string, current: string): boolean {
+ const left = Buffer.from(probed, "utf8");
+ const right = Buffer.from(current, "utf8");
+ return left.length === right.length && timingSafeEqual(left, right);
+}
diff --git a/packages/coding-agent/src/core/messages.ts b/packages/coding-agent/src/core/messages.ts
index 09f3c5ceae..fce065d42e 100644
--- a/packages/coding-agent/src/core/messages.ts
+++ b/packages/coding-agent/src/core/messages.ts
@@ -41,6 +41,7 @@ export const IPYTHON_STATE_RESTORED_CUSTOM_TYPE = "ipython_state_restored";
export const SESSION_SLASH_COMMAND_CUSTOM_TYPE = "session_slash_command";
export const SESSION_SLASH_COMMAND_RESULT_CUSTOM_TYPE = "session_slash_command_result";
export const COMPACTION_OUTCOME_CUSTOM_TYPE = "compaction_outcome";
+export const MCP_CONNECTION_OUTCOME_CUSTOM_TYPE = "mcp_connection_outcome";
export const REFINEMENT_OUTCOME_CUSTOM_TYPE = "refinement_outcome";
export const REFINEMENT_NOTICE_CUSTOM_TYPE = "refinement_notice";
export const HARNESS_DIGEST_CUSTOM_TYPE = "harness_digest";
@@ -124,6 +125,68 @@ export interface RefinementNoticeMessage extends CustomMessage<RefinementNoticeD
details: RefinementNoticeDetails;
}
+/** How an MCP connection attempt finished: verified handshake, saved but unverified, or unrecorded result. */
+export type McpConnectionVerificationState = "connected" | "unverified" | "unsaved";
+
+/** Which flow produced the outcome: a completed login, an inline token paste, or a pending-account retry verification. */
+export type McpConnectionOutcomeSource = "login" | "paste" | "retry";
+
+/** Whether the saved connection change is live in the current session. */
+export type McpConnectionActivationState = "active" | "inactive";
+
+export interface McpConnectionOutcomeDetails {
+ /** Absent on entries written before disconnect outcomes existed; both mean "connect". */
+ kind?: "connect";
+ /** Display label the outcome line names, e.g. "Linear" or "Acme (acme-2)". */
+ label: string;
+ source: McpConnectionOutcomeSource;
+ verification: McpConnectionVerificationState;
+ /** Tools verified by the MCP handshake; present only when verification is "connected". */
+ toolCount?: number;
+ /** Human-readable reason the handshake did not complete; present only when verification is "unverified". */
+ issue?: string;
+ /** Probe error category behind `issue` (e.g. "http-unauthorized"), so the renderer can name the fix. */
+ issueCategory?: string;
+ /** Account connection id when the outcome is account-scoped. */
+ connectionId?: string;
+ /** True when the login added a new account to a multi-account service. */
+ addedAccount?: boolean;
+ /** Whether the saved change is live in this session; absent until activation resolves. */
+ activation?: McpConnectionActivationState;
+}
+
+/**
+ * How a disconnect finished. Only outcomes that actually removed the stored
+ * credential are representable: a failed or partial removal never gets a
+ * durable "Disconnected" entry.
+ */
+export type McpDisconnectionState = "removed" | "credential-only" | "preserved";
+
+export interface McpDisconnectionOutcomeDetails {
+ kind: "disconnect";
+ /** Display label the outcome line names, e.g. "Granola" or "account acme-2". */
+ label: string;
+ removal: McpDisconnectionState;
+ /** Account connection id when the outcome is account-scoped. */
+ connectionId?: string;
+ /** Whether the saved change is live in this session; absent until activation resolves. */
+ activation?: McpConnectionActivationState;
+}
+
+/** Either side of the MCP connection lifecycle, carried by one durable entry type. */
+export type McpOutcomeDetails = McpConnectionOutcomeDetails | McpDisconnectionOutcomeDetails;
+
+/** Connect details predate the disconnect entry, so a missing `kind` means "connect". */
+export function isMcpDisconnectionOutcome(details: McpOutcomeDetails): details is McpDisconnectionOutcomeDetails {
+ return (details as Partial<McpDisconnectionOutcomeDetails>).kind === "disconnect";
+}
+
+export interface McpConnectionOutcomeMessage extends CustomMessage<McpOutcomeDetails> {
+ customType: typeof MCP_CONNECTION_OUTCOME_CUSTOM_TYPE;
+ content: string;
+ details: McpOutcomeDetails;
+}
+
export interface HarnessDigestDetails {
digest: string;
}
@@ -485,6 +548,78 @@ function isRecord(value: unknown): value is Record<string, unknown> {
return typeof value === "object" && value !== null;
}
+/** The saved-but-not-live tail every outcome line shares. */
+function activationSuffix(details: McpOutcomeDetails): string {
+ return details.activation === "inactive" ? " The change remains saved, but it is not active in this session." : "";
+}
+
+/** Plain-text outcome line for a completed MCP disconnect. */
+function formatMcpDisconnectionNotice(details: McpDisconnectionOutcomeDetails): string {
+ const suffix = activationSuffix(details);
+ switch (details.removal) {
+ case "removed":
+ return `Disconnected ${details.label}.${suffix}`;
+ case "credential-only":
+ return `Disconnected ${details.label}. No saved connection entry existed; the stored credential was removed.${suffix}`;
+ case "preserved":
+ return `Disconnected ${details.label}. The saved connection entry was kept and now shows as not connected.${suffix}`;
+ }
+}
+
+/**
+ * Plain-text outcome line for an MCP connect or disconnect. This is the
+ * durable wording the flows already reported: it is what the entry persists as
+ * `content` and what the transient fallback shows, so it stays a full sentence
+ * even where the rendered entry splits it into a header and a detail line.
+ */
+export function formatMcpConnectionOutcomeNotice(details: McpOutcomeDetails): string {
+ if (isMcpDisconnectionOutcome(details)) return formatMcpDisconnectionNotice(details);
+ const prefix =
+ details.source === "login" && details.addedAccount === true && details.connectionId
+ ? `Added account ${details.connectionId}. `
+ : "";
+ const suffix = activationSuffix(details);
+ switch (details.verification) {
+ case "connected":
+ return `${prefix}Connected ${details.label}${
+ details.toolCount !== undefined ? ` (${details.toolCount} tools verified)` : ""
+ }.${suffix}`;
+ case "unverified":
+ if (details.source === "retry") {
+ return `Verification did not complete: ${details.issue}. The connection is saved; retry from /plugins.${suffix}`;
+ }
+ if (details.source === "paste") {
+ // No login happened: the user pasted a token. "Login succeeded"
+ // would be a false claim here.
+ return `Token saved for ${details.label}, but connection verification did not complete: ${details.issue}. The connection is saved; retry from /plugins.${suffix}`;
+ }
+ return `${prefix}Login succeeded for ${details.label}, but connection verification did not complete: ${details.issue}. The connection is saved; retry from /plugins.${suffix}`;
+ case "unsaved":
+ if (details.source === "retry") {
+ return `The verification result could not be saved. The connection is saved; retry from /plugins.${suffix}`;
+ }
+ if (details.source === "paste") {
+ return `Token saved for ${details.label}, but the verification result could not be saved. The connection is saved; retry from /plugins.${suffix}`;
+ }
+ return `${prefix}Login succeeded for ${details.label}, but the verification result could not be saved. The connection is saved; retry from /plugins.${suffix}`;
+ }
+}
+
+export function createMcpConnectionOutcomeMessage(
+ details: McpOutcomeDetails,
+ display = true,
+ timestamp = Date.now(),
+): McpConnectionOutcomeMessage {
+ return {
+ role: "custom",
+ customType: MCP_CONNECTION_OUTCOME_CUSTOM_TYPE,
+ content: formatMcpConnectionOutcomeNotice(details),
+ display,
+ details: { ...details },
+ timestamp,
+ };
+}
+
function hasValidCustomMessageEnvelope(message: Record<string, unknown>, customType: string): boolean {
return (
message.role === "custom" &&
@@ -575,6 +710,42 @@ export function isRefinementOutcomeMessage(message: unknown): message is Refinem
);
}
+function isValidMcpActivation(activation: unknown): boolean {
+ return activation === undefined || activation === "active" || activation === "inactive";
+}
+
+function isValidMcpDisconnectionDetails(details: Record<string, unknown>): boolean {
+ return (
+ typeof details.label === "string" &&
+ (details.removal === "removed" || details.removal === "credential-only" || details.removal === "preserved") &&
+ (details.connectionId === undefined || typeof details.connectionId === "string") &&
+ isValidMcpActivation(details.activation)
+ );
+}
+
+export function isMcpConnectionOutcomeMessage(message: unknown): message is McpConnectionOutcomeMessage {
+ if (!isRecord(message) || !hasValidCustomMessageEnvelope(message, MCP_CONNECTION_OUTCOME_CUSTOM_TYPE)) return false;
+ if (!isRecord(message.details)) return false;
+ if (message.details.kind === "disconnect") return isValidMcpDisconnectionDetails(message.details);
+ return (
+ (message.details.kind === undefined || message.details.kind === "connect") &&
+ typeof message.details.label === "string" &&
+ (message.details.source === "login" ||
+ message.details.source === "retry" ||
+ message.details.source === "paste") &&
+ (message.details.verification === "connected" ||
+ message.details.verification === "unverified" ||
+ message.details.verification === "unsaved") &&
+ (message.details.toolCount === undefined ||
+ (typeof message.details.toolCount === "number" && Number.isInteger(message.details.toolCount))) &&
+ (message.details.issue === undefined || typeof message.details.issue === "string") &&
+ (message.details.issueCategory === undefined || typeof message.details.issueCategory === "string") &&
+ (message.details.connectionId === undefined || typeof message.details.connectionId === "string") &&
+ (message.details.addedAccount === undefined || typeof message.details.addedAccount === "boolean") &&
+ isValidMcpActivation(message.details.activation)
+ );
+}
+
export interface HeartbeatPromptMessage extends CustomMessage<HeartbeatPromptDetails> {
customType: typeof HEARTBEAT_PROMPT_CUSTOM_TYPE;
content: string;
@@ -624,6 +795,7 @@ export function convertToLlm(messages: AgentMessage[]): Message[] {
m.customType === SESSION_SLASH_COMMAND_CUSTOM_TYPE ||
m.customType === SESSION_SLASH_COMMAND_RESULT_CUSTOM_TYPE ||
m.customType === COMPACTION_OUTCOME_CUSTOM_TYPE ||
+ m.customType === MCP_CONNECTION_OUTCOME_CUSTOM_TYPE ||
m.customType === REFINEMENT_OUTCOME_CUSTOM_TYPE
) {
return undefined;
diff --git a/packages/coding-agent/src/core/sdk.ts b/packages/coding-agent/src/core/sdk.ts
index c78ac5aa55..4f1f7fd7ed 100644
--- a/packages/coding-agent/src/core/sdk.ts
+++ b/packages/coding-agent/src/core/sdk.ts
@@ -160,7 +160,7 @@ export async function createAgentSession(options: CreateAgentSessionOptions = {}
const mcpManager =
options.mcpManager ??
new McpManager({ authStorage, getUserServers: () => settingsManager.getGlobalMcpServers() });
- modelRegistry.setOnOAuthProvidersReset(() => mcpManager.registerUserProviders());
+ modelRegistry.setOnOAuthProvidersReset(() => mcpManager.registerAllProviders());
if (!resourceLoader) {
resourceLoader = new DefaultResourceLoader({
diff --git a/packages/coding-agent/src/core/settings-manager.ts b/packages/coding-agent/src/core/settings-manager.ts
index 56992e2e6c..9e9733940e 100644
--- a/packages/coding-agent/src/core/settings-manager.ts
+++ b/packages/coding-agent/src/core/settings-manager.ts
@@ -141,10 +141,10 @@ export type PackageSource =
};
/**
- * Remote/local MCP server an integration connects to. Built-in integrations
- * (Linear/Notion) are defined in the ai/mcp catalog; this is for user-declared
- * servers. The kernel-side integration package reads creds from auth.json
- * (`mcp:<name>`); login/refresh run host-side.
+ * Remote/local MCP server an integration connects to. Catalog services are
+ * defined in the ai/mcp service catalog; this is for user-declared servers.
+ * The kernel's generic mcp runtime reads creds from auth.json (`mcp:<name>`);
+ * login/refresh/verification run host-side.
*/
export type McpServerConfig =
| {
@@ -155,6 +155,18 @@ export type McpServerConfig =
bearerTokenEnvVar?: string;
/** Use the generic OAuth login flow for this server. */
oauth?: boolean;
+ /** Pre-registered OAuth client id for this server (optional). */
+ oauthClientId?: string;
+ /**
+ * Env var holding the OAuth client secret. When set, a missing or
+ * empty env value fails the login/refresh — never a stale stored
+ * secret fallback.
+ */
+ oauthClientSecretEnvVar?: string;
+ /** Client identity metadata document URL (CIMD) for this server. */
+ oauthClientMetadataUrl?: string;
+ /** Requested OAuth scopes for this server (config > PRM > omit). */
+ oauthScopes?: string[];
/** Force-disable even when credentials exist. */
enabled?: boolean;
enabledTools?: string[];
@@ -215,6 +227,7 @@ export interface Settings {
shellCommandPrefix?: string; // Prefix prepended to every bash command (e.g., "shopt -s expand_aliases" for alias support)
npmCommand?: string[]; // Command used for npm package lookup/install operations, argv-style (e.g., ["mise", "exec", "node@20", "--", "npm"])
mcpServers?: Record<string, McpServerConfig>; // User-declared MCP servers (name → config); built-ins are in the ai/mcp catalog
+ mcpCatalogSources?: string[]; // Extra local MCP service catalog files (~-relative ok); merged after the built-in catalog, first source wins per id
packages?: PackageSource[]; // Array of npm/git package sources (string or object with filtering)
extensions?: string[]; // Array of local extension file paths or directories
skills?: string[]; // Array of local skill file paths or directories
@@ -1350,6 +1363,11 @@ export class SettingsManager {
return structuredClone(this.globalSettings.mcpServers);
}
+ /** Declared local service-catalog source paths (unexpanded ~ allowed). */
+ getMcpCatalogSources(): string[] {
+ return structuredClone(this.globalSettings.mcpCatalogSources ?? []);
+ }
+
setGlobalMcpServer(name: string, config: McpServerConfig, force = false): void {
if (this.globalSettings.mcpServers?.[name] && !force) {
throw new Error(`MCP server "${name}" already exists. Use --force to replace it.`);
diff --git a/packages/coding-agent/src/core/slash-commands.ts b/packages/coding-agent/src/core/slash-commands.ts
index ea56d625bd..4d93bc30af 100644
--- a/packages/coding-agent/src/core/slash-commands.ts
+++ b/packages/coding-agent/src/core/slash-commands.ts
@@ -146,10 +146,16 @@ const CANONICAL_BUILTIN_SLASH_COMMANDS: ReadonlyArray<BuiltinSlashCommand> = [
{ name: "logout", description: "Remove provider authentication" },
{
name: "mcp",
- description: "Open MCP Connections or manage MCP integrations",
+ description: "Browse external services or manage MCP integrations",
argumentHint: "[add|list|get|remove|login|logout]",
takesArgument: true,
},
+ {
+ name: "plugins",
+ description: "Browse and connect external services",
+ argumentHint: "[search]",
+ takesArgument: true,
+ },
{
name: "new",
description: "Start a new session, optionally named and/or with an initial prompt",
diff --git a/packages/coding-agent/src/core/telemetry.ts b/packages/coding-agent/src/core/telemetry.ts
index d781c90609..74fc5375e7 100644
--- a/packages/coding-agent/src/core/telemetry.ts
+++ b/packages/coding-agent/src/core/telemetry.ts
@@ -456,6 +456,9 @@ export function telemetryAuthCategory(
): TelemetryAuthCategory {
switch (source) {
case "stored":
+ // A pasted MCP static token is a stored credential like any other;
+ // the category taxonomy stays model-provider-shaped.
+ if (storedCredentialType === "mcp_static_token") return "stored";
return storedCredentialType ?? "stored";
case "runtime":
return "runtime_api_key";
diff --git a/packages/coding-agent/src/modes/agent-connection/daemon-agent-connection.ts b/packages/coding-agent/src/modes/agent-connection/daemon-agent-connection.ts
index 54e81a8e86..75d02f36c4 100644
--- a/packages/coding-agent/src/modes/agent-connection/daemon-agent-connection.ts
+++ b/packages/coding-agent/src/modes/agent-connection/daemon-agent-connection.ts
@@ -16,6 +16,7 @@ import type {
AgentHeartbeatUpdateAction,
} from "../../core/cron-jobs.js";
import type { AcpMcpServerConfig } from "../../core/mcp/acp-mcp-types.js";
+import type { CustomMessage } from "../../core/messages.js";
import type { RefinementResult } from "../../core/refinement/index.js";
import type { DeleteSessionFileResult } from "../../core/session-file-actions.js";
import { SessionAlreadyActiveError } from "../../core/session-lease.js";
@@ -1319,6 +1320,16 @@ export class DaemonAgentConnection implements AgentConnection {
);
}
+ async appendCustomMessage(
+ message: Pick<CustomMessage, "customType" | "content" | "display" | "details">,
+ ): Promise<void> {
+ await this.requestOk({
+ type: "append_custom_message",
+ activeSessionId: this.activeSessionId,
+ message,
+ });
+ }
+
async executeBash(command: string, options?: AgentConnectionExecuteBashOptions): Promise<void> {
if (options?.transient && !this.client.supportsServerCapability("transient_bash")) {
// An older daemon would record the run into the session, leaking the
diff --git a/packages/coding-agent/src/modes/agent-connection/in-process-agent-connection.ts b/packages/coding-agent/src/modes/agent-connection/in-process-agent-connection.ts
index fa6ded0202..f0ead7b0a1 100644
--- a/packages/coding-agent/src/modes/agent-connection/in-process-agent-connection.ts
+++ b/packages/coding-agent/src/modes/agent-connection/in-process-agent-connection.ts
@@ -15,6 +15,7 @@ import type {
} from "../../core/cron-jobs.js";
import type { ExtensionUIContext } from "../../core/extensions/types.js";
import type { AcpMcpServerConfig } from "../../core/mcp/acp-mcp-types.js";
+import type { CustomMessage } from "../../core/messages.js";
import { providerRetryPolicy } from "../../core/provider-retry.js";
import type { RefinementResult } from "../../core/refinement/index.js";
import { type DeleteSessionFileResult, deleteSessionFile } from "../../core/session-file-actions.js";
@@ -335,6 +336,12 @@ export class InProcessAgentConnection implements AgentConnection {
this.session.sessionManager.appendLabelChange(entryId, label);
}
+ async appendCustomMessage(
+ message: Pick<CustomMessage, "customType" | "content" | "display" | "details">,
+ ): Promise<void> {
+ await this.session.sendCustomMessage(message);
+ }
+
async respondToExtensionUiRequest(_requestId: string, _response: AgentConnectionExtensionUiResponse): Promise<void> {
// In-process extension UI requests are handled directly by InteractiveMode.
}
diff --git a/packages/coding-agent/src/modes/agent-connection/types.ts b/packages/coding-agent/src/modes/agent-connection/types.ts
index 93fc27d514..fc297d4577 100644
--- a/packages/coding-agent/src/modes/agent-connection/types.ts
+++ b/packages/coding-agent/src/modes/agent-connection/types.ts
@@ -17,6 +17,7 @@ import type { InputSource } from "../../core/extensions/types.js";
import type { GoalState } from "../../core/goals.js";
import type { KernelSentAgentMessage } from "../../core/kernel/index.js";
import type { AcpMcpServerConfig } from "../../core/mcp/acp-mcp-types.js";
+import type { CustomMessage } from "../../core/messages.js";
import type { RefinementResult } from "../../core/refinement/index.js";
import type { RlmMaxDepthStatus, SetRlmMaxDepthResult } from "../../core/rlm-max-depth.js";
import type {
@@ -732,6 +733,13 @@ export interface AgentConnection {
replaceAcpMcpServers?(servers: readonly AcpMcpServerConfig[], ownerId: string): Promise<void>;
releaseAcpMcpServers?(ownerId: string, serverNames: readonly string[]): Promise<void>;
+ /**
+ * Append a durable custom message to the active session transcript without
+ * triggering a turn: it persists in the session file and renders in chat.
+ * Callers must not rely on it while the agent is streaming.
+ */
+ appendCustomMessage(message: Pick<CustomMessage, "customType" | "content" | "display" | "details">): Promise<void>;
+
prompt(message: string, options?: AgentConnectionPromptOptions): Promise<void>;
promptAndWait(message: string, options?: AgentConnectionPromptOptions): Promise<void>;
startSideQuestion(id: string, question: string, previousTurns?: AgentConnectionSideQuestionTurn[]): Promise<void>;
diff --git a/packages/coding-agent/src/modes/interactive/auth-flows.ts b/packages/coding-agent/src/modes/interactive/auth-flows.ts
index 6329dfd494..c3863d866a 100644
--- a/packages/coding-agent/src/modes/interactive/auth-flows.ts
+++ b/packages/coding-agent/src/modes/interactive/auth-flows.ts
@@ -2,6 +2,7 @@ import * as path from "node:path";
import { getProviders, type OAuthProviderId, type OAuthSelectPrompt } from "@earendil-works/pi-ai";
import type { Component, TUI } from "@earendil-works/pi-tui";
import { getAuthPath, getDocsPath } from "../../config.js";
+import type { McpRemoveAccountResult } from "../../core/mcp/connection-store.js";
import type { ModelRegistry } from "../../core/model-registry.js";
import {
checkPrimeAgentTracesAccess,
@@ -116,6 +117,24 @@ export interface ProviderAuthFlowsHost {
onAuthChanged?(): void | Promise<void>;
/** Invoked after a successful login (e.g. to surface billing warnings). */
onLoginCompleted?(): void;
+ /**
+ * OWNS the MCP account login for the generic /login service options and
+ * the config menu: the host runs the ONE guarded connect operation
+ * (claim under the store lock, staged OAuth, guarded finalize). There
+ * is NO raw-dialog fallback for MCP ids — an unresolvable provider
+ * reports an explicit configuration-required outcome; only the guarded
+ * operation's private staging dialog exists.
+ */
+ onMcpAccountLogin?(providerId: string): Promise<AuthenticationResult>;
+ /**
+ * OWNS the entire MCP account logout for the generic /logout route: the
+ * host must perform verified credential deletion AND pending-attempt
+ * cancellation under ONE connection-store critical section (store->auth)
+ * BEFORE the route reports anything. Called INSTEAD of
+ * authStorage.logout for MCP credential ids; non-MCP logouts are
+ * unaffected.
+ */
+ onMcpAccountLogout?(providerId: string): Promise<McpRemoveAccountResult> | McpRemoveAccountResult;
}
export interface ProviderLoginOptions {
@@ -202,6 +221,15 @@ export class ProviderAuthFlows {
loginProvider(providerOption: AuthSelectorProvider): Promise<AuthenticationResult> {
const kind = providerOption.category === "service" ? "service" : "provider";
if (providerOption.authType === "oauth") {
+ // MCP account logins are DELEGATED to the host's guarded connect
+ // operation BEFORE any dialog writes the final credential: a
+ // concurrent logout can cancel the attempt and a late callback
+ // can never reactivate or clobber the account.
+ if (providerOption.id.startsWith("mcp:")) {
+ if (this.host.onMcpAccountLogin) return this.host.onMcpAccountLogin(providerOption.id);
+ this.host.showError("MCP account login requires the guarded host connection flow.");
+ return Promise.resolve({ status: "failed" });
+ }
return this.showLoginDialog(providerOption.id, providerOption.name, kind);
}
if (providerOption.id === PRIME_INFERENCE_PROVIDER_ID) {
@@ -232,7 +260,36 @@ export class ProviderAuthFlows {
close?.();
try {
- this.host.modelRegistry.authStorage.logout(providerOption.id);
+ // MCP logouts are DELEGATED whole before this route touches
+ // auth: a plain authStorage.logout would race a concurrent
+ // finalize that could re-create the credential after it.
+ if (providerOption.id.startsWith("mcp:") && this.host.onMcpAccountLogout) {
+ const outcome = await this.host.onMcpAccountLogout(providerOption.id);
+ if (outcome === "refused") {
+ // State-neutral: the attempt is no longer current
+ // — no "Logged out" claim, and no Connected
+ // claim from mere token presence.
+ this.host.showStatus(
+ `This login attempt is no longer current; manage the account from /plugins.`,
+ );
+ resolve(providerOption.id);
+ return;
+ }
+ if (outcome === "failed") {
+ throw new Error(
+ `Logout failed: the change could not be saved; try logging out ${providerOption.name} again.`,
+ );
+ }
+ if (outcome === "logged-out") {
+ this.host.showStatus(
+ `Logged out of ${providerOption.name}, but the change could not be saved. It may still appear in the list; try again to finish cleanup.`,
+ );
+ resolve(providerOption.id);
+ return;
+ }
+ } else {
+ this.host.modelRegistry.authStorage.logout(providerOption.id);
+ }
this.host.modelRegistry.refresh();
await this.host.onAuthChanged?.();
const message =
@@ -313,7 +370,9 @@ export class ProviderAuthFlows {
options.push({
id: providerId,
name,
- authType: credential.type,
+ // A pasted MCP static token is key-shaped for the selector: it
+ // is removed exactly like a stored API key.
+ authType: credential.type === "mcp_static_token" ? "api_key" : credential.type,
category: isSerper || isMcp ? "service" : "provider",
});
}
diff --git a/packages/coding-agent/src/modes/interactive/components/conversation-components.ts b/packages/coding-agent/src/modes/interactive/components/conversation-components.ts
index d2d7026f09..1dd4591988 100644
--- a/packages/coding-agent/src/modes/interactive/components/conversation-components.ts
+++ b/packages/coding-agent/src/modes/interactive/components/conversation-components.ts
@@ -6,9 +6,11 @@ import {
COMPACTION_OUTCOME_CUSTOM_TYPE,
type CustomMessage,
isCompactionOutcomeMessage,
+ isMcpConnectionOutcomeMessage,
isRefinementOutcomeMessage,
isSessionSlashCommandMessage,
isSessionSlashCommandResultMessage,
+ MCP_CONNECTION_OUTCOME_CUSTOM_TYPE,
REFINEMENT_OUTCOME_CUSTOM_TYPE,
SESSION_SLASH_COMMAND_CUSTOM_TYPE,
SESSION_SLASH_COMMAND_RESULT_CUSTOM_TYPE,
@@ -22,6 +24,10 @@ import {
} from "./compaction-outcome-message.js";
import { InjectedPromptMessageComponent, isInjectedPromptMessage } from "./injected-prompt-message.js";
import { IPythonCellComponent } from "./ipython-cell.js";
+import {
+ MalformedMcpConnectionOutcomeMessageComponent,
+ McpConnectionOutcomeMessageComponent,
+} from "./mcp-connection-outcome-message.js";
import {
MalformedRefinementOutcomeMessageComponent,
RefinementOutcomeMessageComponent,
@@ -230,6 +236,13 @@ export function buildConversationComponents(
? new CompactionOutcomeMessageComponent(message)
: new MalformedCompactionOutcomeMessageComponent(),
);
+ } else if (message.role === "custom" && message.customType === MCP_CONNECTION_OUTCOME_CUSTOM_TYPE) {
+ if (!message.display) continue;
+ const component = isMcpConnectionOutcomeMessage(message)
+ ? new McpConnectionOutcomeMessageComponent(message)
+ : new MalformedMcpConnectionOutcomeMessageComponent();
+ component.setExpanded(expanded);
+ components.push(component);
} else if (message.role === "custom" && message.customType === REFINEMENT_OUTCOME_CUSTOM_TYPE) {
if (!message.display) continue;
const component = isRefinementOutcomeMessage(message)
diff --git a/packages/coding-agent/src/modes/interactive/components/extension-selector.ts b/packages/coding-agent/src/modes/interactive/components/extension-selector.ts
index 561af520ab..39a2c6b555 100644
--- a/packages/coding-agent/src/modes/interactive/components/extension-selector.ts
+++ b/packages/coding-agent/src/modes/interactive/components/extension-selector.ts
@@ -7,7 +7,14 @@ import { Container, getKeybindings, Spacer, Text, type TUI } from "@earendil-wor
import { theme } from "../theme/theme.js";
import { CountdownTimer } from "./countdown-timer.js";
import { keyHint, rawKeyHint } from "./keybinding-hints.js";
-import { getMenuListLayout, MenuList, MenuPanel, MenuRow, type MenuViewportProvider } from "./menu-panel.js";
+import {
+ getMenuListLayout,
+ inlineMenuPanelTopRuleRows,
+ MenuList,
+ MenuPanel,
+ MenuRow,
+ type MenuViewportProvider,
+} from "./menu-panel.js";
export interface ExtensionSelectorOptions {
tui?: TUI;
@@ -67,7 +74,6 @@ export class ExtensionSelectorComponent extends Container {
this.inline = opts?.inline === true;
const header = splitTitleAndDescription(title);
this.baseTitle = header.title;
- this.reservedRows = OPTION_LIST_RESERVED_BASE_ROWS + header.descriptionRows;
const tui = opts?.tui;
this.viewport = { getRows: opts?.getRows ?? (tui ? () => tui.terminal.rows : undefined) };
@@ -89,6 +95,17 @@ export class ExtensionSelectorComponent extends Container {
this.listContainer = new MenuList({ compact: true, inline: this.inline });
this.panel.addChild(this.listContainer);
+ // The inline panel opens with its separator rule; budget it.
+ this.reservedRows =
+ OPTION_LIST_RESERVED_BASE_ROWS +
+ header.descriptionRows +
+ (this.inline
+ ? inlineMenuPanelTopRuleRows({
+ title: header.title,
+ subtitle: header.description,
+ firstChild: this.listContainer,
+ })
+ : 0);
if (!this.inline) this.panel.addChild(new Spacer(1));
this.panel.addChild(
new Text(
diff --git a/packages/coding-agent/src/modes/interactive/components/login-dialog.ts b/packages/coding-agent/src/modes/interactive/components/login-dialog.ts
index 9f19be8a6d..3ec9d960d9 100644
--- a/packages/coding-agent/src/modes/interactive/components/login-dialog.ts
+++ b/packages/coding-agent/src/modes/interactive/components/login-dialog.ts
@@ -131,6 +131,8 @@ export class LoginDialogComponent extends Container implements Focusable {
this.authUrl = url;
const linkedUrl = getCapabilities().hyperlinks ? `\x1b]8;;${url}\x07${url}\x1b]8;;\x07` : url;
this.contentContainer.addChild(new Text(theme.fg("text", linkedUrl), 0, 0));
+ // Keep the browser-step text visually distinct from the URL.
+ this.addSectionSpacer();
// Provider instructions already describe the browser step.
if (instructions) {
this.addInstructions(instructions);
diff --git a/packages/coding-agent/src/modes/interactive/components/mcp-connection-outcome-message.ts b/packages/coding-agent/src/modes/interactive/components/mcp-connection-outcome-message.ts
new file mode 100644
index 0000000000..7d67dd40ce
--- /dev/null
+++ b/packages/coding-agent/src/modes/interactive/components/mcp-connection-outcome-message.ts
@@ -0,0 +1,136 @@
+import { Spacer, Text } from "@earendil-works/pi-tui";
+import {
+ isMcpDisconnectionOutcome,
+ type McpConnectionOutcomeMessage,
+ type McpDisconnectionOutcomeDetails,
+ type McpOutcomeDetails,
+} from "../../../core/messages.js";
+import { theme } from "../theme/theme.js";
+import { ExpandableEventMessage } from "./expandable-event-message.js";
+
+function outcomeHeader(details: McpOutcomeDetails): string {
+ if (isMcpDisconnectionOutcome(details)) return `Disconnected ${details.label}`;
+ const { label, verification, toolCount } = details;
+ switch (verification) {
+ case "connected":
+ return `Connected ${label}${toolCount !== undefined ? ` · ${toolCount} tools verified` : ""}`;
+ case "unverified":
+ // A pasted token the service rejected is not a verification hiccup:
+ // name the real outcome so the next step is obvious.
+ return details.source === "paste" && details.issueCategory === "http-unauthorized"
+ ? `Token not accepted · ${label} not connected`
+ : `Verification did not complete · ${label} saved`;
+ case "unsaved":
+ return `Verification result not recorded · ${label} saved`;
+ }
+}
+
+function capitalize(sentence: string): string {
+ return sentence.length > 0 ? `${sentence[0]!.toUpperCase()}${sentence.slice(1)}` : sentence;
+}
+
+function disconnectionDetail(details: McpDisconnectionOutcomeDetails): string | undefined {
+ switch (details.removal) {
+ case "removed":
+ return undefined;
+ case "credential-only":
+ return "No saved connection entry existed; the stored credential was removed.";
+ case "preserved":
+ return "The saved connection entry was kept and now shows as not connected.";
+ }
+}
+
+/**
+ * The detail the header does NOT already say. The header is the outcome
+ * sentence, so the body carries only what it leaves out (added account, issue,
+ * next step, deferred activation) and is omitted entirely for a plain success.
+ */
+function outcomeBody(details: McpOutcomeDetails): string | undefined {
+ const parts: string[] = [];
+ if (isMcpDisconnectionOutcome(details)) {
+ const detail = disconnectionDetail(details);
+ if (detail) parts.push(detail);
+ } else {
+ if (details.addedAccount === true && details.connectionId) parts.push(`Added account ${details.connectionId}.`);
+ // The next step differs by how the credential arrived: a pasted token is
+ // replaced by pasting another one, an OAuth grant by reconnecting.
+ const nextStep = details.source === "paste" ? "Paste a new token from /mcp." : "Retry from /plugins.";
+ if (details.verification === "unverified")
+ parts.push(details.issue ? `${capitalize(details.issue)}. ${nextStep}` : nextStep);
+ if (details.verification === "unsaved")
+ parts.push(details.source === "paste" ? "Retry verification from /mcp." : "Retry verification from /plugins.");
+ }
+ if (details.activation === "inactive") parts.push("The change remains saved, but it is not active in this session.");
+ return parts.length > 0 ? parts.join(" ") : undefined;
+}
+
+function outcomeMetadata(details: McpOutcomeDetails): string {
+ const activation =
+ details.activation === "inactive" ? "saved, but not active in this session" : "active in this session";
+ const origin = isMcpDisconnectionOutcome(details)
+ ? disconnectionOrigin(details)
+ : details.source === "retry"
+ ? "retry verification"
+ : details.source === "paste"
+ ? "paste flow"
+ : "login flow";
+ return [origin, ...(details.connectionId ? [`account ${details.connectionId}`] : []), activation].join(" · ");
+}
+
+function disconnectionOrigin(details: McpDisconnectionOutcomeDetails): string {
+ switch (details.removal) {
+ case "removed":
+ return "account removed";
+ case "credential-only":
+ return "credential removed";
+ case "preserved":
+ return "entry kept, credential removed";
+ }
+}
+
+/**
+ * Durable MCP connect/disconnect outcome: the header states the outcome, the
+ * body adds only what the header omits, and the metadata line is the toggle.
+ * Disconnects use the muted key rather than the connect purple (a disconnect
+ * is no refinement) or the error red (it succeeded) — the same grey /plugins
+ * already uses for "Not connected".
+ */
+export class McpConnectionOutcomeMessageComponent extends ExpandableEventMessage {
+ constructor(private readonly message: McpConnectionOutcomeMessage) {
+ super();
+ this.updateDisplay();
+ }
+
+ protected updateDisplay(): void {
+ const { details } = this.message;
+ // The diamond colour follows the outcome: purple is success
+ // (connected); anything needing attention — a rejected token, an
+ // unfinished verification, a disconnect — is warning orange.
+ const headerColor =
+ isMcpDisconnectionOutcome(details) || details.verification !== "connected" ? "warning" : "refinementHeader";
+ this.clear();
+ this.addChild(new Spacer(1));
+ this.addChild(new Text(theme.fg(headerColor, `◆ ${outcomeHeader(details)}`), 1, 0));
+ const body = outcomeBody(details);
+ // The purple summary is the success tone; non-success outcomes dim.
+ const bodyTone =
+ isMcpDisconnectionOutcome(details) || details.verification !== "connected" ? "dim" : "refinementSummary";
+ if (body) this.addSummary(body, undefined, bodyTone);
+ if (this.expanded) {
+ this.addChild(new Text(theme.fg("dim", outcomeMetadata(details)), 1, 0));
+ }
+ }
+}
+
+export class MalformedMcpConnectionOutcomeMessageComponent extends ExpandableEventMessage {
+ constructor() {
+ super();
+ this.updateDisplay();
+ }
+
+ protected updateDisplay(): void {
+ this.clear();
+ this.addChild(new Spacer(1));
+ this.addChild(new Text(theme.fg("error", "[Malformed MCP connection outcome message]"), 1, 0));
+ }
+}
diff --git a/packages/coding-agent/src/modes/interactive/components/mcp-token-paste-panel.ts b/packages/coding-agent/src/modes/interactive/components/mcp-token-paste-panel.ts
new file mode 100644
index 0000000000..96636fe6da
--- /dev/null
+++ b/packages/coding-agent/src/modes/interactive/components/mcp-token-paste-panel.ts
@@ -0,0 +1,174 @@
+import {
+ type Component,
+ Container,
+ type Focusable,
+ getKeybindings,
+ truncateToWidth,
+ visibleWidth,
+ wrapTextWithAnsi,
+} from "@earendil-works/pi-tui";
+import { theme } from "../theme/theme.js";
+import { keyText } from "./keybinding-hints.js";
+import { MenuPanel, MenuSearchInput } from "./menu-panel.js";
+import { shouldTreatAsBack } from "./modal-back.js";
+
+export interface McpTokenPasteField {
+ /** Catalog setup field id (the env var the manifest names — display only). */
+ id: string;
+ /** Human prompt label derived from the field (e.g. "GitHub personal access token"). */
+ label: string;
+}
+
+export interface McpTokenPastePanelOptions {
+ /** Service display label (e.g. "GitHub"); the panel title reads "Connect <label>". */
+ serviceLabel: string;
+ /** The service's own one-line setup reason, shown as context when present. */
+ reason?: string;
+ /** The ONE credential the panel collects — the flow is single-credential by construction. */
+ field: McpTokenPasteField;
+ /**
+ * Completes with the pasted value. The value exists only in memory and the
+ * credential store: this component never renders it, and it never reaches a
+ * status line, log, or transcript on any path.
+ */
+ onSubmit: (value: string) => void;
+ /** Esc: nothing was stored, nothing is echoed. */
+ onCancel: () => void;
+}
+
+/** Live projection the body renders from — no secrets, only labels. */
+interface TokenPasteRenderState {
+ reason?: string;
+ promptLabel: string;
+ notice?: string;
+ input: MenuSearchInput;
+}
+
+/** The one muted line the panel shares across renders. */
+const STORAGE_HINT =
+ "Input is hidden; it is saved only to the agent credential store — never settings, never the transcript.";
+
+/**
+ * The inline token paste panel, mounted on the same inline surface as the
+ * OAuth login panel (showInlineAuthPanel) and in the #2331/#2340 visual
+ * language: one separator rule, a prompt-style header, a muted context line,
+ * then the input. Input is MASKED — a rendered line never contains the pasted
+ * secret, only bullets — while edits and submit keep the real buffer. Exactly
+ * ONE credential is collected: the paste flow prompts once, so a multi-value
+ * credential (named header pairs) can never reach this panel.
+ */
+export class McpTokenPastePanelComponent extends Container implements Focusable {
+ private readonly reason: string | undefined;
+ private readonly field: McpTokenPasteField;
+ private notice: string | undefined;
+ private readonly input: MenuSearchInput;
+ private readonly onSubmitCallback: (value: string) => void;
+ private readonly onCancelCallback: () => void;
+ private settled = false;
+
+ // Delegate focus to the input so its IME cursor remains positioned correctly.
+ private _focused = false;
+ get focused(): boolean {
+ return this._focused;
+ }
+ set focused(value: boolean) {
+ this._focused = value;
+ this.input.focused = value;
+ }
+
+ constructor(options: McpTokenPastePanelOptions) {
+ super();
+ this.reason = options.reason?.trim() || undefined;
+ this.field = options.field;
+ this.onSubmitCallback = options.onSubmit;
+ this.onCancelCallback = options.onCancel;
+ // Same inline panel shape as the OAuth login dialog: rule + title, and
+ // the masked input over the editor background.
+ const panel = new MenuPanel({ title: `Connect ${options.serviceLabel}`, inline: true, topRule: true });
+ this.addChild(panel);
+ this.input = new MenuSearchInput("Paste token", true, false, false, { masked: true });
+ this.input.onSubmit = () => this.submit();
+ panel.addChild(new TokenPasteBody(() => this.renderState()));
+ }
+
+ private renderState(): TokenPasteRenderState {
+ return {
+ ...(this.reason ? { reason: this.reason } : {}),
+ promptLabel: this.field.label,
+ ...(this.notice ? { notice: this.notice } : {}),
+ input: this.input,
+ };
+ }
+
+ /** Submit the credential: an empty value stays on the field, never a dead end. */
+ private submit(): void {
+ if (this.settled) return;
+ const value = this.input.getValue().trim();
+ if (!value) {
+ this.notice = "The value cannot be empty.";
+ return;
+ }
+ this.settled = true;
+ this.onSubmitCallback(value);
+ }
+
+ private cancel(): void {
+ if (this.settled) return;
+ this.settled = true;
+ this.onCancelCallback();
+ }
+
+ handleInput(keyData: string): void {
+ const keybindings = getKeybindings();
+ // Esc (and Left at the start of the text, like the login dialog) cancels:
+ // nothing was stored, and the masked buffer dies with the panel.
+ if (keybindings.matches(keyData, "tui.select.cancel") || shouldTreatAsBack(keyData, this.input)) {
+ this.cancel();
+ return;
+ }
+ if (this.settled) return;
+ const hadNotice = this.notice !== undefined;
+ this.input.handleInput(keyData);
+ if (hadNotice && this.input.getValue() !== "") this.notice = undefined;
+ }
+}
+
+/** Full-width panel body in the #2340 shape: blank, context, prompt, masked input, hints. */
+class TokenPasteBody implements Component {
+ readonly fillsMenuPanel = true;
+
+ constructor(private readonly getState: () => TokenPasteRenderState) {}
+
+ invalidate(): void {
+ // Render output derives from the panel's live state.
+ }
+
+ render(width: number): string[] {
+ const safeWidth = Math.max(1, width);
+ const state = this.getState();
+ const lines: string[] = [this.line(safeWidth, "")];
+ if (state.reason) {
+ // Catalog copy can be long: wrap it, cap it at two lines, ellipsize.
+ const wrapWidth = Math.max(1, safeWidth - 2);
+ const wrapped = wrapTextWithAnsi(state.reason, wrapWidth).slice(0, 2);
+ if (wrapped.length === 2 && visibleWidth(wrapped[1] ?? "") >= wrapWidth) {
+ wrapped[1] = `${truncateToWidth(wrapped[1] ?? "", Math.max(0, wrapWidth - 1), "")}…`;
+ }
+ for (const row of wrapped) lines.push(this.line(safeWidth, theme.fg("muted", row)));
+ lines.push(this.line(safeWidth, ""));
+ }
+ if (state.notice) lines.push(this.line(safeWidth, theme.fg("error", state.notice)));
+ lines.push(this.line(safeWidth, theme.fg("text", state.promptLabel)));
+ lines.push(...state.input.render(safeWidth));
+ lines.push(this.line(safeWidth, theme.fg("muted", STORAGE_HINT)));
+ const hint = `${keyText("tui.select.confirm", { primaryOnly: true })} submit · ${keyText("tui.select.cancel", { primaryOnly: true })} close`;
+ lines.push(this.line(safeWidth, theme.fg("dim", hint)));
+ return lines;
+ }
+
+ /** One indented line (the #2340 shape: a single column of indent). */
+ private line(width: number, content: string): string {
+ const truncated = truncateToWidth(content ? ` ${content}` : "", width, "");
+ return truncated + " ".repeat(Math.max(0, width - visibleWidth(truncated)));
+ }
+}
diff --git a/packages/coding-agent/src/modes/interactive/components/menu-panel.ts b/packages/coding-agent/src/modes/interactive/components/menu-panel.ts
index f3fa15b9d9..f0e4ccccc2 100644
--- a/packages/coding-agent/src/modes/interactive/components/menu-panel.ts
+++ b/packages/coding-agent/src/modes/interactive/components/menu-panel.ts
@@ -13,8 +13,58 @@ interface MenuPanelOptions {
title: string;
subtitle?: string;
inline?: boolean;
- /** Inline only: prefix the panel with a full-width separator rule. */
+ /**
+ * Inline only: force or suppress the full-width separator rule above the
+ * panel. By default an inline panel opens with exactly ONE rule — its own,
+ * or the bordered search input's when that input already leads the panel
+ * (never both).
+ */
+ topRule?: boolean;
+}
+
+/**
+ * A component whose first rendered line is already a full-width rule: the
+ * inline MenuSearchInput. MenuPanel uses this to open every inline picker with
+ * exactly one separator rule instead of doubling the search input's border.
+ */
+interface InlineTopRuleComponent {
+ readonly rendersInlineTopRule: boolean;
+}
+
+function rendersInlineTopRule(component: Component | undefined): boolean {
+ return (component as InlineTopRuleComponent | undefined)?.rendersInlineTopRule === true;
+}
+
+/**
+ * The child whose first line opens the panel body. Children that render nothing
+ * (an empty placeholder Container, e.g. the model picker's header-help slot
+ * before it is populated) must be skipped: treating one as the opener answered
+ * "the search input does not lead" and drew a panel rule directly on top of the
+ * search box's own border — two stacked rules and one wasted list row.
+ */
+function firstRenderingChild(children: readonly Component[]): Component | undefined {
+ return children.find((child) => !(child instanceof Container) || child.children.length > 0);
+}
+
+/**
+ * Rows an inline MenuPanel draws above its children: one separator rule,
+ * except when the bordered search input already leads the panel and its own
+ * top border IS that rule. Components that budget viewport rows for an inline
+ * panel must add this to their reserved rows — it is the same decision
+ * MenuPanel.render applies, so the budget and the frame can never disagree.
+ */
+export function inlineMenuPanelTopRuleRows(options: {
+ title?: string;
+ subtitle?: string;
+ /** Prefer `children`: an empty placeholder child must not count as the opener. */
+ firstChild?: Component;
+ children?: readonly Component[];
topRule?: boolean;
+}): number {
+ const hasHeader = Boolean(options.title) || Boolean(options.subtitle?.trim());
+ const opener = options.children ? firstRenderingChild(options.children) : options.firstChild;
+ const firstChildLeadsWithRule = rendersInlineTopRule(opener);
+ return (options.topRule ?? (!firstChildLeadsWithRule || hasHeader)) ? 1 : 0;
}
export interface MenuViewportProvider {
@@ -261,7 +311,18 @@ export class MenuPanel extends Container {
override render(width: number): string[] {
if (this.options.inline) {
const lines: string[] = [];
- if (this.options.topRule) {
+ // Every inline picker opens with one full-width rule that separates
+ // it from the transcript above. A headerless panel led by the
+ // bordered search input keeps that input's own top border as the
+ // rule; a panel with a title or subtitle draws the rule above it.
+ if (
+ inlineMenuPanelTopRuleRows({
+ title: this.title,
+ subtitle: this.options.subtitle,
+ children: this.children,
+ topRule: this.options.topRule,
+ }) > 0
+ ) {
lines.push(theme.fg("borderMuted", "─".repeat(Math.max(0, width))));
}
if (this.title) lines.push(theme.fg("muted", ` ${this.title}`));
@@ -317,7 +378,7 @@ export class MenuPanel extends Container {
export class MenuSearchInput implements Component, Focusable, FullWidthMenuComponent {
readonly fillsMenuPanel = true;
- private readonly input = new Input();
+ private readonly input: Input;
constructor(
private readonly placeholder: string,
@@ -326,7 +387,15 @@ export class MenuSearchInput implements Component, Focusable, FullWidthMenuCompo
private readonly plain = false,
/** Drop the "> " prompt for surfaces that mark selection with their own caret. */
private readonly hidePrompt = false,
- ) {}
+ options: { masked?: boolean } = {},
+ ) {
+ this.input = new Input(options.masked === true ? { masked: true } : {});
+ }
+
+ /** The inline variant renders a full-width rule as its first line — unless it renders plain. */
+ get rendersInlineTopRule(): boolean {
+ return this.inline && !this.plain;
+ }
get focused(): boolean {
return this.input.focused;
diff --git a/packages/coding-agent/src/modes/interactive/components/model-selector.ts b/packages/coding-agent/src/modes/interactive/components/model-selector.ts
index f85ccfa814..a794d5e97b 100644
--- a/packages/coding-agent/src/modes/interactive/components/model-selector.ts
+++ b/packages/coding-agent/src/modes/interactive/components/model-selector.ts
@@ -24,6 +24,7 @@ import { keyHint } from "./keybinding-hints.js";
import {
getInlineTrailingWidth,
getMenuListLayout,
+ inlineMenuPanelTopRuleRows,
MenuList,
MenuPanel,
MenuRow,
@@ -206,6 +207,8 @@ export class ModelSelectorComponent extends Container implements Focusable {
});
private responsiveLayoutKey = "";
private readonly viewport: MenuViewportProvider;
+ /** Rows the inline MenuPanel draws above its children (separator rule). */
+ private inlineTopRuleRows = 0;
private readonly getHeaderRows: () => number;
constructor(
@@ -272,6 +275,11 @@ export class ModelSelectorComponent extends Container implements Focusable {
// Create list container
this.listContainer = new MenuList({ compact: () => this.listLayout.compact, inline: this.inline });
this.panel.addChild(this.listContainer);
+ // The inline panel opens with its separator rule; budget it.
+ this.inlineTopRuleRows = inlineMenuPanelTopRuleRows({
+ subtitle: options.subtitle,
+ children: this.panel.children,
+ });
this.updateResponsiveLayout();
this.loadModels();
@@ -796,7 +804,7 @@ export class ModelSelectorComponent extends Container implements Focusable {
getRows: this.viewport.getRows,
preferredVisibleItems: 8,
totalItems: this.filteredModels.length,
- reservedRows: this.getHeaderRows() + 3 + scopeRows + detailRows,
+ reservedRows: this.getHeaderRows() + 3 + scopeRows + detailRows + this.inlineTopRuleRows,
comfortableItemRows: 1,
comfortableListPaddingRows: 0,
scrollIndicatorRows: 1,
diff --git a/packages/coding-agent/src/modes/interactive/components/oauth-selector.ts b/packages/coding-agent/src/modes/interactive/components/oauth-selector.ts
index 5564cc7c6a..506d368299 100644
--- a/packages/coding-agent/src/modes/interactive/components/oauth-selector.ts
+++ b/packages/coding-agent/src/modes/interactive/components/oauth-selector.ts
@@ -13,6 +13,7 @@ import { PRIME_INFERENCE_PROVIDER_ID } from "../../../core/prime-inference-auth.
import { theme } from "../theme/theme.js";
import {
getMenuListLayout,
+ inlineMenuPanelTopRuleRows,
MenuList,
MenuPanel,
MenuRow,
@@ -88,6 +89,8 @@ export class OAuthSelectorComponent extends Container implements Focusable {
compactItemRows: 2,
});
private readonly viewport: MenuViewportProvider;
+ /** Rows the inline MenuPanel draws above its children (separator rule). */
+ private topRuleRows = 0;
private readonly getHeaderRows: () => number;
private readonly inline: boolean;
private readonly emptyMessage?: string;
@@ -122,14 +125,14 @@ export class OAuthSelectorComponent extends Container implements Focusable {
? options.initialCategory
: (this.categories[0] ?? "provider");
+ const panelTitle =
+ this.inline && options.header ? "" : (options.title ?? (mode === "login" ? "Providers" : "Saved Credentials"));
+ const panelSubtitle =
+ options.subtitle ??
+ (mode === "login" ? "Connect with a subscription or API key." : "Choose a credential to remove.");
const panel = new MenuPanel({
- title:
- this.inline && options.header
- ? ""
- : (options.title ?? (mode === "login" ? "Providers" : "Saved Credentials")),
- subtitle:
- options.subtitle ??
- (mode === "login" ? "Connect with a subscription or API key." : "Choose a credential to remove."),
+ title: panelTitle,
+ subtitle: panelSubtitle,
inline: this.inline,
});
this.addChild(panel);
@@ -156,6 +159,15 @@ export class OAuthSelectorComponent extends Container implements Focusable {
this.listContainer = new MenuList({ compact: () => this.listLayout.compact, inline: this.inline });
panel.addChild(this.listContainer);
+ // The inline panel opens with its separator rule unless the bordered
+ // search already leads it; budget whichever the panel decides.
+ this.topRuleRows = this.inline
+ ? inlineMenuPanelTopRuleRows({
+ title: panelTitle,
+ subtitle: panelSubtitle,
+ children: panel.children,
+ })
+ : 0;
this.filterProviders("");
}
@@ -431,7 +443,8 @@ export class OAuthSelectorComponent extends Container implements Focusable {
return (
(this.inline ? 3 + this.getInlineDetailRows() : PROVIDER_LIST_RESERVED_ROWS) +
this.getHeaderRows() +
- (this.tabBar ? TAB_BAR_RESERVED_ROWS : 0)
+ (this.tabBar ? TAB_BAR_RESERVED_ROWS : 0) +
+ this.topRuleRows
);
}
diff --git a/packages/coding-agent/src/modes/interactive/components/prime-team-selector.ts b/packages/coding-agent/src/modes/interactive/components/prime-team-selector.ts
index 30b6dd24c4..5ba7a32cca 100644
--- a/packages/coding-agent/src/modes/interactive/components/prime-team-selector.ts
+++ b/packages/coding-agent/src/modes/interactive/components/prime-team-selector.ts
@@ -3,6 +3,7 @@ import type { PrimeTeam } from "../../../core/prime-inference-auth.js";
import { theme } from "../theme/theme.js";
import {
getMenuListLayout,
+ inlineMenuPanelTopRuleRows,
MenuList,
MenuPanel,
MenuRow,
@@ -26,6 +27,8 @@ export class PrimeTeamSelectorComponent extends Container implements Focusable {
private filteredOptions: PrimeTeamOption[];
private selectedIndex = 0;
private searchQuery = "";
+ /** Rows the inline MenuPanel draws above its children (separator rule). */
+ private topRuleRows = 0;
private _focused = false;
private listLayout = getMenuListLayout({
preferredVisibleItems: PREFERRED_VISIBLE_TEAMS,
@@ -64,6 +67,11 @@ export class PrimeTeamSelectorComponent extends Container implements Focusable {
this.listContainer = new MenuList({ compact: () => this.listLayout.compact, inline: true });
panel.addChild(this.listContainer);
+ // The inline panel opens with its separator rule; budget it.
+ this.topRuleRows = inlineMenuPanelTopRuleRows({
+ title: "Select a Prime Team:",
+ subtitle: "Choose which account pays for Prime Inference usage.",
+ });
this.filterOptions("");
}
@@ -195,7 +203,7 @@ export class PrimeTeamSelectorComponent extends Container implements Focusable {
getRows: this.viewport.getRows,
preferredVisibleItems: PREFERRED_VISIBLE_TEAMS,
totalItems: this.filteredOptions.length,
- reservedRows: TEAM_LIST_RESERVED_ROWS,
+ reservedRows: TEAM_LIST_RESERVED_ROWS + this.topRuleRows,
comfortableItemRows: 3,
compactItemRows: 2,
scrollIndicatorRows: TEAM_SCROLL_INDICATOR_ROWS,
diff --git a/packages/coding-agent/src/modes/interactive/components/service-catalog-picker.ts b/packages/coding-agent/src/modes/interactive/components/service-catalog-picker.ts
new file mode 100644
index 0000000000..30bd105671
--- /dev/null
+++ b/packages/coding-agent/src/modes/interactive/components/service-catalog-picker.ts
@@ -0,0 +1,735 @@
+import {
+ type Component,
+ Container,
+ type Focusable,
+ getKeybindings,
+ TruncatedText,
+ truncateToWidth,
+ visibleWidth,
+ wrapTextWithAnsi,
+} from "@earendil-works/pi-tui";
+import type { McpPluginView } from "../../../core/mcp/service-catalog.js";
+import { theme } from "../theme/theme.js";
+import { keyText } from "./keybinding-hints.js";
+import {
+ getMenuListLayout,
+ inlineMenuPanelTopRuleRows,
+ MenuList,
+ MenuPanel,
+ MenuRow,
+ MenuSearchInput,
+ type MenuViewportProvider,
+} from "./menu-panel.js";
+import { shouldTreatAsBack } from "./modal-back.js";
+
+export interface ServiceCatalogPickerOptions extends MenuViewportProvider {
+ /** Pre-filled search (e.g. from `/plugins notion`). */
+ initialSearch?: string;
+ /** Panel title override (e.g. the account picker reuses this component). */
+ title?: string;
+ /**
+ * Accounts mode: the static description shown above the options. Defaults
+ * to the shared card description (every account row inherits the service's).
+ */
+ description?: string;
+ /** Account rows preserve their account/disconnect grouping and expose explicit actions. */
+ mode?: "catalog" | "accounts";
+ /** Host-resolved intent and copy for settings-managed transports. */
+ getRowPresentation?: (service: McpPluginView) => { action?: string; status?: string; detail?: string } | undefined;
+ /**
+ * The left arrow (app.modal.back) reports "back" to the host instead of
+ * staying inert: the accounts menu uses it to return to the catalog, the
+ * picker chain's parent surface. The catalog itself has no parent, so it
+ * never sets this.
+ */
+ back?: boolean;
+ /**
+ * Esc reports "back" to the host's parent surface instead of cancelling
+ * the chain: the multi-account sub-picker's Esc returns to the accounts
+ * menu, it never closes the whole chain.
+ */
+ cancelBack?: boolean;
+ /** The hint word after the cancel key: "close" (default) or "back". */
+ closeHint?: string;
+ /** Invoked for the back key when `back` is enabled; wired by the host. */
+ onBack?: () => void;
+}
+
+/**
+ * Catalog copy (descriptions, setup hints) is imported verbatim from upstream
+ * plugin manifests and routinely contains newlines — Canva's description, for
+ * example, lists its skills one per line. A rendered line must be exactly one
+ * terminal line: an embedded newline paints extra physical rows that the
+ * differential renderer never accounted for, so every row below it drifts and
+ * stale rows survive (duplicated entries, doubled scroll counters). Flatten all
+ * whitespace runs before the text becomes a line.
+ */
+function flattenToSingleLine(text: string): string {
+ return text.replace(/\s+/g, " ").trim();
+}
+
+const PREFERRED_VISIBLE_SERVICES = 8;
+const SEARCH_AND_FOOTER_ROWS = 4;
+const SCROLL_INDICATOR_ROWS = 1;
+/** The one fixed line under the list describing the selected connector. */
+const DETAIL_ROWS = 1;
+/** The one blank line between the last row and the description line. */
+const DETAIL_SPACER_ROWS = 1;
+/**
+ * Viewports below this height cannot fit the search box, one result row, the
+ * counter, the spacer, the description, and the hint; the description line
+ * drops instead of overflowing the terminal. Real terminals never reach this
+ * boundary.
+ */
+const MIN_ROWS_FOR_DETAIL = SEARCH_AND_FOOTER_ROWS + DETAIL_ROWS + DETAIL_SPACER_ROWS + 2;
+
+/** Accounts mode: description wrap width, the onboarding choice panel's (PR #2340). */
+/** #2340 row sizing: marker + label + trailing padding, floored so short labels still read as a bar. */
+const ROW_MARKER_WIDTH = 2;
+const ROW_TRAILING_WIDTH = 6;
+const ACCOUNTS_MIN_ROW_WIDTH = 30;
+const ACCOUNTS_DESCRIPTION_WIDTH = 50;
+/** Accounts mode: the description block is hard-capped at three rendered lines. */
+const ACCOUNTS_DESCRIPTION_MAX_LINES = 3;
+/** Accounts mode: description lines plus the blank line under them, budgeted at the cap. */
+const ACCOUNTS_DESCRIPTION_BUDGET_ROWS = ACCOUNTS_DESCRIPTION_MAX_LINES + 1;
+/**
+ * Accounts mode rows that are not option rows: the separator rule, the blank
+ * under it, the header, the blank under the header, the blank under the last
+ * option (it keeps the shortcuts line from touching it), and the shortcuts
+ * line itself.
+ */
+const ACCOUNTS_FRAME_ROWS = 6;
+
+// Search bands: lower scores rank first. Identity fields (label, service id,
+// aliases) always outrank description/setup-hint text.
+const EXACT_SCORE = 0;
+const PREFIX_SCORE = 100;
+const WORD_START_SCORE = 200;
+const SUBSTRING_SCORE = 300;
+const SUBSEQUENCE_SCORE = 400;
+const DESCRIPTION_WORD_START_SCORE = 500;
+const DESCRIPTION_SUBSTRING_SCORE = 600;
+
+function words(text: string): string[] {
+ return text
+ .toLowerCase()
+ .split(/[^\p{L}\p{N}]+/u)
+ .filter(Boolean);
+}
+
+/** Identity match: exact, prefix, word start, substring, then the subsequence fallback. */
+function identityMatchScore(text: string, token: string): number | undefined {
+ const haystack = text.toLowerCase();
+ if (haystack === token) return EXACT_SCORE;
+ if (haystack.startsWith(token)) return PREFIX_SCORE + (haystack.length - token.length) * 0.01;
+ if (words(haystack).some((word) => word.startsWith(token))) return WORD_START_SCORE;
+ const at = haystack.indexOf(token);
+ if (at >= 0) return SUBSTRING_SCORE + at * 0.01;
+ return subsequenceMatchScore(haystack, token);
+}
+
+/**
+ * Identity-only subsequence fallback. The consecutive-run floor — half the
+ * query, minimum two characters — keeps the fallback for tight abbreviations
+ * ("crdb" finds cockroachdb) while rejecting the scattered matches that made
+ * the old joined-haystack search return noise for almost any query.
+ */
+function subsequenceMatchScore(haystack: string, token: string): number | undefined {
+ if (token.length < 2 || token.length > haystack.length) return undefined;
+ let tokenIndex = 0;
+ let runLength = 0;
+ let longestRun = 0;
+ let firstMatch = -1;
+ let lastMatch = -1;
+ for (let index = 0; index < haystack.length && tokenIndex < token.length; index++) {
+ if (haystack[index] !== token[tokenIndex]) continue;
+ runLength = lastMatch === index - 1 ? runLength + 1 : 1;
+ longestRun = Math.max(longestRun, runLength);
+ if (firstMatch === -1) firstMatch = index;
+ lastMatch = index;
+ tokenIndex++;
+ }
+ if (tokenIndex < token.length || longestRun < Math.max(2, Math.ceil(token.length / 2))) return undefined;
+ return SUBSEQUENCE_SCORE + (lastMatch - firstMatch + 1 - token.length) * 2;
+}
+
+/** Description text matches only as a word start or substring — never a subsequence. */
+function descriptionMatchScore(text: string, token: string): number | undefined {
+ const haystack = text.toLowerCase();
+ if (words(haystack).some((word) => word.startsWith(token))) return DESCRIPTION_WORD_START_SCORE;
+ const at = haystack.indexOf(token);
+ if (at >= 0) return DESCRIPTION_SUBSTRING_SCORE + at * 0.01;
+ return undefined;
+}
+
+/**
+ * Score one row against the query; undefined means "not a match". Every query
+ * token must match somewhere. Only the catalog picker searches (accounts mode
+ * has no search box), so description and setup-hint text only ever matches
+ * catalog rows.
+ */
+function serviceMatchScore(service: McpPluginView, query: string): number | undefined {
+ const tokens = query.toLowerCase().split(/\s+/).filter(Boolean);
+ if (tokens.length === 0) return 0;
+ let total = 0;
+ for (const token of tokens) {
+ let best: number | undefined;
+ for (const field of [service.label, service.serviceId, ...(service.aliases ?? [])]) {
+ const score = identityMatchScore(field, token);
+ if (score !== undefined && (best === undefined || score < best)) best = score;
+ }
+ if (best === undefined) {
+ for (const field of [service.description, service.setupHint]) {
+ if (!field) continue;
+ const score = descriptionMatchScore(field, token);
+ if (score !== undefined && (best === undefined || score < best)) best = score;
+ }
+ }
+ if (best === undefined) return undefined;
+ total += best;
+ }
+ return total;
+}
+
+/** One option row of the accounts menu (the label carries the action). */
+interface ServiceAccountsRow {
+ label: string;
+ selected: boolean;
+}
+
+/**
+ * The accounts-mode body: a static choice list in the same selection language
+ * as the onboarding choice panel (PR #2340) — one leading blank row, a single
+ * column of indent, a prompt-style header, a muted wrapped description capped
+ * at three lines, then `> label` for the selection (bold text over the
+ * soft-selection background) and ` label` muted otherwise. No search box, no
+ * counter, no right-hand column: the labels carry the actions.
+ *
+ * #2340 is not merged yet, so this mirrors OnboardingChoiceComponent's visual
+ * language locally instead of importing it — dedupe the two once it lands.
+ */
+class ServiceAccountsBodyComponent implements Component {
+ /** Full-width body: MenuPanel renders it without adding its own indent. */
+ readonly fillsMenuPanel = true;
+
+ constructor(
+ private readonly header: string,
+ private readonly description: string,
+ private readonly getRowsState: () => readonly ServiceAccountsRow[],
+ /**
+ * Rows available for this body inside the panel. The fixed frame
+ * (blank, header, blank, description cap, blank under the options,
+ * trailing blank) is painted first; when the viewport cannot fit it,
+ * the description drops (and with it its blank) instead of the frame
+ * overflowing the terminal — the same rule the catalog mode applies to
+ * its detail line. Options are never dropped: they are the content.
+ */
+ private readonly getAvailableRows: () => number,
+ ) {}
+
+ invalidate(): void {
+ // Render output derives from the picker's live state.
+ }
+
+ render(width: number): string[] {
+ const safeWidth = Math.max(1, width);
+ // The #2340 shape: a leading blank row, then the one-column indent.
+ const lines: string[] = [this.line(safeWidth, "")];
+ if (this.header) {
+ lines.push(this.line(safeWidth, theme.fg("text", this.header)));
+ lines.push(this.line(safeWidth, ""));
+ }
+ // Fixed-frame budget: what must fit besides the option rows.
+ const FIXED_ROWS = 2 /* leading blank, header */ + 1 /* blank under header */ + 1 /* trailing blank */;
+ const budgeted = this.getAvailableRows();
+ const optionRowCount = this.getRowsState().length;
+ const neededWithDescription = FIXED_ROWS + ACCOUNTS_DESCRIPTION_BUDGET_ROWS + optionRowCount + 1 /* trailing */;
+ const showDescription = !!this.description && budgeted >= neededWithDescription;
+ if (showDescription) {
+ const wrapWidth = Math.max(1, Math.min(ACCOUNTS_DESCRIPTION_WIDTH, safeWidth - 2));
+ const wrapped = wrapTextWithAnsi(this.description, wrapWidth);
+ // Hard cap: at most three lines, and when the description ran
+ // longer the third line ALWAYS carries an ellipsis — even when the
+ // wrapped line happens to fill the wrap width exactly.
+ const shown = wrapped.slice(0, ACCOUNTS_DESCRIPTION_MAX_LINES);
+ if (wrapped.length > shown.length && shown.length > 0) {
+ const last = shown.length - 1;
+ shown[last] = `${truncateToWidth(shown[last] ?? "", Math.max(0, wrapWidth - 1), "")}…`;
+ }
+ for (const row of shown) lines.push(this.line(safeWidth, theme.fg("muted", row)));
+ lines.push(this.line(safeWidth, ""));
+ }
+ const rows = this.getRowsState();
+ // #2340 sizing: the selection bar hugs the widest label instead of
+ // spanning the terminal, so a wide window does not paint a full-width
+ // block behind one short option.
+ const labelWidth = rows.reduce((max, row) => Math.max(max, visibleWidth(row.label)), 0);
+ const rowWidth = Math.min(
+ safeWidth,
+ Math.max(ACCOUNTS_MIN_ROW_WIDTH, ROW_MARKER_WIDTH + labelWidth + ROW_TRAILING_WIDTH),
+ );
+ for (const row of rows) {
+ const name = `${row.selected ? "> " : " "}${row.label}`;
+ const content = row.selected ? theme.bold(theme.fg("text", name)) : theme.fg("muted", name);
+ lines.push(this.rowLine(safeWidth, rowWidth, content, row.selected));
+ }
+ // A blank row under the last option keeps the shortcuts line from
+ // touching it (Kevin, live testing).
+ lines.push(this.line(safeWidth, ""));
+ return lines;
+ }
+
+ /** One indented line (the #2340 shape: a single column of indent). */
+ private line(width: number, content: string): string {
+ const truncated = truncateToWidth(content ? ` ${content}` : "", width, "");
+ return truncated + " ".repeat(Math.max(0, width - visibleWidth(truncated)));
+ }
+
+ /**
+ * One option row. The selection background is painted only across rowWidth
+ * (the widest label plus padding), never the whole terminal width; the rest
+ * of the line stays unpainted.
+ */
+ private rowLine(width: number, rowWidth: number, content: string, selected: boolean): string {
+ const body = truncateToWidth(` ${content}`, rowWidth, "");
+ const bar = body + " ".repeat(Math.max(0, rowWidth - visibleWidth(body)));
+ const painted = selected ? theme.getSoftSelectionBackgroundColor()(bar) : bar;
+ return painted + " ".repeat(Math.max(0, width - rowWidth));
+ }
+}
+
+/**
+ * Inline catalog/account picker on the same menu primitives as models/providers.
+ * Selection only reports intent; the host owns every guarded account operation.
+ */
+export class ServiceCatalogPickerComponent extends Container implements Focusable {
+ /** Catalog mode only: accounts mode has no search box (Kevin, live testing). */
+ private searchInput: MenuSearchInput | undefined;
+ /** Accounts mode only: the static choice-list body. */
+ private accountsBody: ServiceAccountsBodyComponent | undefined;
+ /** Accounts mode: description rows budgeted for the viewport layout. */
+ private accountsDescriptionRows = 0;
+
+ // Delegate focus to the search input so its IME cursor remains positioned correctly.
+ private _focused = false;
+ get focused(): boolean {
+ return this._focused;
+ }
+ set focused(value: boolean) {
+ this._focused = value;
+ if (this.searchInput) this.searchInput.focused = value;
+ }
+
+ private listContainer: Container;
+ private allServices: McpPluginView[];
+ private filteredServices: McpPluginView[];
+ private searchQuery = "";
+ private selectedIndex = 0;
+ private readonly viewport: MenuViewportProvider;
+ private readonly mode: "catalog" | "accounts";
+ private readonly contextRows: number;
+ private readonly getRowPresentation: ServiceCatalogPickerOptions["getRowPresentation"];
+ private detailRows = 0;
+ private readonly onSelectCallback: (service: McpPluginView) => void;
+ private readonly onCancelCallback: () => void;
+ /** Set only when the host gave this picker a parent surface to go back to. */
+ private readonly onBackCallback: (() => void) | undefined;
+ /** The hint word after the cancel key: "close" unless Esc itself backs. */
+ private readonly closeHint: string;
+ private listLayout = getMenuListLayout({
+ preferredVisibleItems: PREFERRED_VISIBLE_SERVICES,
+ reservedRows: SEARCH_AND_FOOTER_ROWS,
+ comfortableItemRows: 1,
+ comfortableListPaddingRows: 0,
+ });
+
+ constructor(
+ services: readonly McpPluginView[],
+ onSelect: (service: McpPluginView) => void,
+ onCancel: () => void,
+ options: ServiceCatalogPickerOptions = {},
+ ) {
+ super();
+ this.allServices = [...services];
+ this.filteredServices = this.allServices;
+ this.viewport = options;
+ this.mode = options.mode ?? "catalog";
+ this.getRowPresentation = options.getRowPresentation;
+ this.onSelectCallback = onSelect;
+ this.onCancelCallback = onCancel;
+ this.onBackCallback = options.onBack;
+ this.closeHint = options.closeHint ?? "close";
+
+ const panel = new MenuPanel({
+ title: this.mode === "accounts" ? "" : (options.title ?? ""),
+ inline: true,
+ });
+ this.addChild(panel);
+ // The catalog list container; accounts mode never attaches it — the
+ // accounts body renders its rows from live state instead.
+ this.listContainer = new MenuList({ inline: true });
+
+ if (this.mode === "accounts") {
+ // Kevin (live testing): the accounts menu had a search box that
+ // filtered nothing useful, a first row that only re-verified, and
+ // right-hand "remove account"/"add account" echoes of what the row
+ // labels already say. The redesign is a static choice list —
+ // header, description, then Reconnect/Disconnect/Add rows.
+ const description = flattenToSingleLine(
+ options.description ?? this.allServices[0]?.description ?? this.allServices[0]?.setupHint ?? "",
+ );
+ this.accountsDescriptionRows = description ? ACCOUNTS_DESCRIPTION_BUDGET_ROWS : 0;
+ this.accountsBody = new ServiceAccountsBodyComponent(
+ flattenToSingleLine(options.title ?? ""),
+ description,
+ () => this.accountsRows(),
+ // The picker paints the shortcuts line itself, so the body gets
+ // the rest of the terminal; the separator rule is budgeted by
+ // contextRows, not by the body.
+ // No rows provider means no bound: only a real viewport limits the frame.
+ () => (this.viewport.getRows ? Math.max(0, (this.viewport.getRows() ?? 0) - 1) : Number.POSITIVE_INFINITY),
+ );
+ panel.addChild(this.accountsBody);
+ // The accounts body owns every fixed row (blank, header,
+ // description); only the separator rule leads the panel, and the
+ // viewport budget lives in updateLayout's accounts branch.
+ this.contextRows = inlineMenuPanelTopRuleRows({ firstChild: this.accountsBody });
+ return;
+ }
+
+ const searchInput = new MenuSearchInput("Search MCP connections", true);
+ this.searchInput = searchInput;
+ searchInput.onSubmit = () => {
+ const service = this.filteredServices[this.selectedIndex];
+ if (service) this.onSelectCallback(service);
+ };
+ panel.addChild(searchInput);
+ // A titled panel renders the separator rule plus the title before its
+ // children; a headerless panel's rule IS the search input's top border,
+ // already budgeted in SEARCH_AND_FOOTER_ROWS. The helper is the same
+ // decision MenuPanel.render applies.
+ this.contextRows =
+ (options.title ? 1 : 0) + inlineMenuPanelTopRuleRows({ title: options.title, firstChild: searchInput });
+
+ panel.addChild(this.listContainer);
+
+ if (options.initialSearch) searchInput.setValue(options.initialSearch);
+ this.filterServices(options.initialSearch ?? "");
+ }
+
+ getSearchInput(): MenuSearchInput | undefined {
+ return this.searchInput;
+ }
+
+ private filterServices(query: string): void {
+ if (this.mode === "accounts") {
+ // No search box in accounts mode: the row set IS the menu and
+ // typing is inert, so the filter never runs.
+ this.filteredServices = this.allServices;
+ return;
+ }
+ const queryChanged = query !== this.searchQuery;
+ this.searchQuery = query;
+ const trimmed = query.trim();
+ if (!trimmed) {
+ this.filteredServices = this.allServices;
+ } else {
+ const scored: { service: McpPluginView; score: number }[] = [];
+ for (const service of this.allServices) {
+ const score = serviceMatchScore(service, trimmed);
+ if (score !== undefined) scored.push({ service, score });
+ }
+ // Stable sort: rows that score the same keep their catalog order.
+ scored.sort((left, right) => left.score - right.score);
+ this.filteredServices = scored.map((entry) => entry.service);
+ }
+ this.selectedIndex = queryChanged
+ ? 0
+ : Math.max(0, Math.min(this.selectedIndex, Math.max(0, this.filteredServices.length - 1)));
+ this.updateList();
+ }
+
+ override render(width: number): string[] {
+ // Pure projection: rebuild the visible window from the CURRENT selection,
+ // filter, and viewport on every render. The old layout-change heuristic
+ // kept stale row children whenever a rebuild was skipped, so frames
+ // rendered at unusual times (resizes, host re-renders) could disagree
+ // about which rows were visible or selected. Rebuilding here makes
+ // consecutive frames with unchanged state render byte-identical output.
+ this.updateList();
+ const selected = this.filteredServices[this.selectedIndex];
+ const confirm = keyText("tui.select.confirm", { primaryOnly: true });
+ const cancel = keyText("tui.select.cancel", { primaryOnly: true });
+ // Back is a real navigation key when the host wired a parent surface;
+ // the cancel word says what THAT key does here (close the chain, or
+ // back out of a sub-picker).
+ const back = this.onBackCallback ? `${keyText("app.modal.back", { primaryOnly: true })} back · ` : "";
+ const action = selected
+ ? `${confirm} ${this.getRowPresentation?.(selected)?.action ?? this.actionText(selected)} · `
+ : "";
+ const navigation = `${keyText("tui.select.up", { primaryOnly: true })}/${keyText("tui.select.down", { primaryOnly: true })} navigate · `;
+ const hint = `${width >= 70 ? navigation : ""}${back}${action}${cancel} ${this.closeHint}`;
+ return [...super.render(width), truncateToWidth(theme.fg("dim", ` ${hint}`), width, "", true)];
+ }
+
+ private updateList(): void {
+ this.updateLayout();
+ if (this.mode === "accounts") {
+ // The accounts body renders from the picker's live state every
+ // frame; there is no child list to rebuild.
+ return;
+ }
+ this.listContainer.clear();
+
+ // Centered window over the selection, clamped to the list bounds: at the
+ // top boundary the window starts at row 0 and moving down only ever
+ // shifts it forward — rows never wrap around or repeat.
+ const maxVisible = this.listLayout.visibleItems;
+ const startIndex = Math.max(
+ 0,
+ Math.min(this.selectedIndex - Math.floor(maxVisible / 2), this.filteredServices.length - maxVisible),
+ );
+ const endIndex = Math.min(startIndex + maxVisible, this.filteredServices.length);
+
+ for (let index = startIndex; index < endIndex; index++) {
+ const service = this.filteredServices[index];
+ if (!service) continue;
+ this.listContainer.addChild(
+ new MenuRow({
+ // Labels and host-provided status are catalog copy too: flatten
+ // them so a stray newline can never split a row.
+ primary: flattenToSingleLine(service.label),
+ trailing: [flattenToSingleLine(this.getRowPresentation?.(service)?.status ?? this.statusText(service))],
+ selected: index === this.selectedIndex,
+ inline: true,
+ }),
+ );
+ }
+
+ if (startIndex > 0 || endIndex < this.filteredServices.length) {
+ // One leading space plus TruncatedText's one-column padding puts the
+ // counter's first glyph in the same column as the rows' labels
+ // (the rows render "› "/" before their primary text).
+ const scrollInfo = theme.fg("muted", ` (${this.selectedIndex + 1}/${this.filteredServices.length})`);
+ this.listContainer.addChild(new TruncatedText(scrollInfo, 1, 0));
+ }
+
+ if (this.filteredServices.length === 0) {
+ const message = this.allServices.length === 0 ? "No external services available" : "No matching services";
+ this.listContainer.addChild(new TruncatedText(theme.fg("muted", ` ${message}`), 1, 0));
+ // One blank row between the empty state and the shortcuts line
+ // (Kevin, live testing): the message never touches the keybinds.
+ // The pair is fixed, so the empty frame stays deterministic — the
+ // panel height never jumps between renders of the same state.
+ this.listContainer.addChild({
+ render: () => [""],
+ invalidate: () => {},
+ });
+ } else if (this.detailRows > 0) {
+ // One blank line between the last row and the description, so the
+ // settings block reads as its own group. updateLayout() budgets the
+ // spacer, so the panel height never changes to fit it.
+ this.listContainer.addChild({
+ render: () => [""],
+ invalidate: () => {},
+ });
+ // ONE fixed line about the selected connector — never a growing
+ // description block — with the shortcuts row underneath from render().
+ // updateLayout() budgets the line, so the panel never resizes to fit it.
+ const selected = this.filteredServices[this.selectedIndex];
+ this.listContainer.addChild({
+ render: (width) => [
+ truncateToWidth(
+ theme.fg(
+ "muted",
+ ` ${flattenToSingleLine(
+ this.getRowPresentation?.(selected)?.detail ??
+ this.secondaryText(selected) ??
+ this.statusText(selected),
+ )}`,
+ ),
+ width,
+ "…",
+ true,
+ ),
+ ],
+ invalidate: () => {},
+ });
+ }
+ }
+
+ private actionText(service: McpPluginView): string {
+ // A multi-account Reconnect/Disconnect row opens the account sub-picker
+ // first (Kevin, live testing): the hint names the step, not the action
+ // that runs on the account picked inside it.
+ if (this.mode === "accounts" && service.connectionIds.length > 1) return "choose account";
+ // The relabelled Disconnect row keeps the remove semantics; the hint
+ // names the row (Kevin, live testing).
+ if (service.removeAction) return "disconnect";
+ if (service.loginPending && this.mode === "accounts") return "login in progress";
+ // A requires-setup token service connects by pasting: the hint is the
+ // action, not a dead-end "see setup" pointer.
+ if (service.pasteToken && service.connectionIds.length === 0) return "paste token";
+ if (this.mode === "catalog" && service.connectionIds.length > 0) return "manage accounts";
+ if (this.mode === "accounts" && service.connectionIds.length === 0)
+ return service.usesOAuth ? "add account" : "setup guidance";
+ if (service.source === "user" && !service.usesOAuth) return "manage";
+ // Enter on the accounts Reconnect row re-verifies a connected account;
+ // disconnect is the explicit Disconnect row's job, so Reconnect never
+ // disconnects. The hint names the row.
+ if (service.connectionStatus === "connected") return this.mode === "accounts" ? "reconnect" : "re-verify";
+ if (service.connectionStatus === "pending") return "verify";
+ if (!service.connectable) return "setup guidance";
+ return service.connectionStatus === "error" ? "reconnect" : "connect";
+ }
+
+ private statusText(service: McpPluginView): string {
+ if (service.removeAction) return theme.fg("muted", "Remove account");
+ // The accounts-mode paste row carries its action; the catalog row keeps
+ // the honest "Requires setup" state with the paste-token hint.
+ if (service.pasteToken && this.mode === "accounts") return theme.fg("accent", "Paste token");
+ if (service.loginPending) return theme.fg("warning", "Login in progress");
+ if (this.mode === "accounts" && service.connectionIds.length === 0)
+ return service.usesOAuth ? theme.fg("accent", "Add account") : theme.fg("warning", "Requires setup");
+ switch (service.connectionStatus) {
+ case "connected":
+ return theme.fg(
+ "success",
+ service.toolCount !== undefined ? `Connected · ${service.toolCount} tools` : "Connected",
+ );
+ case "pending":
+ return theme.fg("warning", "Needs verification");
+ case "error":
+ return theme.fg("error", service.connectable ? "Reconnect" : "Needs attention");
+ case "setup_required":
+ return theme.fg("warning", "Requires setup");
+ case "disabled":
+ return theme.fg("muted", "Disabled");
+ default:
+ // "Connect" is the plain next step, not a semantic state like
+ // the success/warning/error trailing texts around it, so it
+ // reads in the white text colour instead of the accent purple
+ // (Kevin, live testing).
+ return service.connectable ? theme.fg("text", "Connect") : theme.fg("muted", "Not connected");
+ }
+ }
+
+ private secondaryText(service: McpPluginView): string | undefined {
+ if (service.removeAction) return "Remove this account and its saved credential.";
+ if (this.mode === "accounts" && service.connectionIds.length === 0)
+ return service.usesOAuth
+ ? "Connect a separate account without replacing an existing one."
+ : "Manage this connection through /mcp or your settings file.";
+ if (service.connectionStatus === "setup_required" || service.connectionStatus === "error") {
+ return service.setupHint ?? service.description;
+ }
+ return service.description ?? service.setupHint;
+ }
+
+ handleInput(keyData: string): void {
+ const keybindings = getKeybindings();
+ if (keybindings.matches(keyData, "tui.select.up")) {
+ if (this.filteredServices.length === 0) return;
+ this.selectedIndex = Math.max(0, this.selectedIndex - 1);
+ this.updateList();
+ } else if (keybindings.matches(keyData, "tui.select.down")) {
+ if (this.filteredServices.length === 0) return;
+ this.selectedIndex = Math.min(this.filteredServices.length - 1, this.selectedIndex + 1);
+ this.updateList();
+ } else if (
+ keybindings.matches(keyData, "tui.select.pageUp") ||
+ keybindings.matches(keyData, "tui.select.pageDown")
+ ) {
+ if (this.filteredServices.length === 0) return;
+ const direction = keybindings.matches(keyData, "tui.select.pageUp") ? -1 : 1;
+ this.selectedIndex = Math.max(
+ 0,
+ Math.min(this.filteredServices.length - 1, this.selectedIndex + direction * this.listLayout.visibleItems),
+ );
+ this.updateList();
+ } else if (keybindings.matches(keyData, "tui.select.confirm")) {
+ const service = this.filteredServices[this.selectedIndex];
+ if (service) this.onSelectCallback(service);
+ } else if (keybindings.matches(keyData, "tui.select.cancel")) {
+ this.onCancelCallback();
+ } else if (this.onBackCallback && shouldTreatAsBack(keyData)) {
+ // Left arrow: a parent surface exists, so it goes back (the same
+ // binding the dialogs use, app.modal.back). Without a parent the
+ // key falls through to the branches below and stays inert.
+ this.onBackCallback();
+ } else if (this.mode === "accounts") {
+ // No search box in accounts mode: plain typing is inert.
+ return;
+ } else {
+ const searchInput = this.searchInput;
+ if (!searchInput) return;
+ const previousQuery = searchInput.getValue();
+ searchInput.handleInput(keyData);
+ if (previousQuery !== searchInput.getValue()) this.filterServices(searchInput.getValue());
+ }
+ }
+
+ /**
+ * Visible accounts rows: the same centered window the catalog list uses,
+ * projected onto the choice-list shape. There is no scroll counter — the
+ * account menu is a short static list, and the window only exists so a
+ * pathological account count can never overflow the terminal.
+ */
+ private accountsRows(): ServiceAccountsRow[] {
+ const maxVisible = this.listLayout.visibleItems;
+ const startIndex = Math.max(
+ 0,
+ Math.min(this.selectedIndex - Math.floor(maxVisible / 2), this.filteredServices.length - maxVisible),
+ );
+ const endIndex = Math.min(startIndex + maxVisible, this.filteredServices.length);
+ const rows: ServiceAccountsRow[] = [];
+ for (let index = startIndex; index < endIndex; index++) {
+ const service = this.filteredServices[index];
+ if (!service) continue;
+ // Row labels carry the action (Reconnect / Disconnect <id> / Add
+ // another account); flatten so a stray newline can never split one.
+ rows.push({ label: flattenToSingleLine(service.label), selected: index === this.selectedIndex });
+ }
+ return rows;
+ }
+
+ private updateLayout(): void {
+ if (this.mode === "accounts") {
+ // Accounts frame: rule + blank + header + blank + (description +
+ // blank, budgeted at the cap) + hint. Budgeting the description at
+ // its MAX keeps the frame deterministic; a shorter description only
+ // undershoots the viewport, it never overflows it.
+ this.detailRows = 0;
+ this.listLayout = getMenuListLayout({
+ getRows: this.viewport.getRows,
+ preferredVisibleItems: PREFERRED_VISIBLE_SERVICES,
+ totalItems: this.filteredServices.length,
+ reservedRows: ACCOUNTS_FRAME_ROWS + this.accountsDescriptionRows,
+ comfortableItemRows: 1,
+ comfortableListPaddingRows: 0,
+ scrollIndicatorRows: 0,
+ });
+ return;
+ }
+ // The description is ONE fixed line (no appearance-driven resize); it
+ // only drops in terminals too short to fit the panel skeleton at all.
+ this.detailRows =
+ (this.viewport.getRows?.() ?? Number.POSITIVE_INFINITY) >= MIN_ROWS_FOR_DETAIL + this.contextRows
+ ? DETAIL_ROWS
+ : 0;
+ this.listLayout = getMenuListLayout({
+ getRows: this.viewport.getRows,
+ preferredVisibleItems: PREFERRED_VISIBLE_SERVICES,
+ totalItems: this.filteredServices.length,
+ reservedRows:
+ SEARCH_AND_FOOTER_ROWS +
+ this.contextRows +
+ this.detailRows +
+ (this.detailRows > 0 ? DETAIL_SPACER_ROWS : 0),
+ comfortableItemRows: 1,
+ comfortableListPaddingRows: 0,
+ scrollIndicatorRows: SCROLL_INDICATOR_ROWS,
+ });
+ }
+}
diff --git a/packages/coding-agent/src/modes/interactive/interactive-mode.ts b/packages/coding-agent/src/modes/interactive/interactive-mode.ts
index 5474ed06cb..b7370196e5 100644
--- a/packages/coding-agent/src/modes/interactive/interactive-mode.ts
+++ b/packages/coding-agent/src/modes/interactive/interactive-mode.ts
@@ -14,6 +14,7 @@ import {
type ToolCall,
} from "@earendil-works/pi-ai";
import { BUILTIN_MCP_CATALOG } from "@earendil-works/pi-ai/mcp";
+import { registerOAuthProvider, unregisterOAuthProvider } from "@earendil-works/pi-ai/oauth";
import type {
AutocompleteItem,
AutocompleteProvider,
@@ -81,6 +82,7 @@ import {
uploadAllAgentTraces,
} from "../../core/agent-traces.js";
import { isNoModelsAvailableMessage } from "../../core/auth-guidance.js";
+import type { AuthCredential } from "../../core/auth-storage.js";
import {
type AgentCronJob,
type AgentHeartbeatManagementAction,
@@ -103,18 +105,49 @@ import { FooterDataProvider, type ReadonlyFooterDataProvider } from "../../core/
import { emptyGoalState, formatGoalUsage, GOAL_CONTEXT_PREVIEW_LABEL, type GoalState } from "../../core/goals.js";
import type { KernelSentAgentMessage } from "../../core/kernel/index.js";
import { type AppKeybinding, KeybindingsManager } from "../../core/keybindings.js";
+import {
+ logoutMcpAccount,
+ type McpConnectionRecord,
+ McpConnectionStore,
+ type McpRemoveAccountResult,
+} from "../../core/mcp/connection-store.js";
import { runMcpManagementCommand } from "../../core/mcp/mcp-command.js";
+import {
+ accountStateFor,
+ buildPluginViews,
+ createConfiguredMcpProvider,
+ isPasteableTokenService,
+ type McpPasteCredential,
+ type McpPluginView,
+ type McpServiceDescriptor,
+ mcpCredentialFieldPromptLabel,
+ mcpCredentialKey,
+ mcpLoginEligibility,
+ mcpPasteCredential,
+ nextMcpConnectionId,
+ reservedMcpOwnership,
+ resolveMcpOAuthIdentity,
+ resolveServiceCatalogWithDiagnostics,
+ verifyMcpConnection,
+} from "../../core/mcp/service-catalog.js";
import {
ASYNC_BASH_COMPLETION_PREVIEW_LABEL,
bashOutputToText,
COMPACTION_OUTCOME_CUSTOM_TYPE,
type CustomMessage,
createHeartbeatPromptMessage,
+ createMcpConnectionOutcomeMessage,
+ formatMcpConnectionOutcomeNotice,
HEARTBEAT_PROMPT_PREVIEW_LABEL,
isCompactionOutcomeMessage,
+ isMcpConnectionOutcomeMessage,
isRefinementOutcomeMessage,
isSessionSlashCommandMessage,
isSessionSlashCommandResultMessage,
+ MCP_CONNECTION_OUTCOME_CUSTOM_TYPE,
+ type McpDisconnectionOutcomeDetails,
+ type McpDisconnectionState,
+ type McpOutcomeDetails,
REFINEMENT_OUTCOME_CUSTOM_TYPE,
SESSION_SLASH_COMMAND_CUSTOM_TYPE,
SESSION_SLASH_COMMAND_RESULT_CUSTOM_TYPE,
@@ -127,6 +160,7 @@ import { parseCommandArgs } from "../../core/prompt-templates.js";
import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../core/session-cwd.js";
import { SessionImportFileNotFoundError } from "../../core/session-import-errors.js";
import { resolveSessionPath, SessionSelectorError, SessionSelectorNotFoundError } from "../../core/session-resolver.js";
+import type { McpServerConfig } from "../../core/settings-manager.js";
import { parseSkillBlock } from "../../core/skill-blocks.js";
import {
BUILTIN_SLASH_COMMANDS,
@@ -220,6 +254,11 @@ import {
keyText,
rawKeyHint,
} from "./components/keybinding-hints.js";
+import {
+ MalformedMcpConnectionOutcomeMessageComponent,
+ McpConnectionOutcomeMessageComponent,
+} from "./components/mcp-connection-outcome-message.js";
+import { McpTokenPastePanelComponent } from "./components/mcp-token-paste-panel.js";
import { createMermaidMarkdownTransform } from "./components/mermaid.js";
import type { AuthSelectorProvider } from "./components/oauth-selector.js";
import { OnboardingChoiceComponent } from "./components/onboarding-choice.js";
@@ -232,6 +271,10 @@ import {
RefinementOutcomeMessageComponent,
} from "./components/refinement-outcome-message.js";
import { ScopedModelsSelectorComponent } from "./components/scoped-models-selector.js";
+import {
+ ServiceCatalogPickerComponent,
+ type ServiceCatalogPickerOptions,
+} from "./components/service-catalog-picker.js";
import { SettingsSelectorComponent } from "./components/settings-selector.js";
import { SideQuestionComponent } from "./components/side-question.js";
import { SkillInvocationMessageComponent } from "./components/skill-invocation-message.js";
@@ -536,6 +579,82 @@ type GoalAnnouncementSnapshot = {
type ModelFallbackWarningAction = "show" | "suppress";
+/** The connection target a picker row dispatches to: a concrete endpoint and
+ * its auth shape, or a settings-managed stdio server. */
+interface McpPickerTarget {
+ url?: string;
+ usesOAuth: boolean;
+ bearerTokenEnvVar?: string;
+ managedBySettings: boolean;
+ transport?: "stdio";
+ name?: string;
+}
+
+/**
+ * What a picker action means for the picker chain that launched it. `ran`
+ * marks an action that STARTED a real flow — a login or paste panel, a
+ * verification, a removal, a settings change — so the chain re-enters the
+ * right surface, rebuilt from the live stores. `ran: false` is a status-only
+ * dead end: the transient line is the outcome and the chain ends, so an
+ * action that cannot proceed never reopens the picker (no re-entry loop).
+ */
+type McpPickerActionOutcome = { ran: boolean };
+
+/** Where the accounts surface sends the picker chain when it returns. */
+type McpAccountsSurfaceExit = "closed" | "catalog";
+
+/**
+ * The settled outcome of one mounted catalog/accounts picker: a selected row,
+ * a cancellation (Esc / stale settle — the surface closes), or "back" (the
+ * left arrow / a sub-picker's Esc: hand control to the parent surface without
+ * acting).
+ */
+type McpPickerSelection = { status: "selected"; service: McpPluginView } | { status: "cancelled" } | { status: "back" };
+
+/**
+ * Connect targets keyed by serviceId: catalog services with a concrete HTTP
+ * endpoint (built-ins keep their bundled endpoint unless the user configured
+ * that id) and every user-declared server, HTTP or stdio.
+ */
+function buildMcpPickerTargets(
+ services: readonly McpServiceDescriptor[],
+ userServers: Record<string, McpServerConfig>,
+): Map<string, McpPickerTarget> {
+ const targets = new Map<string, McpPickerTarget>();
+ for (const service of services) {
+ if (
+ service.transport.type === "http" &&
+ service.transport.url &&
+ (service.legacyBuiltin || !userServers[service.serviceId])
+ ) {
+ targets.set(service.serviceId, {
+ url: service.transport.url,
+ usesOAuth: service.authStrategy === "oauth" || service.authStrategy === "unknown",
+ managedBySettings: false,
+ });
+ }
+ }
+ for (const [name, config] of Object.entries(userServers)) {
+ if (services.some((entry) => entry.serviceId === name && entry.legacyBuiltin)) continue;
+ if (config.type === "http") {
+ targets.set(name, {
+ url: config.url,
+ usesOAuth: config.oauth === true,
+ ...(config.bearerTokenEnvVar ? { bearerTokenEnvVar: config.bearerTokenEnvVar } : {}),
+ managedBySettings: true,
+ });
+ } else if (config.type === "stdio") {
+ targets.set(name, {
+ usesOAuth: false,
+ managedBySettings: true,
+ transport: "stdio",
+ name,
+ });
+ }
+ }
+ return targets;
+}
+
interface OnboardingSplashHandle {
dismiss(): void;
}
@@ -945,6 +1064,44 @@ export function formatAgentDepthLabel(depth: number | undefined, hasChildren: bo
return `depth ${depth}`;
}
+/**
+ * Map a fixed verification category to user-readable wording. The persisted
+ * record keeps only the category; this layer adds the friendly explanation.
+ */
+const MCP_VERIFICATION_ISSUES: Record<string, string> = {
+ "http-unauthorized": "the endpoint rejected the stored credentials (reconnect)",
+ "verification-timeout": "the endpoint did not respond in time",
+ "network-unreachable": "the endpoint could not be reached",
+ "server-rejected-handshake": "the server rejected the MCP handshake",
+ "http-error": "the endpoint returned an HTTP error",
+ "invalid-response": "the endpoint returned an invalid MCP response",
+ "verification-failed": "the handshake could not be completed",
+ "credential-changed": "the stored credentials changed during verification",
+};
+
+function formatMcpVerificationIssue(category: string | undefined): string {
+ return MCP_VERIFICATION_ISSUES[category ?? ""] ?? "the endpoint did not complete an MCP handshake";
+}
+
+/**
+ * Which removal outcomes earn a durable "Disconnected" entry: only the three
+ * that actually removed the stored credential. "logged-out" (partial save
+ * failure), "failed", "missing", and the state-neutral "refused" keep their
+ * honest transient lines — an entry would claim the disconnect is done.
+ */
+function mcpDisconnectionState(result: McpRemoveAccountResult): McpDisconnectionState | undefined {
+ switch (result) {
+ case "removed":
+ return "removed";
+ case "credential-only":
+ return "credential-only";
+ case "preserved":
+ return "preserved";
+ default:
+ return undefined;
+ }
+}
+
export class InteractiveMode {
private static readonly EXIT_HINT_DURATION_MS = 2000;
private static readonly ESCAPE_REPEAT_WINDOW_MS = 500;
@@ -1088,6 +1245,7 @@ export class InteractiveMode {
private connectionModelsRefreshInFlight: { version: number; promise: Promise<AgentConnectionModel[]> } | undefined;
private closeConfigurationMenu: (() => void) | undefined;
private inlineAuthPanelClosers: ((reason?: "reset") => void)[] = [];
+ private closeServiceCatalogPicker: (() => void) | undefined;
private configurationModelSelection: Promise<void> | undefined;
private connectionState: AgentConnectionState | undefined;
private connectionResourceSnapshot: AgentConnectionResourceSnapshot | undefined;
@@ -1117,6 +1275,21 @@ export class InteractiveMode {
private nextImageMarkerId = 1;
private unsubscribe?: () => void;
+ private mcpConnectionStore?: McpConnectionStore;
+ /**
+ * MCP changes made while streaming/compacting; activated at the next safe boundary.
+ * Connection outcomes carry structured details so the boundary renders the
+ * durable outcome message instead of a transient status line.
+ */
+ private pendingPostRunActivation:
+ | { message: string; successMessage: string; connectionOutcome?: McpOutcomeDetails }
+ | undefined;
+ /**
+ * Durable outcome for an MCP logout the generic /logout route just made:
+ * the host owns the store op, the route reports, and the selector records
+ * the entry after the single reload.
+ */
+ private pendingMcpDisconnectionOutcome: McpDisconnectionOutcomeDetails | undefined;
private signalCleanupHandlers: Array<() => void> = [];
private autoCompactionLoader: Loader | undefined = undefined;
@@ -2980,6 +3153,7 @@ export class InteractiveMode {
}
case "agent_end":
this.patchConnectionState({ isStreaming: false, activeToolNames: [] });
+ void this.maybeRunQueuedMcpActivation();
break;
case "session_action_update":
this.patchConnectionState({ sessionActions: event.actions });
@@ -2990,6 +3164,7 @@ export class InteractiveMode {
break;
case "compaction_end":
this.patchConnectionState({ isCompacting: false });
+ void this.maybeRunQueuedMcpActivation();
break;
case "session_info_changed":
this.patchConnectionState({ sessionName: event.name });
@@ -3792,6 +3967,7 @@ export class InteractiveMode {
// down too, so the overlay, its animation and the pending step all end.
this.onboardingAbort?.();
this.closeConfigurationMenu?.();
+ this.closeServiceCatalogPicker?.();
this.cancelActiveConnectionExtensionUiRequests();
this.closeHeartbeatManager();
if (this.extensionSelector) {
@@ -5131,6 +5307,11 @@ export class InteractiveMode {
await this.handleMcpCommand(commandArgs);
return;
}
+ if (commandName === "plugins") {
+ this.editor.setText("");
+ await this.handlePluginsCommand(commandArgs);
+ return;
+ }
if (slashCommand?.name === "clear") {
if (commandArgs) {
this.editor.setText(text);
@@ -6670,6 +6851,10 @@ export class InteractiveMode {
if (message.customType === COMPACTION_OUTCOME_CUSTOM_TYPE) {
return new MalformedCompactionOutcomeMessageComponent();
}
+ if (isMcpConnectionOutcomeMessage(message)) return new McpConnectionOutcomeMessageComponent(message);
+ if (message.customType === MCP_CONNECTION_OUTCOME_CUSTOM_TYPE) {
+ return new MalformedMcpConnectionOutcomeMessageComponent();
+ }
if (isRefinementOutcomeMessage(message)) return new RefinementOutcomeMessageComponent(message);
if (message.customType === REFINEMENT_OUTCOME_CUSTOM_TYPE) {
return new MalformedRefinementOutcomeMessageComponent();
@@ -8522,6 +8707,7 @@ export class InteractiveMode {
private showConfigurationMenu(initialTab: ConfigurationMenuTab, initialModelSearch?: string): Promise<void> {
if (this.configurationModelSelection) return this.configurationModelSelection;
this.closeConfigurationMenu?.();
+ this.closeServiceCatalogPicker?.();
const modelCatalog = this.getCachedModelCandidates();
const authFlows = this.createAuthFlows();
const providerOptions = authFlows.getLoginProviderOptions();
@@ -8571,12 +8757,8 @@ export class InteractiveMode {
if (tab === "mcp-connections") {
if (!authResult.providerId.startsWith("mcp:")) return;
- if (this.isAgentStreaming() || this.isAgentCompacting()) {
- this.showStatus("Connected. Run /reload (after the current turn) to activate the integration.");
- return;
- }
+ // The guarded operation already verified and scheduled activation.
finish();
- await this.handleReloadCommand();
return;
}
@@ -9104,6 +9286,15 @@ export class InteractiveMode {
onLoginCompleted: () => {
void this.maybeWarnAboutAnthropicSubscriptionAuth();
},
+ onMcpAccountLogout: (providerId) => this.logoutMcpAccount(providerId),
+ onMcpAccountLogin: async (providerId) => {
+ const name = providerId.slice("mcp:".length);
+ const { resolved, result } = await this.connectMcpAccountByName(name);
+ if (!resolved) {
+ this.showStatus(`No endpoint configured for ${name}; add it with /mcp add or connect from /plugins.`);
+ }
+ return result;
+ },
});
}
@@ -9182,6 +9373,34 @@ export class InteractiveMode {
return close;
}
+ /**
+ * The ENTIRE MCP account logout, owned by ONE connection-store critical
+ * section (store->auth ordering): verified credential deletion AND
+ * pending-attempt cancellation happen under the store's file lock BEFORE
+ * the generic /logout route reports anything. The route delegates here
+ * instead of calling authStorage.logout first — a plain logout could be
+ * defeated by a concurrent finalize re-creating the credential after it.
+ *
+ * Id resolution is exact-first: a local service id may itself contain
+ * "--", so a staged key maps back ONLY through its actually recorded
+ * attempt nonce.
+ */
+ private async logoutMcpAccount(providerId: string): Promise<McpRemoveAccountResult> {
+ // The shared exported one-op handler: same code the reviewer's route
+ // tests drive, no copied literals.
+ const store = this.getMcpConnectionStore();
+ const connectionId = providerId.startsWith("mcp:") ? providerId.slice("mcp:".length) : providerId;
+ // Read the display label BEFORE the op: a "removed" outcome deletes the
+ // record, so afterwards only the id survives.
+ const label = store.get(connectionId)?.label ?? connectionId;
+ const result = await logoutMcpAccount(providerId, store, this.modelRegistry.authStorage);
+ // The route reports next; the durable entry waits for the reload the
+ // selector already runs, so the logout stays ONE store op and ONE reload.
+ const removal = mcpDisconnectionState(result);
+ this.pendingMcpDisconnectionOutcome = removal ? { kind: "disconnect", label, removal, connectionId } : undefined;
+ return result;
+ }
+
private async prepareForModelSelectionAfterLogin(
authResult: AuthenticationResult,
abortSignal?: AbortSignal,
@@ -9236,7 +9455,7 @@ export class InteractiveMode {
const argv = parseCommandArgs((args ?? "").trim());
const [sub, server] = argv;
if (!sub) {
- await this.showConfigurationMenu("mcp-connections");
+ await this.showServiceCatalogPicker();
return;
}
@@ -9247,8 +9466,13 @@ export class InteractiveMode {
this.showError("Usage: /mcp login <name> (e.g. /mcp login linear)");
return;
}
- const result = await this.createAuthFlows().runMcpLogin(server);
- if (result.status === "success") await this.reloadAfterMcpChange(`Connected ${server}.`);
+ // /mcp login routes through the ONE guarded connect operation (claim
+ // -> staged OAuth -> guarded finalize): the raw dialog that wrote the
+ // final credential directly is gone.
+ const { resolved } = await this.connectMcpAccountByName(server);
+ if (!resolved) {
+ this.showError(`No endpoint configured for ${server}; add it with /mcp add or connect from /plugins.`);
+ }
return;
}
@@ -9261,13 +9485,59 @@ export class InteractiveMode {
this.showStatus(`${server} is not connected.`);
return;
}
- authStorage.logout(`mcp:${server}`);
+ // Read the display label BEFORE the op: a removed record leaves only
+ // the id the user typed.
+ const logoutLabel = this.getMcpConnectionStore().get(server)?.label ?? server;
+ // Credential AND record removal in one store-locked step (the same
+ // lock ordering finalize uses): no orphan credential can survive.
+ const loggedOut = await this.getMcpConnectionStore().removeAccount({
+ connectionId: server,
+ authCleanup: (connectionId) => {
+ // Disk-authoritative logout: remove() swallows persistence
+ // errors, so a failed auth-file write could report the logout
+ // done while the credential survives. removeVerified throws
+ // instead (the honest "failed" path) and returns whether a
+ // credential was actually removed from disk.
+ return authStorage.removeVerified(mcpCredentialKey(connectionId));
+ },
+ });
+ // Honest outcomes: removed/credential-only changed durable state,
+ // missing is a no-op, logged-out keeps the durable logout but says
+ // the record save failed, and failed is state-neutral (the cleanup
+ // may or may not have run — it never claims a specific state).
+ if (loggedOut === "failed") {
+ this.showWarning(`The change could not be saved; try logging out ${server} again.`);
+ return;
+ }
+ if (loggedOut === "logged-out") {
+ this.showWarning(
+ `Logged out ${server}, but the change could not be saved. It may still appear in the list; try again to finish cleanup.`,
+ );
+ return;
+ }
+ if (loggedOut === "missing") {
+ this.showStatus(`${server} is no longer connected.`);
+ return;
+ }
+ const removal = mcpDisconnectionState(loggedOut);
+ if (removal) {
+ await this.completeMcpConnectionOutcome({
+ kind: "disconnect",
+ label: logoutLabel,
+ removal,
+ connectionId: server,
+ });
+ return;
+ }
await this.reloadAfterMcpChange(`Disconnected ${server}.`);
return;
}
try {
const result = await runMcpManagementCommand(argv, this.settingsManager, this.modelRegistry.authStorage);
+ if (result.changed && result.serverChange?.verb === "removed") {
+ await this.removeMcpConnectionRecord(result.serverChange.name);
+ }
if (result.changed && result.serverChange) {
const { name, transport, verb, usesOAuth } = result.serverChange;
const hasMcpProviderRefresh = this.uiServices.refreshMcpProviders !== undefined;
@@ -9294,9 +9564,1264 @@ export class InteractiveMode {
}
}
+ private getMcpConnectionStore(): McpConnectionStore {
+ this.mcpConnectionStore ??= McpConnectionStore.open(path.join(getAgentDir(), "mcp-connections.json"));
+ return this.mcpConnectionStore;
+ }
+
+ private async removeMcpConnectionRecord(connectionId: string): Promise<void> {
+ const store = this.getMcpConnectionStore();
+ store.remove(connectionId);
+ await store.flush().catch(() => undefined);
+ }
+
+ /**
+ * External-service cards for the /plugins picker. Uses the SAME resolver the
+ * host uses (built-in catalog + declared local sources from settings) and
+ * re-reads the shared connection records from disk, so the UI never renders
+ * a stale in-process cache.
+ */
+ private buildServiceCatalogViews(): {
+ services: readonly McpServiceDescriptor[];
+ views: McpPluginView[];
+ diagnostics: string[];
+ } {
+ // Fresh records first: the resolver pins vanished-source services from them.
+ this.getMcpConnectionStore().load();
+ const resolution = resolveServiceCatalogWithDiagnostics(
+ this.settingsManager.getMcpCatalogSources(),
+ this.getMcpConnectionStore().records(),
+ );
+ const views = buildPluginViews({
+ services: resolution.descriptors,
+ userServers: this.settingsManager.getGlobalMcpServers(),
+ authStorage: this.modelRegistry.authStorage,
+ connectionStore: this.getMcpConnectionStore(),
+ });
+ return { services: resolution.descriptors, views, diagnostics: resolution.diagnostics };
+ }
+
+ /**
+ * Catalog resolution WITHOUT reloading the store: mid-flow admission
+ * keeps this process's pending (unflushed) record writes visible — a
+ * load() here would wipe in-memory state a queued op still owns. The
+ * authoritative cross-process gate stays the claim/reserve/finalize ops
+ * under the store's file lock.
+ */
+ private resolveCurrentServiceCatalog(): readonly McpServiceDescriptor[] {
+ return resolveServiceCatalogWithDiagnostics(
+ this.settingsManager.getMcpCatalogSources(),
+ this.getMcpConnectionStore().records(),
+ ).descriptors;
+ }
+
+ private getMcpLoginEligibility(
+ connectionId: string,
+ catalogServiceId = connectionId,
+ addAccount = false,
+ locked?: { record: McpConnectionRecord },
+ explicitLogin = false,
+ precomputedService?: McpServiceDescriptor,
+ ): ReturnType<typeof mcpLoginEligibility> {
+ const services = precomputedService ? [precomputedService] : this.resolveCurrentServiceCatalog();
+ const record = locked ? locked.record : this.getMcpConnectionStore().get(connectionId);
+ const service = services.find((entry) => entry.serviceId === (record?.serviceId ?? catalogServiceId));
+ const userServers = this.settingsManager.getGlobalMcpServers() ?? {};
+ return mcpLoginEligibility({
+ connectionId,
+ service,
+ record,
+ addAccount,
+ explicitLogin,
+ userConfig: userServers[connectionId],
+ reservedConfig: service ? userServers[service.serviceId] : undefined,
+ credential: this.modelRegistry.authStorage.getVerified(mcpCredentialKey(connectionId)),
+ });
+ }
+
+ private async handlePluginsCommand(args: string | undefined): Promise<void> {
+ await this.showServiceCatalogPicker((args ?? "").trim() || undefined);
+ }
+
+ private selectServiceCatalogRow(
+ views: readonly McpPluginView[],
+ options: Omit<ServiceCatalogPickerOptions, "getRows"> = {},
+ ): Promise<McpPickerSelection> {
+ this.closeConfigurationMenu?.();
+ this.closeServiceCatalogPicker?.();
+ return new Promise((resolve) => {
+ this.showSelector((done) => {
+ let settled = false;
+ let wentBack = false;
+ const finish = (selection?: McpPluginView) => {
+ if (settled) return;
+ settled = true;
+ const ownsEditor = this.editorContainer.children.includes(picker);
+ if (ownsEditor) done();
+ if (this.closeServiceCatalogPicker === close) this.closeServiceCatalogPicker = undefined;
+ this.ui.requestRender();
+ // A stale selection settles as cancellation without replacing the
+ // next picker or starting an operation from its old row.
+ if (!ownsEditor) return resolve({ status: "cancelled" });
+ if (wentBack) return resolve({ status: "back" });
+ resolve(selection ? { status: "selected", service: selection } : { status: "cancelled" });
+ };
+ const close = () => finish();
+ // "Back" is a surface transition, never a cancellation: the
+ // accounts menu's left arrow and the account sub-picker's Esc both
+ // hand control to the parent surface with nothing acted on. An
+ // externally forced close (a newer picker taking over, teardown)
+ // still settles as cancellation.
+ const back = () => {
+ wentBack = true;
+ finish();
+ };
+ const picker = new ServiceCatalogPickerComponent(views, finish, options.cancelBack ? back : close, {
+ ...options,
+ getRows: () => Math.max(1, Math.min(20, this.ui.terminal.rows - 3)),
+ ...(options.back ? { onBack: back } : {}),
+ });
+ this.closeServiceCatalogPicker = close;
+ return { component: picker, focus: picker };
+ });
+ });
+ }
+
+ private async showServiceCatalogPicker(initialSearch?: string): Promise<void> {
+ // The picker CHAIN, not a one-shot (Kevin, live testing): an action that
+ // ran lands the user back in the right surface — that service's
+ // accounts menu while it still owns an account, otherwise the catalog —
+ // never the bare prompt. Every entry rebuilds views, targets, and
+ // routing from the LIVE catalog + connection store, so a removed
+ // account is gone and a fresh one shows; Esc anywhere closes the whole
+ // chain.
+ let surface: { kind: "catalog"; search?: string } | { kind: "accounts"; service: McpPluginView } = {
+ kind: "catalog",
+ search: initialSearch,
+ };
+ while (true) {
+ const { services, views, diagnostics } = this.buildServiceCatalogViews();
+ // Wiring problems (a declared local source that vanished, duplicate ids,
+ // truncation) are visible, never silent.
+ if (diagnostics.length > 0) {
+ this.showWarning(`Service catalog notice: ${diagnostics[0]}`);
+ }
+ // Connect targets keyed by serviceId; user-declared servers resolve from settings.
+ const userServers = this.settingsManager.getGlobalMcpServers() ?? {};
+ const targets = buildMcpPickerTargets(services, userServers);
+ // Freeze the displayed intent: guidance must never become a mutation
+ // when settings change while the picker is open.
+ const settingsActions = new Map<
+ string,
+ "disable local server" | "settings guidance" | "verify" | "manage saved account"
+ >();
+ for (const [name, config] of Object.entries(userServers)) {
+ if (views.find((view) => view.serviceId === name)?.source !== "user") continue;
+ if (config.type === "stdio") {
+ settingsActions.set(name, config.enabled === false ? "settings guidance" : "disable local server");
+ } else if (!config.oauth) {
+ const hasSavedAccount =
+ this.getMcpConnectionStore().get(name) !== undefined ||
+ this.modelRegistry.authStorage.getVerified(mcpCredentialKey(name)) !== undefined;
+ const pending =
+ config.enabled !== false &&
+ views.find((view) => view.serviceId === name)?.connectionStatus === "pending";
+ settingsActions.set(
+ name,
+ hasSavedAccount ? "manage saved account" : pending ? "verify" : "settings guidance",
+ );
+ }
+ }
+ if (surface.kind === "accounts") {
+ // The accounts surface handed the chain back: re-enter through the
+ // same freshly built targets every catalog entry uses.
+ const exit = await this.showAccountPickerForService(
+ surface.service,
+ targets.get(surface.service.serviceId),
+ {
+ knownIds: new Set<string>([...services.map((entry) => entry.serviceId), ...Object.keys(userServers)]),
+ },
+ );
+ if (exit === "closed") return;
+ surface = { kind: "catalog" };
+ continue;
+ }
+ const catalogSelection = await this.selectServiceCatalogRow(views, {
+ ...(surface.search !== undefined ? { initialSearch: surface.search } : {}),
+ getRowPresentation: (view) => {
+ const action = settingsActions.get(view.serviceId);
+ return action ? { action } : undefined;
+ },
+ });
+ // The catalog is the chain's root: there is no parent surface to go
+ // back to, so any non-selection ends the chain.
+ if (catalogSelection.status !== "selected") return;
+ const service = catalogSelection.service;
+ // Every configured id is off-limits for new account ids.
+ const knownIds = new Set<string>([...services.map((entry) => entry.serviceId), ...Object.keys(userServers)]);
+ try {
+ const settingsAction = settingsActions.get(service.serviceId);
+ if (settingsAction === "settings guidance") {
+ this.showStatus(
+ service.setupHint ??
+ `${service.label} is configured through settings; manage it with /mcp or your settings file.`,
+ );
+ return;
+ }
+ if (settingsAction === "disable local server" || settingsAction === "verify") {
+ const { ran } = await this.connectServiceFromPicker(service, targets.get(service.serviceId));
+ // A blocked action (status-only dead end) ends the chain: its
+ // transient message is the outcome, and reopening forever would
+ // trap the user — an action that cannot proceed never re-enters.
+ if (!ran) return;
+ const disableReentry = this.mcpAccountsReentrySurface(service.serviceId);
+ surface = disableReentry ? { kind: "accounts", service: disableReentry.service } : { kind: "catalog" };
+ continue;
+ }
+ if (settingsAction === "manage saved account" || service.connectionIds.length > 0) {
+ const accountService =
+ settingsAction === "manage saved account"
+ ? { ...service, connectionIds: [service.serviceId] }
+ : service;
+ surface = { kind: "accounts", service: accountService };
+ continue;
+ }
+ const { ran } = await this.connectServiceFromPicker(service, targets.get(service.serviceId), { knownIds });
+ if (!ran) return;
+ const reentry = this.mcpAccountsReentrySurface(service.serviceId);
+ surface = reentry ? { kind: "accounts", service: reentry.service } : { kind: "catalog" };
+ } catch {
+ this.showError("MCP connection action did not complete. Try again.");
+ return;
+ }
+ }
+ }
+
+ /**
+ * Account management for a service with at least one existing account
+ * (Kevin, live testing): the menu is exactly one "Reconnect" row, one
+ * "Disconnect" row, and an "Add another account" row that allocates a new
+ * id and runs a fresh login — a second account never overwrites the first.
+ *
+ * One account acts directly: Reconnect runs the SAME re-verify path (never
+ * a disconnect) and Disconnect the same remove path. Several accounts add
+ * a second picker that picks the connection id first ("linear",
+ * "linear-2"); Esc or left there returns to this menu with nothing acted
+ * on, and the chosen account runs the action a single account would.
+ *
+ * Re-entry: after an action that ran, the SAME accounts menu is rebuilt
+ * from the live stores and shown again — a disconnected account is gone, a
+ * fresh one shows, statuses refresh — until the service loses its last
+ * account, at which point the chain hands the user back to the catalog.
+ * Esc, blocked status-only actions, and failures close the whole chain;
+ * the left arrow goes back to the catalog, the chain's parent surface.
+ */
+ private async showAccountPickerForService(
+ service: McpPluginView,
+ target: McpPickerTarget | undefined,
+ options: { knownIds: Set<string> },
+ ): Promise<McpAccountsSurfaceExit> {
+ let currentService = service;
+ let currentTarget = target;
+ while (true) {
+ const catalogServiceId = currentService.serviceId;
+ const settingsOnly = currentService.source === "user" && !currentService.usesOAuth;
+ const definition = this.buildServiceCatalogViews().services.find(
+ (entry) => entry.serviceId === catalogServiceId,
+ );
+ const ownership = reservedMcpOwnership(
+ definition,
+ this.settingsManager.getGlobalMcpServers()?.[catalogServiceId],
+ );
+ const accountCards: McpPluginView[] = [];
+ const accountTargets = new Map<string, McpPickerTarget | undefined>();
+ // Per-account acting rows, keyed by connection id: a single account's
+ // menu rows and every multi-account sub-picker row come from the SAME
+ // per-account state computation — only the label differs.
+ const reconnectRows = new Map<string, McpPluginView>();
+ const disconnectRows = new Map<string, McpPluginView>();
+ for (const connectionId of currentService.connectionIds) {
+ // Centralized per-account state: credential binding, expiry, and the
+ // record combine through the SAME computation as the plugin aggregate
+ // and the inventory — the picker never trusts a raw record.status.
+ const admission = this.getMcpLoginEligibility(connectionId, catalogServiceId);
+ const accountTarget =
+ currentTarget && admission.endpoint ? { ...currentTarget, url: admission.endpoint } : currentTarget;
+ accountTargets.set(connectionId, accountTarget);
+ const state = settingsOnly
+ ? {
+ status: currentService.connectionStatus,
+ setupHint: currentService.setupHint,
+ toolCount: currentService.toolCount,
+ }
+ : accountStateFor({
+ connectionId,
+ endpoint: accountTarget?.url ?? "",
+ authStorage: this.modelRegistry.authStorage,
+ connectionStore: this.getMcpConnectionStore(),
+ usesOAuth: currentService.usesOAuth,
+ });
+ const blocked = ownership.status !== "canonical" || currentService.connectionStatus === "disabled";
+ const status = blocked ? currentService.connectionStatus : state.status;
+ const loginPending = "loginPending" in state && state.loginPending === true;
+ const repairHint =
+ admission.repair && admission.endpoint
+ ? `Saved endpoint: ${new URL(admission.endpoint).origin}${new URL(admission.endpoint).pathname}`
+ : undefined;
+ if (settingsOnly) {
+ // Settings-managed servers are single-account by construction:
+ // pending re-verifies, anything else only shows management
+ // guidance, and remove keeps the server settings and its
+ // environment token ("remove saved data").
+ accountCards.push({
+ ...currentService,
+ serviceId: connectionId,
+ label: status === "pending" ? "Reconnect" : `Manage ${connectionId}`,
+ connectionIds: [connectionId],
+ connectionStatus: status,
+ connectable:
+ !blocked &&
+ !loginPending &&
+ admission.allowed &&
+ (status === "error" || status === "not_connected"),
+ loginPending,
+ setupHint: blocked
+ ? currentService.setupHint
+ : !admission.allowed
+ ? admission.setupHint
+ : [repairHint, state.setupHint].filter(Boolean).join(" · ") || undefined,
+ ...(state.toolCount !== undefined ? { toolCount: state.toolCount } : {}),
+ });
+ accountCards.push({
+ ...currentService,
+ serviceId: connectionId,
+ label: `Remove saved data for ${connectionId}`,
+ connectionIds: [connectionId],
+ connectionStatus: status,
+ connectable: false,
+ removeAction: true,
+ });
+ continue;
+ }
+ // The sub-picker rows carry the account id; the single-account menu
+ // relabels them below ("Reconnect"/"Disconnect", Kevin, live
+ // testing). Enter keeps running the SAME re-verify path —
+ // verifyMcpConnection plus the existing retry outcome — and never
+ // disconnects; the disconnect row is the explicit remove action,
+ // state-independent.
+ reconnectRows.set(connectionId, {
+ ...currentService,
+ serviceId: connectionId,
+ label: connectionId,
+ connectionIds: [connectionId],
+ connectionStatus: status,
+ connectable:
+ !blocked && !loginPending && admission.allowed && (status === "error" || status === "not_connected"),
+ loginPending,
+ setupHint: blocked
+ ? currentService.setupHint
+ : !admission.allowed
+ ? admission.setupHint
+ : [repairHint, state.setupHint].filter(Boolean).join(" · ") || undefined,
+ ...(state.toolCount !== undefined ? { toolCount: state.toolCount } : {}),
+ });
+ disconnectRows.set(connectionId, {
+ ...currentService,
+ serviceId: connectionId,
+ label: connectionId,
+ connectionIds: [connectionId],
+ connectionStatus: status,
+ connectable: false,
+ removeAction: true,
+ });
+ }
+ if (!settingsOnly && currentService.connectionIds.length === 1) {
+ // Single account (Kevin, live testing): Enter acts on it directly —
+ // no id suffix on the labels, no sub-picker.
+ const only = currentService.connectionIds[0]!;
+ const reconnect = reconnectRows.get(only);
+ if (reconnect) accountCards.push({ ...reconnect, label: "Reconnect" });
+ const disconnect = disconnectRows.get(only);
+ if (disconnect) accountCards.push({ ...disconnect, label: "Disconnect" });
+ } else if (!settingsOnly && currentService.connectionIds.length > 1) {
+ // Several accounts (Kevin, live testing): ONE Reconnect row and ONE
+ // Disconnect row for the whole service — Enter opens the account
+ // sub-picker that picks the connection id first.
+ accountCards.push({
+ ...currentService,
+ label: "Reconnect",
+ connectionIds: [...currentService.connectionIds],
+ connectable: false,
+ });
+ accountCards.push({
+ ...currentService,
+ label: "Disconnect",
+ connectionIds: [...currentService.connectionIds],
+ connectable: false,
+ removeAction: true,
+ });
+ }
+ if (
+ currentService.usesOAuth &&
+ currentTarget?.usesOAuth &&
+ !currentService.loginPending &&
+ this.getMcpLoginEligibility(catalogServiceId, catalogServiceId, true, undefined, false, definition).allowed
+ ) {
+ accountCards.push({
+ ...currentService,
+ label: "Add another account",
+ connectionIds: [],
+ connectionStatus: "not_connected",
+ connectable: true,
+ setupHint: undefined,
+ });
+ }
+ // Token services keep a paste entry point: a stored token the handshake
+ // rejected needs a NEW paste, not a re-verify of the same value.
+ if (definition && isPasteableTokenService(definition) && !currentService.loginPending) {
+ accountCards.push({
+ ...currentService,
+ label: "Paste a new token",
+ connectionIds: [],
+ connectionStatus: "not_connected",
+ connectable: false,
+ pasteToken: true,
+ setupHint: undefined,
+ });
+ }
+ const selection = await this.selectServiceCatalogRow(accountCards, {
+ // Kevin (live testing): "Accounts — Cloudflare" reads as a caption;
+ // the menu is just the service, with the description above the
+ // options instead of under the list.
+ title: `${currentService.label} MCP`,
+ mode: "accounts",
+ description: settingsOnly
+ ? "Saved account data for a settings-managed server. Removing it keeps the server settings and environment token."
+ : currentService.description,
+ // The accounts redesign renders no trailing status or per-row detail;
+ // the hint names the action and the description block carries the
+ // panel-level explanation.
+ getRowPresentation: (row) =>
+ settingsOnly
+ ? row.removeAction
+ ? { action: "remove saved data" }
+ : { action: row.connectionStatus === "pending" ? "verify" : "settings guidance" }
+ : undefined,
+ // Kevin (live testing): left arrow goes BACK to the /mcp catalog —
+ // the picker chain's parent surface. Esc still closes the chain.
+ back: true,
+ });
+ if (selection.status === "cancelled") return "closed";
+ if (selection.status === "back") return "catalog";
+ let card = selection.service;
+ if (card.connectionIds.length > 1) {
+ // The multi-account Reconnect/Disconnect chooser (Kevin, live
+ // testing): a second picker in the same choice-list shape picks
+ // WHICH account first. Esc or left there returns to this menu
+ // without acting — no status noise — and the chosen account runs
+ // the same action a single account would, so the picker never
+ // nests deeper than this.
+ const actionRows = card.removeAction === true ? disconnectRows : reconnectRows;
+ const chosen = await this.selectServiceCatalogRow([...actionRows.values()], {
+ title: "Accounts",
+ mode: "accounts",
+ // The accounts menu one surface up already carries the service
+ // description; the sub-picker is just the account list.
+ description: "",
+ back: true,
+ cancelBack: true,
+ closeHint: "back",
+ });
+ // Esc and left are the user's "back": return to the accounts
+ // menu, freshly rebuilt, with nothing acted on. An externally
+ // forced close (a newer picker taking over, teardown) settles as
+ // cancellation and ends the chain — the same rule every other
+ // surface follows.
+ if (chosen.status === "back") continue;
+ if (chosen.status === "cancelled") return "closed";
+ card = chosen.service;
+ }
+ try {
+ if (settingsOnly && !card.removeAction && card.connectionStatus !== "pending") {
+ this.showStatus(
+ card.setupHint ??
+ `${currentService.label} is configured through settings; manage it with /mcp or your settings file.`,
+ );
+ return "closed";
+ }
+ const { ran } =
+ card.connectionIds.length === 0
+ ? await this.connectServiceFromPicker(card, currentTarget, {
+ catalogServiceId,
+ addAccount: true,
+ knownIds: options.knownIds,
+ })
+ : await this.connectServiceFromPicker(card, accountTargets.get(card.serviceId), { catalogServiceId });
+ // A blocked action (status-only dead end) ends the chain: its
+ // transient message is the outcome, and reopening forever would
+ // trap the user — an action that cannot proceed never re-enters.
+ if (!ran) return "closed";
+ } catch {
+ this.showError("MCP connection action did not complete. Try again.");
+ return "closed";
+ }
+ // The action ran: land back in the RIGHT surface, freshly rebuilt
+ // from the live catalog + connection store. When the last account
+ // is gone, hand the chain back to the catalog.
+ const reentry = this.mcpAccountsReentrySurface(catalogServiceId);
+ if (!reentry) return "catalog";
+ currentService = reentry.service;
+ currentTarget = reentry.target;
+ }
+ }
+
+ /**
+ * The re-entry surface after a picker action on `catalogServiceId` (Kevin,
+ * live testing): stay in that service's accounts menu while it still owns
+ * an account, otherwise fall back to the catalog. Everything is rebuilt
+ * from the LIVE catalog + connection store — the re-entered menu must not
+ * show a row the action just removed, and a freshly added account must
+ * show. Settings-managed servers keep saved data manageable even when the
+ * core view carries no connectionIds — the same discovery that routes a
+ * catalog row to "manage saved account".
+ */
+ private mcpAccountsReentrySurface(
+ catalogServiceId: string,
+ ): { service: McpPluginView; target: McpPickerTarget | undefined } | undefined {
+ const { services, views } = this.buildServiceCatalogViews();
+ const view = views.find((entry) => entry.serviceId === catalogServiceId);
+ if (!view) return undefined;
+ const target = buildMcpPickerTargets(services, this.settingsManager.getGlobalMcpServers() ?? {}).get(
+ catalogServiceId,
+ );
+ if (view.source === "user" && !view.usesOAuth) {
+ const hasSavedAccount =
+ this.getMcpConnectionStore().get(catalogServiceId) !== undefined ||
+ this.modelRegistry.authStorage.getVerified(mcpCredentialKey(catalogServiceId)) !== undefined;
+ return hasSavedAccount ? { service: { ...view, connectionIds: [catalogServiceId] }, target } : undefined;
+ }
+ return view.connectionIds.length > 0 ? { service: view, target } : undefined;
+ }
+ /**
+ * Route a user-facing MCP login by NAME (/mcp login, the generic /login
+ * service options, the config menu) through the ONE guarded connect
+ * operation: the account is claimed under the store's file lock first,
+ * the OAuth credential stages, and the guarded finalize commits it — a
+ * concurrent logout can cancel us and a late callback can never
+ * reactivate or clobber the account. Resolution and authentication outcomes
+ * are separate; a cancelled login never reports success.
+ */
+ private async connectMcpAccountByName(name: string): Promise<{ resolved: boolean; result: AuthenticationResult }> {
+ const { services } = this.buildServiceCatalogViews();
+ const record = this.getMcpConnectionStore().get(name);
+ const service =
+ services.find((entry) => entry.serviceId === (record?.serviceId ?? name)) ??
+ services.find((entry) => entry.aliases.includes(name));
+ const connectionId = record ? name : (service?.serviceId ?? name);
+ const config = this.settingsManager.getGlobalMcpServers()?.[connectionId];
+ const credential = this.modelRegistry.authStorage.getVerified(mcpCredentialKey(connectionId));
+ if (!service && !record && !config && !credential) return { resolved: false, result: { status: "failed" } };
+ const admission =
+ service || config || record
+ ? this.getMcpLoginEligibility(connectionId, service?.serviceId ?? connectionId, false, undefined, true)
+ : { allowed: true, endpoint: undefined as string | undefined };
+ const endpoint =
+ admission.endpoint ?? (config?.type === "http" ? config.url : undefined) ?? record?.endpoint ?? "";
+ if (!admission.allowed || !endpoint) {
+ this.showStatus(admission.setupHint ?? "This service cannot be connected automatically.");
+ return { resolved: true, result: { status: "failed" } };
+ }
+ const { result } = await this.guardedMcpLogin(
+ {
+ serviceId: connectionId,
+ label: record?.label ?? service?.label ?? connectionId,
+ connectionStatus: record?.status ?? "not_connected",
+ connectionIds: record ? [connectionId] : [],
+ connectable: true,
+ usesOAuth: true,
+ source: service ? "catalog" : "user",
+ },
+ {
+ url: endpoint,
+ usesOAuth: true,
+ managedBySettings: config !== undefined && !service?.legacyBuiltin,
+ },
+ {
+ catalogServiceId: record?.serviceId ?? service?.serviceId ?? connectionId,
+ explicitLogin: true,
+ },
+ );
+ return { resolved: true, result };
+ }
+
+ private async connectServiceFromPicker(
+ service: McpPluginView,
+ target: McpPickerTarget | undefined,
+ options: {
+ catalogServiceId?: string;
+ addAccount?: boolean;
+ knownIds?: ReadonlySet<string>;
+ } = {},
+ ): Promise<McpPickerActionOutcome> {
+ if (target?.transport === "stdio" && target.name) {
+ const serverName = target.name;
+ const config = this.settingsManager.getGlobalMcpServers()?.[serverName];
+ if (!config) {
+ this.showStatus(`${service.label} is no longer present in settings.`);
+ return { ran: false };
+ }
+ if (config.type !== "stdio" || config.enabled === false) {
+ this.showStatus(
+ `${service.label} is disabled. Re-enable or remove it with /mcp, or edit your settings file.`,
+ );
+ return { ran: false };
+ }
+ this.settingsManager.setGlobalMcpServer(serverName, { ...config, enabled: false }, true);
+ await this.settingsManager.flush();
+ this.uiServices.refreshMcpProviders?.();
+ await this.reloadAfterMcpChange(
+ `Disabled local server ${service.label}. Manage it with /mcp or your settings file.`,
+ );
+ return { ran: true };
+ }
+ // Explicit per-account remove: credential AND record removal in ONE
+ // store-locked step (the same lock ordering finalize uses), then reload.
+ if (service.removeAction === true) {
+ // Read the label before the op: a "removed" outcome deletes the record.
+ const removeLabel = this.getMcpConnectionStore().get(service.serviceId)?.label ?? service.label;
+ const removed = await this.getMcpConnectionStore().removeAccount({
+ connectionId: service.serviceId,
+ authCleanup: (connectionId) => {
+ // Disk-authoritative logout: remove() swallows persistence
+ // errors, so a failed auth-file write could report the logout
+ // done while the credential survives. removeVerified throws
+ // instead (the honest "failed" path) and returns whether a
+ // credential was actually removed from disk.
+ return this.modelRegistry.authStorage.removeVerified(mcpCredentialKey(connectionId));
+ },
+ });
+ // Honest outcomes: removed/credential-only removed the account (the
+ // credential-only case still had a credential to log out), missing is
+ // a no-op, logged-out keeps the durable logout but says the record
+ // save failed, and failed is state-neutral (the cleanup may or may
+ // not have run — it never claims a specific state).
+ if (removed === "failed") {
+ this.showWarning(`The change could not be saved; try removing account ${service.serviceId} again.`);
+ return { ran: true };
+ }
+ if (removed === "logged-out") {
+ this.showWarning(
+ `Logged out account ${service.serviceId}, but the change could not be saved. It may still appear in the list; try again to finish cleanup.`,
+ );
+ return { ran: true };
+ }
+ if (removed === "missing") {
+ this.showStatus(`Account ${service.serviceId} is no longer present.`);
+ return { ran: true };
+ }
+ // The explicit Remove row is the picker's primary disconnect gesture,
+ // so it records the same durable entry the /logout routes do instead
+ // of a status line that scrolls away (Kevin, live testing).
+ const removal = mcpDisconnectionState(removed);
+ if (removal) {
+ await this.completeMcpConnectionOutcome({
+ kind: "disconnect",
+ label: removeLabel,
+ removal,
+ connectionId: service.serviceId,
+ });
+ return { ran: true };
+ }
+ await this.reloadAfterMcpChange(`Removed account ${service.serviceId}.`);
+ return { ran: true };
+ }
+ if (service.loginPending || this.getMcpConnectionStore().get(service.serviceId)?.attemptId !== undefined) {
+ this.showStatus("Login in progress. Finish it or remove the account to cancel.");
+ return { ran: false };
+ }
+ // A requires-setup token service connects through the inline paste
+ // panel: nothing is stored until the panel completes, and the stored
+ // token is verified with a real handshake before anything claims
+ // Connected.
+ if (service.pasteToken === true) {
+ return this.pasteTokenForService(service, target, {
+ ...(options.catalogServiceId ? { catalogServiceId: options.catalogServiceId } : {}),
+ });
+ }
+ const currentServices = this.resolveCurrentServiceCatalog();
+ const catalog = currentServices.find(
+ (entry) => entry.serviceId === (options.catalogServiceId ?? service.serviceId),
+ );
+ const ownership = reservedMcpOwnership(
+ catalog,
+ this.settingsManager.getGlobalMcpServers()?.[catalog?.serviceId ?? service.serviceId],
+ );
+ if (ownership.status !== "canonical" || service.connectionStatus === "disabled") {
+ this.showStatus(ownership.setupHint ?? service.setupHint ?? "Disabled in settings.");
+ return { ran: false };
+ }
+ if (service.connectionStatus === "connected" && target?.managedBySettings && !service.usesOAuth) {
+ this.showStatus(
+ `${service.label} is configured through settings; manage it with /mcp remove ${service.serviceId}.`,
+ );
+ return { ran: false };
+ }
+ // Connected and pending accounts retry verification explicitly — no
+ // login needed, the grant already exists; "retry from /plugins" must
+ // actually work. Enter on the account NAME row therefore never
+ // disconnects a working account (Kevin, live testing): removal is the
+ // explicit Remove row's job, and this is the only reachable branch for a
+ // connected account coming out of either picker.
+ if ((service.connectionStatus === "pending" || service.connectionStatus === "connected") && target?.url) {
+ let retried: McpConnectionRecord | undefined;
+ try {
+ retried = await verifyMcpConnection({
+ authStorage: this.modelRegistry.authStorage,
+ connectionStore: this.getMcpConnectionStore(),
+ connectionId: service.serviceId,
+ serviceId: options.catalogServiceId ?? service.serviceId,
+ label: service.label,
+ endpoint: target.url,
+ usesOAuth: target.usesOAuth,
+ ...(target.bearerTokenEnvVar ? { bearerTokenEnvVar: target.bearerTokenEnvVar } : {}),
+ });
+ } catch {
+ retried = undefined;
+ }
+ await this.completeMcpConnectionOutcome(
+ retried?.status === "connected"
+ ? {
+ label: service.label,
+ source: "retry",
+ verification: "connected",
+ ...(retried.toolCount !== undefined ? { toolCount: retried.toolCount } : {}),
+ }
+ : retried
+ ? {
+ label: service.label,
+ source: "retry",
+ verification: "unverified",
+ issue: formatMcpVerificationIssue(retried.lastError),
+ ...(retried.lastError ? { issueCategory: retried.lastError } : {}),
+ }
+ : { label: service.label, source: "retry", verification: "unsaved" },
+ );
+ return { ran: true };
+ }
+
+ // Actual connects route through the ONE guarded OAuth operation —
+ // separate from the picker's disconnect/verify actions above, so LOGIN
+ // intent (from any route) never dispatches a disconnect by record
+ // status.
+ const login = await this.guardedMcpLogin(service, target, options);
+ return { ran: login.ran };
+ }
+
+ /**
+ * The ONE guarded MCP OAuth login operation (initial connect, reconnect,
+ * add account, /mcp login, the generic /login service options, the config
+ * menu): claim/reserve under the store's file lock, staged OAuth, guarded
+ * finalize, verification. Never dispatches on the record's status — the
+ * picker's remove/verify actions live in connectServiceFromPicker.
+ * Reports success only after the finalize committed.
+ */
+ private async guardedMcpLogin(
+ service: McpPluginView,
+ target: McpPickerTarget | undefined,
+ options: {
+ catalogServiceId?: string;
+ addAccount?: boolean;
+ knownIds?: ReadonlySet<string>;
+ explicitLogin?: boolean;
+ } = {},
+ ): Promise<{ ran: boolean; result: AuthenticationResult }> {
+ if (!service.connectable || !target) {
+ this.showStatus(service.setupHint ?? `${service.label} cannot be connected automatically in this build.`);
+ return { ran: false, result: { status: "failed" } };
+ }
+ const currentServices = this.resolveCurrentServiceCatalog();
+ const definition = currentServices.find(
+ (entry) => entry.serviceId === (options.catalogServiceId ?? service.serviceId),
+ );
+ const userConfig = this.settingsManager.getGlobalMcpServers()?.[service.serviceId];
+ const admission =
+ definition || userConfig
+ ? this.getMcpLoginEligibility(
+ service.serviceId,
+ options.catalogServiceId ?? service.serviceId,
+ options.addAccount === true,
+ undefined,
+ options.explicitLogin === true,
+ )
+ : { allowed: true, endpoint: target.url };
+ const targetUrl = admission.endpoint;
+ if (!admission.allowed || !targetUrl || target.url !== targetUrl || !target.usesOAuth) {
+ this.showStatus(admission.setupHint ?? "The connection target changed. Open the catalog again to review it.");
+ return { ran: false, result: { status: "failed" } };
+ }
+ // EVERY user-facing MCP login is guarded (initial connect, reconnect,
+ // add account): the account is claimed under the store's file lock first
+ // — a durable pending reservation for a fresh id, a nonce claim on an
+ // existing record — so a concurrent logout can cancel us and a late
+ // OAuth callback can never reactivate or clobber the account.
+ let connectionId = service.serviceId;
+ let attemptId: string | undefined;
+ let stagedServerId: string | undefined;
+ // The full on-disk identity a guarded REPLACE expects to swap out —
+ // captured for EVERY login, even without a record: legacy
+ // credential-only accounts can hold a grant with no record, and a
+ // reconnect must replace it without clearing it first.
+ let expectedOldCredential: AuthCredential | undefined;
+ if (options.addAccount === true) {
+ const store = this.getMcpConnectionStore();
+ const taken = (id: string): boolean =>
+ store.get(id) !== undefined ||
+ this.modelRegistry.authStorage.get(mcpCredentialKey(id)) !== undefined ||
+ (options.knownIds?.has(id) ?? false) ||
+ this.settingsManager.getGlobalMcpServers()?.[id] !== undefined;
+ const usedIds = new Set<string>();
+ for (let attempt = 0; attempt < 20; attempt++) {
+ const candidate = nextMcpConnectionId(service.serviceId, (id) => taken(id) || usedIds.has(id));
+ const now = Date.now();
+ const nonce = randomUUID();
+ // Durable, commit-gated reservation: the pending marker (with the
+ // opaque attempt nonce) only counts once the record write commits.
+ const won = await store.reserveConnectionId({
+ connectionId: candidate,
+ serviceId: options.catalogServiceId ?? service.serviceId,
+ endpoint: targetUrl,
+ label: `${service.label} (${candidate})`,
+ status: "pending",
+ createdAt: now,
+ updatedAt: now,
+ attemptId: nonce,
+ });
+ if (won) {
+ connectionId = candidate;
+ attemptId = nonce;
+ break;
+ }
+ usedIds.add(candidate);
+ }
+ if (attemptId === undefined) {
+ this.showStatus(`Could not allocate a free account id for ${service.label}.`);
+ return { ran: true, result: { status: "failed" } };
+ }
+ } else {
+ const store = this.getMcpConnectionStore();
+ const nonce = randomUUID();
+ // Disk-authoritative identity capture (never the per-instance cache):
+ // an intentional replacement CASes against exactly this value, and a
+ // newer external writer refuses instead of being clobbered.
+ expectedOldCredential = this.modelRegistry.authStorage.getVerified(mcpCredentialKey(connectionId));
+ const existing = store.get(connectionId);
+ if (existing === undefined) {
+ const now = Date.now();
+ const won = await store.reserveConnectionId({
+ connectionId,
+ serviceId: options.catalogServiceId ?? service.serviceId,
+ endpoint: targetUrl,
+ label: service.label,
+ status: "pending",
+ createdAt: now,
+ updatedAt: now,
+ attemptId: nonce,
+ });
+ if (!won) {
+ this.showStatus(`${service.label} is already being connected from another client.`);
+ return { ran: true, result: { status: "failed" } };
+ }
+ } else {
+ const claimed = await store.claimConnectionId({
+ connectionId,
+ attemptId: nonce,
+ isStillCurrent: (record) => {
+ const current = this.getMcpLoginEligibility(
+ connectionId,
+ options.catalogServiceId ?? service.serviceId,
+ false,
+ { record },
+ options.explicitLogin === true,
+ );
+ return current.allowed && current.endpoint === targetUrl;
+ },
+ });
+ if (!claimed) {
+ this.showStatus(`${service.label} is already being connected from another client.`);
+ return { ran: true, result: { status: "failed" } };
+ }
+ }
+ attemptId = nonce;
+ }
+ // The OAuth credential ALWAYS stages under a per-attempt key; the real
+ // account key is only written by the guarded finalize below.
+ stagedServerId = `${connectionId}--${attemptId}`;
+ const releaseAttempt = async (): Promise<boolean> => {
+ let discarded = false;
+ try {
+ this.modelRegistry.authStorage.removeVerified(mcpCredentialKey(stagedServerId));
+ discarded = true;
+ } catch {
+ // Keep recovery data if staged credential deletion fails.
+ }
+ unregisterOAuthProvider(mcpCredentialKey(stagedServerId));
+ if (discarded)
+ this.showStatus(
+ `The login result was discarded. Account settings for ${connectionId} were kept; reconnect or remove the account from /plugins.`,
+ );
+ // Never delete a shell on cancellation: an external auth writer can
+ // change the account key at any moment, outside the store lock.
+ const released = await this.getMcpConnectionStore().releaseClaim({ connectionId, attemptId });
+ if (!released || !discarded) {
+ this.showWarning(
+ `Could not confirm login cleanup for ${connectionId}. Account settings and any remaining credentials were kept; retry from /plugins or remove the account.`,
+ );
+ }
+ return released && discarded;
+ };
+ // The SERVICE's display name, never the picked row's label: the accounts
+ // picker's "Add another account" row would otherwise name the outcome
+ // "Connected Add another account (linear-2)" (Kevin, live testing).
+ const serviceLabel = definition?.label ?? service.label;
+ const parentServiceId = options.catalogServiceId ?? service.serviceId;
+ const loginLabel = connectionId === parentServiceId ? serviceLabel : `${serviceLabel} (${connectionId})`;
+ // ONE login-time client identity, shared by the staged login and the
+ // post-finalize real-id registration: the engine pins the client
+ // identity on the stored credential and refuses drift at refresh, so
+ // both registrations must resolve the exact same config. Settings
+ // identity applies to user-owned servers; reserved builtins never take
+ // a user-configured client identity.
+ const parentConfig = this.settingsManager.getGlobalMcpServers()?.[options.catalogServiceId ?? service.serviceId];
+ const loginIdentity = definition?.legacyBuiltin ? {} : resolveMcpOAuthIdentity(parentConfig);
+ let result: AuthenticationResult;
+ try {
+ registerOAuthProvider(
+ createConfiguredMcpProvider({
+ server: stagedServerId,
+ label: loginLabel,
+ url: targetUrl,
+ identity: loginIdentity,
+ reviewedScopes: definition?.reviewedScopes,
+ clientRegistration: definition?.clientRegistration,
+ }),
+ );
+ result = await this.createAuthFlows().runMcpLogin(stagedServerId, loginLabel);
+ } catch {
+ result = { status: "failed" };
+ }
+ if (result.status !== "success") {
+ const cleaned = await releaseAttempt();
+ if (cleaned)
+ this.showStatus(
+ `Login did not complete. Account settings for ${connectionId} were kept; reconnect or remove the account from /plugins.`,
+ );
+ return cleaned ? { ran: true, result } : { ran: true, result: { status: "failed" } };
+ }
+ {
+ const stagedKey = mcpCredentialKey(stagedServerId);
+ const realKey = mcpCredentialKey(connectionId);
+ // Guarded commit: the staged credential moves to the REAL account key
+ // under the store's file lock, only while our claim is still ours.
+ // A FRESH account (no existing grant) moves set-if-absent — a
+ // bystander credential is never clobbered. A REPLACEMENT (reconnect,
+ // or a legacy grant with no record) CASes against the captured full
+ // identity; a newer external credential refuses. When the record
+ // write fails, the compensate runs under the SAME lock and RESTORES
+ // the previous credential (never delete-only, never clobbering a
+ // newer writer); a failed rollback surfaces recovery-required with
+ // the credential RETAINED.
+ let movedCredential: AuthCredential | undefined;
+ let replacedPrevious: AuthCredential | undefined;
+ const finalization = await this.getMcpConnectionStore().finalizeAttempt({
+ connectionId,
+ attemptId,
+ commit: (record) => {
+ // Atomic, disk-authoritative move under the AUTH backend's
+ // own file lock: the store's lock cannot cover an ordinary
+ // login in another process, so the conditional move reads
+ // CURRENT on-disk data.
+ const move =
+ expectedOldCredential === undefined
+ ? this.modelRegistry.authStorage.moveStagedCredential(stagedKey, realKey)
+ : this.modelRegistry.authStorage.replaceStagedCredential(
+ stagedKey,
+ realKey,
+ expectedOldCredential,
+ );
+ if (move.status === "occupied") {
+ // A newer external credential - or a deleted old grant -
+ // owns the account key: fail CLOSED and preserve the
+ // account shell in the cleanup.
+ throw new Error("account key occupied by a newer login");
+ }
+ if (move.status === "nothing") throw new Error("staged login credential is missing");
+ if (move.status === "replaced") {
+ movedCredential = move.credential;
+ replacedPrevious = expectedOldCredential;
+ } else if (move.status === "moved") {
+ movedCredential = move.credential;
+ }
+ // Pending-verification: the commit CONSUMES the nonce and
+ // clears the previous verification state — an old Connected
+ // status never carries onto a newly replaced grant.
+ const {
+ attemptId: _consumedNonce,
+ verifiedAt: _oldVerifiedAt,
+ toolCount: _oldToolCount,
+ lastError: _oldLastError,
+ ...pendingRecord
+ } = record;
+ return { ...pendingRecord, status: "pending", updatedAt: Date.now() };
+ },
+ compensate: () => {
+ if (!movedCredential) {
+ // Never moved: nothing of ours to undo.
+ return { status: "failed" };
+ }
+ if (replacedPrevious !== undefined) {
+ // RESTORE the previous credential (never delete-only) via
+ // a full-identity CAS: a newer writer is never clobbered.
+ this.modelRegistry.authStorage.replaceCredentialIfMatches(realKey, movedCredential, replacedPrevious);
+ return { status: "failed" };
+ }
+ // Fresh-account rollback: restore ours to the staged slot only
+ // when it is empty, then delete it from the real slot only
+ // when it is still exactly ours — a credential written by
+ // anyone else is never deleted.
+ this.modelRegistry.authStorage.restoreCredentialIfAbsent(stagedKey, movedCredential);
+ this.modelRegistry.authStorage.removeIfCredentialMatches(realKey, movedCredential);
+ },
+ });
+ if (finalization === "recovery-required") {
+ // Explicit recovery state: the commit or its rollback failed and
+ // partial state may remain. RETAIN the credential wherever it
+ // lives (staged key or real key) — never discard recovery data —
+ // and tell the user exactly that.
+ this.showWarning(
+ `The login for account ${connectionId} could not be committed. The credential is retained and can be recovered; retry from /plugins or remove the placeholder account.`,
+ );
+ return { ran: true, result: { status: "failed" } };
+ }
+ if (finalization !== "committed") {
+ this.showStatus(
+ `The account ${connectionId} was logged out or replaced during login, or the change could not be saved; login was not committed.`,
+ );
+ await releaseAttempt();
+ return { ran: true, result: { status: "failed" } };
+ }
+ // Committed: the real id now owns the credential — register its
+ // provider and drop the staged registration.
+ registerOAuthProvider(
+ createConfiguredMcpProvider({
+ server: connectionId,
+ label: `${service.label} (${connectionId})`,
+ url: targetUrl,
+ identity: loginIdentity,
+ reviewedScopes: definition?.reviewedScopes,
+ clientRegistration: definition?.clientRegistration,
+ }),
+ );
+ unregisterOAuthProvider(mcpCredentialKey(stagedServerId));
+ }
+ // A stored token is not "Connected": verify with a real MCP handshake. The
+ // record's serviceId stays the catalog id; the connectionId is the account.
+ let verification: McpConnectionRecord | undefined;
+ try {
+ verification = await verifyMcpConnection({
+ authStorage: this.modelRegistry.authStorage,
+ connectionStore: this.getMcpConnectionStore(),
+ connectionId,
+ serviceId: options.catalogServiceId ?? service.serviceId,
+ label: loginLabel,
+ endpoint: targetUrl,
+ usesOAuth: target.usesOAuth,
+ ...(target.bearerTokenEnvVar ? { bearerTokenEnvVar: target.bearerTokenEnvVar } : {}),
+ });
+ } catch {
+ verification = undefined;
+ }
+ const accountScoped = options.addAccount === true;
+ await this.completeMcpConnectionOutcome(
+ verification?.status === "connected"
+ ? {
+ label: loginLabel,
+ source: "login",
+ verification: "connected",
+ ...(accountScoped ? { connectionId, addedAccount: true } : {}),
+ ...(verification.toolCount !== undefined ? { toolCount: verification.toolCount } : {}),
+ }
+ : verification
+ ? {
+ label: loginLabel,
+ source: "login",
+ verification: "unverified",
+ issue: formatMcpVerificationIssue(verification.lastError),
+ ...(verification.lastError ? { issueCategory: verification.lastError } : {}),
+ ...(accountScoped ? { connectionId, addedAccount: true } : {}),
+ }
+ : {
+ label: loginLabel,
+ source: "login",
+ verification: "unsaved",
+ ...(accountScoped ? { connectionId, addedAccount: true } : {}),
+ },
+ );
+ return {
+ ran: true,
+ result: {
+ status: "success",
+ providerId: mcpCredentialKey(connectionId),
+ providerName: loginLabel,
+ authType: "oauth",
+ kind: "service",
+ },
+ };
+ }
+
+ /**
+ * The inline paste flow for requires-setup token services: prompt every
+ * required credential field in order (masked), store ONE static-token
+ * credential under the SAME credential key OAuth uses, then verify with a
+ * real MCP handshake. Esc cancels with nothing stored; a verification
+ * failure keeps the decision honest (unverified, never Connected). No
+ * fail-closed rule is relaxed: setup field ids are never read as env vars,
+ * the credential is bound to this exact id and endpoint, and
+ * reserved/shadowed names still fail closed.
+ */
+ private async pasteTokenForService(
+ service: McpPluginView,
+ target: McpPickerTarget | undefined,
+ options: { catalogServiceId?: string } = {},
+ ): Promise<McpPickerActionOutcome> {
+ const serviceId = options.catalogServiceId ?? service.serviceId;
+ const definition = this.resolveCurrentServiceCatalog().find((entry) => entry.serviceId === serviceId);
+ if (!definition || !isPasteableTokenService(definition)) {
+ this.showStatus(service.setupHint ?? `${service.label} cannot be connected by pasting a token.`);
+ return { ran: false };
+ }
+ const ownership = reservedMcpOwnership(
+ definition,
+ this.settingsManager.getGlobalMcpServers()?.[definition.serviceId],
+ );
+ if (ownership.status !== "canonical" || service.connectionStatus === "disabled") {
+ this.showStatus(ownership.setupHint ?? "Disabled in settings.");
+ return { ran: false };
+ }
+ // The paste flow serves CATALOG definitions; a settings-managed server
+ // owns its id and keeps its settings-managed authentication.
+ if (target?.managedBySettings) {
+ this.showStatus(`${service.label} is configured through settings; manage it with /mcp or your settings file.`);
+ return { ran: false };
+ }
+ if (
+ definition.transport.type !== "http" ||
+ !definition.transport.url ||
+ target?.url !== definition.transport.url
+ ) {
+ this.showStatus("The connection target changed. Open the catalog again to review it.");
+ return { ran: false };
+ }
+ const connectionId = definition.serviceId;
+ if (this.getMcpConnectionStore().get(connectionId)?.attemptId !== undefined) {
+ this.showStatus("Login in progress. Finish it or remove the account to cancel.");
+ return { ran: false };
+ }
+ // The ONE credential the runtime sends as the bearer. isPasteableTokenService
+ // above already established that this resolves, so it is read, not re-checked.
+ const credential = mcpPasteCredential(definition);
+ if (!credential) return { ran: false };
+ const value = await this.promptForMcpTokenValues(definition, credential);
+ // Esc (or an empty submit): nothing stored, no record, no status line —
+ // the paste panel ran, so the surface that opened it re-enters.
+ if (!value) return { ran: true };
+ // Stored ONLY in the agent credential store (auth.json), under the SAME
+ // key OAuth uses — never settings.json, never a status line or log.
+ this.modelRegistry.authStorage.set(mcpCredentialKey(connectionId), {
+ type: "mcp_static_token",
+ endpoint: definition.transport.url,
+ bearer: value,
+ bearerFieldId: credential.field.id,
+ createdAt: Date.now(),
+ });
+ // A stored token is not "Connected": verify with a real MCP handshake
+ // that uses the stored token as the bearer.
+ let verification: McpConnectionRecord | undefined;
+ try {
+ verification = await verifyMcpConnection({
+ authStorage: this.modelRegistry.authStorage,
+ connectionStore: this.getMcpConnectionStore(),
+ connectionId,
+ serviceId: definition.serviceId,
+ label: service.label,
+ endpoint: definition.transport.url,
+ usesOAuth: false,
+ staticToken: true,
+ });
+ } catch {
+ verification = undefined;
+ }
+ // The SAME durable outcome entry the OAuth path records: success only
+ // from a verified handshake, unverified/unsaved otherwise — the token
+ // value itself never appears in the entry.
+ await this.completeMcpConnectionOutcome(
+ verification?.status === "connected"
+ ? {
+ label: service.label,
+ source: "paste",
+ verification: "connected",
+ ...(verification.toolCount !== undefined ? { toolCount: verification.toolCount } : {}),
+ }
+ : verification
+ ? {
+ label: service.label,
+ source: "paste",
+ verification: "unverified",
+ issue: formatMcpVerificationIssue(verification.lastError),
+ ...(verification.lastError ? { issueCategory: verification.lastError } : {}),
+ }
+ : { label: service.label, source: "paste", verification: "unsaved" },
+ );
+ // Success or failure, the paste RAN: the re-entry decision is state,
+ // not the verification verdict.
+ return { ran: true };
+ }
+
+ /**
+ * The masked inline prompt for a service's ONE credential — the same inline
+ * surface as the OAuth login panel (showInlineAuthPanel), in the
+ * #2331/#2340 panel language. Resolves with the pasted value, or undefined
+ * when the user cancelled. The raw value never leaves this seam: no status
+ * line, no log, no transcript entry, and no rendered line contains it.
+ */
+ private promptForMcpTokenValues(
+ definition: McpServiceDescriptor,
+ credential: McpPasteCredential,
+ ): Promise<string | undefined> {
+ return new Promise((resolve) => {
+ let close: (() => void) | undefined;
+ const panel = new McpTokenPastePanelComponent({
+ serviceLabel: definition.label,
+ ...(definition.setup.reason ? { reason: definition.setup.reason } : {}),
+ field: {
+ id: credential.field.id,
+ label: mcpCredentialFieldPromptLabel(definition, credential.field),
+ },
+ onSubmit: (value) => {
+ close?.();
+ resolve(value);
+ },
+ onCancel: () => {
+ close?.();
+ resolve(undefined);
+ },
+ });
+ close = this.showInlineAuthPanel(panel);
+ });
+ }
+
private async reloadAfterMcpChange(message: string, successMessage = message): Promise<void> {
if (this.isAgentStreaming() || this.isAgentCompacting()) {
- this.showStatus(`${message} The change was saved. Run /reload after the current turn to activate it.`);
+ this.queueMcpActivationForNextBoundary(message, successMessage);
return;
}
const reloaded = await this.handleReloadCommand();
@@ -9307,13 +10832,85 @@ export class InteractiveMode {
}
}
+ /**
+ * Connect AND disconnect outcomes are durable chat entries, not transient
+ * status lines: reload the session, then record the outcome where it stays
+ * visible.
+ */
+ private async completeMcpConnectionOutcome(details: McpOutcomeDetails): Promise<void> {
+ const notice = formatMcpConnectionOutcomeNotice(details);
+ if (this.isAgentStreaming() || this.isAgentCompacting()) {
+ this.queueMcpActivationForNextBoundary(notice, notice, details);
+ return;
+ }
+ const reloaded = await this.handleReloadCommand();
+ await this.appendMcpConnectionOutcome({ ...details, activation: reloaded ? "active" : "inactive" });
+ }
+
+ private async appendMcpConnectionOutcome(details: McpOutcomeDetails): Promise<void> {
+ const message = createMcpConnectionOutcomeMessage(details);
+ try {
+ await this.agentConnection.appendCustomMessage({
+ customType: message.customType,
+ content: message.content,
+ display: message.display,
+ details: message.details,
+ });
+ } catch {
+ // The connection change itself is already saved; never fail the flow
+ // over a transcript entry — fall back to the transient line.
+ this.showWarning(message.content);
+ }
+ }
+
+ /**
+ * Defer an MCP change's activation to the next safe boundary (agent run end and
+ * compaction end both check); the user never has to run /reload manually.
+ */
+ private queueMcpActivationForNextBoundary(
+ message: string,
+ successMessage = message,
+ connectionOutcome?: McpOutcomeDetails,
+ ): void {
+ this.pendingPostRunActivation = { message, successMessage, ...(connectionOutcome ? { connectionOutcome } : {}) };
+ this.showStatus(`${message} It will activate automatically when the current turn finishes.`);
+ }
+
+ private async maybeRunQueuedMcpActivation(): Promise<void> {
+ if (!this.pendingPostRunActivation) return;
+ if (this.isAgentStreaming() || this.isAgentCompacting()) return;
+ const pending = this.pendingPostRunActivation;
+ this.pendingPostRunActivation = undefined;
+ const reloaded = await this.handleReloadCommand();
+ if (pending.connectionOutcome) {
+ await this.appendMcpConnectionOutcome({
+ ...pending.connectionOutcome,
+ activation: reloaded ? "active" : "inactive",
+ });
+ return;
+ }
+ if (reloaded) {
+ this.showStatus(pending.successMessage);
+ } else {
+ this.showWarning(`${pending.message} The change remains saved, but it is not active in this session.`);
+ }
+ }
+
private async showLogoutSelector(): Promise<void> {
// Only reload when an MCP integration was actually removed (its skill must
// be disabled); a cancelled or non-MCP logout needs no reload.
+ this.pendingMcpDisconnectionOutcome = undefined;
const loggedOut = await this.createAuthFlows().runLogout();
- if (loggedOut?.startsWith("mcp:")) {
- await this.handleReloadCommand();
+ const outcome = this.pendingMcpDisconnectionOutcome;
+ this.pendingMcpDisconnectionOutcome = undefined;
+ if (!loggedOut?.startsWith("mcp:")) return;
+ if (outcome) {
+ // The outcome path reloads itself, then leaves the durable entry; a
+ // refused/partial logout falls back to the reload-only behaviour.
+ await this.completeMcpConnectionOutcome(outcome);
+ return;
}
+ await this.handleReloadCommand();
}
private async handleUpdateCommand(args: string): Promise<void> {
@@ -9489,6 +11086,7 @@ export class InteractiveMode {
try {
await this.agentConnection.reload();
+ this.pendingPostRunActivation = undefined;
this.toolDefinitionCache.clear();
this.keybindings.reload();
const activeHeader = this.customHeader ?? this.builtInHeader;
@@ -10698,6 +12296,7 @@ ${interrupt ? `| \`${interrupt}\` | Interrupt current operation |\n` : ""}${shor
stop(options: { preserveAltScreen?: boolean } = {}): void {
this.closeConfigurationMenu?.();
+ this.closeServiceCatalogPicker?.();
this.unregisterSignalHandlers();
this.clearCtrlCExitHint({ render: false });
this.clearEscapeRepeat();
diff --git a/packages/coding-agent/test/agent-session-services.test.ts b/packages/coding-agent/test/agent-session-services.test.ts
index 2013132888..be4051cb43 100644
--- a/packages/coding-agent/test/agent-session-services.test.ts
+++ b/packages/coding-agent/test/agent-session-services.test.ts
@@ -8,6 +8,9 @@ import { AGENT_MESSAGE_SKILL_NAME, type AgentSessionMessageController } from "..
import { AGENT_OBSERVE_SKILL_NAME, type AgentObserveController } from "../src/core/agent-observe.js";
import { createAgentSessionFromServices, createAgentSessionServices } from "../src/core/agent-session-services.js";
import { AuthStorage } from "../src/core/auth-storage.js";
+import { McpConnectionStore } from "../src/core/mcp/connection-store.js";
+import { McpManager } from "../src/core/mcp/mcp-manager.js";
+import { ModelRegistry } from "../src/core/model-registry.js";
import { SessionManager } from "../src/core/session-manager.js";
import { SettingsManager } from "../src/core/settings-manager.js";
import { createSyntheticSourceInfo } from "../src/core/source-info.js";
@@ -185,6 +188,18 @@ describe("createAgentSessionFromServices", () => {
});
it("advertises enabled generic MCP servers and refreshes the prompt on reload", async () => {
+ /**
+ * The enabled-generic-servers line: user-declared servers plus per-account
+ * records; a catalog entry appears only when it is explicitly public
+ * no-auth AND setup-ready (credential-free dispatch — api_key and
+ * requires-setup rows fail closed). The exact catalog contents evolve, so
+ * the contract pins WHICH servers appear, not the full list.
+ */
+ const enabledServersLine = (prompt: string): string => {
+ const match = prompt.match(/Enabled generic MCP servers: ([^\n]*)\./);
+ return match?.[1] ?? "";
+ };
+
const tempDir = join(tmpdir(), `pi-session-mcp-prompt-${Date.now()}-${Math.random().toString(36).slice(2)}`);
const projectDir = join(tempDir, "project");
const agentDir = join(tempDir, "agent");
@@ -231,7 +246,8 @@ describe("createAgentSessionFromServices", () => {
expect(initialPrompt).toContain(
"Generic MCP connections are accessed through the pre-imported Python `mcp` object in the Python REPL, not as top-level native tool namespaces or installed Python skills.",
);
- expect(initialPrompt).toContain("Enabled generic MCP servers: `filesystem`, `zebra`.");
+ // Zero none+ready catalog rows exist today, so the enabled line is exactly the user-declared servers.
+ expect(enabledServersLine(initialPrompt)).toBe("`filesystem`, `zebra`");
expect(initialPrompt).toContain('await mcp.list_tools("filesystem")');
expect(initialPrompt).toContain('await mcp.call_tool("filesystem", "<tool>", arguments)');
for (const hidden of [
@@ -264,7 +280,7 @@ describe("createAgentSessionFromServices", () => {
],
"owner-a",
);
- expect(session.systemPrompt).toContain("Enabled generic MCP servers: `filesystem`, `zebra`.");
+ expect(enabledServersLine(session.systemPrompt)).toBe("`filesystem`, `zebra`");
expect(session.systemPrompt).not.toContain('await mcp.list_tools("task")');
expect(session.getActiveToolNames()).toEqual(expect.arrayContaining(["mcp_list_tools_task", "mcp_call_task"]));
expect(session.systemPrompt).not.toContain("task-secret");
@@ -281,7 +297,7 @@ describe("createAgentSessionFromServices", () => {
expect(execute).toHaveBeenCalledOnce();
expect(execute.mock.calls[0]?.[0]).toContain("await _prime_mcp.reload(_prime_mcp_name)");
expect(execute.mock.calls[0]?.[0]).toContain('["task"]');
- expect(session.systemPrompt).toContain("Enabled generic MCP servers: `filesystem`, `zebra`.");
+ expect(enabledServersLine(session.systemPrompt)).toBe("`filesystem`, `zebra`");
expect(session.getAllTools().map((tool) => tool.name)).not.toContain("mcp_call_task");
expect(session.getActiveToolNames()).not.toContain("mcp_call_task");
@@ -290,7 +306,7 @@ describe("createAgentSessionFromServices", () => {
await settingsManager.flush();
await session.reload();
- expect(session.systemPrompt).toContain("Enabled generic MCP servers: `added`, `zebra`.");
+ expect(enabledServersLine(session.systemPrompt)).toBe("`added`, `zebra`");
expect(session.systemPrompt).toContain('await mcp.list_tools("added")');
expect(session.systemPrompt).not.toContain('await mcp.list_tools("filesystem")');
expect(session.systemPrompt).not.toContain("new-secret");
@@ -299,6 +315,102 @@ describe("createAgentSessionFromServices", () => {
}
});
+ it("ENG-6108: activates a verified catalog connection in the live conversation after /plugins login", async () => {
+ // A /plugins login must become usable in the current (daemon-backed) conversation without a restart: credentials
+ // land in the shared credential store, the connection is verified with a real MCP handshake (token presence alone
+ // is never Connected), and the session reload the picker triggers rebuilds the system prompt and serves the catalog
+ // service through the generic mcp route.
+ const tempDir = join(
+ tmpdir(),
+ `pi-session-catalog-activation-${Date.now()}-${Math.random().toString(36).slice(2)}`,
+ );
+ mkdirSync(tempDir, { recursive: true });
+ cleanupPaths.push(tempDir);
+ const faux = registerFauxProvider({ provider: "faux-eng6108" });
+ unregisters.push(() => faux.unregister());
+ const authStorage = AuthStorage.inMemory();
+ const store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ // Pin a minimal catalog: this exercises connect-then-activate, not the merged catalog's breadth.
+ const mcpManager = new McpManager({
+ authStorage,
+ connectionStore: store,
+ getServiceCatalog: () => [
+ {
+ serviceId: "notion",
+ label: "Notion",
+ aliases: [],
+ transport: { type: "http", url: "https://mcp.notion.com/mcp" },
+ authStrategy: "oauth",
+ setup: { status: "ready" },
+ metadataReviewed: true,
+ legacyBuiltin: true,
+ },
+ ],
+ noBackgroundVerification: true,
+ probeConnection: async () => ({ ok: true, toolCount: 3 }),
+ });
+ const model = faux.getModel();
+ const modelRegistry = ModelRegistry.inMemory(authStorage);
+ modelRegistry.registerProvider(model.provider, {
+ baseUrl: model.baseUrl,
+ apiKey: "faux-key",
+ api: faux.api,
+ models: faux.models.map((registeredModel) => ({
+ id: registeredModel.id,
+ name: registeredModel.name,
+ api: registeredModel.api,
+ reasoning: registeredModel.reasoning,
+ input: registeredModel.input,
+ cost: registeredModel.cost,
+ contextWindow: registeredModel.contextWindow,
+ maxTokens: registeredModel.maxTokens,
+ baseUrl: registeredModel.baseUrl,
+ })),
+ });
+ const services = await createAgentSessionServices({
+ cwd: tempDir,
+ agentDir: join(tempDir, "agent"),
+ authStorage,
+ settingsManager: SettingsManager.inMemory(),
+ modelRegistry,
+ mcpManager,
+ telemetryDisabled: true,
+ noBuiltinHerdrReporter: true,
+ resourceLoaderOptions: { noExtensions: true },
+ });
+ const { session } = await createAgentSessionFromServices({
+ services,
+ sessionManager: SessionManager.inMemory(),
+ model,
+ });
+ try {
+ expect(session.agent.state.systemPrompt).not.toContain("Enabled generic MCP servers");
+ expect(services.mcpManager.getDisabledBuiltinSkillOverrides()).toContain("-notion/SKILL.md");
+
+ // The /plugins connect flow, minus the UI: browser OAuth writes the
+ // shared credential, then the host verifies with a real handshake.
+ authStorage.set("mcp:notion", {
+ type: "oauth",
+ access: "notion-access",
+ refresh: "notion-refresh",
+ expires: Date.now() + 3600_000,
+ endpoint: "https://mcp.notion.com/mcp",
+ });
+ const record = await services.mcpManager.verifyConnection("notion");
+ expect(record.status).toBe("connected");
+
+ // The picker triggers the same session reload the interactive client performs: the prompt now
+ // advertises the service and the authored skill override clears.
+ await session.reload();
+ const promptAfter = session.agent.state.systemPrompt;
+ expect(promptAfter).toContain("Enabled generic MCP servers");
+ expect(promptAfter).toContain('await mcp.list_tools("notion")');
+ expect(services.mcpManager.getDisabledBuiltinSkillOverrides()).not.toContain("-notion/SKILL.md");
+ } finally {
+ session.dispose();
+ }
+ });
+
it("forwards daemon-backed agent message controllers into AgentSession", async () => {
const tempDir = join(tmpdir(), `pi-session-services-${Date.now()}-${Math.random().toString(36).slice(2)}`);
mkdirSync(tempDir, { recursive: true });
diff --git a/packages/coding-agent/test/auth-flows.test.ts b/packages/coding-agent/test/auth-flows.test.ts
index eb4ea9bbb7..6b83eb593e 100644
--- a/packages/coding-agent/test/auth-flows.test.ts
+++ b/packages/coding-agent/test/auth-flows.test.ts
@@ -1,12 +1,14 @@
import { existsSync, mkdirSync, readFileSync, rmSync, writeFileSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
+import { resetOAuthProviders } from "@earendil-works/pi-ai/oauth";
import type { Component, OverlayHandle, TUI } from "@earendil-works/pi-tui";
import stripAnsi from "strip-ansi";
import { afterEach, beforeAll, beforeEach, describe, expect, it, onTestFinished, vi } from "vitest";
import { ENV_AGENT_DIR } from "../src/config.js";
import { createAgentSessionServices } from "../src/core/agent-session-services.js";
import { AuthStorage } from "../src/core/auth-storage.js";
+import type { McpRemoveAccountResult } from "../src/core/mcp/connection-store.js";
import { ModelRegistry } from "../src/core/model-registry.js";
import { PRIME_INFERENCE_PROVIDER_ID } from "../src/core/prime-inference-auth.js";
import { createAgentSession } from "../src/core/sdk.js";
@@ -143,6 +145,7 @@ describe("ProviderAuthFlows", () => {
});
beforeEach(() => {
+ resetOAuthProviders();
vi.stubEnv("PRIME_AGENT_INFERENCE_API_BASE_URL", "");
vi.stubEnv("PRIME_AGENT_INFERENCE_FRONTEND_URL", "");
tempDir = join(tmpdir(), `pi-auth-flows-${Date.now()}-${Math.random().toString(36).slice(2)}`);
@@ -168,6 +171,7 @@ describe("ProviderAuthFlows", () => {
if (existsSync(tempDir)) {
rmSync(tempDir, { recursive: true });
}
+ resetOAuthProviders();
vi.restoreAllMocks();
vi.unstubAllEnvs();
});
@@ -260,6 +264,147 @@ describe("ProviderAuthFlows", () => {
expect(overlays).toHaveLength(0);
});
+ it("the generic /logout route delegates MCP logouts whole before touching auth", async () => {
+ const authStorage = AuthStorage.create(authJsonPath, { usePrimeCliConfig: false });
+ authStorage.set("mcp:acme-2", {
+ type: "oauth",
+ access: "real-for-acme-2",
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ });
+ const { host, panels, statusMessages, errorMessages } = createHost(authStorage);
+ const logout = vi.spyOn(authStorage, "logout");
+ const delegated = vi.fn(async () => "removed" as McpRemoveAccountResult);
+ (host as { onMcpAccountLogout?: unknown }).onMcpAccountLogout = delegated;
+
+ const logoutResult = new ProviderAuthFlows(host).runLogout();
+ expect(panels).toHaveLength(1); // #2331: the route selector mounts inline, not as an overlay
+ for (const char of "acme-2") {
+ panels[0]?.handleInput?.(char);
+ }
+ panels[0]?.handleInput?.("\r");
+ await expect(logoutResult).resolves.toBe("mcp:acme-2");
+ // The route never touched auth directly for the MCP id: the host-owned
+ // critical section (store->auth) did everything.
+ expect(logout).not.toHaveBeenCalled();
+ expect(delegated).toHaveBeenCalledWith("mcp:acme-2");
+ expect(errorMessages).toEqual([]);
+ expect(statusMessages.join("\n")).toContain("Logged out of acme-2");
+ });
+
+ it("a failed MCP logout outcome reports the failure honestly instead of success", async () => {
+ const authStorage = AuthStorage.create(authJsonPath, { usePrimeCliConfig: false });
+ authStorage.set("mcp:acme-2", {
+ type: "oauth",
+ access: "real-for-acme-2",
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ });
+ const { host, panels, statusMessages, errorMessages } = createHost(authStorage);
+ (host as { onMcpAccountLogout?: unknown }).onMcpAccountLogout = vi.fn(
+ async () => "failed" as McpRemoveAccountResult,
+ );
+
+ const logoutResult = new ProviderAuthFlows(host).runLogout();
+ expect(panels).toHaveLength(1); // #2331: the route selector mounts inline, not as an overlay
+ for (const char of "acme-2") {
+ panels[0]?.handleInput?.(char);
+ }
+ panels[0]?.handleInput?.("\r");
+ await expect(logoutResult).resolves.toBeNull();
+ expect(errorMessages.join("\n")).toContain("Logout failed");
+ expect(statusMessages.join("\n")).not.toContain("Logged out of acme-2");
+ });
+
+ // The honest partial-state wording ("could not be saved... try again") is pinned ONCE at the removeAction seam in
+ // mcp-activation-queue.test.ts ("a removeAccount whose record write fails after the logout reports the honest
+ // partial state").
+
+ it("the generic /login service option for an MCP account delegates to the guarded host hook", async () => {
+ const authStorage = AuthStorage.create(authJsonPath, { usePrimeCliConfig: false });
+ const { host } = createHost(authStorage);
+ const delegated = vi.fn(async () => ({
+ status: "success" as const,
+ providerId: "mcp:acme",
+ providerName: "Acme",
+ authType: "oauth" as const,
+ kind: "service" as const,
+ }));
+ (host as { onMcpAccountLogin?: unknown }).onMcpAccountLogin = delegated;
+
+ const result = await new ProviderAuthFlows(host).loginProvider({
+ id: "mcp:acme",
+ name: "Acme",
+ authType: "oauth",
+ category: "service",
+ });
+
+ // The MCP login went through the guarded hook — never a raw dialog writing the final credential directly.
+ expect(delegated).toHaveBeenCalledWith("mcp:acme");
+ expect(result.status).toBe("success");
+ });
+
+ it("an MCP login without a guarded host hook fails closed without opening a dialog", async () => {
+ const { host, overlays, errorMessages } = createHost(
+ AuthStorage.create(authJsonPath, { usePrimeCliConfig: false }),
+ );
+ const result = await new ProviderAuthFlows(host).loginProvider({
+ id: "mcp:my--service",
+ name: "My service",
+ authType: "oauth",
+ category: "service",
+ });
+ expect(result).toEqual({ status: "failed" });
+ expect(overlays).toEqual([]);
+ expect(errorMessages.join("\n")).toContain("guarded host");
+ });
+
+ it("an unresolvable MCP login reports an explicit failure — never a raw-dialog fallback", async () => {
+ const authStorage = AuthStorage.create(authJsonPath, { usePrimeCliConfig: false });
+ const { host } = createHost(authStorage);
+ const delegated = vi.fn(async () => ({ status: "failed" as const }));
+ (host as { onMcpAccountLogin?: unknown }).onMcpAccountLogin = delegated;
+
+ const result = await new ProviderAuthFlows(host).loginProvider({
+ id: "mcp:acme",
+ name: "Acme",
+ authType: "oauth",
+ category: "service",
+ });
+
+ // The hook OWNS every MCP login (including unresolvable names): its explicit failed outcome is the route's result —
+ // no raw dialog ever writes the final credential directly.
+ expect(delegated).toHaveBeenCalledWith("mcp:acme");
+ expect(result).toEqual({ status: "failed" });
+ });
+
+ // A refused stale staged logout staying state-neutral is pinned at the STORE level in mcp-connection-store.test.ts
+ // ("a staged-key logout queued behind a finalize-first move refuses fail-closed" and "a staged-key logout with a
+ // bystander on the real key preserves the account shell") and at the resolution seam in
+ // mcp-activation-queue.test.ts ("logoutMcpAccount resolves exact ids first...").
+
+ it("non-MCP logouts stay unchanged: the route removes them directly", async () => {
+ const authStorage = AuthStorage.create(authJsonPath, { usePrimeCliConfig: false });
+ authStorage.set("anthropic", { type: "api_key", key: "sk-ant-test" });
+ const { host, panels, statusMessages } = createHost(authStorage);
+ const delegated = vi.fn(async () => "removed" as McpRemoveAccountResult);
+ (host as { onMcpAccountLogout?: unknown }).onMcpAccountLogout = delegated;
+ const logout = vi.spyOn(authStorage, "logout");
+
+ const logoutResult = new ProviderAuthFlows(host).runLogout();
+ expect(panels).toHaveLength(1); // #2331: the route selector mounts inline, not as an overlay
+ for (const char of "anthropic") {
+ panels[0]?.handleInput?.(char);
+ }
+ panels[0]?.handleInput?.("\r");
+ await expect(logoutResult).resolves.toBe("anthropic");
+ expect(delegated).not.toHaveBeenCalled();
+ expect(logout).toHaveBeenCalledWith("anthropic");
+ expect(statusMessages.join("\n")).toContain("Removed stored API key for anthropic");
+ });
+
it("does not offer logout for credentials owned only by the Prime CLI", async () => {
writeFileSync(primeConfigPath, JSON.stringify({ api_key: "prime-cli-key" }));
const authStorage = AuthStorage.create(authJsonPath, { primeCliConfigPath: primeConfigPath });
diff --git a/packages/coding-agent/test/auth-storage.test.ts b/packages/coding-agent/test/auth-storage.test.ts
index 5593d814fc..10e4705121 100644
--- a/packages/coding-agent/test/auth-storage.test.ts
+++ b/packages/coding-agent/test/auth-storage.test.ts
@@ -760,6 +760,108 @@ describe("AuthStorage", () => {
await expect(authStorage.getApiKey("anthropic")).resolves.toBe("stored-key");
});
});
+
+ describe("atomic conditional credential writes", () => {
+ function credential(access: string): { type: "oauth"; access: string; refresh: string; expires: number } {
+ return {
+ type: "oauth",
+ access,
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ };
+ }
+
+ test("moveStagedCredential refuses to clobber a bystander written by ANOTHER instance", () => {
+ const clientA = AuthStorage.create(authJsonPath);
+ const clientB = AuthStorage.create(authJsonPath);
+ // A stages its login...
+ const staged = credential("staged-for-attempt");
+ const bystander = credential("ordinary-login");
+ clientA.set("mcp:acme-2--attempt-1", staged);
+ // ...then B's ordinary login writes the real key: A's per-instance
+ // cache cannot see it, so only a fresh on-disk read can refuse.
+ clientB.set("mcp:acme-2", bystander);
+
+ const move = clientA.moveStagedCredential("mcp:acme-2--attempt-1", "mcp:acme-2");
+
+ expect(move).toEqual({ status: "occupied" });
+ // A fresh reader sees the bystander byte-for-byte; the staged key survives.
+ const fresh = AuthStorage.create(authJsonPath);
+ expect(fresh.get("mcp:acme-2")).toEqual(bystander);
+ expect(fresh.get("mcp:acme-2--attempt-1")).toEqual(staged);
+ });
+
+ test("moveStagedCredential moves atomically when the real key is empty on disk", () => {
+ const clientA = AuthStorage.create(authJsonPath);
+ const clientB = AuthStorage.create(authJsonPath);
+ const staged = credential("staged-for-attempt");
+ clientA.set("mcp:acme-2--attempt-1", staged);
+ // B (a generic /logout in another client) removes the real key: the
+ // fresh on-disk read inside the move sees the honest empty state.
+ clientB.logout("mcp:acme-2");
+
+ const move = clientA.moveStagedCredential("mcp:acme-2--attempt-1", "mcp:acme-2");
+
+ expect(move.status).toBe("moved");
+ if (move.status === "moved") {
+ expect(move.credential).toEqual(staged);
+ }
+ const fresh = AuthStorage.create(authJsonPath);
+ expect(fresh.get("mcp:acme-2")).toEqual(staged);
+ expect(fresh.list()).toEqual(["mcp:acme-2"]);
+ });
+
+ test("removeIfCredentialMatches deletes ONLY the exact own credential", () => {
+ const clientA = AuthStorage.create(authJsonPath);
+ const clientB = AuthStorage.create(authJsonPath);
+ clientA.set("mcp:acme-2", credential("mine"));
+ // B replaces the credential with a NEWER one after our move: the exact-own check must refuse to delete it.
+ const newer = credential("newer-login");
+ clientB.set("mcp:acme-2", newer);
+
+ const removedStale = clientA.removeIfCredentialMatches("mcp:acme-2", credential("mine"));
+ const removedNewer = clientB.removeIfCredentialMatches("mcp:acme-2", newer);
+
+ expect(removedStale).toBe(false);
+ expect(removedNewer).toBe(true);
+ expect(AuthStorage.create(authJsonPath).list()).toEqual([]);
+ });
+
+ test("replaceStagedCredential refuses when the expected old credential was deleted (absence is a change)", () => {
+ // Full-identity CAS: the captured expected-old must match the CURRENT on-disk value INCLUDING absence. A nonempty
+ // expectedOld with an ABSENT real slot is a CHANGED value — the replace must refuse, not treat the emptied slot as
+ // free.
+ const clientA = AuthStorage.create(authJsonPath);
+ const expectedOld = credential("previous-credential");
+ clientA.set("mcp:acme-2", expectedOld);
+ const captured = clientA.getVerified("mcp:acme-2");
+ expect(captured).toBeDefined();
+ // Another client deletes the real credential while our attempt is in flight.
+ AuthStorage.create(authJsonPath).removeVerified("mcp:acme-2");
+ const stagedKey = "mcp:acme-2--attempt-1";
+ clientA.set(stagedKey, credential("our-credential"));
+
+ const move = clientA.replaceStagedCredential(stagedKey, "mcp:acme-2", captured);
+
+ expect(move.status, "a deleted expected-old value must refuse the replace").toBe("occupied");
+ const fresh = AuthStorage.create(authJsonPath);
+ expect(fresh.get("mcp:acme-2"), "nothing may land on the changed slot").toBeUndefined();
+ expect(fresh.get(stagedKey), "our staged credential must stay staged").toBeDefined();
+ });
+
+ test("restoreCredentialIfAbsent never overwrites a newer writer", () => {
+ const clientA = AuthStorage.create(authJsonPath);
+ const clientB = AuthStorage.create(authJsonPath);
+ clientA.set("mcp:acme-2--attempt-1", credential("staged-for-attempt"));
+ const newer = credential("newer-login");
+ clientB.set("mcp:acme-2--attempt-1", newer);
+
+ const restored = clientA.restoreCredentialIfAbsent("mcp:acme-2--attempt-1", credential("staged-for-attempt"));
+
+ expect(restored).toBe(false);
+ expect(AuthStorage.create(authJsonPath).get("mcp:acme-2--attempt-1")).toEqual(newer);
+ });
+ });
});
function structuredFailureMessage(kind: string, status: number, errorMessage: string): AssistantMessage {
diff --git a/packages/coding-agent/test/kernel-bootstrap-runtime-ready.test.ts b/packages/coding-agent/test/kernel-bootstrap-runtime-ready.test.ts
new file mode 100644
index 0000000000..5b20439f2c
--- /dev/null
+++ b/packages/coding-agent/test/kernel-bootstrap-runtime-ready.test.ts
@@ -0,0 +1,66 @@
+import { spawnSync } from "node:child_process";
+import { existsSync } from "node:fs";
+import { homedir } from "node:os";
+import { join, resolve } from "node:path";
+import { fileURLToPath } from "node:url";
+import { describe, expect, it } from "vitest";
+import { RUNTIME_READY_CHECK } from "../src/core/kernel/bootstrap.js";
+
+const here = fileURLToPath(new URL(".", import.meta.url));
+// Resolve from the FILE, not process.cwd(): the vitest worker cwd is the
+// repo root, which would silently fall through to the stale fallback venv.
+const runtimePython = resolve(here, "..", "..", "..", "prime-agent-runtime", ".venv", "bin", "python");
+const fallbackPython = join(homedir(), ".prime", "agent", "kernel-venv", "bin", "python");
+
+/**
+ * The kernel venv is part of the standard checkout/CI environment, so the
+ * suite is unconditional and self-contained: it must fail loudly when no
+ * kernel-ready python is available, never silently skip.
+ */
+function resolveKernelPython(): string {
+ for (const python of [process.env.PRIME_AGENT_KERNEL_PYTHON, runtimePython, fallbackPython]) {
+ if (!python || !existsSync(python)) continue;
+ const check = spawnSync(python, ["-c", "import rlm.repl, mcp, rlm"], { encoding: "utf8" });
+ if (check.status === 0) return python;
+ }
+ throw new Error(`no kernel-ready python found (tried ${runtimePython} and ${fallbackPython})`);
+}
+
+const python = resolveKernelPython();
+
+/**
+ * The ready check is the gate that decides whether a cached kernel venv can be
+ * reused or must be rebuilt. These regressions execute the exact shipped check
+ * string against a real runtime: it must accept the current runtime, and it must
+ * reject a runtime that predates the MCP discovery surface by simulating each
+ * missing method in-process.
+ */
+describe("kernel bootstrap runtime ready check", () => {
+ it("accepts the current runtime", () => {
+ const result = spawnSync(python as string, ["-c", RUNTIME_READY_CHECK], {
+ encoding: "utf8",
+ timeout: 30_000,
+ });
+ expect(result.stderr, result.stderr).toBe("");
+ expect(result.status).toBe(0);
+ });
+
+ it("rejects a runtime missing any MCP discovery method", () => {
+ for (const method of ["list_plugins", "search_plugins", "list_connections", "search_tools", "describe_tool"]) {
+ // Simulate an old runtime: delete one discovery method from the
+ // already-imported module, then execute the exact ready check.
+ const source = [
+ "import os, rlm.mcp as mcp",
+ `delattr(mcp, ${JSON.stringify(method)})`,
+ 'exec(os.environ["PRIME_AGENT_TEST_READY_CHECK"])',
+ ].join("; ");
+ const result = spawnSync(python as string, ["-c", source], {
+ encoding: "utf8",
+ timeout: 30_000,
+ env: { ...process.env, PRIME_AGENT_TEST_READY_CHECK: RUNTIME_READY_CHECK },
+ });
+ expect(result.status, `a runtime without ${method} must fail the ready check`).not.toBe(0);
+ expect(result.stderr).toContain("MCP discovery");
+ }
+ });
+});
diff --git a/packages/coding-agent/test/mcp-activation-queue.test.ts b/packages/coding-agent/test/mcp-activation-queue.test.ts
new file mode 100644
index 0000000000..6149876883
--- /dev/null
+++ b/packages/coding-agent/test/mcp-activation-queue.test.ts
@@ -0,0 +1,1531 @@
+import { mkdtempSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { getOAuthProvider, resetOAuthProviders } from "@earendil-works/pi-ai/oauth";
+import { type Component, Container, type OverlayHandle, type TUI } from "@earendil-works/pi-tui";
+import { afterEach, beforeAll, beforeEach, describe, expect, test, vi } from "vitest";
+import type { McpRemoveAccountResult } from "../src/core/mcp/connection-store.js";
+import { ProviderAuthFlows, type ProviderAuthFlowsHost } from "../src/modes/interactive/auth-flows.js";
+import { writeFileAtomicSync } from "../src/utils/atomic-file.js";
+
+// The atomic write is the seam for finalize write-failure regressions; every
+// other test keeps the real implementation.
+vi.mock("../src/utils/atomic-file.js", async (importOriginal) => {
+ const actual = await importOriginal<typeof import("../src/utils/atomic-file.js")>();
+ return { ...actual, writeFileAtomicSync: vi.fn(actual.writeFileAtomicSync) };
+});
+
+import { AuthStorage } from "../src/core/auth-storage.js";
+import { McpConnectionStore } from "../src/core/mcp/connection-store.js";
+
+import type { AgentConnectionSessionEvent } from "../src/modes/agent-connection/index.js";
+import { InteractiveMode } from "../src/modes/interactive/interactive-mode.js";
+import { initTheme } from "../src/modes/interactive/theme/theme.js";
+
+beforeEach(() => {
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(async () => {
+ throw new Error("offline synthetic probe");
+ }),
+ );
+});
+afterEach(() => vi.unstubAllGlobals());
+
+type ActivationQueueThis = {
+ chatContainer: Container;
+ connectionState: { isStreaming: boolean; isCompacting: boolean; messageCount: number };
+ pendingPostRunActivation: { message: string; successMessage: string; connectionOutcome?: unknown } | undefined;
+ agentConnection: { appendCustomMessage: ReturnType<typeof vi.fn> };
+ pulseTimer: ReturnType<typeof setInterval> | undefined;
+ ui: { requestRender: ReturnType<typeof vi.fn> };
+ showStatus: ReturnType<typeof vi.fn>;
+ showWarning: ReturnType<typeof vi.fn>;
+ handleReloadCommand: ReturnType<typeof vi.fn>;
+};
+
+function createFakeMode(): ActivationQueueThis {
+ const fake: ActivationQueueThis = {
+ // Main's patchConnectionState now pulses working state off
+ // chatContainer children; the fake carries a real (empty) container.
+ chatContainer: new Container(),
+ connectionState: { isStreaming: false, isCompacting: false, messageCount: 0 },
+ pendingPostRunActivation: undefined,
+ agentConnection: { appendCustomMessage: vi.fn(async () => {}) },
+ pulseTimer: undefined,
+ ui: { requestRender: vi.fn() },
+ showStatus: vi.fn(),
+ showWarning: vi.fn(),
+ handleReloadCommand: vi.fn(async () => true),
+ };
+ Object.setPrototypeOf(fake, InteractiveMode.prototype);
+ return fake;
+}
+
+function callPrivate<TThis extends object, TResult>(name: string, self: TThis, ...args: unknown[]): TResult {
+ const method = (InteractiveMode.prototype as unknown as Record<string, (...args: unknown[]) => TResult>)[name];
+ return method.apply(self, args);
+}
+
+const ACME_URL = "https://mcp.acme.test/mcp";
+
+/** A synthetic OAuth grant bound to the given endpoint. */
+const grant = (access: string, endpoint = ACME_URL, at = Date.now()) => ({
+ type: "oauth" as const,
+ access,
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint,
+});
+
+/** A store record for the account fixture. */
+const _account = (connectionId: string, status: "connected" | "error" | "pending" = "connected", at = Date.now()) => ({
+ connectionId,
+ serviceId: "acme",
+ endpoint: ACME_URL,
+ label: connectionId === "acme" ? "Acme" : `Acme (${connectionId})`,
+ status,
+ ...(status === "connected" ? { verifiedAt: at, toolCount: 2 } : {}),
+ createdAt: at,
+ updatedAt: at,
+});
+
+/** The /mcp `login <name>` command on the guarded-connect seam. */
+const callMcpLogin = (fake: Record<string, unknown>, name: string) =>
+ (
+ fake as unknown as {
+ handleMcpCommand: (this: unknown, args: string | undefined) => Promise<void>;
+ }
+ ).handleMcpCommand.call(fake, `login ${name}`);
+
+/** connectServiceFromPicker on the prototype seam. */
+const callPickerAction = (
+ fake: Record<string, unknown>,
+ service: unknown,
+ target: unknown,
+ options: unknown = {},
+): Promise<unknown> =>
+ (
+ fake as unknown as {
+ connectServiceFromPicker: (this: unknown, ...args: unknown[]) => Promise<unknown>;
+ }
+ ).connectServiceFromPicker.call(fake, service, target, options);
+
+/** A name-routed login through connectMcpAccountByName (resolved-but-not-committed). */
+const _callLoginByName = (fake: Record<string, unknown>, name: string) =>
+ (
+ fake as unknown as {
+ connectMcpAccountByName: (
+ this: unknown,
+ name: string,
+ ) => Promise<{ resolved: boolean; result: { status: string } }>;
+ }
+ ).connectMcpAccountByName.call(fake, name);
+
+/**
+ * Resolve once the queued activation's reload starts: the mock's own invocation
+ * is the concrete completion signal — no timer, no polling.
+ */
+function reloadSignal(target: ActivationQueueThis): Promise<void> {
+ return new Promise((resolve) => {
+ target.handleReloadCommand.mockImplementation(async () => {
+ resolve();
+ return true;
+ });
+ });
+}
+
+describe("ENG-6108 MCP activation queue at safe boundaries", () => {
+ let mode: ActivationQueueThis;
+
+ beforeAll(() => {
+ // Overlay components (the generic /logout selector) need the theme.
+ initTheme("dark");
+ });
+
+ beforeEach(() => {
+ mode = createFakeMode();
+ });
+
+ test.each([
+ { boundary: "agent_end", state: "streaming" },
+ { boundary: "compaction_end", state: "compacting" },
+ ])(
+ "queues a login made mid-$state and activates automatically at the $boundary — never says /reload",
+ async ({ boundary, state }) => {
+ mode.connectionState.isStreaming = state === "streaming";
+ mode.connectionState.isCompacting = state === "compacting";
+ await callPrivate("reloadAfterMcpChange", mode, "Connected Notion.");
+
+ // Deferred: no reload yet, and the message must not tell the user to run /reload.
+ expect(mode.handleReloadCommand).not.toHaveBeenCalled();
+ expect(mode.showStatus).toHaveBeenCalledWith(
+ "Connected Notion. It will activate automatically when the current turn finishes.",
+ );
+ expect(JSON.stringify(mode.showStatus.mock.calls)).not.toContain("/reload");
+
+ // The boundary fires: activation runs.
+ const reloaded = reloadSignal(mode);
+ callPrivate("updateConnectionStateFromEvent", mode, { type: boundary } as AgentConnectionSessionEvent);
+ await reloaded;
+ expect(mode.handleReloadCommand).toHaveBeenCalledTimes(1);
+ expect(mode.showStatus).toHaveBeenCalledWith("Connected Notion.");
+ expect(mode.pendingPostRunActivation).toBeUndefined();
+ },
+ );
+
+ test("waits for both streaming and compaction to finish before activating, and a settled activation never runs twice", async () => {
+ mode.connectionState.isStreaming = true;
+ mode.connectionState.isCompacting = true;
+ await callPrivate("reloadAfterMcpChange", mode, "Connected Notion.");
+
+ // Streaming ends but compaction still holds the boundary: the fire is
+ // fully synchronous (the early return precedes any await), so the mock
+ // not being called is the settled outcome — nothing is pending.
+ callPrivate("updateConnectionStateFromEvent", mode, { type: "agent_end" } as AgentConnectionSessionEvent);
+ expect(mode.handleReloadCommand).not.toHaveBeenCalled();
+
+ const reloaded = reloadSignal(mode);
+ callPrivate("updateConnectionStateFromEvent", mode, {
+ type: "compaction_end",
+ } as AgentConnectionSessionEvent);
+ await reloaded;
+ expect(mode.handleReloadCommand).toHaveBeenCalledTimes(1);
+ // The second boundary fires after the queued activation already ran:
+ // the early return precedes any await, so the settled count is one.
+ callPrivate("updateConnectionStateFromEvent", mode, { type: "agent_end" } as AgentConnectionSessionEvent);
+ expect(mode.handleReloadCommand).toHaveBeenCalledTimes(1);
+ });
+ test("keeps the change queued when the boundary reload fails, with an honest warning", async () => {
+ mode.connectionState.isStreaming = true;
+ await callPrivate("reloadAfterMcpChange", mode, "Connected Notion.");
+ const failedReload = new Promise<void>((resolve) => {
+ mode.handleReloadCommand.mockImplementation(async () => {
+ resolve();
+ return false;
+ });
+ });
+ callPrivate("updateConnectionStateFromEvent", mode, { type: "agent_end" } as AgentConnectionSessionEvent);
+ await failedReload;
+ expect(mode.handleReloadCommand).toHaveBeenCalledTimes(1);
+ expect(mode.showWarning).toHaveBeenCalledWith(
+ "Connected Notion. The change remains saved, but it is not active in this session.",
+ );
+ });
+});
+
+describe("ENG-6108 /plugins stdio server management", () => {
+ type StdioThis = {
+ ui: { requestRender: ReturnType<typeof vi.fn> };
+ showStatus: ReturnType<typeof vi.fn>;
+ showWarning: ReturnType<typeof vi.fn>;
+ handleReloadCommand: ReturnType<typeof vi.fn>;
+ settingsManager: {
+ getGlobalMcpServers: ReturnType<typeof vi.fn>;
+ setGlobalMcpServer: ReturnType<typeof vi.fn>;
+ flush: ReturnType<typeof vi.fn>;
+ };
+ uiServices: { refreshMcpProviders: ReturnType<typeof vi.fn> };
+ };
+
+ function createStdioFake(servers: Record<string, unknown>): StdioThis {
+ const fake: StdioThis = {
+ ui: { requestRender: vi.fn() },
+ showStatus: vi.fn(),
+ showWarning: vi.fn(),
+ handleReloadCommand: vi.fn(async () => true),
+ settingsManager: {
+ getGlobalMcpServers: vi.fn(() => structuredClone(servers)),
+ setGlobalMcpServer: vi.fn(),
+ flush: vi.fn(async () => undefined),
+ },
+ uiServices: { refreshMcpProviders: vi.fn() },
+ };
+ Object.setPrototypeOf(fake, InteractiveMode.prototype);
+ return fake;
+ }
+
+ test("Enter on a connected stdio user server disables it through settings — a real action, not a fake disconnect", async () => {
+ const fake = createStdioFake({
+ local: { type: "stdio", command: "npx", args: ["-y", "some-server"] },
+ });
+ await callPrivate(
+ "connectServiceFromPicker",
+ fake,
+ { serviceId: "local", label: "Local" },
+ { usesOAuth: false, managedBySettings: true, transport: "stdio", name: "local" },
+ );
+
+ expect(fake.settingsManager.setGlobalMcpServer).toHaveBeenCalledWith(
+ "local",
+ { type: "stdio", command: "npx", args: ["-y", "some-server"], enabled: false },
+ true,
+ );
+ expect(fake.settingsManager.flush).toHaveBeenCalled();
+ expect(fake.uiServices.refreshMcpProviders).toHaveBeenCalled();
+ expect(fake.handleReloadCommand).toHaveBeenCalledTimes(1);
+ expect(JSON.stringify(fake.showStatus.mock.calls)).toContain("Disabled local server Local.");
+ });
+
+ test("Enter on an already-disabled stdio server reports the disabled state instead of acting again", async () => {
+ const fake = createStdioFake({
+ local: { type: "stdio", command: "npx", enabled: false },
+ });
+ await callPrivate(
+ "connectServiceFromPicker",
+ fake,
+ { serviceId: "local", label: "Local" },
+ { usesOAuth: false, managedBySettings: true, transport: "stdio", name: "local" },
+ );
+ expect(fake.settingsManager.setGlobalMcpServer).not.toHaveBeenCalled();
+ expect(JSON.stringify(fake.showStatus.mock.calls)).toContain("disabled");
+ });
+
+ test("a vanished stdio settings entry reports it is gone", async () => {
+ const fake = createStdioFake({});
+ await callPrivate(
+ "connectServiceFromPicker",
+ fake,
+ { serviceId: "local", label: "Local" },
+ { usesOAuth: false, managedBySettings: true, transport: "stdio", name: "local" },
+ );
+ expect(fake.settingsManager.setGlobalMcpServer).not.toHaveBeenCalled();
+ expect(JSON.stringify(fake.showStatus.mock.calls)).toContain("no longer present in settings");
+ });
+});
+
+function fakeWithStore(options: { authStorage?: AuthStorage; runMcpLogin?: ReturnType<typeof vi.fn> } = {}) {
+ const store = McpConnectionStore.open(join(mkdtempSync(join(tmpdir(), "guarded-")), "mcp-connections.json"));
+ const authStorage = options.authStorage ?? AuthStorage.inMemory();
+ const showStatus = vi.fn();
+ const showWarning = vi.fn();
+ const appendCustomMessage = vi.fn(async (_message: Record<string, unknown>) => {});
+ const fake = {
+ agentConnection: { appendCustomMessage },
+ mcpConnectionStore: store,
+ modelRegistry: { authStorage },
+ ...(options.runMcpLogin ? { createAuthFlows: () => ({ runMcpLogin: options.runMcpLogin }) } : {}),
+ ui: { requestRender: vi.fn() },
+ showStatus,
+ showWarning,
+ handleReloadCommand: vi.fn(async () => true),
+ uiServices: {
+ settingsManager: {
+ getGlobalMcpServers: () => undefined,
+ getMcpCatalogSources: () => [],
+ },
+ },
+ } as unknown as Record<string, unknown>;
+ Object.setPrototypeOf(fake, InteractiveMode.prototype);
+ return { fake, store, authStorage, showStatus, showWarning, appendCustomMessage };
+}
+
+describe("ENG-6108 guarded credential commit", () => {
+ beforeAll(() => initTheme("dark"));
+ const callAddAccount = (fake: Record<string, unknown>) =>
+ (
+ fake as unknown as {
+ connectServiceFromPicker: (this: unknown, ...args: unknown[]) => Promise<void>;
+ }
+ ).connectServiceFromPicker.call(
+ fake,
+ {
+ serviceId: "acme",
+ label: "Add another account",
+ connectionStatus: "not_connected",
+ connectionIds: [],
+ connectable: true,
+ },
+ { url: "https://mcp.acme.test/mcp", usesOAuth: true, managedBySettings: false },
+ { catalogServiceId: "acme", addAccount: true, knownIds: new Set(["acme"]) },
+ );
+
+ /** A login that writes the STAGED credential and runs `midFlight` first. */
+ function stagedLogin(authStorage: AuthStorage, midFlight?: (stagedServerId: string) => void) {
+ return vi.fn(async (serverId: string) => {
+ midFlight?.(serverId);
+ authStorage.set(`mcp:${serverId}`, {
+ type: "oauth",
+ access: `staged-for-${serverId}`,
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ });
+ return { status: "success" } as const;
+ });
+ }
+
+ test("late login SUCCESS after the reservation was removed: the credential never lands and the account stays gone", async () => {
+ const { fake, store, authStorage, showStatus } = fakeWithStore();
+ (fake as unknown as Record<string, unknown>).createAuthFlows = () => ({
+ runMcpLogin: stagedLogin(authStorage, (stagedServerId) => {
+ // Another client removes OUR pending reservation mid-login.
+ const nonce = stagedServerId.split("--")[1];
+ void store.removeReservation("acme-2", nonce);
+ }),
+ });
+ await callAddAccount(fake);
+ // The real account key NEVER received the late credential.
+ expect(authStorage.get("mcp:acme-2")).toBeUndefined();
+ // No staged leftovers and no resurrected record.
+ expect(store.get("acme-2")).toBeUndefined();
+ const stagedLeftovers = authStorage.list().filter((id) => id.startsWith("mcp:acme-2--"));
+ expect(stagedLeftovers).toEqual([]);
+ expect(JSON.stringify(showStatus.mock.calls)).toContain("logged out or replaced during login");
+ });
+
+ test("logoutMcpAccount resolves exact ids first, cancels pending attempts, and preserves completed records", async () => {
+ const { fake, store, authStorage } = fakeWithStore();
+ const at = Date.now();
+ const logoutAccount = (
+ InteractiveMode.prototype as unknown as {
+ logoutMcpAccount: (this: unknown, providerId: string) => Promise<McpRemoveAccountResult>;
+ }
+ ).logoutMcpAccount;
+ // A completed account whose id itself contains "--": EXACT resolution wins (never an unconditional nonce split);
+ // the completed record is PRESERVED and its credential removed.
+ store.upsert({
+ connectionId: "my--service-1",
+ serviceId: "my--service",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme (my--service-1)",
+ status: "connected",
+ createdAt: at,
+ updatedAt: at,
+ });
+ authStorage.set("mcp:my--service-1", grant("real-for-my--service-1", "https://mcp.acme.test/mcp", at));
+ await expect(logoutAccount.call(fake, "mcp:my--service-1")).resolves.toBe("preserved");
+ expect(authStorage.get("mcp:my--service-1")).toBeUndefined();
+ expect(store.get("my--service-1")?.status).toBe("connected");
+ // A staged key maps back ONLY through its recorded attempt nonce: the
+ // pending attempt is cancelled AND the staged credential is removed.
+ const mine = "nonce-abc";
+ await store.reserveConnectionId({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme (acme-2)",
+ status: "pending",
+ createdAt: at,
+ updatedAt: at,
+ attemptId: mine,
+ });
+ authStorage.set("mcp:acme-2--nonce-abc", grant("staged-for-attempt", "https://mcp.acme.test/mcp", at));
+ // A staged-key logout CANCELS the attempt but PRESERVES the account shell: the state-neutral "refused" outcome, the
+ // staged credential removed, the nonce invalidated, the record kept (removal is the explicit Remove action's job).
+ await expect(logoutAccount.call(fake, "mcp:acme-2--nonce-abc")).resolves.toBe("refused");
+ expect(authStorage.get("mcp:acme-2--nonce-abc")).toBeUndefined();
+ expect(store.get("acme-2")).toBeDefined();
+ expect(store.get("acme-2")?.attemptId).toBeUndefined();
+ // An unrelated id containing "--" with NO recorded attempt is its own
+ // credential-only account (removed, no record involved).
+ authStorage.set("mcp:odd--key", grant("real-for-odd--key", "https://mcp.acme.test/mcp", at));
+ await expect(logoutAccount.call(fake, "mcp:odd--key")).resolves.toBe("credential-only");
+ expect(authStorage.get("mcp:odd--key")).toBeUndefined();
+ });
+
+ test("failed nonce cleanup reports recovery instead of a completed cancellation", async () => {
+ const { fake, store, authStorage, showWarning } = fakeWithStore();
+ fake.createAuthFlows = () => ({ runMcpLogin: async () => ({ status: "cancelled" }) });
+ vi.spyOn(store, "releaseClaim").mockResolvedValue(false);
+ await callAddAccount(fake);
+ expect(store.get("acme-2")?.attemptId).toBeDefined();
+ expect(authStorage.get("mcp:acme-2")).toBeUndefined();
+ expect(JSON.stringify(showWarning.mock.calls)).toContain("Could not confirm login cleanup");
+ });
+
+ test("a success callback without a staged credential fails without reporting login success", async () => {
+ const { fake, store, authStorage, showStatus } = fakeWithStore();
+ fake.createAuthFlows = () => ({ runMcpLogin: async () => ({ status: "success" }) });
+ await callAddAccount(fake);
+ expect(store.get("acme-2")?.attemptId).toBeUndefined();
+ expect(store.get("acme-2")?.status).toBe("pending");
+ expect(authStorage.get("mcp:acme-2")).toBeUndefined();
+ expect(JSON.stringify(showStatus.mock.calls)).not.toContain("Login succeeded");
+ });
+
+ test("a direct login on a CONNECTED account reconnects through the guarded claim — never the picker disconnect", async () => {
+ const { fake, store, authStorage } = fakeWithStore();
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "connected",
+ verifiedAt: at,
+ toolCount: 2,
+ createdAt: at,
+ updatedAt: at,
+ });
+ authStorage.set("mcp:acme", grant("old-grant", "https://mcp.acme.test/mcp", at));
+ (fake as unknown as Record<string, unknown>).createAuthFlows = () => ({
+ runMcpLogin: vi.fn(async (serverId: string) => {
+ authStorage.set(`mcp:${serverId}`, grant("reconnected-grant", "https://mcp.acme.test/mcp", at));
+ return { status: "success" as const };
+ }),
+ });
+ // LOGIN intent goes DIRECTLY to the guarded operation: the connected record is CLAIMED and CAS-replaced — the
+ // picker's disconnect branch must never run for a login.
+ await store.flush();
+ const { resolved, result } = await (
+ InteractiveMode.prototype as unknown as {
+ connectMcpAccountByName: (
+ this: unknown,
+ name: string,
+ ) => Promise<{
+ resolved: boolean;
+ result: { status: string };
+ }>;
+ }
+ ).connectMcpAccountByName.call(fake, "acme");
+ expect(resolved).toBe(true);
+ expect(result.status).toBe("success");
+ const newGrant = authStorage.get("mcp:acme");
+ expect(newGrant?.type).toBe("oauth");
+ if (newGrant?.type === "oauth") {
+ expect(newGrant.access).toBe("reconnected-grant");
+ }
+ // The record went pending-verification with the nonce consumed — the
+ // account was NOT disconnected (no removeAccount ran).
+ const record = store.get("acme");
+ expect(record?.status).toBe("pending");
+ expect(record?.attemptId).toBeUndefined();
+ });
+
+ test("a cancelled login propagates the actual outcome: resolved but not committed", async () => {
+ const { fake, store, authStorage } = fakeWithStore();
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "error",
+ createdAt: at,
+ updatedAt: at,
+ });
+ authStorage.set("mcp:acme", grant("old-grant", "https://mcp.acme.test/mcp", at));
+ (fake as unknown as Record<string, unknown>).createAuthFlows = () => ({
+ runMcpLogin: vi.fn(async () => ({ status: "cancelled" as const })),
+ });
+ await store.flush();
+ const { resolved, result } = await (
+ InteractiveMode.prototype as unknown as {
+ connectMcpAccountByName: (
+ this: unknown,
+ name: string,
+ ) => Promise<{
+ resolved: boolean;
+ result: { status: string };
+ }>;
+ }
+ ).connectMcpAccountByName.call(fake, "acme");
+ // Resolution and login success are SEPARATE: the endpoint resolved, the login did NOT commit — a /login hook maps
+ // this to an honest failure, never a success claim.
+ expect(resolved).toBe(true);
+ expect(result.status).toBe("cancelled");
+ // The account is untouched.
+ expect(store.get("acme")?.status).toBe("error");
+ expect(authStorage.get("mcp:acme")?.type).toBe("oauth");
+ });
+
+ test("a double-hyphen account id resolves EXACTLY through the guarded route — no raw-dialog bypass", async () => {
+ const { fake, store, authStorage } = fakeWithStore();
+ const at = Date.now();
+ store.upsert({
+ connectionId: "my--service-1",
+ serviceId: "my--service",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "My Service (my--service-1)",
+ status: "error",
+ createdAt: at,
+ updatedAt: at,
+ });
+ authStorage.set("mcp:my--service-1", grant("old-grant", "https://mcp.acme.test/mcp", at));
+ let stagedIdSeen = "";
+ (fake as unknown as Record<string, unknown>).createAuthFlows = () => ({
+ runMcpLogin: vi.fn(async (serverId: string) => {
+ stagedIdSeen = serverId;
+ authStorage.set(`mcp:${serverId}`, grant("reconnected-grant", "https://mcp.acme.test/mcp", at));
+ return { status: "success" as const };
+ }),
+ });
+ await store.flush();
+ const { resolved, result } = await (
+ InteractiveMode.prototype as unknown as {
+ connectMcpAccountByName: (
+ this: unknown,
+ name: string,
+ ) => Promise<{
+ resolved: boolean;
+ result: { status: string };
+ }>;
+ }
+ ).connectMcpAccountByName.call(fake, "my--service-1");
+ // The double-hyphen id resolved EXACTLY and went through the guarded
+ // claim (a staged id was handed to the login) — no raw-dialog fallback.
+ expect(resolved).toBe(true);
+ expect(result.status).toBe("success");
+ expect(stagedIdSeen).toMatch(/^my--service-1--/);
+ expect(store.get("my--service-1")?.status).toBe("pending");
+ });
+
+ test("a login whose captured old grant was DELETED externally refuses (CAS includes absence) and preserves the shell", async () => {
+ const { fake, store, authStorage, showStatus } = fakeWithStore();
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "error",
+ createdAt: at,
+ updatedAt: at,
+ });
+ authStorage.set("mcp:acme", grant("old-grant", "https://mcp.acme.test/mcp", at));
+ (fake as unknown as Record<string, unknown>).createAuthFlows = () => ({
+ runMcpLogin: vi.fn(async (serverId: string) => {
+ // Mid-login, the old grant is deleted externally (a logout).
+ authStorage.removeVerified("mcp:acme");
+ authStorage.set(`mcp:${serverId}`, grant("late-grant", "https://mcp.acme.test/mcp", at));
+ return { status: "success" as const };
+ }),
+ });
+ await store.flush();
+ const { resolved, result } = await (
+ InteractiveMode.prototype as unknown as {
+ connectMcpAccountByName: (
+ this: unknown,
+ name: string,
+ ) => Promise<{
+ resolved: boolean;
+ result: { status: string };
+ }>;
+ }
+ ).connectMcpAccountByName.call(fake, "acme");
+ expect(resolved).toBe(true);
+ // The CAS compared INCLUDING absence: the deleted old grant is a CHANGED
+ // state — the late login refuses, never reactivating the account.
+ expect(result.status).toBe("failed");
+ expect(authStorage.get("mcp:acme")).toBeUndefined();
+ expect(authStorage.list().filter((id) => id.startsWith("mcp:acme--"))).toEqual([]);
+ // The shell survives with our claim nonce released.
+ const record = store.get("acme");
+ expect(record?.status).toBe("error");
+ expect(record?.attemptId).toBeUndefined();
+ expect(JSON.stringify(showStatus.mock.calls)).toContain("discarded");
+ });
+
+ // A cancelled fresh login preserving the shell against mid-dialog state changes is the SAME
+ // guarded-CAS family as the surviving races below ("late login SUCCESS after the reservation
+ // was removed", "a login whose captured old grant was DELETED externally", "same id, new
+ // owner") and the store-level bystander refusal in mcp-connection-store.test.ts.
+
+ test("an error-state reconnect routes through the guarded claim: full-identity CAS, pending-verification, nonce consumed", async () => {
+ const { fake, store, authStorage, appendCustomMessage } = fakeWithStore();
+ const at = Date.now();
+ // An EXISTING account: an error record with a real (old) credential and
+ // stale verification fields that must NOT carry onto the new grant.
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "error",
+ verifiedAt: at - 9999,
+ toolCount: 3,
+ lastError: "http_unauthorized",
+ createdAt: at,
+ updatedAt: at,
+ });
+ const oldCredential = {
+ type: "oauth" as const,
+ access: "old-grant",
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ };
+ authStorage.set("mcp:acme", oldCredential);
+ let stagedIdSeen = "";
+ (fake as unknown as Record<string, unknown>).createAuthFlows = () => ({
+ runMcpLogin: vi.fn(async (serverId: string) => {
+ // The login ONLY ever sees the staged id — never the real one.
+ stagedIdSeen = serverId;
+ authStorage.set(`mcp:${serverId}`, grant("new-grant", "https://mcp.acme.test/mcp", at));
+ return { status: "success" as const };
+ }),
+ });
+ await callPickerAction(
+ fake,
+ {
+ serviceId: "acme",
+ label: "Acme",
+ connectionStatus: "error",
+ connectable: true,
+ usesOAuth: true,
+ source: "catalog",
+ connectionIds: ["acme"],
+ },
+ { url: "https://mcp.acme.test/mcp", usesOAuth: true, managedBySettings: false },
+ {},
+ );
+ // The login was handed the STAGED id only.
+ expect(stagedIdSeen).toMatch(/^acme--/);
+ // The FULL-IDENTITY CAS replaced the old grant...
+ const replacedCredential = authStorage.get("mcp:acme");
+ expect(replacedCredential?.type).toBe("oauth");
+ if (replacedCredential?.type === "oauth") {
+ expect(replacedCredential.access).toBe("new-grant");
+ }
+ // ...the record is PENDING-VERIFICATION with the nonce CONSUMED and the
+ // old verification state cleared (no stale Connected/verifiedAt).
+ const record = store.get("acme");
+ expect(record?.status).toBe("pending");
+ expect(record?.attemptId).toBeUndefined();
+ expect(record?.verifiedAt).toBeUndefined();
+ expect(record?.toolCount).toBeUndefined();
+ // The OLD failure detail never carries onto the new grant (a fresh verification failure of its own is honest).
+ expect(record?.lastError).not.toBe("http_unauthorized");
+ // No staged leftovers.
+ expect(authStorage.list().filter((id) => id.startsWith("mcp:acme--"))).toEqual([]);
+ // The offline verification outcome is the durable entry: the login
+ // succeeded and the wording never claims Connected.
+ expect(appendCustomMessage).toHaveBeenCalledTimes(1);
+ const [appended] = appendCustomMessage.mock.calls[0]!;
+ expect(appended.content).toContain("Login succeeded for Acme");
+ expect(appended.content).not.toContain("Connected Acme");
+ expect(appended.details).toMatchObject({ label: "Acme", source: "login", verification: "unverified" });
+ });
+
+ test("a cancelled reconnect preserves the existing credential and account unchanged", async () => {
+ const { fake, store, authStorage } = fakeWithStore();
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "connected",
+ verifiedAt: at,
+ toolCount: 2,
+ createdAt: at,
+ updatedAt: at,
+ });
+ const oldCredential = {
+ type: "oauth" as const,
+ access: "old-grant",
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ };
+ authStorage.set("mcp:acme", oldCredential);
+ (fake as unknown as Record<string, unknown>).createAuthFlows = () => ({
+ runMcpLogin: vi.fn(async () => ({ status: "cancelled" as const })),
+ });
+ await callPickerAction(
+ fake,
+ {
+ serviceId: "acme",
+ label: "Acme",
+ connectionStatus: "error",
+ connectable: true,
+ usesOAuth: true,
+ source: "catalog",
+ connectionIds: ["acme"],
+ },
+ { url: "https://mcp.acme.test/mcp", usesOAuth: true, managedBySettings: false },
+ {},
+ );
+ // The claim was RELEASED: the record keeps its status with NO nonce...
+ const record = store.get("acme");
+ expect(record?.status).toBe("connected");
+ expect(record?.attemptId).toBeUndefined();
+ expect(record?.verifiedAt).toBe(at);
+ // ...and the old credential survives byte-for-byte.
+ expect(authStorage.get("mcp:acme")).toEqual(oldCredential);
+ expect(authStorage.list().filter((id) => id.startsWith("mcp:acme--"))).toEqual([]);
+ });
+
+ // A late success being discarded against a mid-login state change is pinned by the surviving
+ // CAS races below (reservation removed, grant deleted, new owner) and the staged-key logout
+ // cancellation in "logoutMcpAccount resolves exact ids first"; the staged-credential discard
+ // path is shared by all of them.
+
+ test("the REAL generic /logout fired inside the finalize commit is never defeated by the race", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "mcp-auth-"));
+ const authPath = join(tempDir, "auth.json");
+ const clientA = AuthStorage.create(authPath);
+ const clientB = AuthStorage.create(authPath);
+ const { fake, store, showStatus } = fakeWithStore({ authStorage: clientA });
+ const at = Date.now();
+ // The account key holds a REAL credential from client B's ordinary login.
+ clientB.set("mcp:acme-2", {
+ type: "oauth",
+ access: "ordinary-login-for-acme-2",
+ refresh: "r2",
+ expires: at + 7200_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ });
+ // The REAL generic /logout route, driven on client B (which sees the
+ // account credential) with the REAL prototype handler wired.
+ const routeOverlays: Component[] = [];
+ const overlayHandle = (): OverlayHandle => ({
+ hide: vi.fn(),
+ setHidden: vi.fn(),
+ isHidden: () => false,
+ focus: vi.fn(),
+ unfocus: vi.fn(),
+ isFocused: () => true,
+ });
+ const routeShowOverlay = vi.fn((component: Component) => {
+ routeOverlays.push(component);
+ return overlayHandle();
+ });
+ const routeHost: ProviderAuthFlowsHost = {
+ ui: {
+ terminal: { columns: 80, rows: 24 },
+ requestRender: vi.fn(),
+ showOverlay: routeShowOverlay,
+ } as unknown as TUI,
+ modelRegistry: {
+ authStorage: clientB,
+ refresh: vi.fn(),
+ getAll: () => [],
+ getProviderDisplayName: (providerId: string) => providerId,
+ getProviderAuthStatus: () => clientB.getAuthStatus("mcp:acme-2"),
+ } as unknown as ProviderAuthFlowsHost["modelRegistry"],
+ showStatus: (message: string) => showStatus(message),
+ showError: vi.fn(),
+ // #2331 inline-auth surface: the route host must mount auth panels
+ // inline; tracked like overlays so the test can inspect them.
+ showAuthPanel: (component: Component) => {
+ routeOverlays.push(component);
+ return () => {
+ const index = routeOverlays.lastIndexOf(component);
+ if (index !== -1) {
+ routeOverlays.splice(index, 1);
+ }
+ };
+ },
+ getAuthPanelRows: () => 24,
+ getAvailableModels: async () => [],
+ onMcpAccountLogout: (providerId) =>
+ (
+ InteractiveMode.prototype as unknown as {
+ logoutMcpAccount: (this: unknown, providerId: string) => Promise<McpRemoveAccountResult>;
+ }
+ ).logoutMcpAccount.call(fake, providerId),
+ };
+ let routePromise: Promise<string | null> | undefined;
+ (fake as unknown as Record<string, unknown>).createAuthFlows = () => ({
+ runMcpLogin: stagedLogin(clientA, () => {
+ // Mid-login (staged written, reservation held): open the REAL
+ // route and filter to the account, leaving the confirm pending.
+ routePromise = new ProviderAuthFlows(routeHost).runLogout();
+ for (const char of "acme-2") {
+ routeOverlays[0]?.handleInput?.(char);
+ }
+ }),
+ });
+ // The barrier: the route's selection confirms INSIDE the finalize's locked commit. The OLD code (logout before the
+ // store critical section) deleted the credential right here, and the commit then moved our staged credential in —
+ // the logout was defeated.
+ const originalMove = clientA.moveStagedCredential.bind(clientA);
+ clientA.moveStagedCredential = (stagedProvider: string, provider: string) => {
+ routeOverlays[0]?.handleInput?.("\r");
+ return originalMove(stagedProvider, provider);
+ };
+ await callAddAccount(fake);
+ await routePromise;
+ // #2331 inline-auth surface: the route mounted its selector through
+ // showAuthPanel (tracked in routeOverlays), never an overlay popup.
+ expect(routeShowOverlay).not.toHaveBeenCalled();
+ // The route's logout is NEVER defeated: no credential at the account key.
+ const fresh = AuthStorage.create(authPath);
+ expect(fresh.get("mcp:acme-2")).toBeUndefined();
+ // No staged leftovers and no surviving record.
+ expect(fresh.list().filter((id) => id.startsWith("mcp:acme-2--"))).toEqual([]);
+ expect(store.get("acme-2")).toBeUndefined();
+ // The route reported an honest logout.
+ expect(JSON.stringify(showStatus.mock.calls)).toContain("Logged out of acme-2");
+ });
+
+ test("a bystander written by ANOTHER client's ordinary login survives finalization (two real storage instances)", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "mcp-auth-"));
+ const authPath = join(tempDir, "auth.json");
+ const clientA = AuthStorage.create(authPath);
+ const clientB = AuthStorage.create(authPath);
+ const { fake, store, showStatus } = fakeWithStore({ authStorage: clientA });
+ const bystander = {
+ type: "oauth" as const,
+ access: "ordinary-login-for-acme-2",
+ refresh: "r2",
+ expires: Date.now() + 7200_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ };
+ (fake as unknown as Record<string, unknown>).createAuthFlows = () => ({
+ runMcpLogin: stagedLogin(clientA, () => {
+ // ANOTHER client's ordinary login writes the real account key after our staging, before our finalize. Client A's
+ // per-instance cache never sees it — only the on-disk conditional move under the auth backend's own file lock can
+ // refuse the clobber.
+ clientB.set("mcp:acme-2", bystander);
+ }),
+ });
+ await callAddAccount(fake);
+ // A fresh reader of the shared credential file sees the bystander
+ // credential byte-for-byte — never our staged value.
+ const fresh = AuthStorage.create(authPath);
+ expect(fresh.get("mcp:acme-2")).toEqual(bystander);
+ // Our staged credential was discarded...
+ expect(fresh.list().filter((id) => id.startsWith("mcp:acme-2--"))).toEqual([]);
+ // ...and the account SHELL is PRESERVED (the occupancy refusal saw the newer external credential: only OUR nonce
+ // was released, the record never deleted) so the bystander stays visible and manageable.
+ const preservedShell = store.get("acme-2");
+ expect(preservedShell?.status).toBe("pending");
+ expect(preservedShell?.attemptId).toBeUndefined();
+ expect(JSON.stringify(showStatus.mock.calls)).toContain("discarded");
+ });
+
+ // A direct logout leaving an honest unbound record (no corruption) is the last-writer-wins
+ // case pinned by "logoutMcpAccount resolves exact ids first..." above (real key logout →
+ // removed) and the unbound-record error honesty in mcp-manager.test.ts ("records an error
+ // (reconnect) once when demand-driven verification finds an unbound grant").
+
+ test("a removeAccount whose AUTH-file write fails never reports the logout done (fresh reader sees the credential survive)", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "mcp-auth-"));
+ const authPath = join(tempDir, "auth.json");
+ const authStorage = AuthStorage.create(authPath);
+ const { fake, store, showWarning, showStatus } = fakeWithStore({ authStorage });
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme (acme-2)",
+ status: "connected",
+ createdAt: at,
+ updatedAt: at,
+ });
+ authStorage.set("mcp:acme-2", grant("real-for-acme-2", "https://mcp.acme.test/mcp", at));
+ // Fail ONLY the AUTH-file write (the durable logout): the account must
+ // NOT be reported removed/disconnected while the credential survives.
+ const actualModule =
+ await vi.importActual<typeof import("../src/utils/atomic-file.js")>("../src/utils/atomic-file.js");
+ const real = actualModule.writeFileAtomicSync;
+ vi.mocked(writeFileAtomicSync).mockImplementation((...args: Parameters<typeof real>) => {
+ if (String(args[0]).endsWith("auth.json")) {
+ throw new Error("simulated auth write failure");
+ }
+ return real(...args);
+ });
+ await callPickerAction(
+ fake,
+ {
+ serviceId: "acme-2",
+ label: "Acme (acme-2)",
+ connectionStatus: "connected",
+ connectable: false,
+ removeAction: true,
+ },
+ { url: "https://mcp.acme.test/mcp", usesOAuth: true, managedBySettings: false },
+ {},
+ );
+ vi.mocked(writeFileAtomicSync).mockImplementation(real);
+ // A FRESH reader of the auth file sees the credential SURVIVE on disk...
+ const freshReader = AuthStorage.create(authPath);
+ const survivor = freshReader.get("mcp:acme-2");
+ expect(survivor?.type).toBe("oauth");
+ if (survivor?.type === "oauth") {
+ expect(survivor.access).toBe("real-for-acme-2");
+ }
+ // ...and the connection RECORD survives too: a failed verified logout
+ // never persists its record deletion (nothing was cancelled).
+ expect(store.get("acme-2")?.status).toBe("connected");
+ // The record also survives (nothing durable was committed).
+ expect(AuthStorage.create(authPath).list()).toContain("mcp:acme-2");
+ // The wording is state-neutral (never "Removed"/"Disconnected").
+ const calls = JSON.stringify([...showWarning.mock.calls, ...showStatus.mock.calls]);
+ expect(calls).toContain("could not be saved");
+ expect(calls).toContain("try removing account acme-2 again");
+ expect(calls).not.toContain("Removed account");
+ expect(calls).not.toContain("Disconnected");
+ });
+
+ test("a removeAccount whose record write fails after the logout reports the honest partial state", async () => {
+ const { fake, store, authStorage, showWarning, showStatus } = fakeWithStore();
+ // A real record AND a real credential for the account.
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme (acme-2)",
+ status: "connected",
+ createdAt: at,
+ updatedAt: at,
+ });
+ authStorage.set("mcp:acme-2", grant("real-for-acme-2", "https://mcp.acme.test/mcp", at));
+ // Fail ONLY the connection-RECORD write: the durable auth-file logout
+ // (removeVerified) must succeed first, then the record save fails.
+ const actualModule =
+ await vi.importActual<typeof import("../src/utils/atomic-file.js")>("../src/utils/atomic-file.js");
+ const real = actualModule.writeFileAtomicSync;
+ vi.mocked(writeFileAtomicSync).mockImplementation((...args: Parameters<typeof real>) => {
+ if (String(args[0]).includes("mcp-connections.json")) {
+ throw new Error("simulated remove write failure");
+ }
+ return real(...args);
+ });
+ // Drive the REAL removeAction branch.
+ await callPickerAction(
+ fake,
+ {
+ serviceId: "acme-2",
+ label: "Acme (acme-2)",
+ connectionStatus: "connected",
+ connectable: false,
+ removeAction: true,
+ },
+ { url: "https://mcp.acme.test/mcp", usesOAuth: true, managedBySettings: false },
+ {},
+ );
+ vi.mocked(writeFileAtomicSync).mockImplementation(real);
+ // The logout is PRESERVED (credential gone from DISK, removeVerified); the record survives on disk.
+ expect(authStorage.get("mcp:acme-2")).toBeUndefined();
+ expect(store.get("acme-2")).toBeDefined();
+ // The wording reports the honest partial state and never claims the account is still connected.
+ const calls = JSON.stringify([...showWarning.mock.calls, ...showStatus.mock.calls]);
+ expect(calls).toContain("Logged out account acme-2");
+ expect(calls).toContain("could not be saved");
+ expect(calls).toContain("try again to finish cleanup");
+ expect(calls).not.toContain("still connected");
+ });
+
+ test("a finalize whose record write fails: credentials restored to staged, account key untouched, reservation released, honest message", async () => {
+ const { fake, store, authStorage, showStatus } = fakeWithStore();
+ (fake as unknown as Record<string, unknown>).createAuthFlows = () => ({
+ runMcpLogin: stagedLogin(authStorage),
+ });
+ // Fail exactly the SECOND atomic write: the reserve commit succeeds; the
+ // finalize's record write fails, so its compensation must run.
+ const actualModule =
+ await vi.importActual<typeof import("../src/utils/atomic-file.js")>("../src/utils/atomic-file.js");
+ const real = actualModule.writeFileAtomicSync;
+ let writeCount = 0;
+ vi.mocked(writeFileAtomicSync).mockImplementation((...args: Parameters<typeof real>) => {
+ writeCount += 1;
+ if (writeCount === 2) {
+ throw new Error("simulated finalize write failure");
+ }
+ return real(...args);
+ });
+ try {
+ await callAddAccount(fake);
+ // All-or-nothing: the REAL account key never received the credential...
+ expect(authStorage.get("mcp:acme-2")).toBeUndefined();
+ // ...the staged credential was compensated then discarded...
+ const stagedLeftovers = authStorage.list().filter((id) => id.startsWith("mcp:acme-2--"));
+ expect(stagedLeftovers).toEqual([]);
+ // The durable shell remains, but our login nonce is released.
+ expect(store.get("acme-2")?.status).toBe("pending");
+ expect(store.get("acme-2")?.attemptId).toBeUndefined();
+ const calls = JSON.stringify(showStatus.mock.calls);
+ expect(calls).toContain("could not be saved");
+ expect(calls).toContain("Account settings for acme-2 were kept");
+ } finally {
+ vi.mocked(writeFileAtomicSync).mockImplementation(real);
+ }
+ });
+
+ test("same id, new owner: a replaced reservation is finalized by ITS attempt only; the stale attempt's credential is discarded", async () => {
+ const { fake, store, authStorage, showStatus } = fakeWithStore();
+ (fake as unknown as Record<string, unknown>).createAuthFlows = () => ({
+ runMcpLogin: stagedLogin(authStorage, (stagedServerId) => {
+ // The first attempt is cancelled; a second client wins the same id
+ // with its own nonce and stores its own credential.
+ const nonce = stagedServerId.split("--")[1];
+ void store.removeReservation("acme-2", nonce);
+ const now = Date.now();
+ authStorage.set("mcp:acme-2", grant("second-owner-credential", "https://mcp.acme.test/mcp"));
+ store.upsert({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme (acme-2)",
+ status: "pending",
+ createdAt: now,
+ updatedAt: now,
+ attemptId: `second-owner-${now}`,
+ });
+ void store.flush();
+ }),
+ });
+ await callAddAccount(fake);
+ // The new owner's credential is intact; the stale attempt's staged
+ // credential was discarded, never overwriting the account.
+ expect(authStorage.get("mcp:acme-2")).toMatchObject({
+ access: "second-owner-credential",
+ });
+ expect(store.get("acme-2")).toBeDefined();
+ const stagedLeftovers = authStorage.list().filter((id) => id.startsWith("mcp:acme-2--"));
+ expect(stagedLeftovers).toEqual([]);
+ expect(JSON.stringify(showStatus.mock.calls)).toContain("logged out or replaced during login");
+ });
+
+ test("a /mcp login on a PENDING account performs a guarded reconnect, never just a verification", async () => {
+ const { fake, store, authStorage } = fakeWithStore();
+ fake.uiServices = {
+ settingsManager: {
+ getGlobalMcpServers: () => ({ acme: { type: "http", url: "https://mcp.acme.test/mcp" } }),
+ getMcpCatalogSources: () => [],
+ },
+ };
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "pending",
+ createdAt: at,
+ updatedAt: at,
+ });
+ authStorage.set("mcp:acme", grant("existing-grant", "https://mcp.acme.test/mcp", at));
+ let stagedIdSeen = "";
+ fake.createAuthFlows = () => ({
+ runMcpLogin: vi.fn(async (serverId: string) => {
+ stagedIdSeen = serverId;
+ authStorage.set(`mcp:${serverId}`, grant("reconnect-credential", "https://mcp.acme.test/mcp", at));
+ return { status: "success" as const };
+ }),
+ });
+ await store.flush();
+ await callMcpLogin(fake, "acme");
+ // LOGIN intent runs the guarded reconnect (claim + staged login + CAS
+ // finalize) even on a pending account — never a verification-only retry.
+ expect(stagedIdSeen).toMatch(/^acme--/);
+ expect((authStorage.get("mcp:acme") as { access: string } | undefined)?.access).toBe("reconnect-credential");
+ expect(store.get("acme"), "the account record must survive a login").toBeDefined();
+ });
+
+ test("an explicit /mcp login repairs a vanished-source account at its durable saved endpoint; a bare pending shell without evidence cannot log in", async () => {
+ const at = Date.now();
+ // Repair evidence: a verified record plus its bound grant at the saved
+ // endpoint — the record is the only surviving definition.
+ const repaired = fakeWithStore();
+ repaired.store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://old.acme.test/mcp",
+ label: "Acme",
+ status: "connected",
+ verifiedAt: at,
+ toolCount: 2,
+ createdAt: at,
+ updatedAt: at,
+ });
+ repaired.authStorage.set("mcp:acme", {
+ type: "oauth",
+ access: "existing-grant",
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint: "https://old.acme.test/mcp",
+ });
+ let sawStagedId = false;
+ repaired.fake.createAuthFlows = () => ({
+ runMcpLogin: vi.fn(async (serverId: string) => {
+ sawStagedId = serverId.startsWith("acme--");
+ repaired.authStorage.set(`mcp:${serverId}`, grant("repaired-credential", "https://old.acme.test/mcp", at));
+ return { status: "success" as const };
+ }),
+ });
+ await repaired.store.flush();
+ await callMcpLogin(repaired.fake, "acme");
+ expect(sawStagedId, "the saved endpoint plus bound grant is repair evidence").toBe(true);
+ expect((repaired.authStorage.get("mcp:acme") as { access: string } | undefined)?.access).toBe(
+ "repaired-credential",
+ );
+
+ // A pending shell WITHOUT evidence (no credential, no verification) refuses.
+ const bare = fakeWithStore();
+ await bare.store.reserveConnectionId({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://old.acme.test/mcp",
+ label: "Acme",
+ status: "pending",
+ createdAt: at,
+ updatedAt: at,
+ attemptId: "shell",
+ });
+ await bare.store.releaseClaim({ connectionId: "acme", attemptId: "shell" });
+ bare.fake.createAuthFlows = () => ({
+ runMcpLogin: vi.fn(async (serverId: string) => {
+ throw new Error(`no login may start without evidence, got ${serverId}`);
+ }),
+ });
+ await callMcpLogin(bare.fake, "acme");
+ expect(JSON.stringify(bare.showStatus.mock.calls)).toContain("restore its source");
+ expect(bare.authStorage.get("mcp:acme")).toBeUndefined();
+ expect(bare.store.get("acme")).toBeDefined();
+ });
+
+ describe("ENG-6108 token paste flow (picker action seam, offline verification)", () => {
+ const PASTE_URL = "https://api.githubcopilot.com/mcp/";
+ const SECRET = "ghp_live-secret-token-value";
+
+ function pasteFake(prompt: ReturnType<typeof vi.fn>) {
+ const built = fakeWithStore();
+ Object.assign(built.fake, { promptForMcpTokenValues: prompt });
+ return built;
+ }
+
+ /** The picker's paste action: `ran` marks a flow that started, so the
+ * chain re-enters; a blocked paste reports ran:false and the status line
+ * is the outcome. */
+ function callPaste(fake: Record<string, unknown>, url: string, label: string): Promise<{ ran: boolean }> {
+ return (
+ fake as unknown as {
+ connectServiceFromPicker: (
+ this: unknown,
+ service: unknown,
+ target: unknown,
+ options?: unknown,
+ ) => Promise<{ ran: boolean }>;
+ }
+ ).connectServiceFromPicker.call(
+ fake,
+ {
+ serviceId: "github",
+ label,
+ connectionStatus: "setup_required",
+ connectionIds: [],
+ connectable: false,
+ usesOAuth: false,
+ pasteToken: true,
+ },
+ { url, usesOAuth: false, managedBySettings: false },
+ {},
+ );
+ }
+
+ test("stores the single-credential static token under the owning connection's key and verifies with it", async () => {
+ const credentialsSeen: unknown[] = [];
+ const built = pasteFake(
+ vi.fn(async (_definition: unknown, credential: unknown) => {
+ credentialsSeen.push(credential);
+ return SECRET;
+ }),
+ );
+ await expect(callPaste(built.fake, PASTE_URL, "GitHub")).resolves.toEqual({ ran: true });
+ // The seam receives the ONE credential — GitHub's two fields collapse
+ // to a single PAT under its first alternative id.
+ expect(credentialsSeen).toHaveLength(1);
+ expect(credentialsSeen[0]).toMatchObject({
+ field: expect.objectContaining({ id: "GITHUB_PAT_TOKEN" }),
+ fieldIds: ["GITHUB_PAT_TOKEN", "GITHUB_PERSONAL_ACCESS_TOKEN"],
+ });
+ // The credential lands under the SAME key OAuth uses, with the honest single-credential static-token shape: bound
+ // to the endpoint, no oauth fields faked, no multi-value map.
+ expect(built.authStorage.get("mcp:github")).toMatchObject({
+ type: "mcp_static_token",
+ endpoint: PASTE_URL,
+ bearer: SECRET,
+ bearerFieldId: "GITHUB_PAT_TOKEN",
+ });
+ expect(Object.keys(built.authStorage.get("mcp:github") ?? {})).not.toContain("values");
+ // The offline probe failed honestly: saved, never Connected.
+ expect(built.store.get("github")?.status).toBe("pending");
+ expect(built.store.get("github")?.verifiedAt).toBeUndefined();
+ // THE leak test: the raw secret appears in NO status or warning call.
+ expect(
+ JSON.stringify([...built.showStatus.mock.calls, ...built.showWarning.mock.calls]).includes(SECRET),
+ ).toBe(false);
+ });
+
+ test.each([undefined, ""])(
+ "a cancelled (value=%s) paste stores nothing and claims nothing, yet still counts as ran",
+ async (value) => {
+ const built = pasteFake(vi.fn(async () => value));
+ await expect(callPaste(built.fake, PASTE_URL, "GitHub")).resolves.toEqual({ ran: true });
+ expect(built.authStorage.get("mcp:github")).toBeUndefined();
+ expect(built.store.get("github")).toBeUndefined();
+ const emitted = JSON.stringify([...built.showStatus.mock.calls, ...built.showWarning.mock.calls]);
+ expect(emitted).not.toContain("Connected");
+ expect(emitted).not.toContain("saved");
+ },
+ );
+
+ test.each([
+ { name: "a login attempt owns the account", url: PASTE_URL, status: "Login in progress" },
+ {
+ name: "the target no longer matches the catalog definition",
+ url: "https://moved.example.test/mcp",
+ status: "target changed",
+ },
+ ])("refuses to paste when $name", async ({ url, status }) => {
+ const at = Date.now();
+ const prompt = vi.fn(async () => SECRET);
+ const built = pasteFake(prompt);
+ if (url === PASTE_URL) {
+ built.store.upsert({
+ connectionId: "github",
+ serviceId: "github",
+ endpoint: PASTE_URL,
+ label: "GitHub",
+ status: "pending",
+ createdAt: at,
+ updatedAt: at,
+ attemptId: "attempt-in-progress",
+ });
+ await built.store.flush();
+ }
+ // Blocked BEFORE the panel opened: ran is false, the status line is
+ // the outcome, and the picker chain does not re-enter.
+ await expect(callPaste(built.fake, url, "GitHub")).resolves.toEqual({ ran: false });
+ expect(prompt).not.toHaveBeenCalled();
+ expect(built.authStorage.get("mcp:github")).toBeUndefined();
+ expect(JSON.stringify(built.showStatus.mock.calls)).toContain(status);
+ });
+ });
+});
+
+describe("ENG-6108 /plugins account state actions", () => {
+ /** The shared fake-mode builder with a default successful login wired. */
+ function fakeFor(options: { authStorage?: AuthStorage; runMcpLogin?: ReturnType<typeof vi.fn> } = {}) {
+ const runMcpLogin = options.runMcpLogin ?? vi.fn(async () => ({ status: "success" }) as const);
+ return { ...fakeWithStore({ ...options, runMcpLogin }), runMcpLogin };
+ }
+
+ const callConnect = (fake: Record<string, unknown>, service: unknown, target: unknown, options: unknown = {}) =>
+ (
+ fake as unknown as {
+ connectServiceFromPicker: (this: unknown, ...args: unknown[]) => Promise<void>;
+ }
+ ).connectServiceFromPicker.call(fake, service, target, options);
+
+ test("pending account retries verification without a new login", async () => {
+ const { fake, store, authStorage, runMcpLogin, appendCustomMessage } = fakeFor({});
+ authStorage.set("mcp:acme-2", grant("second", "https://mcp.acme.test/mcp"));
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme (acme-2)",
+ status: "pending",
+ createdAt: at,
+ updatedAt: at,
+ });
+ const retryStatus = vi.fn();
+ (fake as unknown as Record<string, unknown>).showStatus = retryStatus;
+ await callConnect(
+ fake,
+ { serviceId: "acme-2", label: "Acme · acme-2", connectionStatus: "pending", connectionIds: ["acme-2"] },
+ { url: "https://mcp.acme.test/mcp", usesOAuth: true, managedBySettings: false },
+ { catalogServiceId: "acme" },
+ );
+ expect(runMcpLogin).not.toHaveBeenCalled();
+ // The retry runs the verify path and records the outcome as a DURABLE chat entry: offline the probe fails honestly
+ // and the wording keeps its pending/category state — no login, no /reload ask.
+ expect(appendCustomMessage).toHaveBeenCalledTimes(1);
+ const [appended] = appendCustomMessage.mock.calls[0]!;
+ expect(appended.details).toMatchObject({
+ label: "Acme · acme-2",
+ source: "retry",
+ verification: "unverified",
+ activation: "active",
+ });
+ expect(appended.content).toContain("Verification did not complete");
+ expect(appended.content).toContain("The connection is saved; retry from /plugins.");
+ expect(JSON.stringify(retryStatus.mock.calls)).not.toContain("/reload");
+ expect(JSON.stringify(retryStatus.mock.calls)).not.toContain("Verification did not complete");
+ });
+
+ test("remove action logs out and removes that account's record only", async () => {
+ const { fake, store, authStorage, appendCustomMessage } = fakeFor({});
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme (acme-2)",
+ status: "connected",
+ verifiedAt: at,
+ toolCount: 1,
+ createdAt: at,
+ updatedAt: at,
+ });
+ // The durable logout uses removeVerified (disk-authoritative); a plain
+ // logout() would swallow auth-file write failures.
+ const removeVerified = vi.fn(() => true);
+ authStorage.removeVerified = removeVerified;
+ await callConnect(
+ fake,
+ {
+ serviceId: "acme-2",
+ label: "Remove acme-2",
+ connectionStatus: "connected",
+ connectionIds: ["acme-2"],
+ removeAction: true,
+ },
+ { url: "https://mcp.acme.test/mcp", usesOAuth: true, managedBySettings: false },
+ { catalogServiceId: "acme" },
+ );
+ expect(removeVerified).toHaveBeenCalledWith("mcp:acme-2");
+ expect(store.get("acme-2")).toBeUndefined();
+ // The Remove row records a durable Disconnected entry instead of a status
+ // line that scrolls away (Kevin, live testing).
+ expect(appendCustomMessage).toHaveBeenCalledTimes(1);
+ const [appended] = appendCustomMessage.mock.calls[0]!;
+ expect(appended.details).toMatchObject({ kind: "disconnect", removal: "removed", connectionId: "acme-2" });
+ });
+
+ test("a login whose verification result cannot be saved reports pending, never Connected", async () => {
+ const { fake, appendCustomMessage } = fakeFor({});
+ const brokenStore = {
+ load: vi.fn(),
+ get: vi.fn(() => undefined),
+ records: vi.fn(() => []),
+ flush: vi.fn(async () => undefined),
+ upsert: vi.fn(),
+ remove: vi.fn(),
+ reserveConnectionId: vi.fn(async () => true),
+ claimConnectionId: vi.fn(async () => true),
+ releaseClaim: vi.fn(async () => true),
+ removeReservation: vi.fn(async () => true),
+ finalizeAttempt: vi.fn(async () => "committed"),
+ queueVerifyResult: vi.fn(() => {
+ throw new Error("boom");
+ }),
+ };
+ (fake as unknown as Record<string, unknown>).mcpConnectionStore = brokenStore;
+ await callConnect(
+ fake,
+ {
+ serviceId: "acme",
+ label: "Acme",
+ connectionStatus: "not_connected",
+ connectionIds: [],
+ connectable: true,
+ },
+ { url: "https://mcp.acme.test/mcp", usesOAuth: true, managedBySettings: false },
+ );
+ // The honest pending state lands in the durable outcome message, never
+ // as a transient line and never claiming Connected.
+ expect(appendCustomMessage).toHaveBeenCalledTimes(1);
+ const [appended] = appendCustomMessage.mock.calls[0]!;
+ expect(appended.details).toMatchObject({
+ label: "Acme",
+ source: "login",
+ verification: "unsaved",
+ activation: "active",
+ });
+ expect(appended.content).toContain("Login succeeded for Acme");
+ expect(appended.content).toContain("could not be saved");
+ expect(appended.content).not.toContain("Connected Acme");
+ });
+
+ test("add-account never allocates an id configured as a user server", async () => {
+ const { fake, store, showStatus } = fakeFor({});
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "connected",
+ verifiedAt: at,
+ toolCount: 1,
+ createdAt: at,
+ updatedAt: at,
+ });
+ (fake as unknown as Record<string, unknown>).uiServices = {
+ settingsManager: {
+ getGlobalMcpServers: () => ({ "acme-2": { type: "http", url: "https://x.test/mcp" } }),
+ getMcpCatalogSources: () => [],
+ },
+ };
+ await callConnect(
+ fake,
+ {
+ serviceId: "acme",
+ label: "Add another account",
+ connectionStatus: "not_connected",
+ connectionIds: [],
+ connectable: true,
+ },
+ { url: "https://mcp.acme.test/mcp", usesOAuth: true, managedBySettings: false },
+ { catalogServiceId: "acme", addAccount: true, knownIds: new Set(["acme"]) },
+ );
+ // Skipped the configured acme-2; the allocation landed on acme-3. The synthetic login stages no credential, so the
+ // honest finalize failure wording names the allocated id.
+ expect(JSON.stringify(showStatus.mock.calls)).toContain("acme-3");
+ expect(store.get("acme-2")).toBeUndefined();
+ expect(store.get("acme-3")).toBeDefined();
+ });
+});
+
+describe("ENG-6108 /plugins add-account flow", () => {
+ test("adding an account allocates a new connection id, registers its provider, and records the catalog service id", async () => {
+ resetOAuthProviders();
+ const now = Date.now();
+ const runMcpLogin = vi.fn(async (serverId: string, _label?: string) => {
+ // The login writes the STAGED credential; the guarded finalize commits it under the real account key.
+ fakeAuth.set(`mcp:${serverId}`, grant("synthetic", "https://mcp.acme.test/mcp", now));
+ return { status: "success" } as const;
+ });
+ const built = fakeWithStore({ runMcpLogin });
+ const fakeAuth = built.authStorage;
+ // The first account exists: allocation must land on acme-2, not overwrite. A connected record carries its
+ // verification evidence: the durable endpoint approval the Add-account exception requires.
+ built.store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "connected",
+ verifiedAt: now,
+ toolCount: 2,
+ createdAt: now,
+ updatedAt: now,
+ });
+ const fake = built.fake;
+ const store = built.store;
+ const _authStorage = built.authStorage;
+ const appendCustomMessage = built.appendCustomMessage;
+
+ const callAdd = (fake as unknown as { connectServiceFromPicker: (...args: unknown[]) => Promise<void> })
+ .connectServiceFromPicker;
+ await callAdd.call(
+ fake,
+ { serviceId: "acme", label: "Acme", connectable: true, connectionIds: [], connectionStatus: "not_connected" },
+ { url: "https://mcp.acme.test/mcp", usesOAuth: true, managedBySettings: false },
+ { catalogServiceId: "acme", addAccount: true },
+ );
+
+ // The second account got its OWN id: the login targets the per-attempt STAGED id (<id>--<nonce>); the credential
+ // moves to mcp:acme-2 only through the guarded finalize.
+ const loginCall = runMcpLogin.mock.calls[0];
+ expect(loginCall?.[1]).toBe("Acme (acme-2)");
+ expect(String(loginCall?.[0])).toMatch(/^acme-2--[0-9a-f-]{36}$/);
+ // After the guarded finalize the staged registration is gone; the REAL account provider is registered for the id.
+ expect(getOAuthProvider("mcp:acme-2")).toBeDefined();
+ const record = store.get("acme-2");
+ expect(record?.connectionId).toBe("acme-2");
+ expect(record?.serviceId).toBe("acme");
+ // The first account is untouched.
+ expect(store.get("acme")?.status).toBe("connected");
+ // The connect outcome is a durable chat entry naming the new account.
+ expect(appendCustomMessage).toHaveBeenCalledTimes(1);
+ const [appended] = appendCustomMessage.mock.calls[0]!;
+ expect(appended.content).toContain("Added account acme-2.");
+ expect(appended.details).toMatchObject({
+ connectionId: "acme-2",
+ addedAccount: true,
+ source: "login",
+ });
+ resetOAuthProviders();
+ });
+});
diff --git a/packages/coding-agent/test/mcp-catalog-eligibility.test.ts b/packages/coding-agent/test/mcp-catalog-eligibility.test.ts
new file mode 100644
index 0000000000..7557d2f97a
--- /dev/null
+++ b/packages/coding-agent/test/mcp-catalog-eligibility.test.ts
@@ -0,0 +1,472 @@
+// Authoritative ENG-6108 MCP catalog eligibility regressions, driven against the REAL generated catalog data and the
+// ONE shared oauthGrantUsable predicate. The matrix asserts the SAME answer across every consumer that previously
+// diverged: system-prompt eligibility (getEnabledPersistentGenericServers), kernel dispatch (mcp.config), and the
+// picker/inventory view builders. The catalog cap section pins installed-row protection (still-in-source AND
+// vanished-source), and the explicit >500-installed soft-discovery diagnostic. Offline only: in-memory or temp-file
+// auth/records, no network, no provider calls; env vars are set and restored inside tests.
+
+import { mkdtempSync, rmSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { afterEach, beforeEach, describe, expect, it } from "vitest";
+import { type AuthCredential, AuthStorage, type McpStaticTokenCredential } from "../src/core/auth-storage.js";
+
+import { type McpConnectionRecord, McpConnectionStore } from "../src/core/mcp/connection-store.js";
+import { McpManager } from "../src/core/mcp/mcp-manager.js";
+import {
+ buildPluginViews,
+ defaultServiceCatalogProvider,
+ type McpServiceDescriptor,
+ oauthGrantUsable,
+} from "../src/core/mcp/service-catalog.js";
+
+const ENDPOINT = "https://matrix.example.test/mcp";
+
+function descriptor(overrides: Partial<McpServiceDescriptor>): McpServiceDescriptor {
+ return {
+ serviceId: "matrix-service",
+ label: "Matrix Service",
+ aliases: [],
+ transport: { type: "http", url: ENDPOINT },
+ authStrategy: "none",
+ setup: { status: "ready" },
+ metadataReviewed: true,
+ legacyBuiltin: false,
+ ...overrides,
+ };
+}
+
+function _record(serviceId: string): McpConnectionRecord {
+ const now = Date.now();
+ return {
+ connectionId: serviceId,
+ serviceId,
+ endpoint: ENDPOINT,
+ label: `Matrix (${serviceId})`,
+ status: "connected",
+ createdAt: now,
+ updatedAt: now,
+ };
+}
+
+describe("MCP catalog eligibility (authoritative real-data regressions)", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let store: McpConnectionStore;
+ const savedEnv: Record<string, string | undefined> = {};
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "mcp-eligibility-"));
+ authStorage = AuthStorage.create(join(tempDir, "auth.json"));
+ store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ });
+
+ afterEach(() => {
+ for (const [key, value] of Object.entries(savedEnv)) {
+ if (value === undefined) delete process.env[key];
+ else process.env[key] = value;
+ }
+ for (const key of Object.keys(savedEnv)) delete savedEnv[key];
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ function managerFor(options: {
+ services?: readonly McpServiceDescriptor[];
+ userServers?: Record<string, unknown>;
+ }): McpManager {
+ return new McpManager({
+ authStorage,
+ connectionStore: store,
+ noBackgroundVerification: true,
+ getServiceCatalog: () => options.services ?? [],
+ getUserServers: () => (options.userServers ?? undefined) as never,
+ });
+ }
+
+ async function configFor(manager: McpManager, server: string): Promise<Record<string, unknown>> {
+ const handler = manager.hostHandlers()["mcp.config"];
+ if (!handler) throw new Error("mcp.config handler missing");
+ return handler({ server });
+ }
+
+ function viewFor(
+ services: readonly McpServiceDescriptor[],
+ server: string,
+ ): ReturnType<typeof buildPluginViews>[number] | undefined {
+ return buildPluginViews({
+ services,
+ userServers: undefined,
+ authStorage,
+ connectionStore: store,
+ }).find((view) => view.serviceId === server);
+ }
+
+ it("sweeps the REAL catalog: no row is enabled without proven credentials, and the sweep is meaningful", async () => {
+ const descriptors = defaultServiceCatalogProvider()();
+ // The sweep must actually cover the strategies Bugbot found divergent: real api_key rows and real unknown rows.
+ // none+ready is asserted to be exactly zero TODAY so catalog drift forces a conscious update here. Post-2026-09-16
+ // single-credential cut: 68 rows (57 one-click DCR, 11 one-paste user-setup), of which 10 are api_key strategy and
+ // 53 unknown. The thresholds below stay where they were — the cuts removed 6 api_key rows, 1 oauth row, and no
+ // unknown rows.
+ expect(descriptors.length).toBeGreaterThan(50);
+ expect(descriptors.filter((d) => d.authStrategy === "api_key").length).toBeGreaterThanOrEqual(10);
+ expect(descriptors.filter((d) => d.authStrategy === "unknown").length).toBeGreaterThanOrEqual(50);
+ expect(descriptors.filter((d) => d.authStrategy === "none").length).toBe(0);
+
+ const manager = managerFor({ services: descriptors });
+ const enabled = manager.getEnabledPersistentGenericServers();
+ expect(enabled, "with empty credentials no real catalog row may be enabled").toEqual([]);
+ expect(manager.listStatus().every((row) => !row.enabled)).toBe(true);
+
+ // Setup-field env presence must NEVER be inferred as a credential —
+ // even for the one real api_key row that NAMES its env var.
+ const aws = descriptors.find((d) => d.serviceId === "aws-devops-agent");
+ expect(aws?.authStrategy).toBe("api_key");
+ savedEnv.DEVOPS_AGENT_TOKEN = process.env.DEVOPS_AGENT_TOKEN;
+ process.env.DEVOPS_AGENT_TOKEN = "inferred-secret";
+ try {
+ const envManager = managerFor({ services: descriptors });
+ expect(envManager.getEnabledPersistentGenericServers()).not.toContain("aws-devops-agent");
+ expect(await configFor(envManager, "aws-devops-agent")).toEqual({});
+ expect(envManager.listStatus().find((row) => row.server === "aws-devops-agent")?.enabled).toBe(false);
+ } finally {
+ if (savedEnv.DEVOPS_AGENT_TOKEN === undefined) delete process.env.DEVOPS_AGENT_TOKEN;
+ else process.env.DEVOPS_AGENT_TOKEN = savedEnv.DEVOPS_AGENT_TOKEN;
+ delete savedEnv.DEVOPS_AGENT_TOKEN;
+ }
+ });
+
+ // The aws-devops-agent env-presence refusal is asserted inside the REAL catalog sweep above.
+
+ it.each([
+ ["none+ready is credential-free eligible", descriptor({}), true],
+ ["none+requires-setup fails closed", descriptor({ setup: { status: "requires-setup" } }), false],
+ ["api_key requires-setup fails closed (env unset)", descriptor({ authStrategy: "api_key" }), false],
+ ["unknown without a credential fails closed", descriptor({ authStrategy: "unknown" }), false],
+ ])("%s across prompt and dispatch", async (_name, service, expectedEnabled) => {
+ const manager = managerFor({ services: [service as McpServiceDescriptor] });
+ const enabled = manager.getEnabledPersistentGenericServers();
+ const configured = await configFor(manager, (service as McpServiceDescriptor).serviceId);
+ if (expectedEnabled) {
+ expect(enabled).toContain((service as McpServiceDescriptor).serviceId);
+ expect(configured).not.toEqual({});
+ } else {
+ expect(enabled).not.toContain((service as McpServiceDescriptor).serviceId);
+ expect(configured, "dispatch must not serve an unproven catalog row").toEqual({});
+ const status = viewFor(
+ [service as McpServiceDescriptor],
+ (service as McpServiceDescriptor).serviceId,
+ )?.connectionStatus;
+ if ((service as McpServiceDescriptor).authStrategy === "unknown") {
+ // OAuth-gated rows are RECONNECTABLE (not_connected + connect),
+ // not setup_required — only api_key/requires-setup rows are.
+ expect(status).toBe("not_connected");
+ } else {
+ expect(status).toBe("setup_required");
+ }
+ }
+ });
+
+ it("a none+requires-setup row never renders as connectable in the picker", () => {
+ const service = descriptor({ setup: { status: "requires-setup" } });
+ const view = viewFor([service], service.serviceId);
+ expect(view?.connectionStatus).toBe("setup_required");
+ expect(view?.connectable).toBe(false);
+ });
+
+ it("OAuth grant states agree across the shared predicate, prompt, dispatch, and the picker view", async () => {
+ const service = descriptor({ authStrategy: "oauth" });
+ const bound = {
+ type: "oauth" as const,
+ access: "valid-token",
+ refresh: "refresh-token",
+ expires: Date.now() + 3600_000,
+ endpoint: ENDPOINT,
+ };
+ // The OAuthCredentials TYPE requires refresh: string; the shared predicate treats FALSY refresh as no-refresh
+ // (Boolean(refresh), the status resolver's semantics), so "" is the type-clean fixture.
+ const cases: ReadonlyArray<{
+ name: string;
+ credential: AuthCredential;
+ enabled: boolean;
+ reason: string | undefined;
+ }> = [
+ { name: "valid bound grant", credential: bound, enabled: true, reason: undefined },
+ {
+ name: "expired grant WITH refresh stays usable (dispatch refreshes)",
+ credential: { ...bound, access: "stale", expires: Date.now() - 1000 },
+ enabled: true,
+ reason: undefined,
+ },
+ {
+ name: "expired grant WITHOUT refresh fails closed",
+ credential: { ...bound, access: "stale", refresh: "", expires: Date.now() - 1000 },
+ enabled: false,
+ reason: "expired-no-refresh",
+ },
+ {
+ // Intentionally wrong-typed so the guard is exercised on the TYPE, with an endpoint that MATCHES — the old
+ // endpoint-only check passed exactly this shape, so this is the authoritative wrong-type regression.
+ name: "wrong-type credential fails closed",
+ credential: {
+ type: "api_key",
+ key: "not-oauth",
+ endpoint: ENDPOINT,
+ } as unknown as AuthCredential,
+ enabled: false,
+ reason: "wrong-type",
+ },
+ {
+ name: "empty-access credential fails closed",
+ credential: { ...bound, access: "" },
+ enabled: false,
+ reason: "empty-access",
+ },
+ {
+ name: "unbound credential fails closed",
+ credential: { ...bound, endpoint: undefined },
+ enabled: false,
+ reason: "unbound",
+ },
+ {
+ name: "cross-endpoint credential fails closed",
+ credential: { ...bound, endpoint: "https://other.example.test/mcp" },
+ enabled: false,
+ reason: "cross-endpoint",
+ },
+ ];
+ for (const testCase of cases) {
+ authStorage.set(`mcp:${service.serviceId}`, testCase.credential);
+ const usable = oauthGrantUsable(authStorage.get(`mcp:${service.serviceId}`), ENDPOINT);
+ expect(usable.reason, `${testCase.name}: shared predicate reason`).toBe(testCase.reason);
+ const manager = managerFor({ services: [service] });
+ const enabled = manager.getEnabledPersistentGenericServers();
+ const configured = await configFor(manager, service.serviceId);
+ const view = viewFor([service], service.serviceId);
+ if (testCase.enabled) {
+ expect(enabled, testCase.name).toContain(service.serviceId);
+ expect(configured, testCase.name).not.toEqual({});
+ } else {
+ expect(enabled, testCase.name).not.toContain(service.serviceId);
+ expect(configured, testCase.name).toEqual({});
+ if (usable.reason === "expired-no-refresh") {
+ expect(view?.setupHint, testCase.name).toContain("expired without a refresh token");
+ }
+ if (usable.reason === "unbound" || usable.reason === "cross-endpoint") {
+ expect(view?.setupHint, testCase.name).toContain("not bound to this endpoint");
+ }
+ }
+ }
+ });
+
+ it("user-declared servers keep their semantics, but a configured bearer env var is the ONLY credential source", async () => {
+ // Anonymous HTTP: the user owns the auth decision; stays enabled.
+ let manager = managerFor({
+ services: [],
+ userServers: { anonymous: { type: "http", url: "https://anon.example.test/mcp" } },
+ });
+ expect(manager.getEnabledPersistentGenericServers()).toContain("anonymous");
+ expect(await configFor(manager, "anonymous")).not.toEqual({});
+
+ // stdio: unchanged.
+ manager = managerFor({
+ services: [],
+ userServers: { local: { type: "stdio", command: "run-me" } },
+ });
+ expect(manager.getEnabledPersistentGenericServers()).toContain("local");
+
+ // disabled: excluded everywhere.
+ manager = managerFor({
+ services: [],
+ userServers: { off: { type: "stdio", command: "no", enabled: false } },
+ });
+ expect(manager.getEnabledPersistentGenericServers()).not.toContain("off");
+
+ // Bearer env UNSET: must fail closed even though a stale OAuth grant for the same id is bound to the same endpoint
+ // (the old stale-OAuth fall-through Bugbot flagged).
+ authStorage.set("mcp:bearer", {
+ type: "oauth" as const,
+ access: "stale-oauth-token",
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ endpoint: "https://bearer.example.test/mcp",
+ });
+ manager = managerFor({
+ services: [],
+ userServers: {
+ bearer: { type: "http", url: "https://bearer.example.test/mcp", bearerTokenEnvVar: "MATRIX_BEARER" },
+ },
+ });
+ expect(
+ manager.getEnabledPersistentGenericServers(),
+ "unset bearer env must fail closed with no stale-OAuth fallback",
+ ).not.toContain("bearer");
+ // A user-declared config is the user's own: mcp.config serves it and the kernel fails late at connection time. The
+ // stale-OAuth regression is the eligibility exclusion above, which must hold even with a bound grant stored under
+ // the same id.
+ expect((await configFor(manager, "bearer")).bearerTokenEnvVar).toBe("MATRIX_BEARER");
+
+ // Bearer env SET: enabled and served.
+ savedEnv.MATRIX_BEARER = process.env.MATRIX_BEARER;
+ process.env.MATRIX_BEARER = "configured-bearer";
+ manager = managerFor({
+ services: [],
+ userServers: {
+ bearer: { type: "http", url: "https://bearer.example.test/mcp", bearerTokenEnvVar: "MATRIX_BEARER" },
+ },
+ });
+ expect(manager.getEnabledPersistentGenericServers()).toContain("bearer");
+ expect(await configFor(manager, "bearer")).not.toEqual({});
+ });
+});
+
+describe("MCP catalog token services (paste flow) eligibility and dispatch", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let store: McpConnectionStore;
+ const savedEnv: Record<string, string | undefined> = {};
+ const GITHUB_URL = "https://api.githubcopilot.com/mcp/";
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "mcp-token-eligibility-"));
+ authStorage = AuthStorage.create(join(tempDir, "auth.json"));
+ store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ });
+
+ afterEach(() => {
+ for (const [key, value] of Object.entries(savedEnv)) {
+ if (value === undefined) delete process.env[key];
+ else process.env[key] = value;
+ }
+ for (const key of Object.keys(savedEnv)) delete savedEnv[key];
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ function managerFor(options: {
+ services?: readonly McpServiceDescriptor[];
+ userServers?: Record<string, unknown>;
+ }): McpManager {
+ return new McpManager({
+ authStorage,
+ connectionStore: store,
+ noBackgroundVerification: true,
+ getServiceCatalog: () => options.services ?? [],
+ getUserServers: () => (options.userServers ?? undefined) as never,
+ });
+ }
+
+ async function configFor(manager: McpManager, server: string): Promise<Record<string, unknown>> {
+ const handler = manager.hostHandlers()["mcp.config"];
+ if (!handler) throw new Error("mcp.config handler missing");
+ return handler({ server });
+ }
+
+ function storedGithubToken(overrides: Partial<McpStaticTokenCredential> = {}): McpStaticTokenCredential {
+ return {
+ type: "mcp_static_token",
+ endpoint: GITHUB_URL,
+ bearer: "ghp_pasted-token",
+ bearerFieldId: "GITHUB_PAT_TOKEN",
+ createdAt: Date.now(),
+ ...overrides,
+ };
+ }
+
+ it("a stored pasted token enables the real github row with the setup env var UNSET", async () => {
+ const descriptors = defaultServiceCatalogProvider()();
+ // The setup fields NAME env vars; they stay UNSET and unread.
+ savedEnv.GITHUB_PAT_TOKEN = process.env.GITHUB_PAT_TOKEN;
+ delete process.env.GITHUB_PAT_TOKEN;
+ savedEnv.GITHUB_PERSONAL_ACCESS_TOKEN = process.env.GITHUB_PERSONAL_ACCESS_TOKEN;
+ delete process.env.GITHUB_PERSONAL_ACCESS_TOKEN;
+
+ authStorage.set("mcp:github", storedGithubToken());
+ const manager = managerFor({ services: descriptors });
+ expect(manager.getEnabledPersistentGenericServers()).toContain("github");
+ expect(manager.listStatus().find((row) => row.server === "github")?.enabled).toBe(true);
+ const config = await configFor(manager, "github");
+ expect(config).toMatchObject({
+ type: "http",
+ url: GITHUB_URL,
+ credentialSource: "static-token",
+ });
+ });
+
+ it("a stored pasted token enables nothing else: eligibility binds to the exact id and endpoint", async () => {
+ const descriptors = defaultServiceCatalogProvider()();
+ authStorage.set("mcp:github", storedGithubToken());
+ const manager = managerFor({ services: descriptors });
+ const enabled = manager.getEnabledPersistentGenericServers();
+ expect(enabled).toContain("github");
+ // Every other token service stays closed (its id has no credential).
+ for (const serviceId of ["pagerduty", "sonatype-guide", "zoom"]) {
+ expect(enabled, serviceId).not.toContain(serviceId);
+ }
+ // A token bound to another endpoint never serves this row.
+ authStorage.set("mcp:pagerduty", storedGithubToken());
+ const other = managerFor({ services: descriptors });
+ expect(other.getEnabledPersistentGenericServers()).not.toContain("pagerduty");
+ expect(await configFor(other, "pagerduty")).toEqual({});
+ });
+
+ it("github still fails closed with no stored token even when its setup env vars are set", async () => {
+ const descriptors = defaultServiceCatalogProvider()();
+ savedEnv.GITHUB_PAT_TOKEN = process.env.GITHUB_PAT_TOKEN;
+ process.env.GITHUB_PAT_TOKEN = "ambient-guess";
+ const manager = managerFor({ services: descriptors });
+ // No inference from field ids: the env var the field NAMES is not a source.
+ expect(manager.getEnabledPersistentGenericServers()).not.toContain("github");
+ expect(await configFor(manager, "github")).toEqual({});
+ });
+
+ it("a wrong-typed or unbound stored credential never enables a token service", async () => {
+ const descriptors = defaultServiceCatalogProvider()();
+ // An OAuth grant stored under the token service id is the wrong type.
+ authStorage.set("mcp:github", {
+ type: "oauth",
+ access: "oauth-grant",
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ endpoint: GITHUB_URL,
+ });
+ let manager = managerFor({ services: descriptors });
+ expect(manager.getEnabledPersistentGenericServers()).not.toContain("github");
+ expect(await configFor(manager, "github")).toEqual({});
+
+ // An unbound pasted token (no endpoint) fails closed too.
+ authStorage.set("mcp:github", storedGithubToken({ endpoint: undefined as never }));
+ manager = managerFor({ services: descriptors });
+ expect(manager.getEnabledPersistentGenericServers()).not.toContain("github");
+ expect(await configFor(manager, "github")).toEqual({});
+ });
+
+ it("a reserved builtin name with a stored pasted token still fails closed under a user shadow", async () => {
+ const reservedTokenService = descriptor({
+ serviceId: "linear",
+ label: "Linear",
+ legacyBuiltin: true,
+ authStrategy: "api_key",
+ setup: {
+ status: "requires-setup",
+ reason: "paste a token",
+ fields: [{ id: "LINEAR_TOKEN", label: "LINEAR_TOKEN", required: true, kind: "bearer-token" }],
+ },
+ });
+ authStorage.set("mcp:linear", {
+ type: "mcp_static_token",
+ endpoint: "https://shadow.example.test/mcp",
+ bearer: "shadow-token",
+ bearerFieldId: "LINEAR_TOKEN",
+ createdAt: Date.now(),
+ });
+ const manager = managerFor({
+ services: [reservedTokenService],
+ userServers: { linear: { type: "http", url: "https://shadow.example.test/mcp", oauth: true } },
+ });
+ expect(
+ manager.getEnabledPersistentGenericServers(),
+ "a shadowed reserved name never dispatches, even with a stored token",
+ ).not.toContain("linear");
+ expect(await configFor(manager, "linear")).toEqual({});
+ });
+});
diff --git a/packages/coding-agent/test/mcp-connection-outcome-message.test.ts b/packages/coding-agent/test/mcp-connection-outcome-message.test.ts
new file mode 100644
index 0000000000..8846362695
--- /dev/null
+++ b/packages/coding-agent/test/mcp-connection-outcome-message.test.ts
@@ -0,0 +1,579 @@
+import { mkdtempSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { resetOAuthProviders } from "@earendil-works/pi-ai/oauth";
+import { type Component, Container, type TUI } from "@earendil-works/pi-tui";
+import stripAnsi from "strip-ansi";
+import { afterAll, afterEach, beforeAll, describe, expect, test, vi } from "vitest";
+import { AuthStorage } from "../src/core/auth-storage.js";
+import { McpConnectionStore } from "../src/core/mcp/connection-store.js";
+import {
+ convertToLlm,
+ createMcpConnectionOutcomeMessage,
+ formatMcpConnectionOutcomeNotice,
+ isMcpConnectionOutcomeMessage,
+ MCP_CONNECTION_OUTCOME_CUSTOM_TYPE,
+} from "../src/core/messages.js";
+import type { AgentConnectionSessionEvent } from "../src/modes/agent-connection/index.js";
+import { buildConversationComponents } from "../src/modes/interactive/components/conversation-components.js";
+import {
+ MalformedMcpConnectionOutcomeMessageComponent,
+ McpConnectionOutcomeMessageComponent,
+} from "../src/modes/interactive/components/mcp-connection-outcome-message.js";
+import { InteractiveMode } from "../src/modes/interactive/interactive-mode.js";
+import { initTheme, theme } from "../src/modes/interactive/theme/theme.js";
+
+// The connect flows verify through the real verifyMcpConnection seam; the
+// emit-site tests pin each outcome variant by controlling it directly.
+const verifyMock = vi.hoisted(() => vi.fn());
+vi.mock("../src/core/mcp/service-catalog.js", async (importOriginal) => {
+ const actual = await importOriginal<typeof import("../src/core/mcp/service-catalog.js")>();
+ return { ...actual, verifyMcpConnection: verifyMock };
+});
+
+function callPrivate<TThis extends object, TResult>(name: string, self: TThis, ...args: unknown[]): TResult {
+ const method = (InteractiveMode.prototype as unknown as Record<string, (...args: unknown[]) => TResult>)[name];
+ return method.apply(self, args);
+}
+
+function rendered(component: Component): string {
+ return stripAnsi(component.render(120).join("\n"))
+ .split("\n")
+ .map((line) => line.trimEnd())
+ .join("\n");
+}
+
+/** Wrapping-aware contains: collapsed bodies wrap across rendered lines. */
+function flat(component: Component): string {
+ return rendered(component).replace(/\s+/g, " ").trim();
+}
+
+function outcomeComponent(details: Parameters<typeof createMcpConnectionOutcomeMessage>[0]) {
+ return new McpConnectionOutcomeMessageComponent(createMcpConnectionOutcomeMessage(details));
+}
+
+const connected = {
+ label: "Linear",
+ source: "login",
+ verification: "connected",
+ toolCount: 12,
+ activation: "active",
+} as const;
+
+describe("McpConnectionOutcomeMessageComponent", () => {
+ beforeAll(() => {
+ initTheme("dark");
+ });
+
+ test("renders a plain connected outcome as the purple diamond header ALONE, never a restated body", () => {
+ const component = outcomeComponent(connected);
+ const output = rendered(component);
+ const lines = output.split("\n");
+ // One line only: the body restated the header ("Connected Linear · 12
+ // tools verified / Connected Linear (12 tools verified).").
+ expect(lines.filter((line) => line.trim()).map((line) => line.trimEnd())).toEqual([
+ " ◆ Connected Linear · 12 tools verified",
+ ]);
+ expect(flat(component)).not.toContain("(12 tools verified)");
+ const raw = component.render(120).join("\n");
+ expect(raw).toContain(theme.fg("refinementHeader", "◆ Connected Linear · 12 tools verified"));
+ expect(raw).not.toContain("Ctrl+O");
+ // The persisted content keeps the full sentence for status-line fallbacks.
+ expect(createMcpConnectionOutcomeMessage(connected).content).toBe("Connected Linear (12 tools verified).");
+ });
+
+ test("the body carries only the detail the header omits, for every variant", () => {
+ expect(flat(outcomeComponent({ ...connected, toolCount: undefined }))).toBe("◆ Connected Linear");
+ expect(
+ flat(
+ outcomeComponent({
+ ...connected,
+ connectionId: "acme-2",
+ addedAccount: true,
+ }),
+ ),
+ ).toBe("◆ Connected Linear · 12 tools verified Added account acme-2.");
+ });
+
+ test("keeps the diamond header for unverified and unsaved outcomes, with the body carrying only the new detail", () => {
+ const unverified = outcomeComponent({
+ label: "Linear",
+ source: "retry",
+ verification: "unverified",
+ issue: "the endpoint rejected the stored credentials (reconnect)",
+ activation: "active",
+ });
+ const unverifiedLines = rendered(unverified)
+ .split("\n")
+ .filter((line) => line.trim());
+ expect(unverifiedLines[0]).toContain("◆");
+ expect(unverifiedLines[0]).toContain("Linear saved");
+ // The body adds the reason and the next step; it never restates the header.
+ expect(flat(unverified)).toContain("Retry from /plugins.");
+ expect(flat(unverified)).not.toMatch(/Verification did not complete.*Verification did not complete/);
+ const unsaved = outcomeComponent({
+ label: "Linear",
+ source: "retry",
+ verification: "unsaved",
+ activation: "active",
+ });
+ const unsavedLines = rendered(unsaved)
+ .split("\n")
+ .filter((line) => line.trim());
+ expect(unsavedLines[0]).toContain("◆");
+ expect(unsavedLines[0]).toContain("Linear saved");
+ expect(flat(unsaved)).toContain("Retry verification");
+ });
+
+ test("names the service, never the picked row, and tells a rejected token what to do", () => {
+ // Kevin, live testing: a fake PAT rendered "[Malformed MCP connection outcome message]" (the guard did not know
+ // source "paste"), and adding an account read "Connected Add another account (linear-2)".
+ const rejected = {
+ label: "GitHub",
+ source: "paste",
+ verification: "unverified",
+ issue: "the endpoint rejected the stored credentials (reconnect)",
+ issueCategory: "http-unauthorized",
+ activation: "active",
+ } as const;
+ const rejectedFlat = flat(outcomeComponent(rejected));
+ expect(rejectedFlat).toContain("Token not accepted");
+ expect(rejectedFlat).toContain("Paste a new token from /mcp.");
+ expect(isMcpConnectionOutcomeMessage(createMcpConnectionOutcomeMessage(rejected))).toBe(true);
+ });
+
+ test("a paste outcome keeps the diamond entry honest: token saved, never 'login succeeded'", () => {
+ const connectedPaste = {
+ label: "GitHub",
+ source: "paste",
+ verification: "connected",
+ toolCount: 9,
+ activation: "active",
+ } as const;
+ expect(flat(outcomeComponent(connectedPaste))).toContain("◆ Connected GitHub");
+ expect(createMcpConnectionOutcomeMessage(connectedPaste).content).toBe("Connected GitHub (9 tools verified).");
+
+ const unverifiedPaste = {
+ label: "GitHub",
+ source: "paste",
+ verification: "unverified",
+ issue: "the endpoint rejected the stored credentials (reconnect)",
+ activation: "active",
+ } as const;
+ expect(flat(outcomeComponent(unverifiedPaste))).toContain("GitHub saved");
+ expect(flat(outcomeComponent(unverifiedPaste))).toContain("Paste a new token from /mcp.");
+ expect(createMcpConnectionOutcomeMessage(unverifiedPaste).content).toBe(
+ "Token saved for GitHub, but connection verification did not complete: the endpoint rejected the stored credentials (reconnect). The connection is saved; retry from /plugins.",
+ );
+
+ const unsavedPaste = {
+ label: "GitHub",
+ source: "paste",
+ verification: "unsaved",
+ activation: "active",
+ } as const;
+ expect(flat(outcomeComponent(unsavedPaste))).toContain("Retry verification from /mcp.");
+ expect(createMcpConnectionOutcomeMessage(unsavedPaste).content).toBe(
+ "Token saved for GitHub, but the verification result could not be saved. The connection is saved; retry from /plugins.",
+ );
+ // The expanded metadata origin names the paste flow.
+ const expanded = new McpConnectionOutcomeMessageComponent(createMcpConnectionOutcomeMessage(unverifiedPaste));
+ expanded.setExpanded(true);
+ expect(rendered(expanded)).toContain("paste flow");
+ });
+
+ test("reports a saved-but-inactive change in the body, not the header", () => {
+ const inactiveFlat = flat(outcomeComponent({ ...connected, activation: "inactive" }));
+ expect(inactiveFlat).toContain("not active in this session.");
+ // The deferred-activation sentence is the ONLY body: no restated header.
+ expect(inactiveFlat).not.toMatch(/Connected Linear.*Connected Linear/);
+ });
+
+ // The unverified-warning colour assertion is folded into "warning outcomes
+ // render the warning diamond, never the success purple or error red".
+ test("warning outcomes render the warning diamond, never the success purple or error red", () => {
+ // Kevin: purple means success. An unfinished verification and a disconnect are warnings — orange diamonds.
+ const component = outcomeComponent({ kind: "disconnect", label: "Granola", removal: "removed" });
+ expect(flat(component)).toContain("◆ Disconnected Granola");
+ const raw = component.render(120).join("\n");
+ expect(raw).toContain(theme.fg("warning", "◆ Disconnected Granola"));
+ expect(raw).not.toContain(theme.fg("refinementHeader", "◆ Disconnected Granola"));
+ expect(raw).not.toContain(theme.fg("error", "◆ Disconnected Granola"));
+ const unverified = {
+ label: "GitHub",
+ source: "paste",
+ verification: "unverified",
+ issue: "the endpoint returned an HTTP error",
+ activation: "active",
+ } as const;
+ const lines = outcomeComponent(unverified).render(120);
+ expect(lines.join("\n")).not.toContain(
+ theme.fg("refinementHeader", "◆ Verification did not complete · GitHub saved"),
+ );
+ expect(lines.join("\n")).not.toContain(theme.fg("refinementSummary", " The endpoint returned an HTTP error"));
+ });
+
+ test("a disconnect body adds only the honest extra state", () => {
+ expect(flat(outcomeComponent({ kind: "disconnect", label: "Granola", removal: "credential-only" }))).toContain(
+ "No saved connection entry existed; the stored credential was removed.",
+ );
+ expect(flat(outcomeComponent({ kind: "disconnect", label: "Granola", removal: "preserved" }))).toContain(
+ "was kept and now shows as not connected.",
+ );
+ });
+
+ test("a disconnect expands to its own metadata line and survives transcript replay", () => {
+ const details = { kind: "disconnect", label: "Granola", removal: "removed", connectionId: "granola" } as const;
+ const component = outcomeComponent(details);
+ component.setExpanded(true);
+ expect(rendered(component)).toContain("account removed · account granola · active in this session");
+ const message = createMcpConnectionOutcomeMessage(details);
+ expect(message.content).toBe("Disconnected Granola.");
+ expect(isMcpConnectionOutcomeMessage(message)).toBe(true);
+ expect(isMcpConnectionOutcomeMessage({ ...message, details: { ...details, removal: "nope" } })).toBe(false);
+ expect(convertToLlm([message])).toEqual([]);
+ const [replay] = buildConversationComponents([message], {
+ ui: {} as TUI,
+ cwd: "/tmp",
+ toolOptions: {},
+ getToolDefinition: () => undefined,
+ });
+ expect(replay).toBeInstanceOf(McpConnectionOutcomeMessageComponent);
+ expect(replay!.render(120)).toEqual(outcomeComponent(details).render(120));
+ });
+
+ test("no rendered outcome line ever contains a newline", () => {
+ const variants = [
+ connected,
+ { ...connected, activation: "inactive" },
+ { label: "L", source: "retry", verification: "unverified", issue: "t" },
+ { kind: "disconnect", label: "G", removal: "credential-only" },
+ ] as const;
+ for (const details of variants) {
+ for (const expanded of [false, true]) {
+ const component = outcomeComponent(details);
+ component.setExpanded(expanded);
+ for (const line of component.render(60)) expect(line).not.toContain("\n");
+ }
+ }
+ });
+
+ // The expand/collapse metadata-line contract is pinned with the transcript-replay test below (the disconnect
+ // variant asserts the metadata line and the replayed component in one place).
+
+ test("replays from the transcript through the conversation renderer, malformed entries included", () => {
+ const message = createMcpConnectionOutcomeMessage(connected);
+ const [replay] = buildConversationComponents([message], {
+ ui: {} as TUI,
+ cwd: "/tmp",
+ toolOptions: {},
+ getToolDefinition: () => undefined,
+ });
+ expect(replay).toBeInstanceOf(McpConnectionOutcomeMessageComponent);
+ expect(replay!.render(120)).toEqual(outcomeComponent(connected).render(120));
+
+ const malformed = {
+ role: "custom" as const,
+ customType: MCP_CONNECTION_OUTCOME_CUSTOM_TYPE,
+ content: "Connected Linear.",
+ display: true,
+ details: { label: 42 },
+ timestamp: 0,
+ };
+ const [broken] = buildConversationComponents([malformed], {
+ ui: {} as TUI,
+ cwd: "/tmp",
+ toolOptions: {},
+ getToolDefinition: () => undefined,
+ });
+ expect(broken).toBeInstanceOf(MalformedMcpConnectionOutcomeMessageComponent);
+ expect(rendered(broken!)).toContain("[Malformed MCP connection outcome message]");
+ });
+
+ test("hides non-displayed outcomes from the transcript renderer", () => {
+ const message = createMcpConnectionOutcomeMessage(connected, false);
+ const components = buildConversationComponents([message], {
+ ui: {} as TUI,
+ cwd: "/tmp",
+ toolOptions: {},
+ getToolDefinition: () => undefined,
+ });
+ expect(components).toHaveLength(0);
+ });
+
+ test("guards the persisted shape and keeps the outcome out of LLM context", () => {
+ const message = createMcpConnectionOutcomeMessage(connected);
+ expect(isMcpConnectionOutcomeMessage(message)).toBe(true);
+ expect(isMcpConnectionOutcomeMessage({ ...message, customType: "other" })).toBe(false);
+ expect(isMcpConnectionOutcomeMessage({ ...message, details: { ...connected, verification: "nope" } })).toBe(
+ false,
+ );
+ expect(convertToLlm([message])).toEqual([]);
+ });
+
+ test("formatMcpConnectionOutcomeNotice keeps the exact legacy wording for every variant", () => {
+ expect(formatMcpConnectionOutcomeNotice(connected)).toBe("Connected Linear (12 tools verified).");
+ expect(
+ formatMcpConnectionOutcomeNotice({
+ label: "Acme (acme-2)",
+ source: "login",
+ verification: "connected",
+ toolCount: 7,
+ connectionId: "acme-2",
+ addedAccount: true,
+ activation: "active",
+ }),
+ ).toBe("Added account acme-2. Connected Acme (acme-2) (7 tools verified).");
+ expect(
+ formatMcpConnectionOutcomeNotice({
+ label: "Linear",
+ source: "login",
+ verification: "unsaved",
+ activation: "active",
+ }),
+ ).toBe(
+ "Login succeeded for Linear, but the verification result could not be saved. The connection is saved; retry from /plugins.",
+ );
+ });
+});
+
+type OutcomeFake = Record<string, unknown> & {
+ agentConnection: { appendCustomMessage: ReturnType<typeof vi.fn> };
+};
+
+function createOutcomeFake(): {
+ fake: OutcomeFake;
+ appendCustomMessage: ReturnType<typeof vi.fn>;
+ store: McpConnectionStore;
+ authStorage: AuthStorage;
+ showStatus: ReturnType<typeof vi.fn>;
+ showWarning: ReturnType<typeof vi.fn>;
+} {
+ const appendCustomMessage = vi.fn(async () => {});
+ const showStatus = vi.fn();
+ const showWarning = vi.fn();
+ const store = McpConnectionStore.open(join(mkdtempSync(join(tmpdir(), "mcp-outcome-")), "mcp-connections.json"));
+ const authStorage = AuthStorage.inMemory();
+ const fake = {
+ agentConnection: { appendCustomMessage },
+ mcpConnectionStore: store,
+ modelRegistry: { authStorage },
+ ui: { requestRender: vi.fn() },
+ showStatus,
+ showWarning,
+ handleReloadCommand: vi.fn(async () => true),
+ connectionState: { isStreaming: false, isCompacting: false, messageCount: 0 },
+ chatContainer: new Container(),
+ pulseTimer: undefined,
+ uiServices: {
+ settingsManager: {
+ getGlobalMcpServers: () => undefined,
+ getMcpCatalogSources: () => [],
+ },
+ },
+ } as unknown as OutcomeFake;
+ Object.setPrototypeOf(fake, InteractiveMode.prototype);
+ return { fake, appendCustomMessage, store, authStorage, showStatus, showWarning };
+}
+
+const retryService = {
+ serviceId: "acme-2",
+ label: "Acme · acme-2",
+ connectionStatus: "pending",
+ connectionIds: ["acme-2"],
+};
+
+const retryTarget = { url: "https://mcp.acme.test/mcp", usesOAuth: true, managedBySettings: false };
+
+function seedPendingRecord(store: McpConnectionStore): void {
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme · acme-2",
+ status: "pending",
+ createdAt: at,
+ updatedAt: at,
+ });
+}
+
+describe("MCP connect outcome emit sites", () => {
+ beforeAll(() => {
+ initTheme("dark");
+ });
+
+ afterEach(() => {
+ verifyMock.mockReset();
+ resetOAuthProviders();
+ });
+
+ afterAll(() => {
+ vi.restoreAllMocks();
+ });
+
+ test("retry verification records a connected outcome as a durable chat message, not a status line", async () => {
+ const { fake, appendCustomMessage, store, showStatus } = createOutcomeFake();
+ seedPendingRecord(store);
+ verifyMock.mockResolvedValue({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: retryTarget.url,
+ label: "Acme · acme-2",
+ status: "connected",
+ verifiedAt: Date.now(),
+ toolCount: 12,
+ createdAt: Date.now(),
+ updatedAt: Date.now(),
+ });
+
+ await callPrivate("connectServiceFromPicker", fake, retryService, retryTarget, { catalogServiceId: "acme" });
+
+ expect(appendCustomMessage).toHaveBeenCalledTimes(1);
+ const [appended] = appendCustomMessage.mock.calls[0]!;
+ expect(appended).toMatchObject({
+ customType: MCP_CONNECTION_OUTCOME_CUSTOM_TYPE,
+ display: true,
+ content: "Connected Acme · acme-2 (12 tools verified).",
+ });
+ expect(appended.details).toEqual({
+ label: "Acme · acme-2",
+ source: "retry",
+ verification: "connected",
+ toolCount: 12,
+ activation: "active",
+ });
+ // The outcome line is no longer a transient status message.
+ expect(JSON.stringify(showStatus.mock.calls)).not.toContain("tools verified");
+ });
+
+ // The saved-but-unverified durable wording is pinned ONCE, at the same retry seam, in mcp-activation-queue.test.ts
+ // ("pending account retries verification without a new login").
+
+ // The added-account durable outcome (details and content) is pinned at the add-account SEAM in
+ // mcp-activation-queue.test.ts ("adding an account allocates a new connection id...").
+
+ // The unsaved-login outcome wording is pinned ONCE, at the picker seam, in mcp-activation-queue.test.ts ("a login
+ // whose verification result cannot be saved reports pending, never Connected").
+
+ test.each([
+ {
+ name: "connect",
+ details: { label: "Linear", source: "login", verification: "connected", toolCount: 3 },
+ deferredStatus:
+ "Connected Linear (3 tools verified). It will activate automatically when the current turn finishes.",
+ expected: { verification: "connected" },
+ reloadSucceeds: true,
+ },
+ {
+ name: "disconnect",
+ details: { kind: "disconnect", label: "Granola", removal: "removed" },
+ deferredStatus: undefined,
+ expected: { kind: "disconnect", removal: "removed", activation: "inactive" },
+ reloadSucceeds: false,
+ },
+ ])(
+ "a mid-stream $name queues the durable outcome for the next safe boundary",
+ async ({ details, deferredStatus, expected, reloadSucceeds }) => {
+ const { fake, appendCustomMessage, showStatus } = createOutcomeFake();
+ (fake as Record<string, unknown>).connectionState = {
+ isStreaming: true,
+ isCompacting: false,
+ messageCount: 0,
+ };
+ if (!reloadSucceeds) {
+ (fake as Record<string, unknown>).handleReloadCommand = vi.fn(async () => false);
+ }
+ await callPrivate("completeMcpConnectionOutcome", fake, details as never);
+ // In-flight only: nothing durable yet; the connect variant's transient line says the activation is deferred.
+ expect(appendCustomMessage).not.toHaveBeenCalled();
+ if (deferredStatus !== undefined) {
+ expect(showStatus).toHaveBeenCalledWith(deferredStatus);
+ }
+ // The queued activation's durable append is the concrete completion signal — never a timer.
+ const boundaryAppend = new Promise<void>((resolve) => {
+ appendCustomMessage.mockImplementation(async () => {
+ resolve();
+ });
+ });
+ callPrivate("updateConnectionStateFromEvent", fake, { type: "agent_end" } as AgentConnectionSessionEvent);
+ await boundaryAppend;
+ const [appended] = appendCustomMessage.mock.calls[0]!;
+ expect(appended.details).toMatchObject(expected);
+ if (reloadSucceeds) {
+ expect(appended.details.activation).toBe("active");
+ }
+ },
+ );
+
+ // A failed reload marking the outcome "inactive" is pinned by the boundary
+ // table's disconnect case (reloadSucceeds: false → activation "inactive")
+ // and the saved-but-inactive body test in the component section.
+
+ test("falls back to the transient line when the durable append fails", async () => {
+ const { fake, showWarning } = createOutcomeFake();
+ (fake as Record<string, unknown>).agentConnection = {
+ appendCustomMessage: vi.fn(async () => {
+ throw new Error("connection down");
+ }),
+ };
+
+ await callPrivate("completeMcpConnectionOutcome", fake, {
+ label: "Linear",
+ source: "login",
+ verification: "connected",
+ toolCount: 3,
+ });
+
+ expect(showWarning).toHaveBeenCalledWith("Connected Linear (3 tools verified).");
+ });
+});
+
+/** Seed a connected account plus its credential, the state a disconnect acts on. */
+function seedConnectedAccount(store: McpConnectionStore, authStorage: AuthStorage, connectionId: string): void {
+ const at = Date.now();
+ store.upsert({
+ connectionId,
+ serviceId: "granola",
+ endpoint: "https://mcp.granola.test/mcp",
+ label: "Granola",
+ status: "connected",
+ createdAt: at,
+ updatedAt: at,
+ });
+ authStorage.set(`mcp:${connectionId}`, {
+ type: "oauth",
+ access: "synthetic",
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint: "https://mcp.granola.test/mcp",
+ });
+}
+
+describe("MCP disconnect outcome emit sites", () => {
+ beforeAll(() => {
+ initTheme("dark");
+ });
+
+ // The picker's Remove row recording the durable "◆ Disconnected" entry is pinned end-to-end at the chain seam in
+ // service-catalog-picker.test.ts ("the accounts Disconnect row removes that account and records the durable entry").
+
+ test("a failed /mcp logout warns and records nothing: no entry may claim it is done", async () => {
+ const { fake, appendCustomMessage, store, authStorage, showWarning } = createOutcomeFake();
+ seedConnectedAccount(store, authStorage, "granola");
+ vi.spyOn(authStorage, "removeVerified").mockImplementation(() => {
+ throw new Error("auth file is read-only");
+ });
+
+ await callPrivate("handleMcpCommand", fake, "logout granola");
+
+ expect(appendCustomMessage).not.toHaveBeenCalled();
+ expect(showWarning).toHaveBeenCalledWith("The change could not be saved; try logging out granola again.");
+ vi.restoreAllMocks();
+ });
+
+ // The mid-stream DISCONNECT variant is folded into the boundary table above (failed reload →
+ // activation: "inactive"); the generic /logout route's durable disconnect is pinned at the route
+ // seam in mcp-activation-queue.test.ts ("the REAL generic /logout fired inside the finalize
+ // commit..."), and a refused logout staying honest is pinned in auth-flows.test.ts.
+});
diff --git a/packages/coding-agent/test/mcp-connection-probe.test.ts b/packages/coding-agent/test/mcp-connection-probe.test.ts
new file mode 100644
index 0000000000..ce4204a4d8
--- /dev/null
+++ b/packages/coding-agent/test/mcp-connection-probe.test.ts
@@ -0,0 +1,256 @@
+import { describe, expect, it, vi } from "vitest";
+import { categorizeProbeError, MCP_PROBE_ERRORS, probeMcpEndpoint } from "../src/core/mcp/connection-probe.js";
+
+type FetchCall = { url: string | URL; init: RequestInit };
+
+function jsonRpcResponse(id: number, result: unknown, status = 200): Response {
+ return new Response(JSON.stringify({ jsonrpc: "2.0", id, result }), {
+ status,
+ headers: { "content-type": "application/json" },
+ });
+}
+
+/**
+ * Fake streamable-HTTP MCP server. Responds to initialize, the initialized
+ * notification, tools/list, and session termination; GET streams are declined
+ * (405, allowed by the spec).
+ */
+function createMcpFakeFetch(
+ options: {
+ tools?: Array<{ name: string; inputSchema: { type: string } }>;
+ initializeStatus?: number;
+ initializeBody?: (body: { id?: number }) => Response;
+ sseCrlf?: boolean;
+ onDelete?: () => void;
+ onInitialize?: (body: unknown) => void;
+ deleteNeverReturns?: boolean;
+ } = {},
+) {
+ const calls: FetchCall[] = [];
+ const deletes: unknown[] = [];
+ const fetchImpl = vi.fn(async (url: string | URL, init: RequestInit = {}) => {
+ calls.push({ url, init });
+ const method = init.method ?? "GET";
+ if (method === "DELETE") {
+ deletes.push(init);
+ options.onDelete?.();
+ if (options.deleteNeverReturns) await new Promise(() => {});
+ return new Response(null, { status: 200 });
+ }
+ if (method === "GET") {
+ return new Response(null, { status: 405 });
+ }
+ const body = JSON.parse(String(init.body)) as {
+ id?: number;
+ method: string;
+ params?: { protocolVersion?: string };
+ };
+ if (body.method === "initialize") {
+ options.onInitialize?.(body);
+ if (options.initializeBody) return options.initializeBody(body);
+ if (options.initializeStatus !== undefined && options.initializeStatus !== 200) {
+ return new Response("nope", {
+ status: options.initializeStatus,
+ headers: { "content-type": "text/plain" },
+ });
+ }
+ if (options.sseCrlf) {
+ const payload = JSON.stringify({
+ jsonrpc: "2.0",
+ id: body.id,
+ result: {
+ protocolVersion: body.params?.protocolVersion,
+ capabilities: {},
+ serverInfo: { name: "acme", version: "1.0" },
+ },
+ });
+ return new Response(`event: message\r\ndata: ${payload}\r\n\r\n`, {
+ status: 200,
+ headers: { "content-type": "text/event-stream" },
+ });
+ }
+ const response = jsonRpcResponse(body.id ?? 1, {
+ protocolVersion: body.params?.protocolVersion,
+ capabilities: {},
+ serverInfo: { name: "acme", version: "1.0" },
+ });
+ // A session id makes the SDK's terminateSession send the cleanup DELETE.
+ const headers = new Headers(response.headers);
+ headers.set("mcp-session-id", "probe-session");
+ return new Response(response.body, { status: response.status, headers });
+ }
+ if (body.method === "notifications/initialized") {
+ return new Response(null, { status: 202 });
+ }
+ if (body.method === "tools/list") {
+ return jsonRpcResponse(body.id ?? 2, {
+ tools: options.tools ?? [{ name: "search", inputSchema: { type: "object" } }],
+ });
+ }
+ throw new Error(`unexpected method ${body.method}`);
+ });
+ return { fetchImpl, calls, deletes };
+}
+
+const FAKE_TOKEN = "probe-token-value";
+
+describe("probeMcpEndpoint", () => {
+ it("verifies a handshake through the official SDK and terminates the session", async () => {
+ const server = createMcpFakeFetch({
+ tools: [
+ { name: "a", inputSchema: { type: "object" } },
+ { name: "b", inputSchema: { type: "object" } },
+ { name: "c", inputSchema: { type: "object" } },
+ ],
+ });
+ const result = await probeMcpEndpoint({
+ url: "https://mcp.acme.test/mcp",
+ getToken: () => FAKE_TOKEN,
+ fetchImpl: server.fetchImpl as unknown as typeof fetch,
+ });
+ expect(result).toEqual({ ok: true, toolCount: 3 });
+ // The session is explicitly terminated (HTTP DELETE), not just aborted.
+ expect(server.deletes).toHaveLength(1);
+ // The bearer token reaches requests; no redirect following is allowed.
+ const bodyText = (call: FetchCall): string => (call.init.body === undefined ? "" : String(call.init.body));
+ const initialize = server.calls.find((call) => bodyText(call).includes("initialize"));
+ expect(initialize?.init.redirect).toBe("error");
+ expect((initialize?.init.headers as Headers).get("authorization")).toBe(`Bearer ${FAKE_TOKEN}`);
+ // Subsequent requests carry the negotiated protocol version header (SDK-managed).
+ const toolsList = server.calls.find((call) => bodyText(call).includes("tools/list"));
+ expect((toolsList?.init.headers as Headers).get("mcp-protocol-version")).toBeTruthy();
+ });
+
+ it("parses CRLF-separated SSE responses", async () => {
+ const server = createMcpFakeFetch({ sseCrlf: true });
+ const result = await probeMcpEndpoint({
+ url: "https://mcp.acme.test/mcp",
+ getToken: () => FAKE_TOKEN,
+ fetchImpl: server.fetchImpl as unknown as typeof fetch,
+ });
+ expect(result).toEqual({ ok: true, toolCount: 1 });
+ });
+
+ it("maps a 401 to the fixed unauthorized category without echoing server text", async () => {
+ const server = createMcpFakeFetch({ initializeStatus: 401 });
+ const result = await probeMcpEndpoint({
+ url: "https://mcp.acme.test/mcp?session=SECRET",
+ getToken: () => FAKE_TOKEN,
+ fetchImpl: server.fetchImpl as unknown as typeof fetch,
+ });
+ expect(result).toEqual({ ok: false, error: MCP_PROBE_ERRORS.UNAUTHORIZED });
+ const serialized = JSON.stringify(result);
+ expect(serialized).not.toContain("SECRET");
+ expect(serialized).not.toContain("mcp.acme.test");
+ });
+
+ it("maps network failures (including refused redirects) without echoing the URL", async () => {
+ const result = await probeMcpEndpoint({
+ url: "https://user:[email protected]/mcp?token=QUERY-SECRET",
+ getToken: () => FAKE_TOKEN,
+ fetchImpl: (async () => {
+ throw new TypeError("fetch failed");
+ }) as unknown as typeof fetch,
+ });
+ expect(result).toEqual({ ok: false, error: MCP_PROBE_ERRORS.NETWORK });
+ const serialized = JSON.stringify(result);
+ expect(serialized).not.toContain("user:pass");
+ expect(serialized).not.toContain("QUERY-SECRET");
+ expect(serialized).not.toContain("mcp.acme.test");
+ });
+
+ it("drops server-controlled JSON-RPC error text into a fixed category", async () => {
+ const server = createMcpFakeFetch({
+ initializeBody: (body: { id?: number }) =>
+ new Response(
+ JSON.stringify({
+ jsonrpc: "2.0",
+ id: body.id,
+ error: { code: -32000, message: "token probe-token-value leaked at https://mcp.acme.test/mcp" },
+ }),
+ { status: 200, headers: { "content-type": "application/json" } },
+ ),
+ });
+ const result = await probeMcpEndpoint({
+ url: "https://mcp.acme.test/mcp",
+ getToken: () => FAKE_TOKEN,
+ fetchImpl: server.fetchImpl as unknown as typeof fetch,
+ });
+ expect(result).toEqual({ ok: false, error: MCP_PROBE_ERRORS.SERVER_REJECTED });
+ const serialized = JSON.stringify(result);
+ expect(serialized).not.toContain("probe-token-value");
+ expect(serialized).not.toContain("mcp.acme.test");
+ });
+
+ // Both hang variants verify the probe's own bounds (cleanup grace, response
+ // deadline): it must return instead of hanging forever.
+ it("still returns when the cleanup DELETE never responds", async () => {
+ const server = createMcpFakeFetch({ deleteNeverReturns: true });
+ const started = Date.now();
+ const result = await probeMcpEndpoint({
+ url: "https://mcp.acme.test/mcp",
+ getToken: () => FAKE_TOKEN,
+ cleanupTimeoutMs: 50,
+ fetchImpl: server.fetchImpl as unknown as typeof fetch,
+ });
+ expect(result).toEqual({ ok: true, toolCount: 1 });
+ expect(server.deletes).toHaveLength(1);
+ // Bounded by the cleanup grace, not by an unbounded DELETE.
+ expect(Date.now() - started).toBeLessThan(2000);
+ // test-policy: allow explicit-test-timeout -- the probe's own cleanup-timeout bound is the behavior under test
+ }, 5000);
+
+ it("still returns when the response body never completes", async () => {
+ const fetchImpl = vi.fn(async (_url: string | URL, init: RequestInit = {}) => {
+ const body = JSON.parse(String(init.body)) as { method: string };
+ if (body.method === "initialize") {
+ // Headers arrive; the body stream never yields a byte or closes.
+ return new Response(new ReadableStream({ start() {} }), {
+ status: 200,
+ headers: { "content-type": "application/json", "mcp-session-id": "probe-session" },
+ });
+ }
+ throw new Error(`unexpected method ${body.method}`);
+ });
+ const result = await probeMcpEndpoint({
+ url: "https://mcp.acme.test/mcp",
+ getToken: () => FAKE_TOKEN,
+ timeoutMs: 40,
+ cleanupTimeoutMs: 50,
+ fetchImpl: fetchImpl as unknown as typeof fetch,
+ });
+ expect(result).toEqual({ ok: false, error: MCP_PROBE_ERRORS.TIMEOUT });
+ // test-policy: allow explicit-test-timeout -- the probe's own response-timeout bound is the behavior under test
+ }, 5000);
+
+ it("reports a fixed timeout category when the endpoint hangs", async () => {
+ const result = await probeMcpEndpoint({
+ url: "https://mcp.acme.test/mcp",
+ getToken: () => FAKE_TOKEN,
+ timeoutMs: 40,
+ cleanupTimeoutMs: 50,
+ fetchImpl: (async () => {
+ await new Promise(() => {});
+ }) as unknown as typeof fetch,
+ });
+ expect(result).toEqual({ ok: false, error: MCP_PROBE_ERRORS.TIMEOUT });
+ // test-policy: allow explicit-test-timeout -- the probe's own request-timeout bound is the behavior under test
+ }, 5000);
+});
+
+describe("categorizeProbeError", () => {
+ it("always produces one of the fixed categories, never raw error text", () => {
+ const categories = new Set(Object.values(MCP_PROBE_ERRORS));
+ const samples: unknown[] = [
+ new Error("secret https://x.test token=abc"),
+ "plain string failure",
+ undefined,
+ null,
+ { unexpected: "shape" },
+ ];
+ for (const sample of samples) {
+ const category = categorizeProbeError(sample);
+ expect(categories.has(category)).toBe(true);
+ }
+ });
+});
diff --git a/packages/coding-agent/test/mcp-connection-store.test.ts b/packages/coding-agent/test/mcp-connection-store.test.ts
new file mode 100644
index 0000000000..2a3708ea79
--- /dev/null
+++ b/packages/coding-agent/test/mcp-connection-store.test.ts
@@ -0,0 +1,1086 @@
+import { spawn } from "node:child_process";
+import { randomUUID } from "node:crypto";
+import { existsSync, default as fs, mkdtempSync, rmSync, statSync, writeFileSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { fileURLToPath } from "node:url";
+import lockfile from "proper-lockfile";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { AuthStorage } from "../src/core/auth-storage.js";
+import {
+ logoutMcpAccount,
+ type McpConnectionRecord,
+ McpConnectionStore,
+ resolveMcpAccountLogoutTarget,
+} from "../src/core/mcp/connection-store.js";
+import { writeFileAtomicSync } from "../src/utils/atomic-file.js";
+
+// The store's atomic write is the seam for write-failure regressions; the real
+// implementation stays the default so every other test hits the real disk path.
+vi.mock("../src/utils/atomic-file.js", async (importOriginal) => {
+ const actual = await importOriginal<typeof import("../src/utils/atomic-file.js")>();
+ return { ...actual, writeFileAtomicSync: vi.fn(actual.writeFileAtomicSync) };
+});
+
+// The file lock is the seam for lock-ACQUISITION failure regressions; the real
+// implementation stays the default so every other test takes the real lock.
+vi.mock("proper-lockfile", async (importOriginal) => {
+ const actual = await importOriginal<typeof import("proper-lockfile")>();
+ // CJS interop: default imports resolve through `default`, so expose the
+ // wrapped namespace there too (the store imports lockfile as a default).
+ const wrapped = { ...actual, lock: vi.fn(actual.lock) };
+ return { ...wrapped, default: wrapped };
+});
+
+const TEST_DIR = fileURLToPath(new URL(".", import.meta.url));
+// A file URL stays a valid ESM import specifier on every platform; a resolved
+// absolute OS path does not (Windows drive-letter paths are not specifiers).
+const STORE_MODULE_URL = new URL("../src/core/mcp/connection-store.js", import.meta.url).href;
+
+/**
+ * Real-process first-writer worker. Loaded through the project tsx loader so it
+ * imports the TS store module directly: each child opens the shared store, posts
+ * a ready marker, waits at the file barrier so every process starts its flush
+ * at once, then upserts its own record and flushes. Exit codes: 3 barrier
+ * timeout, 4 lost own record.
+ */
+const FIRST_CREATE_WORKER_SOURCE = `
+import { existsSync, writeFileSync } from "node:fs";
+import { join } from "node:path";
+import { McpConnectionStore } from ${JSON.stringify(STORE_MODULE_URL)};
+const [storePath, barrierPath, readyDir, connectionId] = process.argv.slice(2);
+const store = McpConnectionStore.open(storePath);
+writeFileSync(join(readyDir, "ready-" + connectionId), connectionId);
+const deadline = Date.now() + 10_000;
+while (!existsSync(barrierPath)) {
+ if (Date.now() > deadline) {
+ console.error("barrier timeout");
+ process.exit(3);
+ }
+ await new Promise((resolve) => setTimeout(resolve, 5));
+}
+const now = Date.now();
+store.upsert({
+ connectionId: connectionId,
+ serviceId: connectionId,
+ endpoint: "https://mcp.example.test/mcp",
+ label: connectionId,
+ status: "connected",
+ createdAt: now,
+ updatedAt: now,
+});
+await store.flush();
+if (store.get(connectionId) === undefined) {
+ console.error("worker lost its own record");
+ process.exit(4);
+}
+`;
+
+function recordFixture(connectionId: string, overrides: Partial<McpConnectionRecord> = {}): McpConnectionRecord {
+ const now = Date.now();
+ return {
+ connectionId,
+ serviceId: connectionId,
+ endpoint: `https://mcp.${connectionId}.test/mcp`,
+ label: connectionId,
+ status: "connected",
+ createdAt: now,
+ updatedAt: now,
+ ...overrides,
+ };
+}
+
+describe("McpConnectionStore concurrency", () => {
+ let tempDir: string;
+ let path: string;
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "mcp-store-"));
+ path = join(tempDir, "mcp-connections.json");
+ });
+
+ afterEach(() => {
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("directory preparation failure settles reserve and claim without later ghost mutations", async () => {
+ const blockedDirectory = join(tempDir, "blocked");
+ const blockedPath = join(blockedDirectory, "connections.json");
+ writeFileSync(blockedDirectory, "not a directory");
+ const failed = McpConnectionStore.open(blockedPath);
+ const reserve = failed.reserveConnectionId(
+ recordFixture("fresh", { status: "pending", attemptId: "denied-reserve" }),
+ );
+ const claim = failed.claimConnectionId({ connectionId: "existing", attemptId: "denied-claim" });
+ expect(await reserve).toBe(false);
+ expect(await claim).toBe(false);
+ rmSync(blockedDirectory);
+ const writer = McpConnectionStore.open(blockedPath);
+ writer.upsert(recordFixture("existing"));
+ await writer.flush();
+ await failed.flush();
+ const fresh = McpConnectionStore.open(blockedPath);
+ expect(fresh.get("fresh")).toBeUndefined();
+ expect(fresh.get("existing")?.attemptId).toBeUndefined();
+ });
+
+ it("two instances never lose each other's records on interleaved or racing flushes", async () => {
+ // Interleaved: the second writer has not re-read; the read-modify-write
+ // under the file lock must preserve the first writer's record.
+ const client = McpConnectionStore.open(path);
+ const daemon = McpConnectionStore.open(path);
+ client.upsert(recordFixture("client-service"));
+ await client.flush();
+ daemon.upsert(recordFixture("daemon-service"));
+ await daemon.flush();
+ let reopened = McpConnectionStore.open(path);
+ expect(reopened.get("client-service")).toBeDefined();
+ expect(reopened.get("daemon-service")).toBeDefined();
+ expect(reopened.records()).toHaveLength(2);
+
+ // Concurrent: both flush at once and both records must survive.
+ const first = McpConnectionStore.open(path);
+ const second = McpConnectionStore.open(path);
+ first.upsert(recordFixture("first"));
+ second.upsert(recordFixture("second"));
+ await Promise.all([first.flush(), second.flush()]);
+ reopened = McpConnectionStore.open(path);
+ expect(reopened.get("first")).toBeDefined();
+ expect(reopened.get("second")).toBeDefined();
+ });
+
+ it("applies removes and upserts from different instances without resurrecting removed records", async () => {
+ const owner = McpConnectionStore.open(path);
+ const other = McpConnectionStore.open(path);
+ owner.upsert(recordFixture("doomed"));
+ await owner.flush();
+
+ // One instance removes while the other adds; the final state reflects both.
+ other.upsert(recordFixture("added"));
+ await other.flush();
+ owner.remove("doomed");
+ await owner.flush();
+
+ const reopened = McpConnectionStore.open(path);
+ expect(reopened.get("doomed")).toBeUndefined();
+ expect(reopened.get("added")).toBeDefined();
+ });
+
+ it("discards a queued verification result whose guard fails at flush time", async () => {
+ const store = McpConnectionStore.open(path);
+ let current = true;
+ store.queueVerifyResult(recordFixture("acme", { status: "connected" }), () => current);
+ current = false; // the credential changed before the flush acquired the lock
+ await store.flush();
+ expect(store.get("acme")).toBeUndefined();
+
+ store.queueVerifyResult(recordFixture("acme", { status: "connected" }), () => current);
+ current = true;
+ await store.flush();
+ expect(store.get("acme")?.status).toBe("connected");
+ });
+
+ it("writes with a unique temp file so concurrent flushes never collide on rename", async () => {
+ const instances = Array.from({ length: 4 }, (_, index) => {
+ const store = McpConnectionStore.open(path);
+ store.upsert(recordFixture(`service-${index}`));
+ return store;
+ });
+ await Promise.all(instances.map((store) => store.flush()));
+
+ const reopened = McpConnectionStore.open(path);
+ expect(
+ reopened
+ .records()
+ .map((record) => record.connectionId)
+ .sort(),
+ ).toEqual(["service-0", "service-1", "service-2", "service-3"]);
+ });
+
+ it("creates the file exclusively when first-time writers race", async () => {
+ const instances = ["alpha", "beta", "gamma"].map((id) => {
+ const store = McpConnectionStore.open(path);
+ store.upsert(recordFixture(id));
+ return store;
+ });
+ await Promise.all(instances.map((store) => store.flush()));
+
+ const reopened = McpConnectionStore.open(path);
+ expect(
+ reopened
+ .records()
+ .map((record) => record.connectionId)
+ .sort(),
+ ).toEqual(["alpha", "beta", "gamma"]);
+ // The exclusive create keeps the file owner-private regardless of umask.
+ // Windows mode bits do not map meaningfully, so only POSIX asserts exactly.
+ if (process.platform !== "win32") {
+ expect(statSync(path).mode & 0o777).toBe(0o600);
+ }
+ });
+
+ it("requeues operations when the atomic write fails and retries them in order", async () => {
+ const store = McpConnectionStore.open(path);
+ store.upsert(recordFixture("acme", { label: "v1", status: "pending" }));
+ store.upsert(recordFixture("acme", { label: "v2", status: "pending" }));
+ let verificationStillCurrent = true;
+ store.queueVerifyResult(
+ recordFixture("acme", { status: "connected", toolCount: 7, verifiedAt: 123 }),
+ () => verificationStillCurrent,
+ );
+
+ vi.mocked(writeFileAtomicSync).mockImplementationOnce(() => {
+ throw new Error("simulated write failure");
+ });
+ await expect(store.flush()).rejects.toThrow("simulated write failure");
+ // In-memory state kept the immediate upserts; the disk kept nothing.
+ expect(store.get("acme")?.label).toBe("v2");
+ const untouched = McpConnectionStore.open(path);
+ expect(untouched.get("acme")).toBeUndefined();
+
+ // Ops queued after the failed flush stay behind the requeued batch.
+ verificationStillCurrent = false; // the verification result went stale meanwhile
+ store.upsert(recordFixture("beta"));
+ await store.flush();
+
+ const reopened = McpConnectionStore.open(path);
+ // The requeued upserts re-applied in order (the later one wins), the
+ // stale verification was re-guarded and discarded, and the late op landed.
+ expect(reopened.get("acme")?.label).toBe("v2");
+ expect(reopened.get("acme")?.status).toBe("pending");
+ expect(reopened.get("acme")?.toolCount).toBeUndefined();
+ expect(reopened.get("beta")).toBeDefined();
+ });
+
+ it("keeps operations queued while another flush is in flight for the next flush", async () => {
+ const store = McpConnectionStore.open(path);
+ // A flush is already in flight when the next mutation is queued: the splice
+ // happens after the lock is acquired, so the operation is not lost.
+ const firstFlush = store.flush();
+ store.upsert(recordFixture("queued-mid-flight"));
+ await firstFlush;
+ expect(store.get("queued-mid-flight")).toBeDefined();
+ await store.flush();
+
+ const reopened = McpConnectionStore.open(path);
+ expect(reopened.get("queued-mid-flight")).toBeDefined();
+ });
+});
+
+describe("McpConnectionStore multi-process first create", () => {
+ let tempDir: string;
+ let path: string;
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "mcp-store-mp-"));
+ path = join(tempDir, "mcp-connections.json");
+ });
+
+ afterEach(() => {
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("independent first-time processes never wipe each other's records", async () => {
+ const workerPath = join(tempDir, "first-create-worker.mts");
+ const barrierPath = join(tempDir, "GO");
+ writeFileSync(workerPath, FIRST_CREATE_WORKER_SOURCE);
+
+ const ids = ["mp-alpha", "mp-beta", "mp-gamma", "mp-delta"];
+ const children = ids.map((id) =>
+ spawn(process.execPath, ["--import", "tsx", workerPath, path, barrierPath, tempDir, id], {
+ cwd: TEST_DIR,
+ stdio: ["ignore", "pipe", "pipe"],
+ }),
+ );
+ // Real, distinct OS processes — this is not the in-process instance race.
+ expect(new Set(children.map((child) => child.pid)).size).toBe(ids.length);
+ const failures: string[] = [];
+ for (const child of children) {
+ child.stderr?.on("data", (chunk: Buffer) => failures.push(String(chunk)));
+ }
+
+ try {
+ // Align every first-writer before any of them flushes: the ready
+ // markers are awaited as filesystem EVENTS, never a polling loop.
+ const pending = new Set(ids.filter((id) => !existsSync(join(tempDir, `ready-${id}`))));
+ if (pending.size > 0) {
+ await new Promise<void>((resolve, reject) => {
+ const watcher = fs.watch(tempDir, (_event, filename) => {
+ pending.delete(String(filename).replace(/^ready-/, ""));
+ if (pending.size === 0) {
+ watcher.close();
+ resolve();
+ }
+ });
+ watcher.on("error", reject);
+ });
+ }
+ writeFileSync(barrierPath, "");
+ const exits = await Promise.all(
+ children.map(
+ (child) =>
+ new Promise<number | null>((resolve) => {
+ child.on("close", (code) => resolve(code));
+ }),
+ ),
+ );
+ expect(exits).toEqual([0, 0, 0, 0]);
+ expect(failures.join("")).toBe("");
+ } finally {
+ for (const child of children) {
+ if (child.exitCode === null && !child.killed) child.kill();
+ }
+ }
+
+ const reopened = McpConnectionStore.open(path);
+ expect(
+ reopened
+ .records()
+ .map((record) => record.connectionId)
+ .sort(),
+ ).toEqual([...ids].sort());
+ // Windows mode bits do not map meaningfully, so only POSIX asserts exactly.
+ if (process.platform !== "win32") {
+ expect(statSync(path).mode & 0o777).toBe(0o600);
+ }
+ // test-policy: allow explicit-test-timeout -- bounds real multi-process tsx startup variance, not the assertion
+ }, 30_000);
+});
+
+describe("ENG-6108 durable account reservations", () => {
+ const nonce = (): string => `attempt-${randomUUID()}`;
+ const record = (connectionId: string, at: number, attemptId: string) => ({
+ connectionId,
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: `Acme (${connectionId})`,
+ status: "pending" as const,
+ createdAt: at,
+ updatedAt: at,
+ attemptId,
+ });
+
+ it("two clients reserving the same id concurrently: exactly one wins, the loser sees the durable marker", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "reserve-race-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const clientA = McpConnectionStore.open(path);
+ const clientB = McpConnectionStore.open(path);
+ const at = Date.now();
+ // Barrier: both clients enqueue the reservation before either flush lands.
+ const [a, b] = await Promise.all([
+ clientA.reserveConnectionId(record("acme-2", at, nonce())),
+ clientB.reserveConnectionId(record("acme-2", at, nonce())),
+ ]);
+ // Exactly one winner; the durable pending marker blocks the loser.
+ expect(a || b).toBe(true);
+ expect(a && b).toBe(false);
+ // The reservation is durable: a fresh reader sees the pending marker.
+ const third = McpConnectionStore.open(path);
+ expect(third.get("acme-2")?.status).toBe("pending");
+ // The loser re-reads and allocates the NEXT id atomically.
+ const loser = a ? clientB : clientA;
+ loser.load();
+ const nextAttempt = nonce();
+ const next = await loser.reserveConnectionId(record("acme-3", at + 1, nextAttempt));
+ expect(next).toBe(true);
+ expect(loser.get("acme-3")?.status).toBe("pending");
+ // Finalize moves the pending reservation to the committed account state
+ // under the lock, only for the owning attempt.
+ expect(
+ await loser.finalizeAttempt({
+ connectionId: "acme-3",
+ attemptId: nextAttempt,
+ commit: (current) => current,
+ }),
+ ).toBe("committed");
+ // A different attempt id cannot finalize someone else's reservation.
+ const otherAttempt = nonce();
+ expect(await loser.reserveConnectionId(record("acme-5", at + 2, otherAttempt))).toBe(true);
+ expect(
+ await loser.finalizeAttempt({
+ connectionId: "acme-5",
+ attemptId: "not-the-owner",
+ commit: (current) => current,
+ }),
+ ).toBe("denied");
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("a failed record write resolves the reservation FALSE: no durable marker, no ghost retry, no login may start", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "reserve-write-fail-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const client = McpConnectionStore.open(path);
+ const at = Date.now();
+ const mine = nonce();
+ vi.mocked(writeFileAtomicSync).mockImplementationOnce(() => {
+ throw new Error("simulated reservation write failure");
+ });
+ // Commit-gated resolution: the caller learns the reservation did NOT land.
+ await expect(client.reserveConnectionId(record("acme-2", at, mine))).resolves.toBe(false);
+ // Nothing durable: a fresh reader sees no marker, and the failed one-shot
+ // op was dropped (never requeued for a surprise later commit).
+ const fresh = McpConnectionStore.open(path);
+ expect(fresh.get("acme-2")).toBeUndefined();
+ // The next attempt on the same id works normally.
+ const retryNonce = nonce();
+ await expect(client.reserveConnectionId(record("acme-2", at, retryNonce))).resolves.toBe(true);
+ expect(McpConnectionStore.open(path).get("acme-2")?.attemptId).toBe(retryNonce);
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("TWO reserves batched into one failing write: BOTH resolve false (no hang), no ghost, retry works", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "reserve-batch-fail-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const client = McpConnectionStore.open(path);
+ const at = Date.now();
+ vi.mocked(writeFileAtomicSync).mockImplementationOnce(() => {
+ throw new Error("simulated batched write failure");
+ });
+ // Both reserves queue into the SAME first flush (flushChain serializes
+ // runs, but both ops are already enqueued before the first run starts).
+ const [first, second] = await Promise.all([
+ client.reserveConnectionId(record("acme-2", at, nonce())),
+ client.reserveConnectionId(record("acme-3", at, nonce())),
+ ]);
+ // Explicit settlement: every one-shot resolves exactly once — false here.
+ expect(first).toBe(false);
+ expect(second).toBe(false);
+ // No durable marker for either id (no ghost), and a retry succeeds.
+ const fresh = McpConnectionStore.open(path);
+ expect(fresh.get("acme-2")).toBeUndefined();
+ expect(fresh.get("acme-3")).toBeUndefined();
+ const retryNonce = nonce();
+ await expect(client.reserveConnectionId(record("acme-2", at, retryNonce))).resolves.toBe(true);
+ expect(McpConnectionStore.open(path).get("acme-2")?.attemptId).toBe(retryNonce);
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("a finalize whose RECORD write fails compensates: staged credential restored, real key untouched, no record", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "finalize-compensate-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const client = McpConnectionStore.open(path);
+ const at = Date.now();
+ const mine = nonce();
+ await client.reserveConnectionId(record("acme-2", at, mine));
+ const commitMoves: Array<string> = [];
+ const committed = await client.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: mine,
+ commit: (current) => {
+ commitMoves.push("moved");
+ return current;
+ },
+ compensate: () => {
+ commitMoves.push("compensated");
+ },
+ });
+ // A committed finalize consumed its nonce. A new transaction must claim again.
+ const retryNonce = nonce();
+ expect(await client.claimConnectionId({ connectionId: "acme-2", attemptId: retryNonce })).toBe(true);
+ // The write is mocked to fail exactly once — inject it AFTER the
+ // reservation commit so the finalize's write is the failing one.
+ vi.mocked(writeFileAtomicSync).mockImplementationOnce(() => {
+ throw new Error("simulated finalize write failure");
+ });
+ const failed = await client.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: retryNonce,
+ commit: (current) => {
+ commitMoves.push("moved-again");
+ return current;
+ },
+ compensate: () => {
+ commitMoves.push("compensated-again");
+ },
+ });
+ expect(committed).toBe("committed");
+ expect(failed).toBe("compensated");
+ // All-or-nothing: compensation ran under the same lock.
+ expect(commitMoves).toContain("compensated-again");
+ // The record write failed: nothing durable for the second finalize, and
+ // the FIRST (successful) finalize's record is still on disk.
+ const fresh = McpConnectionStore.open(path);
+ expect(fresh.get("acme-2")?.attemptId).toBe(retryNonce);
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("a failed lock ACQUISITION settles one-shot ops and requeues durable ops (pre-splice)", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "lock-fail-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const client = McpConnectionStore.open(path);
+ // One durable upsert queued BEFORE the failing flush: it must requeue and land on the next flush.
+ client.upsert(recordFixture("acme", { label: "durable", status: "pending" }));
+ vi.mocked(lockfile.lock).mockImplementationOnce(async () => {
+ throw new Error("lock contention");
+ });
+ const at = Date.now();
+ const mine = nonce();
+ const reserveOutcome = client.reserveConnectionId(record("acme-2", at, mine));
+ // The lock never acquired: the one-shot reserve settles false (no ghost
+ // marker), while the durable upsert survives for the next flush.
+ await expect(reserveOutcome).resolves.toBe(false);
+ await client.flush();
+ expect(client.get("acme")?.label).toBe("durable");
+ // No ghost reservation: the same id is free again.
+ const retryMine = nonce();
+ await expect(client.reserveConnectionId(record("acme-2", at, retryMine))).resolves.toBe(true);
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("a commit callback that throws mid-move is compensated under the same lock", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "finalize-partial-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const client = McpConnectionStore.open(path);
+ const at = Date.now();
+ const mine = nonce();
+ await client.reserveConnectionId(record("acme-2", at, mine));
+ const moves: string[] = [];
+ // The commit does the side effect (moves the credential) and then throws
+ // BEFORE returning the record: the registration must already cover it.
+ const outcome = await client.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: mine,
+ commit: () => {
+ moves.push("moved");
+ throw new Error("commit threw mid-move");
+ },
+ compensate: () => {
+ moves.push("compensated");
+ },
+ });
+ expect(outcome).toBe("compensated");
+ expect(moves).toEqual(["moved", "compensated"]);
+ // No record change landed for a commit that never returned one; the durable PENDING reservation marker itself stays
+ // (removable via removeReservation), which is the honest pre-login state.
+ expect(McpConnectionStore.open(path).get("acme-2")?.status).toBe("pending");
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ // A failed compensation resolving recovery-required (never a plain no-op
+ // implying the account is unchanged) is pinned by the STRONGER combo below:
+ // a write-failed finalize whose compensation ALSO fails.
+
+ it("a write-failed finalize whose compensation ALSO fails resolves recovery-required", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "finalize-recovery-2-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const client = McpConnectionStore.open(path);
+ const at = Date.now();
+ const mine = nonce();
+ await client.reserveConnectionId(record("acme-2", at, mine));
+ const mine2 = nonce();
+ await client.reserveConnectionId(record("acme-4", at + 1, mine2));
+ // The record write fails AFTER the commit callback ran; the rollback then fails too, so the outcome must surface
+ // recovery instead of claiming a clean rollback.
+ vi.mocked(writeFileAtomicSync).mockImplementationOnce(() => {
+ throw new Error("disk full");
+ });
+ const outcome = await client.finalizeAttempt({
+ connectionId: "acme-4",
+ attemptId: mine2,
+ commit: (current) => current,
+ compensate: () => {
+ throw new Error("rollback failed");
+ },
+ });
+ expect(outcome).toBe("recovery-required");
+ // Nothing committed; the durable PENDING reservation marker stays for
+ // manual recovery or removeReservation — never a silent ghost.
+ expect(McpConnectionStore.open(path).get("acme-4")?.status).toBe("pending");
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("claims and releases settle exactly once on a failed batch write (no requeue, no ghost claim)", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "claim-fail-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const client = McpConnectionStore.open(path);
+ const at = Date.now();
+ // A finished account to claim.
+ const mine = nonce();
+ await client.reserveConnectionId(record("acme-2", at, mine));
+ const finalized = await client.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: mine,
+ commit: (current) => ({ ...current, status: "connected" as const }),
+ });
+ expect(finalized).toBe("committed");
+
+ // TWO claims batched into ONE failing write: both settle false (never hang, never requeue as ghost claims). The
+ // failure is injected into the batch's single record write.
+ vi.mocked(writeFileAtomicSync).mockImplementationOnce(() => {
+ throw new Error("simulated claim write failure");
+ });
+ const nonceA = nonce();
+ const nonceB = nonce();
+ const claimA = client.claimConnectionId({ connectionId: "acme-2", attemptId: nonceA });
+ const claimB = client.claimConnectionId({ connectionId: "acme-2", attemptId: nonceB });
+ await expect(claimA).resolves.toBe(false);
+ await expect(claimB).resolves.toBe(false);
+ // The disk record carries NEITHER failed claim's nonce (nothing
+ // half-applied, no ghost claim for a later flush to materialize).
+ const attemptAfterFailure = McpConnectionStore.open(path).get("acme-2")?.attemptId;
+ expect([nonceA, nonceB]).not.toContain(attemptAfterFailure);
+
+ // A retry claim still works after the failure.
+ const retryNonce = nonce();
+ await expect(client.claimConnectionId({ connectionId: "acme-2", attemptId: retryNonce })).resolves.toBe(true);
+ // ...and releases the same way (one-shot, ownership-checked).
+ await expect(client.releaseClaim({ connectionId: "acme-2", attemptId: retryNonce })).resolves.toBe(true);
+ await expect(client.releaseClaim({ connectionId: "acme-2", attemptId: retryNonce })).resolves.toBe(false);
+ expect(McpConnectionStore.open(path).get("acme-2")?.attemptId).toBeUndefined();
+ expect(McpConnectionStore.open(path).get("acme-2")?.status).toBe("connected");
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("a claim's finalize on an EXISTING (non-pending) record commits, consumes the nonce, and rolls back with the previous credential", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "claim-finalize-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const authPath = join(tempDir, "auth.json");
+ const client = McpConnectionStore.open(path);
+ const auth = AuthStorage.create(authPath);
+ const at = Date.now();
+ // A CONNECTED account with an old grant.
+ const mine = nonce();
+ await client.reserveConnectionId(record("acme-2", at, mine));
+ const finalized = await client.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: mine,
+ commit: (current) => ({ ...current, status: "connected" as const }),
+ });
+ expect(finalized).toBe("committed");
+ const oldCredential = {
+ type: "oauth" as const,
+ access: "old-grant",
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ };
+ auth.set("mcp:acme-2", oldCredential);
+
+ // Claim the existing record and stage the new credential.
+ const claimNonce = nonce();
+ await expect(client.claimConnectionId({ connectionId: "acme-2", attemptId: claimNonce })).resolves.toBe(true);
+ auth.set(`mcp:acme-2--${claimNonce}`, {
+ type: "oauth",
+ access: "new-grant",
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ });
+ const expectedOld = auth.getVerified("mcp:acme-2");
+
+ // A failing RECORD write makes the compensate run under the same lock:
+ // it must RESTORE the previous credential (never delete-only).
+ vi.mocked(writeFileAtomicSync).mockImplementationOnce(() => {
+ throw new Error("simulated record write failure");
+ });
+ const outcome = await client.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: claimNonce,
+ commit: (record) => {
+ const move = auth.replaceStagedCredential(`mcp:acme-2--${claimNonce}`, "mcp:acme-2", expectedOld);
+ expect(move.status).toBe("replaced");
+ const { attemptId: _consumed, ...pending } = record;
+ return { ...pending, status: "pending" as const };
+ },
+ compensate: () => {
+ // Full-identity CAS restore of the previous credential.
+ auth.replaceCredentialIfMatches(
+ "mcp:acme-2",
+ {
+ type: "oauth",
+ access: "new-grant",
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ },
+ oldCredential,
+ );
+ },
+ });
+ expect(outcome).toBe("compensated");
+ // The PREVIOUS credential is restored byte-for-byte...
+ expect(AuthStorage.create(authPath).get("mcp:acme-2")).toEqual(oldCredential);
+ // ...the record keeps its connected status with the claim still held
+ // (the write failed; the claim was never consumed).
+ const recordAfter = McpConnectionStore.open(path).get("acme-2");
+ expect(recordAfter?.status).toBe("connected");
+ expect(recordAfter?.attemptId).toBe(claimNonce);
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("a removeAccount whose verified auth cleanup FAILS preserves the record on disk", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "auth-fail-logout-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const client = McpConnectionStore.open(path);
+ const at = Date.now();
+ const mine = nonce();
+ await client.reserveConnectionId(record("acme-2", at, mine));
+
+ const outcome = await client.removeAccount({
+ connectionId: "acme-2",
+ preserveCompletedRecord: true,
+ authCleanup: () => {
+ // removeVerified throws on an auth-file write failure.
+ throw new Error("simulated auth write failure");
+ },
+ });
+
+ // Nothing claimed, nothing cancelled: the PENDING record survives on disk (the batch write must not persist a
+ // deletion that a failed logout never earned) and the attempt stays recoverable.
+ expect(outcome).toBe("failed");
+ // The record remains in MEMORY (this client's view is unchanged)...
+ expect(client.get("acme-2")?.status).toBe("pending");
+ expect(client.get("acme-2")?.attemptId).toBe(mine);
+ // ...AND on disk (the batch write persisted no deletion).
+ const reopened = McpConnectionStore.open(path);
+ expect(reopened.get("acme-2")?.status).toBe("pending");
+ expect(reopened.get("acme-2")?.attemptId).toBe(mine);
+ // A failed logout never poisons later operations.
+ await expect(client.removeAccount({ connectionId: "acme-9", authCleanup: () => false })).resolves.toBe("missing");
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("a staged-key logout queued behind a finalize-first move refuses fail-closed (no orphan)", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "staged-logout-race-"));
+ const storePath = join(tempDir, "mcp-connections.json");
+ const authPath = join(tempDir, "auth.json");
+ const loginClient = AuthStorage.create(authPath);
+ const routeClient = AuthStorage.create(authPath);
+ const finalizingStore = McpConnectionStore.open(storePath);
+ const warmedStore = McpConnectionStore.open(storePath);
+ const at = Date.now();
+ const mine = nonce();
+ await finalizingStore.reserveConnectionId(record("acme-2", at, mine));
+ loginClient.set(`mcp:acme-2--${mine}`, {
+ type: "oauth",
+ access: `staged-for-acme-2--${mine}`,
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ });
+
+ // The finalize holds the store lock; its commit moves the staged credential to the real key. MID-COMMIT, the other
+ // client's staged-key logout fires through the REAL exported handler — it queues behind our lock and must act on
+ // CURRENT state, not the stale snapshot.
+ let routeLogout: Promise<import("../src/core/mcp/connection-store.js").McpRemoveAccountResult> | undefined;
+ const finalization = finalizingStore.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: mine,
+ commit: (current) => {
+ routeLogout = logoutMcpAccount(`mcp:acme-2--${mine}`, warmedStore, routeClient);
+ const moved = loginClient.moveStagedCredential(`mcp:acme-2--${mine}`, "mcp:acme-2");
+ expect(moved.status).toBe("moved");
+ // Finalize consumes ownership even when the callback returns the
+ // pending record unchanged; verification updates its status later.
+ return current;
+ },
+ });
+
+ await expect(finalization).resolves.toBe("committed");
+ const outcome = await routeLogout;
+ // Finalize consumed the nonce and moved the staged key. A late staged
+ // logout finds no exact key; it never guesses or touches the live account.
+ expect(outcome).toBe("missing");
+ const fresh = AuthStorage.create(authPath);
+ // The moved credential SURVIVES on the real key...
+ const survivingCredential = fresh.get("mcp:acme-2");
+ expect(survivingCredential?.type).toBe("oauth");
+ if (survivingCredential?.type === "oauth") {
+ expect(survivingCredential.access).toBe(`staged-for-acme-2--${mine}`);
+ }
+ // ...AND the account shell (the record) survives — no orphan either way — with the old attempt nonce INVALIDATED so
+ // the in-flight login's denied path cannot removeReservation-delete it.
+ const survivingRecord = McpConnectionStore.open(storePath).get("acme-2");
+ expect(survivingRecord).toBeDefined();
+ expect(survivingRecord?.attemptId).toBeUndefined();
+ // A later finalize with the OLD nonce is denied...
+ const denied = await finalizingStore.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: mine,
+ commit: (current) => current,
+ });
+ expect(denied).toBe("denied");
+ // ...and the denied cleanup (removeReservation) preserves the record.
+ await expect(finalizingStore.removeReservation("acme-2", mine)).resolves.toBe(false);
+ expect(McpConnectionStore.open(storePath).get("acme-2")).toBeDefined();
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("a staged-key logout with a bystander on the real key preserves the account shell and never orphans the credential", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "both-exist-"));
+ const storePath = join(tempDir, "mcp-connections.json");
+ const authPath = join(tempDir, "auth.json");
+ const loginClient = AuthStorage.create(authPath);
+ const bystander = {
+ type: "oauth" as const,
+ access: "ordinary-login-for-acme-2",
+ refresh: "r2",
+ expires: Date.now() + 7200_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ };
+ const otherClient = AuthStorage.create(authPath);
+ const store = McpConnectionStore.open(storePath);
+ const at = Date.now();
+ const mine = nonce();
+ await store.reserveConnectionId(record("acme-2", at, mine));
+ loginClient.set(`mcp:acme-2--${mine}`, {
+ type: "oauth",
+ access: `staged-for-acme-2--${mine}`,
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ });
+ // BOTH credentials exist: our staged attempt AND another client's ordinary login on the real account key.
+ otherClient.set("mcp:acme-2", bystander);
+
+ const outcome = await logoutMcpAccount(`mcp:acme-2--${mine}`, store, otherClient);
+
+ // 1. Our staged credential is removed (verified)...
+ expect(outcome).toBe("refused");
+ const fresh = AuthStorage.create(authPath);
+ expect(fresh.get(`mcp:acme-2--${mine}`)).toBeUndefined();
+ // 2. ...the bystander's credential survives BYTE-FOR-BYTE...
+ expect(fresh.get("mcp:acme-2")).toEqual(bystander);
+ // 3. ...and the ACCOUNT SHELL (the record) is PRESERVED — record deletion is the explicit Remove action's job —
+ // with the old nonce INVALIDATED so the in-flight login can neither finalize nor removeReservation-delete the
+ // preserved record.
+ const preserved = McpConnectionStore.open(storePath).get("acme-2");
+ expect(preserved).toBeDefined();
+ expect(preserved?.attemptId).toBeUndefined();
+ await expect(
+ store.finalizeAttempt({ connectionId: "acme-2", attemptId: mine, commit: (current) => current }),
+ ).resolves.toBe("denied");
+ await expect(store.removeReservation("acme-2", mine)).resolves.toBe(false);
+ expect(McpConnectionStore.open(storePath).get("acme-2")).toBeDefined();
+ expect(AuthStorage.create(authPath).get("mcp:acme-2")).toEqual(bystander);
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("resolveMcpAccountLogoutTarget treats a nonce match as a LIVE attempt on any record status", () => {
+ const records = [
+ { connectionId: "acme-2", status: "connected", attemptId: "nonce-1" },
+ { connectionId: "other", status: "pending", attemptId: "nonce-2" },
+ ];
+ // A nonce match is ALWAYS live (claimed reconnects carry nonces on
+ // connected/error records; successful finalizes consume them).
+ expect(resolveMcpAccountLogoutTarget("mcp:acme-2--nonce-1", records)).toEqual({
+ connectionId: "acme-2",
+ credentialKey: "mcp:acme-2--nonce-1",
+ });
+ expect(resolveMcpAccountLogoutTarget("mcp:other--nonce-2", records)).toEqual({
+ connectionId: "other",
+ credentialKey: "mcp:other--nonce-2",
+ });
+ expect(resolveMcpAccountLogoutTarget("mcp:acme-2", records)).toEqual({
+ connectionId: "acme-2",
+ credentialKey: "mcp:acme-2",
+ });
+ });
+
+ it("removeAccount with preserveCompletedRecord cancels PENDING attempts but PRESERVES finished accounts", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "preserve-logout-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const client = McpConnectionStore.open(path);
+ const at = Date.now();
+ // A pending attempt: cancelled by the credential-only logout.
+ const pendingMine = nonce();
+ await client.reserveConnectionId(record("acme-2", at, pendingMine));
+ // A FINISHED account: preserved (honest unbound state after logout).
+ const finishedMine = nonce();
+ await client.reserveConnectionId(record("acme-4", at + 1, finishedMine));
+ const finished = await client.finalizeAttempt({
+ connectionId: "acme-4",
+ attemptId: finishedMine,
+ commit: (current) => ({ ...current, status: "connected" as const }),
+ });
+ expect(finished).toBe("committed");
+
+ const removedCredentialOnly = await client.removeAccount({
+ connectionId: "acme-2",
+ preserveCompletedRecord: true,
+ authCleanup: () => true,
+ });
+ const preservedFinished = await client.removeAccount({
+ connectionId: "acme-4",
+ preserveCompletedRecord: true,
+ authCleanup: () => true,
+ });
+
+ expect(removedCredentialOnly).toBe("removed");
+ expect(preservedFinished).toBe("preserved");
+ // The stale attempt loses ownership and can NEVER re-activate.
+ const denied = await client.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: pendingMine,
+ commit: (current) => current,
+ });
+ expect(denied).toBe("denied");
+ expect(McpConnectionStore.open(path).get("acme-2")).toBeUndefined();
+ // The finished account survives with its record (unbound display).
+ expect(McpConnectionStore.open(path).get("acme-4")?.status).toBe("connected");
+ // Without the flag, the same call removes the record entirely.
+ const removed = await client.removeAccount({
+ connectionId: "acme-4",
+ authCleanup: () => false,
+ });
+ expect(removed).toBe("removed");
+ expect(McpConnectionStore.open(path).get("acme-4")).toBeUndefined();
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ // A logout/remove racing a finalize never orphaning a credential is pinned ONCE, at the REAL
+ // route seam (the stronger end-to-end race), in mcp-activation-queue.test.ts ("the REAL
+ // generic /logout fired inside the finalize commit is never defeated by the race"); the
+ // staged-key bystander pair above pins the store-level refusal paths.
+
+ it("removeReservation is ownership-validated by the attempt nonce: only OUR pending marker disappears", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "reserve-cancel-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const client = McpConnectionStore.open(path);
+ const at = Date.now();
+ const mine = nonce();
+ expect(await client.reserveConnectionId(record("acme-2", at, mine))).toBe(true);
+
+ // A different owner (wrong nonce) cannot remove it.
+ expect(await client.removeReservation("acme-2", nonce())).toBe(false);
+ expect(client.get("acme-2")).toBeDefined();
+
+ // A completed account is not a reservation anymore: finalize first.
+ expect(
+ await client.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: mine,
+ commit: (current) => ({ ...current, status: "connected" as const }),
+ }),
+ ).toBe("committed");
+ expect(await client.removeReservation("acme-2", mine)).toBe(false);
+ expect(client.get("acme-2")?.status).toBe("connected");
+
+ // The true owner cancels a still-pending reservation.
+ const cancelMine = nonce();
+ expect(await client.reserveConnectionId(record("acme-4", at, cancelMine))).toBe(true);
+ expect(await client.removeReservation("acme-4", cancelMine)).toBe(true);
+ expect(client.get("acme-4")).toBeUndefined();
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("finalizeAttempt never runs a foreign nonce's commit and cannot resurrect a removed account", async () => {
+ const tempDir = mkdtempSync(join(tmpdir(), "finalize-owner-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const client = McpConnectionStore.open(path);
+ const at = Date.now();
+ const mine = nonce();
+ expect(await client.reserveConnectionId(record("acme-2", at, mine))).toBe(true);
+
+ // A foreign nonce loses the guarded commit AND its side effects must
+ // never run — the reservation stays pending for the real owner.
+ let foreignCommitRan = false;
+ expect(
+ await client.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: `${mine}-wrong`,
+ commit: (current) => {
+ foreignCommitRan = true;
+ return current;
+ },
+ }),
+ ).toBe("denied");
+ expect(foreignCommitRan).toBe(false);
+ expect(client.get("acme-2")?.status).toBe("pending");
+
+ let ownedCommitRan = false;
+ expect(
+ await client.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: mine,
+ commit: (current) => {
+ ownedCommitRan = true;
+ return { ...current, status: "connected" as const, toolCount: 3 };
+ },
+ }),
+ ).toBe("committed");
+ expect(ownedCommitRan).toBe(true);
+ expect(client.get("acme-2")).toMatchObject({ status: "connected", toolCount: 3 });
+
+ // After removal, even the owning nonce cannot resurrect the account.
+ await client.remove("acme-2");
+ await client.flush();
+ let lateCommitRan = false;
+ expect(
+ await client.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: mine,
+ commit: (current) => {
+ lateCommitRan = true;
+ return current;
+ },
+ }),
+ ).toBe("denied");
+ expect(lateCommitRan).toBe(false);
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("the conditional move compares persisted credentials inside the AUTH backend lock (store->auth gap interleave)", async () => {
+ // Two REAL file-backed storage instances share one credential file. An ordinary login from ANOTHER client lands in
+ // the gap between the store lock and the auth backend lock: the conditional move must refuse inside the auth lock,
+ // not act on a stale read taken under only the store lock.
+ const tempDir = mkdtempSync(join(tmpdir(), "finalize-gap-"));
+ const path = join(tempDir, "mcp-connections.json");
+ const authPath = join(tempDir, "auth.json");
+ const clientA = McpConnectionStore.open(path);
+ const authA = AuthStorage.create(authPath);
+ const otherClient = AuthStorage.create(authPath);
+ const at = Date.now();
+ const mine = nonce();
+ expect(await clientA.reserveConnectionId(record("acme-2", at, mine))).toBe(true);
+ const stagedKey = `mcp:acme-2--${mine}`;
+ const realKey = "mcp:acme-2";
+ const stagedCredential = {
+ type: "oauth" as const,
+ access: "staged-credential",
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ };
+ authA.set(stagedKey, stagedCredential);
+ const bystander = {
+ type: "oauth" as const,
+ access: "other-client-ordinary-login",
+ refresh: "other-client-refresh",
+ expires: at + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ };
+
+ // The REAL interactive commit/compensate pairing with the interposed
+ // ordinary login: the finalize compensates when the move refuses.
+ let movedCredential: ReturnType<AuthStorage["get"]>;
+ const finalization = await clientA.finalizeAttempt({
+ connectionId: "acme-2",
+ attemptId: mine,
+ commit: (current) => {
+ otherClient.set(realKey, { ...bystander });
+ const move = authA.moveStagedCredential(stagedKey, realKey);
+ if (move.status === "occupied") throw new Error("account key occupied by another login");
+ if (move.status === "moved") movedCredential = move.credential;
+ return current;
+ },
+ compensate: () => {
+ if (movedCredential) {
+ authA.restoreCredentialIfAbsent(stagedKey, movedCredential);
+ authA.removeIfCredentialMatches(realKey, movedCredential);
+ }
+ },
+ });
+
+ expect(finalization).toBe("compensated");
+ const truth = AuthStorage.create(authPath);
+ expect(
+ JSON.stringify(truth.get(realKey)),
+ "the interposed ordinary-login credential must survive byte-for-byte",
+ ).toBe(JSON.stringify(bystander));
+ expect(JSON.stringify(truth.get(stagedKey)), "our own staged credential must be intact after the refusal").toBe(
+ JSON.stringify(stagedCredential),
+ );
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+});
diff --git a/packages/coding-agent/test/mcp-manager.test.ts b/packages/coding-agent/test/mcp-manager.test.ts
index fdc83c64b9..6565add5cd 100644
--- a/packages/coding-agent/test/mcp-manager.test.ts
+++ b/packages/coding-agent/test/mcp-manager.test.ts
@@ -2,9 +2,11 @@ import { mkdtempSync, rmSync } from "node:fs";
import { tmpdir } from "node:os";
import { join } from "node:path";
import { getOAuthProvider, resetOAuthProviders } from "@earendil-works/pi-ai/oauth";
-import { afterEach, beforeEach, describe, expect, it } from "vitest";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { AuthStorage } from "../src/core/auth-storage.js";
+import { McpConnectionStore } from "../src/core/mcp/connection-store.js";
import { McpManager } from "../src/core/mcp/mcp-manager.js";
+import type { McpServiceDescriptor } from "../src/core/mcp/service-catalog.js";
import { ModelRegistry } from "../src/core/model-registry.js";
import type { McpServerConfig } from "../src/core/settings-manager.js";
@@ -31,12 +33,7 @@ describe("McpManager", () => {
});
it("enables an integration once credentials are stored", () => {
- authStorage.set("mcp:linear", {
- type: "oauth",
- access: "tok",
- refresh: "r",
- expires: Date.now() + 3600_000,
- });
+ authStorage.set("mcp:linear", grant("tok", "https://mcp.linear.app/mcp", Date.now()));
const manager = new McpManager({ authStorage });
const overrides = manager.getDisabledBuiltinSkillOverrides();
expect(overrides).not.toContain("-linear/SKILL.md");
@@ -52,30 +49,33 @@ describe("McpManager", () => {
expect(getOAuthProvider("mcp:notion")).toBeDefined();
});
- it("keeps MCP providers registered after ModelRegistry.refresh() resets the registry", () => {
+ it("keeps MCP providers registered after ModelRegistry.refresh resets the registry, via the reset hook", () => {
+ // Built-in catalog providers survive reset; user-declared servers survive through the production reset hook.
new McpManager({ authStorage });
const registry = ModelRegistry.create(authStorage, join(tempDir, "models.json"));
- registry.refresh(); // calls resetOAuthProviders(); must re-add MCP providers
- expect(getOAuthProvider("mcp:linear")).toBeDefined();
- expect(getOAuthProvider("mcp:notion")).toBeDefined();
- });
-
- it("re-registers user-declared OAuth servers after ModelRegistry.refresh via the reset hook", () => {
const manager = new McpManager({
authStorage,
getUserServers: () => ({ acme: { type: "http", url: "https://mcp.acme.test/mcp", oauth: true } }),
});
- const registry = ModelRegistry.create(authStorage, join(tempDir, "models.json"));
- registry.setOnOAuthProvidersReset(() => manager.registerUserProviders());
+ registry.setOnOAuthProvidersReset(() => manager.registerAllProviders());
expect(getOAuthProvider("mcp:acme")).toBeDefined();
- registry.refresh(); // resets registry; hook must re-add the custom provider
+ registry.refresh(); // calls resetOAuthProviders(); hook + built-ins must re-add MCP providers
+ expect(getOAuthProvider("mcp:linear")).toBeDefined();
+ expect(getOAuthProvider("mcp:notion")).toBeDefined();
expect(getOAuthProvider("mcp:acme")).toBeDefined();
});
-
+ // The user-declared server's reset-hook re-registration is folded into
+ // "keeps MCP providers registered after ModelRegistry.refresh resets the registry, via the reset hook" above.
it("exposes only mcp.refresh when no interactive login is wired", async () => {
- const manager = new McpManager({ authStorage });
+ const manager = new McpManager({ authStorage, noBackgroundVerification: true });
const handlers = manager.hostHandlers();
- expect(Object.keys(handlers).sort()).toEqual(["mcp.config", "mcp.refresh"]);
+ expect(Object.keys(handlers).sort()).toEqual([
+ "mcp.config",
+ "mcp.list_connections",
+ "mcp.list_plugins",
+ "mcp.refresh",
+ "mcp.search_plugins",
+ ]);
await expect(handlers["mcp.refresh"]({ server: "linear" })).rejects.toThrow("Could not refresh");
await expect(handlers["mcp.refresh"]({})).rejects.toThrow("requires a server");
@@ -85,88 +85,65 @@ describe("McpManager", () => {
let called = "";
const manager = new McpManager({
authStorage,
+ noBackgroundVerification: true,
beginLogin: async (server) => {
called = server;
},
});
const handlers = manager.hostHandlers();
- expect(Object.keys(handlers).sort()).toEqual(["mcp.begin_login", "mcp.config", "mcp.refresh"]);
+ expect(Object.keys(handlers).sort()).toEqual([
+ "mcp.begin_login",
+ "mcp.config",
+ "mcp.list_connections",
+ "mcp.list_plugins",
+ "mcp.refresh",
+ "mcp.search_plugins",
+ ]);
await handlers["mcp.begin_login"]({ server: "linear" });
expect(called).toBe("linear");
});
- it("mcp.config keeps catalog names reserved from generic overrides", async () => {
+ it("mcp.config keeps catalog names reserved from generic overrides and serves connected catalog services", async () => {
const manager = new McpManager({
authStorage,
+ noBackgroundVerification: true,
getUserServers: () => ({
linear: { type: "http", url: "https://proxy.test/mcp", oauth: true, headers: { "X-Extra": "1" } },
}),
});
const handlers = manager.hostHandlers();
+ // A user entry shadowing a bundled catalog name is dead by design.
expect(await handlers["mcp.config"]({ server: "linear" })).toEqual({});
- // Catalog-only entries are reserved for their authored skills, not the generic API.
+ // An unconnected catalog service is not dispatched through the generic route.
expect(await handlers["mcp.config"]({ server: "notion" })).toEqual({});
- });
- it("does not treat an oauth override of a catalog name as authed via the official stored cred", () => {
- authStorage.set("mcp:linear", {
- type: "oauth",
- access: "official",
- refresh: "r",
- expires: Date.now() + 3600_000,
- });
- const manager = new McpManager({
- authStorage,
- getUserServers: () => ({ linear: { type: "http", url: "https://proxy.test/mcp", oauth: true } }),
+ authStorage.set("mcp:notion", grant("tok", "https://mcp.notion.com/mcp", Date.now()));
+ // Stored credentials put the catalog service on the generic route.
+ expect(await handlers["mcp.config"]({ server: "notion" })).toEqual({
+ type: "http",
+ url: "https://mcp.notion.com/mcp",
+ oauth: true,
});
- expect(manager.listStatus().find((s) => s.server === "linear")?.enabled).toBe(false);
});
- it("does not enable a server from a credential bound to a different endpoint or unbound", () => {
- authStorage.set("mcp:unbound", {
- type: "oauth",
- access: "unbound-token",
- refresh: "r",
- expires: Date.now() + 3600_000,
- });
- authStorage.set("mcp:remote", {
- type: "oauth",
- access: "old-token",
- refresh: "r",
- expires: Date.now() + 3600_000,
- endpoint: "https://old.test/mcp",
- } as never);
- const manager = new McpManager({
- authStorage,
- getUserServers: () => ({
- remote: { type: "http", url: "https://new.test/mcp", oauth: true },
- unbound: { type: "http", url: "https://srv.test/mcp", oauth: true },
- }),
- });
- expect(manager.listStatus().find((s) => s.server === "remote")?.enabled).toBe(false);
- expect(manager.listStatus().find((s) => s.server === "unbound")?.enabled).toBe(false);
- expect(manager.getEnabledPersistentGenericServers()).toEqual([]);
- });
+ // A shadow credential never authorizes a reserved name: pinned with the reserved-name matrix below and in
+ // mcp-catalog-eligibility.test.ts ("a reserved builtin name with a stored pasted token still fails closed under a
+ // user shadow").
- it("honors a bearer-token env var for user-declared servers", () => {
- process.env.MY_MCP_TOKEN = "secret";
- try {
- const manager = new McpManager({
- authStorage,
- getUserServers: () => ({
- custom: { type: "http", url: "https://example.test/mcp", bearerTokenEnvVar: "MY_MCP_TOKEN" },
- }),
- });
- const status = manager.listStatus().find((s) => s.server === "custom");
- expect(status?.enabled).toBe(true);
- } finally {
- delete process.env.MY_MCP_TOKEN;
- }
- });
+ // Unbound/cross-endpoint grants fail closed: pinned across the shared predicate, prompt, dispatch, and view in
+ // mcp-catalog-eligibility.test.ts ("OAuth grant states agree across the shared predicate, prompt, dispatch, and the
+ // picker view").
+
+ // Bearer-env eligibility (including the stale-OAuth fall-through refusal) is pinned in
+ // mcp-catalog-eligibility.test.ts ("user-declared servers keep their semantics, but a configured bearer env var is
+ // the ONLY credential source").
- it("lists only enabled non-catalog user servers in deterministic order", () => {
+ it("lists enabled generic servers including connected catalog services in deterministic order", () => {
+ authStorage.set("mcp:notion", grant("tok", "https://mcp.notion.com/mcp", Date.now()));
const manager = new McpManager({
authStorage,
+ noBackgroundVerification: true,
+ getServiceCatalog: () => LEGACY_CATALOG,
getUserServers: () => ({
zebra: { type: "stdio", command: "z" },
disabled: { type: "stdio", command: "off", enabled: false },
@@ -175,7 +152,8 @@ describe("McpManager", () => {
}),
});
- expect(manager.getEnabledPersistentGenericServers()).toEqual(["alpha", "zebra"]);
+ // The linear shadow stays dead (reserved catalog name); connected notion joins.
+ expect(manager.getEnabledPersistentGenericServers()).toEqual(["alpha", "notion", "zebra"]);
});
it("picks up mcpServers added after construction on refresh()", () => {
@@ -289,4 +267,782 @@ describe("McpManager", () => {
});
expect(authStorage.get("mcp:task")).toMatchObject({ access: "stored-oauth-token" });
});
+
+ // The empty-auth sweep over the REAL catalog is pinned in mcp-catalog-eligibility.test.ts ("sweeps the REAL catalog:
+ // no row is enabled without proven credentials").
+
+ // Field-id env vars are never inferred as credentials: pinned on the REAL catalog in mcp-catalog-eligibility.test.ts
+ // ("the real aws-devops-agent row stays unauthenticated even when its setup env var is present").
+
+ // Strategy fail-closed semantics are pinned ONCE across prompt, dispatch,
+ // and view in mcp-catalog-eligibility.test.ts ("%s across prompt and dispatch").
+
+ // The oauth grant-state matrix is pinned ONCE, across the shared predicate, prompt, dispatch, and the picker view,
+ // in mcp-catalog-eligibility.test.ts.
+
+ it("a configured bearer env var is the ONLY credential source: no stale-OAuth fall-through when it is unset", () => {
+ // A stale OAuth grant sits under the id, but the server's configured
+ // credential source is the env var — while unset, nothing is enabled.
+ authStorage.set("mcp:beared", grant("stale", "https://beared.example/mcp", Date.now()));
+ const manager = new McpManager({
+ authStorage,
+ getServiceCatalog: () => [],
+ getUserServers: () => ({
+ beared: { type: "http", url: "https://beared.example/mcp", bearerTokenEnvVar: "BEARED_TOKEN_TEST" },
+ }),
+ });
+ expect(manager.listStatus().find((s) => s.server === "beared")?.enabled).toBe(false);
+ expect(manager.getEnabledPersistentGenericServers()).toEqual([]);
+
+ process.env.BEARED_TOKEN_TEST = "present";
+ try {
+ manager.refresh();
+ expect(manager.listStatus().find((s) => s.server === "beared")?.enabled).toBe(true);
+ } finally {
+ delete process.env.BEARED_TOKEN_TEST;
+ }
+ });
+});
+/**
+ * Deterministic settle for demand-driven background verification: the store's
+ * queueVerifyResult call is the concrete signal that the verification result
+ * was accepted, and the trailing flush chains behind the durable write — no
+ * timer, no polling.
+ */
+function verifyResultSettled(store: McpConnectionStore): { queued: Promise<void>; flush: () => Promise<void> } {
+ let queued!: () => void;
+ const signal = new Promise<void>((resolve) => {
+ queued = resolve;
+ });
+ const real = store.queueVerifyResult.bind(store);
+ vi.spyOn(store, "queueVerifyResult").mockImplementation((...args: Parameters<typeof real>) => {
+ queued();
+ return real(...args);
+ });
+ return { queued: signal, flush: () => store.flush() };
+}
+
+/** A synthetic OAuth grant bound to the given endpoint (no endpoint = unbound). */
+const grant = (access: string, endpoint?: string, at = Date.now()) => ({
+ type: "oauth" as const,
+ access,
+ refresh: "r",
+ expires: at + 3600_000,
+ ...(endpoint !== undefined ? { endpoint } : {}),
+});
+
+const CATALOG_SERVICE: McpServiceDescriptor = {
+ serviceId: "acme",
+ label: "Acme",
+ aliases: [],
+ transport: { type: "http", url: "https://mcp.acme.test/mcp" },
+ authStrategy: "oauth",
+ setup: { status: "ready" },
+ metadataReviewed: true,
+ legacyBuiltin: false,
+};
+
+const LEGACY_CATALOG: McpServiceDescriptor[] = [
+ {
+ serviceId: "linear",
+ label: "Linear",
+ aliases: [],
+ transport: { type: "http", url: "https://mcp.linear.app/mcp" },
+ authStrategy: "oauth",
+ setup: { status: "ready" },
+ metadataReviewed: true,
+ legacyBuiltin: true,
+ },
+ {
+ serviceId: "notion",
+ label: "Notion",
+ aliases: [],
+ transport: { type: "http", url: "https://mcp.notion.com/mcp" },
+ authStrategy: "oauth",
+ setup: { status: "ready" },
+ metadataReviewed: true,
+ legacyBuiltin: true,
+ },
+];
+
+describe("ENG-6108 reserved ownership and durable repair endpoints (manager)", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let store: McpConnectionStore;
+ let probeCalls: Array<{ url: string; token: string }>;
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "mcp-ownership-"));
+ authStorage = AuthStorage.create(join(tempDir, "auth.json"));
+ resetOAuthProviders();
+ store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ probeCalls = [];
+ });
+
+ afterEach(() => {
+ resetOAuthProviders();
+ rmSync(tempDir, { recursive: true, force: true });
+ });
+
+ function createManager(options: Partial<ConstructorParameters<typeof McpManager>[0]> = {}): McpManager {
+ return new McpManager({
+ authStorage,
+ connectionStore: store,
+ getServiceCatalog: () => LEGACY_CATALOG,
+ probeConnection: async (probeOptions) => {
+ probeCalls.push({ url: probeOptions.url, token: await probeOptions.getToken() });
+ return { ok: true, toolCount: 2 };
+ },
+ ...options,
+ });
+ }
+
+ it("a conflicting reserved-name declaration is never dispatchable: config, probe, and login all refuse", async () => {
+ const manager = createManager({
+ noBackgroundVerification: true,
+ getUserServers: () => ({ linear: { type: "http", url: "https://shadow.example/mcp", oauth: true } }),
+ });
+ const handlers = manager.hostHandlers();
+ await expect(handlers["mcp.config"]({ server: "linear" })).resolves.toEqual({});
+ await expect(handlers["mcp.refresh"]({ server: "linear" })).rejects.toThrow();
+ await expect(manager.verifyConnection("linear")).rejects.toThrow(
+ "Rename or remove the conflicting server settings",
+ );
+ expect(manager.getEnabledPersistentGenericServers()).not.toContain("linear");
+ // A shadow credential can never authorize dispatch either.
+ authStorage.set("mcp:linear", grant("shadow", "https://shadow.example/mcp", Date.now()));
+ manager.refresh();
+ expect(manager.getEnabledPersistentGenericServers()).not.toContain("linear");
+ expect(manager.getDisabledBuiltinSkillOverrides()).toContain("-linear/SKILL.md");
+ });
+
+ it("a same-name enabled:false declaration disables the builtin slot without deleting it", () => {
+ const manager = createManager({
+ noBackgroundVerification: true,
+ getUserServers: () => ({ linear: { type: "http", url: "https://mcp.linear.app/mcp", enabled: false } }),
+ });
+ authStorage.set("mcp:linear", grant("tok", "https://mcp.linear.app/mcp", Date.now()));
+ manager.refresh();
+ expect(manager.getEnabledPersistentGenericServers()).not.toContain("linear");
+ expect(manager.getDisabledBuiltinSkillOverrides()).toContain("-linear/SKILL.md");
+ });
+
+ it("a canonical-equivalent declaration keeps the builtin integration live", async () => {
+ const manager = createManager({
+ noBackgroundVerification: true,
+ getUserServers: () => ({
+ linear: { type: "http", url: "https://mcp.linear.app/mcp", oauth: true },
+ }),
+ });
+ authStorage.set("mcp:linear", grant("tok", "https://mcp.linear.app/mcp", Date.now()));
+ manager.refresh();
+ expect(manager.getEnabledPersistentGenericServers()).toContain("linear");
+ await expect(manager.verifyConnection("linear")).resolves.toMatchObject({ status: "connected" });
+ });
+
+ it("an installed record pins its durable endpoint for verification and dispatch when the catalog URL changes", async () => {
+ const now = Date.now();
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://old.acme.test/mcp",
+ label: "Acme",
+ status: "connected",
+ verifiedAt: now,
+ toolCount: 2,
+ createdAt: now,
+ updatedAt: now,
+ });
+ await store.flush();
+ authStorage.set("mcp:acme", grant("tok", "https://old.acme.test/mcp", Date.now()));
+ const manager = createManager({
+ noBackgroundVerification: true,
+ getServiceCatalog: () => [
+ { ...CATALOG_SERVICE, transport: { type: "http", url: "https://new.acme.test/mcp" } },
+ ],
+ });
+ // Verification probes the DURABLE saved endpoint, never the changed URL.
+ await expect(manager.verifyConnection("acme")).resolves.toMatchObject({
+ status: "connected",
+ endpoint: "https://old.acme.test/mcp",
+ });
+ expect(probeCalls).toEqual([{ url: "https://old.acme.test/mcp", token: "tok" }]);
+ // Dispatch config carries the same durable endpoint.
+ const config = (await manager.hostHandlers()["mcp.config"]({ server: "acme" })) as {
+ url?: string;
+ };
+ expect(config.url).toBe("https://old.acme.test/mcp");
+ });
+
+ it("a credential-only account never retargets automatic dispatch to a stored endpoint", async () => {
+ authStorage.set("mcp:acme", grant("tok", "https://old.acme.test/mcp", Date.now()));
+ const manager = createManager({ noBackgroundVerification: true, getServiceCatalog: () => [CATALOG_SERVICE] });
+ const handlers = manager.hostHandlers();
+ // A cross-endpoint credential-only grant authorizes nothing at the
+ // current service URL — dispatch config stays absent.
+ await expect(handlers["mcp.config"]({ server: "acme" })).resolves.toEqual({});
+ // A bound grant authorizes dispatch at the CURRENT service URL only — never at a stored credential endpoint.
+ authStorage.set("mcp:acme", grant("tok", "https://mcp.acme.test/mcp", Date.now()));
+ manager.refresh();
+ const bound = (await handlers["mcp.config"]({ server: "acme" })) as { url?: string };
+ expect(bound.url).toBe("https://mcp.acme.test/mcp");
+ });
+
+ it("background verification never probes an account claimed by a live attempt", async () => {
+ await store.reserveConnectionId({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "pending",
+ attemptId: "live-owner",
+ createdAt: 1,
+ updatedAt: 1,
+ });
+ authStorage.set("mcp:acme", grant("tok", "https://mcp.acme.test/mcp", Date.now()));
+ const manager = createManager({ getServiceCatalog: () => [CATALOG_SERVICE] });
+ const handlers = manager.hostHandlers();
+ await handlers["mcp.list_plugins"]({});
+ // The claimed-account skip happens in the scan's synchronous prefix (fired before the listing resolves), so the
+ // settled outcome is exact: no probe may ever start.
+ expect(probeCalls).toEqual([]);
+ });
+});
+
+describe("McpManager service catalog handlers", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let store: McpConnectionStore;
+ let probeCalls: Array<{ url: string; token: string }>;
+ let probeResult: { ok: true; toolCount: number } | { ok: false; error: "http-unauthorized" };
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "mcp-catalog-"));
+ authStorage = AuthStorage.create(join(tempDir, "auth.json"));
+ resetOAuthProviders();
+ store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ probeCalls = [];
+ probeResult = { ok: true, toolCount: 3 };
+ });
+
+ afterEach(() => {
+ resetOAuthProviders();
+ rmSync(tempDir, { recursive: true, force: true });
+ });
+
+ function createManager(options: Partial<ConstructorParameters<typeof McpManager>[0]> = {}): McpManager {
+ return new McpManager({
+ authStorage,
+ connectionStore: store,
+ // Exact-list assertions pin the legacy built-in slice; individual tests override this with their own catalogs.
+ getServiceCatalog: () => LEGACY_CATALOG,
+ probeConnection: async (probeOptions) => {
+ probeCalls.push({ url: probeOptions.url, token: await probeOptions.getToken() });
+ return probeResult;
+ },
+ ...options,
+ });
+ }
+
+ it("lists plugins with statuses, strict status filtering, and honest pagination", async () => {
+ authStorage.set("mcp:notion", grant("tok", "https://mcp.notion.com/mcp", Date.now()));
+ const manager = createManager({ noBackgroundVerification: true });
+ const handlers = manager.hostHandlers();
+
+ const all = (await handlers["mcp.list_plugins"]({})) as {
+ plugins: Array<{ serviceId: string; connectionStatus: string }>;
+ nextCursor: string | null;
+ };
+ expect(all.plugins.map((plugin) => `${plugin.serviceId}:${plugin.connectionStatus}`).sort()).toEqual([
+ "linear:not_connected",
+ "notion:pending",
+ ]);
+ expect(all.nextCursor).toBeNull();
+
+ const connected = (await handlers["mcp.list_plugins"]({
+ connectionStatus: "not_connected",
+ limit: 1,
+ })) as { plugins: Array<{ serviceId: string }>; nextCursor: string | null };
+ expect(connected.plugins).toHaveLength(1);
+ expect(connected.plugins[0]).toMatchObject({ serviceId: "linear" });
+ expect(connected.nextCursor).toBeNull();
+
+ const page = (await handlers["mcp.list_plugins"]({ limit: 1 })) as {
+ plugins: Array<{ serviceId: string }>;
+ nextCursor: string | null;
+ };
+ expect(page.plugins).toHaveLength(1);
+ expect(page.nextCursor).toBe("1");
+
+ await expect(handlers["mcp.list_plugins"]({ connectionStatus: "bogus" })).rejects.toThrow(
+ "unknown connectionStatus",
+ );
+ await expect(handlers["mcp.list_plugins"]({ limit: 0 })).rejects.toThrow("positive integer");
+ await expect(handlers["mcp.list_plugins"]({ cursor: "bogus" })).rejects.toThrow("invalid cursor");
+ });
+
+ it("searches plugins boundedly and rejects empty queries", async () => {
+ const manager = createManager({ noBackgroundVerification: true });
+ const handlers = manager.hostHandlers();
+ const result = (await handlers["mcp.search_plugins"]({ query: "NOTION" })) as {
+ plugins: Array<{ serviceId: string }>;
+ };
+ expect(result.plugins.map((plugin) => plugin.serviceId)).toEqual(["notion"]);
+ await expect(handlers["mcp.search_plugins"]({ query: " " })).rejects.toThrow("non-empty query");
+ });
+
+ it("lists connections including pending catalog grants, user servers, and ACP servers", async () => {
+ authStorage.set("mcp:linear", grant("tok", "https://mcp.linear.app/mcp", Date.now()));
+ const manager = createManager({
+ noBackgroundVerification: true,
+ getUserServers: () => ({ custom: { type: "http", url: "https://custom.test/mcp" } }),
+ });
+ manager.replaceAcpServers(
+ [{ name: "acp-tool", type: "http", url: "https://acp.test/mcp", headers: {} }],
+ "owner",
+ );
+ const handlers = manager.hostHandlers();
+ const result = (await handlers["mcp.list_connections"]({})) as {
+ connections: Array<{ connectionId: string; source: string; status: string; transport: string }>;
+ };
+ expect(result.connections.map((c) => `${c.connectionId}:${c.source}:${c.status}:${c.transport}`)).toEqual([
+ "acp-tool:acp:connected:http",
+ "custom:user:connected:http",
+ "linear:catalog:pending:http",
+ ]);
+ });
+
+ it("records an error (reconnect) once when demand-driven verification finds an unbound grant", async () => {
+ authStorage.set("mcp:acme", {
+ type: "oauth",
+ access: "legacy-token",
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ });
+ const manager = createManager({ getServiceCatalog: () => [CATALOG_SERVICE] });
+ const handlers = manager.hostHandlers();
+ await handlers["mcp.list_plugins"]({});
+ // The unusable-grant record is queued and flushed in the scan's
+ // synchronous prefix; the chained flush confirms the durable write.
+ await store.flush();
+ const record = store.get("acme");
+ expect(record?.status).toBe("error");
+ expect(record?.lastError).toBe("credential-unbound");
+ expect(probeCalls).toEqual([]);
+ // The next listing does not rewrite the record: its scan sees the
+ // existing record, so nothing is queued and the timestamp is settled.
+ await handlers["mcp.list_plugins"]({});
+ await store.flush();
+ expect(store.get("acme")?.updatedAt).toBe(record?.updatedAt);
+ });
+
+ it("serves per-account connection ids as their own dispatchable integrations", async () => {
+ // A second account "acme-2" with its own bound credential.
+ authStorage.set("mcp:acme-2", grant("acct-2", "https://mcp.acme.test/mcp", Date.now()));
+ store.upsert({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme (acme-2)",
+ status: "pending",
+ createdAt: Date.now(),
+ updatedAt: Date.now(),
+ });
+ await store.flush();
+ const manager = createManager({ getServiceCatalog: () => [CATALOG_SERVICE] });
+ // The alias gets its own provider (the add-account login targets it).
+ expect(getOAuthProvider("mcp:acme-2")).toBeDefined();
+ // Inventory includes the alias account once verified...
+ expect(manager.getEnabledPersistentGenericServers()).toContain("acme-2");
+ const record = await manager.verifyConnection("acme-2");
+ expect(record.status).toBe("connected");
+ expect(record.connectionId).toBe("acme-2");
+ expect(record.serviceId).toBe("acme");
+ expect(probeCalls).toEqual([{ url: "https://mcp.acme.test/mcp", token: "acct-2" }]);
+ });
+
+ it("full account lifecycle: second account listed and remains manageable after the default disconnects", async () => {
+ authStorage.set("mcp:acme", grant("primary", "https://mcp.acme.test/mcp", Date.now()));
+ authStorage.set("mcp:acme-2", grant("second", "https://mcp.acme.test/mcp", Date.now()));
+ const at = Date.now();
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "connected",
+ verifiedAt: at,
+ toolCount: 2,
+ createdAt: at,
+ updatedAt: at,
+ });
+ store.upsert({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme (acme-2)",
+ status: "pending",
+ createdAt: at,
+ updatedAt: at,
+ });
+ await store.flush();
+ const manager = createManager({ getServiceCatalog: () => [CATALOG_SERVICE] });
+ const handlers = manager.hostHandlers();
+
+ // Reload: both accounts are listed by the inventory.
+ manager.refresh();
+ const connections = (await handlers["mcp.list_connections"]({})) as {
+ connections: Array<{ connectionId: string; status: string }>;
+ };
+ const ids = connections.connections.map((connection) => connection.connectionId).sort();
+ expect(ids).toEqual(["acme", "acme-2"]);
+
+ // The default account disconnects: logout + record removal + reload.
+ authStorage.remove("mcp:acme");
+ store.remove("acme");
+ await store.flush();
+ manager.refresh();
+
+ // The second account is STILL listed, dispatchable, and verifiable.
+ const after = (await handlers["mcp.list_connections"]({})) as {
+ connections: Array<{ connectionId: string; status: string }>;
+ };
+ expect(after.connections.map((connection) => connection.connectionId)).toEqual(["acme-2"]);
+ expect(manager.getEnabledPersistentGenericServers()).toContain("acme-2");
+ const verified = await manager.verifyConnection("acme-2");
+ expect(verified.status).toBe("connected");
+ expect(verified.serviceId).toBe("acme");
+ });
+
+ it("drops an alias account's provider when its record is removed", async () => {
+ store.upsert({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme (acme-2)",
+ status: "pending",
+ createdAt: Date.now(),
+ updatedAt: Date.now(),
+ });
+ await store.flush();
+ const manager = createManager({ getServiceCatalog: () => [CATALOG_SERVICE] });
+ expect(getOAuthProvider("mcp:acme-2")).toBeDefined();
+ store.remove("acme-2");
+ await store.flush();
+ manager.refresh();
+ expect(getOAuthProvider("mcp:acme-2")).toBeUndefined();
+ });
+
+ it("alias accounts mirror the parent's classification: public no-auth stays credential-free, requires-setup gains no OAuth provider", async () => {
+ const at = Date.now();
+ const descriptors: McpServiceDescriptor[] = [
+ {
+ serviceId: "public-docs",
+ label: "Public Docs",
+ aliases: [],
+ transport: { type: "http", url: "https://public.example/mcp" },
+ authStrategy: "none",
+ setup: { status: "ready" },
+ metadataReviewed: true,
+ legacyBuiltin: false,
+ },
+ {
+ serviceId: "gated-oauth",
+ label: "Gated OAuth",
+ aliases: [],
+ transport: { type: "http", url: "https://gated.example/mcp" },
+ authStrategy: "oauth",
+ setup: { status: "requires-setup", reason: "manual setup" },
+ metadataReviewed: true,
+ legacyBuiltin: false,
+ },
+ ];
+ for (const [connectionId, serviceId, endpoint] of [
+ ["public-docs-2", "public-docs", "https://public.example/mcp"],
+ ["gated-oauth-2", "gated-oauth", "https://gated.example/mcp"],
+ ] as const) {
+ store.upsert({
+ connectionId,
+ serviceId,
+ endpoint,
+ label: connectionId,
+ status: "pending",
+ createdAt: at,
+ updatedAt: at,
+ });
+ }
+ await store.flush();
+ const manager = createManager({ noBackgroundVerification: true, getServiceCatalog: () => descriptors });
+ // Neither parent qualifies for an OAuth provider, so neither alias does: a requires-setup or otherwise non-OAuth
+ // service never offers a browser login to an extra account.
+ expect(getOAuthProvider("mcp:public-docs-2")).toBeUndefined();
+ expect(getOAuthProvider("mcp:gated-oauth-2")).toBeUndefined();
+ // A public no-auth service's account is credential-free exactly like its
+ // parent, so the alias record stays dispatchable with no credential.
+ expect(manager.getEnabledPersistentGenericServers()).toContain("public-docs-2");
+ // A requires-setup service's account stays closed like its parent until
+ // setup completes — no OAuth provider, no phantom browser-login path.
+ expect(manager.getEnabledPersistentGenericServers()).not.toContain("gated-oauth-2");
+ expect(manager.listStatus().find((s) => s.server === "gated-oauth-2")?.enabled).toBe(false);
+ });
+
+ it("reconciles owned providers atomically: override removal restores the catalog provider in one refresh", () => {
+ const getServices = () => [CATALOG_SERVICE];
+ let userServers: Record<string, { type: "http"; url: string; oauth: boolean }> = {
+ acme: { type: "http", url: "https://user-override.test/mcp", oauth: true },
+ };
+ const manager = createManager({ getServiceCatalog: getServices, getUserServers: () => userServers });
+ manager.registerAllProviders();
+ expect(getOAuthProvider("mcp:acme")?.name).toBe("acme");
+
+ // Removing the user override must restore the catalog provider in ONE refresh.
+ userServers = {};
+ manager.refresh();
+ manager.registerAllProviders();
+ expect(getOAuthProvider("mcp:acme")?.name).toBe("Acme");
+ });
+
+ it("verifies pending connections on demand: a listing triggers a real handshake and the next listing reports it", async () => {
+ authStorage.set("mcp:linear", grant("tok", "https://mcp.linear.app/mcp", Date.now()));
+ const settle = verifyResultSettled(store);
+ const manager = createManager();
+ const handlers = manager.hostHandlers();
+
+ const before = (await handlers["mcp.list_plugins"]({ connectionStatus: "pending" })) as {
+ plugins: Array<{ serviceId: string; connectionStatus: string }>;
+ };
+ expect(before.plugins[0]).toMatchObject({ serviceId: "linear", connectionStatus: "pending" });
+
+ // The demand-driven background probe runs against the bound endpoint
+ // with the token; its result lands durably before the next listing.
+ await settle.queued;
+ await settle.flush();
+ expect(probeCalls).toEqual([{ url: "https://mcp.linear.app/mcp", token: "tok" }]);
+
+ const after = (await handlers["mcp.list_plugins"]({})) as {
+ plugins: Array<{ serviceId: string; connectionStatus: string; toolCount?: number }>;
+ };
+ expect(after.plugins.find((plugin) => plugin.serviceId === "linear")).toMatchObject({
+ connectionStatus: "connected",
+ toolCount: 3,
+ });
+ });
+
+ it("keeps verification failures recoverable: a rejected credential records error without deleting the grant", async () => {
+ authStorage.set("mcp:linear", grant("tok", "https://mcp.linear.app/mcp", Date.now()));
+ probeResult = { ok: false, error: "http-unauthorized" };
+ const manager = createManager();
+ const record = await manager.verifyConnection("linear");
+ expect(record.status).toBe("error");
+ expect(record.lastError).toBe("http-unauthorized");
+ expect(authStorage.get("mcp:linear")).toBeDefined();
+ expect(store.get("linear")?.lastError).not.toContain("mcp.linear.app");
+ });
+
+ it("reloads connection records written by the interactive client on refresh()", async () => {
+ const manager = createManager({ noBackgroundVerification: true });
+ const clientStore = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ authStorage.set("mcp:notion", grant("tok", "https://mcp.notion.com/mcp", Date.now()));
+ clientStore.upsert({
+ connectionId: "notion",
+ serviceId: "notion",
+ endpoint: "https://mcp.notion.com/mcp",
+ label: "Notion",
+ status: "connected",
+ verifiedAt: Date.now(),
+ toolCount: 9,
+ createdAt: Date.now(),
+ updatedAt: Date.now(),
+ });
+ await clientStore.flush();
+ manager.refresh();
+
+ const handlers = manager.hostHandlers();
+ const connections = (await handlers["mcp.list_connections"]({})) as {
+ connections: Array<{ connectionId: string; status: string }>;
+ };
+ expect(connections.connections.find((connection) => connection.connectionId === "notion")).toMatchObject({
+ status: "connected",
+ });
+ });
+
+ // User-owned non-bundled ids coexisting with catalog cards is pinned at
+ // the identity/provider sites in mcp-provider-identity.test.ts ("manager
+ // catalog and per-account sites carry catalog advisory data") and by the
+ // registry-reset preservation in mcp-service-safety.test.ts.
+
+ // Connectable-vs-setup-required registration is pinned at the same
+ // manager sites in mcp-provider-identity.test.ts and the
+ // requires-setup fail-closed rule in mcp-catalog-eligibility.test.ts.
+
+ it("exposes mcp.connect only with an explicit approver and maps its result", async () => {
+ const bare = createManager({ noBackgroundVerification: true });
+ expect(Object.keys(bare.hostHandlers())).not.toContain("mcp.connect");
+
+ const approvals: string[] = [];
+ authStorage.set("mcp:acme", grant("grant", "https://mcp.acme.test/mcp", Date.now()));
+ const manager = createManager({
+ noBackgroundVerification: true,
+ getServiceCatalog: () => [CATALOG_SERVICE],
+ beginConnect: async (serviceId) => {
+ approvals.push(serviceId);
+ return serviceId === "acme";
+ },
+ });
+ const handlers = manager.hostHandlers();
+ // An approved login whose handshake fails reports the failure honestly.
+ probeResult = { ok: false, error: "http-unauthorized" };
+ const failed = (await handlers["mcp.connect"]({ serviceId: "acme" })) as {
+ status: string;
+ message?: string;
+ };
+ expect(failed.status).toBe("error");
+ expect(failed.message).toBe("http-unauthorized");
+
+ // A verified handshake is the only "connected" claim, with the tool count.
+ probeResult = { ok: true, toolCount: 3 };
+ const connected = await handlers["mcp.connect"]({ serviceId: "acme" });
+ expect(connected).toEqual({ status: "connected", connectionId: "acme", toolCount: 3 });
+ expect(approvals).toEqual(["acme", "acme"]);
+
+ await expect(handlers["mcp.connect"]({ serviceId: "missing" })).rejects.toThrow("Unknown MCP service");
+ await expect(handlers["mcp.connect"]({})).rejects.toThrow("requires a serviceId");
+ });
+});
+
+describe("McpManager token services (paste flow)", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let store: McpConnectionStore;
+ const TOKEN_URL = "https://mcp.token-service.test/mcp";
+
+ function tokenServiceFixture(overrides: Partial<McpServiceDescriptor> = {}): McpServiceDescriptor {
+ return {
+ serviceId: "token-service",
+ label: "Token Service",
+ aliases: [],
+ transport: { type: "http", url: TOKEN_URL },
+ authStrategy: "api_key",
+ setup: {
+ status: "requires-setup",
+ reason: "paste your token",
+ fields: [{ id: "TOKEN_SERVICE_TOKEN", label: "TOKEN_SERVICE_TOKEN", required: true, kind: "bearer-token" }],
+ },
+ metadataReviewed: false,
+ legacyBuiltin: false,
+ ...overrides,
+ };
+ }
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "mcp-token-mgr-"));
+ authStorage = AuthStorage.create(join(tempDir, "auth.json"));
+ store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ resetOAuthProviders();
+ });
+
+ afterEach(() => {
+ resetOAuthProviders();
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("demand-driven verification probes a token service only once its token is stored", async () => {
+ authStorage.set("mcp:token-service", {
+ type: "mcp_static_token",
+ endpoint: TOKEN_URL,
+ bearer: "ghp_stored-token",
+ bearerFieldId: "TOKEN_SERVICE_TOKEN",
+ createdAt: Date.now(),
+ });
+ const probes: string[] = [];
+ const settle = verifyResultSettled(store);
+ const manager = new McpManager({
+ authStorage,
+ connectionStore: store,
+ getServiceCatalog: () => [tokenServiceFixture()],
+ probeConnection: async (options) => {
+ probes.push(await options.getToken());
+ return { ok: true, toolCount: 7 };
+ },
+ });
+ const listPlugins = manager.hostHandlers()["mcp.list_plugins"];
+ expect(listPlugins).toBeDefined();
+ await listPlugins({ limit: 10 });
+ // The background handshake runs and lands in the record, not the console.
+ await settle.queued;
+ await settle.flush();
+ expect(probes).toEqual(["ghp_stored-token"]);
+ expect(store.get("token-service")).toMatchObject({ status: "connected", toolCount: 7 });
+ });
+
+ it("never probes a token service without a stored credential (no anonymous handshakes)", async () => {
+ const probes: string[] = [];
+ const manager = new McpManager({
+ authStorage,
+ connectionStore: store,
+ getServiceCatalog: () => [tokenServiceFixture()],
+ probeConnection: async (options) => {
+ probes.push(await options.getToken());
+ return { ok: true, toolCount: 7 };
+ },
+ });
+ const listPlugins = manager.hostHandlers()["mcp.list_plugins"];
+ expect(listPlugins).toBeDefined();
+ await listPlugins({ limit: 10 });
+ // The no-credential skip happens in the scan's synchronous prefix (fired before the listing resolves): no anonymous
+ // handshake may ever start, and nothing is recorded.
+ expect(probes).toEqual([]);
+ expect(store.get("token-service")).toBeUndefined();
+ });
+
+ it("a second account of a token service gets no OAuth provider and stays token-based and dispatchable", async () => {
+ const at = Date.now();
+ store.upsert({
+ connectionId: "token-service-2",
+ serviceId: "token-service",
+ endpoint: TOKEN_URL,
+ label: "Token Service (token-service-2)",
+ status: "pending",
+ createdAt: at,
+ updatedAt: at,
+ });
+ await store.flush();
+ const probed: string[] = [];
+ const manager = new McpManager({
+ authStorage,
+ connectionStore: store,
+ noBackgroundVerification: true,
+ getServiceCatalog: () => [tokenServiceFixture()],
+ probeConnection: async (options) => {
+ probed.push(await options.getToken());
+ return { ok: true, toolCount: 4 };
+ },
+ });
+ // The alias mirrors the parent's token classification: NO OAuth provider is registered for the account id (or the
+ // parent), so the extra account can never be offered a browser login whose grant isAuthed would reject.
+ expect(getOAuthProvider("mcp:token-service")).toBeUndefined();
+ expect(getOAuthProvider("mcp:token-service-2")).toBeUndefined();
+ // A pasted static token stored under the ACCOUNT's own id — the same
+ // credential source the parent accepts — makes it dispatchable.
+ authStorage.set("mcp:token-service-2", {
+ type: "mcp_static_token",
+ endpoint: TOKEN_URL,
+ bearer: "second-account-token",
+ bearerFieldId: "TOKEN_SERVICE_TOKEN",
+ createdAt: at,
+ });
+ expect(manager.getEnabledPersistentGenericServers()).toEqual(["token-service-2"]);
+ // mcp.config serves the SAME token-based config shape the parent serves.
+ const handlers = manager.hostHandlers();
+ await expect(handlers["mcp.config"]({ server: "token-service-2" })).resolves.toEqual({
+ type: "http",
+ url: TOKEN_URL,
+ credentialSource: "static-token",
+ });
+ // Verification probes with the stored pasted token, exactly like the parent.
+ const record = await manager.verifyConnection("token-service-2");
+ expect(record.status).toBe("connected");
+ expect(record.serviceId).toBe("token-service");
+ expect(probed).toEqual(["second-account-token"]);
+ });
});
diff --git a/packages/coding-agent/test/mcp-provider-identity.test.ts b/packages/coding-agent/test/mcp-provider-identity.test.ts
new file mode 100644
index 0000000000..e398af0a51
--- /dev/null
+++ b/packages/coding-agent/test/mcp-provider-identity.test.ts
@@ -0,0 +1,218 @@
+// ENG-6108 OAuth client identity wiring. The five provider registration sites must resolve the SAME identity
+// (settings fields -> engine options) at login and refresh time; the engine pins client identity on stored
+// credentials and refuses drift, so a mismatched factory breaks refresh spuriously. Offline: temporary files, denied
+// fetch, synthetic credentials, no OAuth flow.
+
+import { mkdtempSync, rmSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { resetOAuthProviders } from "@earendil-works/pi-ai/oauth";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { AuthStorage } from "../src/core/auth-storage.js";
+import { McpConnectionStore } from "../src/core/mcp/connection-store.js";
+import { McpManager } from "../src/core/mcp/mcp-manager.js";
+import { createConfiguredMcpProvider, resolveMcpOAuthIdentity } from "../src/core/mcp/service-catalog.js";
+import type { McpServerConfig } from "../src/core/settings-manager.js";
+import { InteractiveMode } from "../src/modes/interactive/interactive-mode.js";
+
+const createProviderMock = vi.hoisted(() => vi.fn());
+vi.mock("@earendil-works/pi-ai/mcp", async (importOriginal) => {
+ const actual = await importOriginal<typeof import("@earendil-works/pi-ai/mcp")>();
+ return {
+ ...actual,
+ createMcpOAuthProvider: ((config: unknown) => {
+ createProviderMock(config);
+ // The real provider keeps every downstream behavior intact.
+ return actual.createMcpOAuthProvider(config as never);
+ }) as typeof actual.createMcpOAuthProvider,
+ };
+});
+
+const IDENTITY_CONFIG: McpServerConfig = {
+ type: "http",
+ url: "https://mcp.acme.test/mcp",
+ oauth: true,
+ oauthClientId: "my-client",
+ oauthClientSecretEnvVar: "ACME_IDENTITY_SECRET",
+ oauthClientMetadataUrl: "https://mcp.acme.test/.well-known/client-metadata",
+ oauthScopes: ["read", "write"],
+};
+
+describe("ENG-6108 OAuth client identity wiring", () => {
+ let tempDir: string;
+ let realFetch: typeof globalThis.fetch;
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "mcp-identity-"));
+ process.env.ACME_IDENTITY_SECRET = "configured-secret";
+ createProviderMock.mockClear();
+ resetOAuthProviders();
+ realFetch = globalThis.fetch;
+ globalThis.fetch = (() => {
+ throw new Error("unexpected network fetch in offline mcp identity test");
+ }) as typeof fetch;
+ });
+
+ afterEach(() => {
+ delete process.env.ACME_IDENTITY_SECRET;
+ globalThis.fetch = realFetch;
+ resetOAuthProviders();
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ function providerConfigs(): Array<Record<string, unknown>> {
+ return createProviderMock.mock.calls.map((call) => call[0] as Record<string, unknown>);
+ }
+
+ // The resolver itself (configured identity, fail-closed missing secret, non-OAuth configs staying empty) is pinned
+ // in mcp-service-catalog.test.ts ("resolves a configured OAuth client identity with fail-closed secret semantics"
+ // and neighbors).
+
+ it("factory maps identity onto engine options: settings scopes win, catalog scopes fill otherwise", () => {
+ createConfiguredMcpProvider({
+ server: "acme",
+ label: "Acme",
+ url: "https://mcp.acme.test/mcp",
+ identity: resolveMcpOAuthIdentity(IDENTITY_CONFIG),
+ reviewedScopes: ["catalog-only"],
+ clientRegistration: "pre-registered",
+ });
+ expect(providerConfigs()).toEqual([
+ {
+ server: "acme",
+ label: "Acme",
+ url: "https://mcp.acme.test/mcp",
+ clientId: "my-client",
+ clientSecret: "configured-secret",
+ clientMetadataUrl: "https://mcp.acme.test/.well-known/client-metadata",
+ scopes: "read write",
+ clientRegistration: "pre-registered",
+ },
+ ]);
+ });
+
+ it("factory falls back to reviewed catalog scopes when no settings scopes exist", () => {
+ createConfiguredMcpProvider({
+ server: "acme",
+ url: "https://mcp.acme.test/mcp",
+ identity: {},
+ reviewedScopes: ["catalog-a", "catalog-b"],
+ });
+ expect(providerConfigs()).toEqual([
+ { server: "acme", url: "https://mcp.acme.test/mcp", scopes: "catalog-a catalog-b" },
+ ]);
+ });
+
+ // Manager registration failing closed on a missing secret env is the SAME resolver invariant pinned in
+ // mcp-service-catalog.test.ts ("a configured secret env that is missing resolves to the explicit empty string"): the
+ // manager passes the resolved identity straight to the factory pinned above.
+
+ it("manager catalog and per-account sites carry catalog advisory data, not user identity", async () => {
+ const store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ const now = Date.now();
+ store.upsert({
+ connectionId: "acme-2",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme (acme-2)",
+ status: "connected",
+ verifiedAt: now,
+ createdAt: now,
+ updatedAt: now,
+ });
+ await store.flush();
+ createProviderMock.mockClear();
+ new McpManager({
+ authStorage: AuthStorage.inMemory(),
+ connectionStore: store,
+ getServiceCatalog: () => [
+ {
+ serviceId: "acme",
+ label: "Acme",
+ aliases: [],
+ transport: { type: "http", url: "https://mcp.acme.test/mcp" },
+ authStrategy: "oauth",
+ setup: { status: "ready" },
+ metadataReviewed: true,
+ legacyBuiltin: false,
+ clientRegistration: "dynamic",
+ reviewedScopes: ["catalog-a"],
+ },
+ ],
+ });
+ const configs = providerConfigs().filter((config) => config.server === "acme" || config.server === "acme-2");
+ expect(configs).toEqual([
+ {
+ server: "acme",
+ label: "Acme",
+ url: "https://mcp.acme.test/mcp",
+ scopes: "catalog-a",
+ clientRegistration: "dynamic",
+ },
+ {
+ server: "acme-2",
+ label: "Acme (acme-2)",
+ url: "https://mcp.acme.test/mcp",
+ scopes: "catalog-a",
+ clientRegistration: "dynamic",
+ },
+ ]);
+ });
+
+ it("a guarded settings login registers staged and real ids with the IDENTICAL identity", async () => {
+ const authStorage = AuthStorage.inMemory();
+ const store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ const fake = {
+ mcpConnectionStore: store,
+ modelRegistry: { authStorage },
+ createAuthFlows: () => ({
+ runMcpLogin: async (serverId: string) => {
+ authStorage.set(`mcp:${serverId}`, {
+ type: "oauth",
+ access: "identity-credential",
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ });
+ return { status: "success" };
+ },
+ }),
+ ui: { requestRender: vi.fn() },
+ showStatus: vi.fn(),
+ showWarning: vi.fn(),
+ showError: vi.fn(),
+ isAgentStreaming: () => false,
+ isAgentCompacting: () => false,
+ handleReloadCommand: vi.fn(async () => true),
+ settingsManager: {
+ getGlobalMcpServers: () => ({ acme: IDENTITY_CONFIG }),
+ getMcpCatalogSources: () => [],
+ },
+ uiServices: { settingsManager: { getGlobalMcpServers: () => ({ acme: IDENTITY_CONFIG }) } },
+ } as unknown as Record<string, unknown>;
+ Object.setPrototypeOf(fake, InteractiveMode.prototype);
+ await (
+ fake as unknown as {
+ connectMcpAccountByName: (name: string) => Promise<{ resolved: boolean; result: { status: string } }>;
+ }
+ ).connectMcpAccountByName.call(fake, "acme");
+
+ const staged = providerConfigs().find(
+ (config) => typeof config.server === "string" && config.server.includes("--"),
+ );
+ const real = providerConfigs().find((config) => config.server === "acme");
+ expect(staged).toBeDefined();
+ expect(real).toBeDefined();
+ // The SAME resolved identity lands on the staged login and the real
+ // account provider: the engine's refresh binding never sees drift.
+ for (const config of [staged, real]) {
+ expect(config).toMatchObject({
+ url: "https://mcp.acme.test/mcp",
+ clientId: "my-client",
+ clientSecret: "configured-secret",
+ clientMetadataUrl: "https://mcp.acme.test/.well-known/client-metadata",
+ scopes: "read write",
+ });
+ }
+ });
+});
diff --git a/packages/coding-agent/test/mcp-service-catalog.test.ts b/packages/coding-agent/test/mcp-service-catalog.test.ts
new file mode 100644
index 0000000000..9d3b9fefcf
--- /dev/null
+++ b/packages/coding-agent/test/mcp-service-catalog.test.ts
@@ -0,0 +1,1382 @@
+import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
+import { homedir, tmpdir } from "node:os";
+import { join } from "node:path";
+import type { McpServiceEntry } from "@earendil-works/pi-ai/mcp";
+import { createMcpOAuthProvider, SERVICE_CATALOG } from "@earendil-works/pi-ai/mcp";
+import { registerOAuthProvider, resetOAuthProviders } from "@earendil-works/pi-ai/oauth";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { AuthStorage, type McpStaticTokenCredential } from "../src/core/auth-storage.js";
+import { MCP_PROBE_ERRORS } from "../src/core/mcp/connection-probe.js";
+import { type McpConnectionRecord, McpConnectionStore } from "../src/core/mcp/connection-store.js";
+import {
+ buildConnectionViews,
+ buildPluginViews,
+ defaultServiceCatalogProvider,
+ isPasteableTokenService,
+ type McpPluginView,
+ type McpServiceDescriptor,
+ mcpCredentialFieldPromptLabel,
+ mcpCredentialFields,
+ mcpCredentialKey,
+ mcpLoginEligibility,
+ mcpPasteCredential,
+ mcpStaticTokenUsable,
+ nextMcpConnectionId,
+ resolveMcpOAuthIdentity,
+ resolveMcpServiceCatalog,
+ sameGrantToken,
+ searchPluginViews,
+ verifyMcpConnection,
+} from "../src/core/mcp/service-catalog.js";
+
+function serviceFixture(overrides: Partial<McpServiceDescriptor> = {}): McpServiceDescriptor {
+ return {
+ serviceId: "acme",
+ label: "Acme",
+ aliases: [],
+ transport: { type: "http", url: "https://mcp.acme.test/mcp" },
+ authStrategy: "oauth",
+ setup: { status: "ready" },
+ metadataReviewed: true,
+ legacyBuiltin: false,
+ ...overrides,
+ };
+}
+
+function oauthCredential(expiresInMs = 3600_000, endpoint?: string) {
+ return {
+ type: "oauth" as const,
+ access: "tok",
+ refresh: "r",
+ expires: Date.now() + expiresInMs,
+ ...(endpoint !== undefined ? { endpoint } : {}),
+ };
+}
+
+describe("service catalog views", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let store: McpConnectionStore;
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "svc-catalog-"));
+ authStorage = AuthStorage.inMemory();
+ store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ });
+
+ afterEach(() => {
+ rmSync(tempDir, { recursive: true, force: true });
+ });
+
+ /** The view surface under test: one catalog service over the live stores. */
+ function buildViews(): McpPluginView[] {
+ return buildPluginViews({
+ services: [serviceFixture()],
+ userServers: undefined,
+ authStorage,
+ connectionStore: store,
+ });
+ }
+
+ it("lists a catalog service as not connected and connectable without credentials", () => {
+ const views = buildViews();
+ expect(views).toHaveLength(1);
+ expect(views[0]).toMatchObject({
+ serviceId: "acme",
+ label: "Acme",
+ connectionStatus: "not_connected",
+ connectable: true,
+ usesOAuth: true,
+ source: "catalog",
+ connectionIds: [],
+ });
+ });
+
+ it("keeps a cancelled account shell visible and connectable without implying an active login", async () => {
+ await store.reserveConnectionId({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "pending",
+ attemptId: "cancelled",
+ createdAt: 1,
+ updatedAt: 1,
+ });
+ await store.releaseClaim({ connectionId: "acme", attemptId: "cancelled" });
+ const options = { services: [serviceFixture()], userServers: undefined, authStorage, connectionStore: store };
+ const [view] = buildPluginViews(options);
+ expect(view).toMatchObject({ connectionStatus: "not_connected", connectable: true, connectionIds: ["acme"] });
+ expect(view.setupHint).toContain("settings kept");
+ expect(buildConnectionViews(options)[0]).toMatchObject({ connectionId: "acme", status: "not_connected" });
+ const userOptions = {
+ ...options,
+ userServers: { acme: { type: "http" as const, url: "https://mcp.acme.test/mcp", oauth: true } },
+ };
+ expect(buildPluginViews(userOptions)[0]).toMatchObject({
+ connectionIds: ["acme"],
+ connectionStatus: "not_connected",
+ connectable: true,
+ });
+ expect(buildConnectionViews(userOptions)[0]).toMatchObject({ connectionId: "acme", status: "not_connected" });
+ expect(await store.claimConnectionId({ connectionId: "acme", attemptId: "retry" })).toBe(true);
+ expect(await store.removeAccount({ connectionId: "acme", authCleanup: () => false })).toBe("removed");
+ });
+
+ it("never reports connected from a stored token alone: bound grants without a verified record stay pending", () => {
+ authStorage.set(mcpCredentialKey("acme"), oauthCredential(3600_000, "https://mcp.acme.test/mcp"));
+ const views = buildViews();
+ expect(views[0]?.connectionStatus).toBe("pending");
+ expect(views[0]?.connectionIds).toEqual(["acme"]);
+ });
+
+ it.each([
+ { name: "an unbound legacy grant", credential: () => oauthCredential() },
+ { name: "a cross-endpoint grant", credential: () => oauthCredential(3600_000, "https://other.example/mcp") },
+ ])("surfaces $name as reconnect-required, never pending or connected", ({ credential }) => {
+ authStorage.set(mcpCredentialKey("acme"), credential());
+ const views = buildViews();
+ expect(views[0]?.connectionStatus).toBe("error");
+ expect(views[0]?.setupHint).toContain("not bound to this endpoint");
+ });
+
+ it("reports connected only with a verified connection record", () => {
+ authStorage.set(mcpCredentialKey("acme"), oauthCredential(3600_000, "https://mcp.acme.test/mcp"));
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "connected",
+ verifiedAt: Date.now(),
+ toolCount: 7,
+ createdAt: Date.now(),
+ updatedAt: Date.now(),
+ });
+ const views = buildViews();
+ expect(views[0]?.connectionStatus).toBe("connected");
+ expect(views[0]?.toolCount).toBe(7);
+ expect(views[0]?.verifiedAt).toBeGreaterThan(0);
+ });
+
+ // Wrong-type and empty-access grant usability is pinned across predicate,
+ // prompt, dispatch, and view in mcp-catalog-eligibility.test.ts.
+
+ it("downgrades a connected record when the credential disappears", () => {
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "connected",
+ verifiedAt: Date.now(),
+ toolCount: 3,
+ createdAt: Date.now(),
+ updatedAt: Date.now(),
+ });
+ const views = buildViews();
+ expect(views[0]?.connectionStatus).toBe("error");
+ expect(views[0]?.setupHint).toContain("Reconnect");
+ });
+
+ // Expired-no-refresh status and its honest hint are pinned across
+ // predicate, prompt, dispatch, and view in mcp-catalog-eligibility.test.ts.
+
+ // none+requires-setup failing closed with no connect action is pinned across prompt, dispatch, and view in
+ // mcp-catalog-eligibility.test.ts ("%s across prompt and dispatch").
+
+ it("never offers Connect for sse, stdio, or http-template transports", () => {
+ const views = buildPluginViews({
+ services: [
+ serviceFixture({ serviceId: "sse-svc", label: "SSE Svc", transport: { type: "other" } }),
+ serviceFixture({ serviceId: "stdio-svc", label: "Stdio Svc", transport: { type: "stdio" } }),
+ serviceFixture({ serviceId: "tmpl-svc", label: "Tmpl Svc", transport: { type: "http-template" } }),
+ ],
+ userServers: undefined,
+ authStorage,
+ connectionStore: store,
+ });
+ expect(views.every((view) => view.connectionStatus === "setup_required" && !view.connectable)).toBe(true);
+ expect(views.every((view) => typeof view.setupHint === "string" && view.setupHint.length > 0)).toBe(true);
+ });
+
+ // Unverified imported OAuth candidates staying explicitly connectable is pinned in this file's
+ // resolveMcpServiceCatalog describe ("keeps unverified OAuth candidates visible and explicitly connectable").
+
+ // User-owned non-legacy ids coexisting with catalog rows is pinned at dispatch level in mcp-manager.test.ts ("serves
+ // custom catalog providers: user-owned non-bundled ids coexist with catalog cards").
+
+ // Dead user shadows of bundled catalog ids are pinned with the reserved name matrix at dispatch level in
+ // mcp-manager.test.ts ("ENG-6108 reserved ownership and durable repair endpoints").
+
+ // Plugin/connection listing, search, strict status filtering, and honest cursor pagination are pinned at the
+ // PROTOCOL boundary (the mcp.list_plugins / mcp.search_plugins handlers) in mcp-manager.test.ts.
+});
+
+describe("ENG-6108 active login ownership (distinct from pending verification)", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let store: McpConnectionStore;
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "svc-login-pending-"));
+ authStorage = AuthStorage.inMemory();
+ store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ });
+
+ afterEach(() => {
+ rmSync(tempDir, { recursive: true, force: true });
+ });
+
+ it("an active pending login (attemptId, no grant) stays visible and suppresses Connect actions, never reads as missing credentials", async () => {
+ await store.reserveConnectionId({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "pending",
+ attemptId: "live-owner",
+ createdAt: 1,
+ updatedAt: 1,
+ });
+ const options = { services: [serviceFixture()], userServers: undefined, authStorage, connectionStore: store };
+ const [view] = buildPluginViews(options);
+ // The account row is visible and honestly pending — but the aggregate
+ // never offers a second Connect/Reconnect while an attempt owns it.
+ expect(view.connectionStatus).toBe("pending");
+ expect(view.loginPending).toBe(true);
+ expect(view.connectable).toBe(false);
+ expect(view.addAccountAllowed).toBe(false);
+ expect(view.connectionIds).toEqual(["acme"]);
+ const [inventory] = buildConnectionViews(options);
+ expect(inventory).toMatchObject({ connectionId: "acme", status: "pending", loginPending: true });
+ });
+
+ // A claimed account being live ownership (no second action, Remove stays
+ // available) is pinned at dispatch level in mcp-manager.test.ts
+ // ("background verification never probes an account claimed by a live
+ // attempt") and at the chain seam in service-catalog-picker.test.ts
+ // ("a blocked action (login in progress) reports its status and never re-enters").
+});
+
+// Reserved-builtin ownership classification (canonical-equivalent keeps the slot live, enabled:false disables without
+// deleting, conflicting names never dispatch, installed accounts stay listed) is pinned at the DISPATCH level in
+// mcp-manager.test.ts ("ENG-6108 reserved ownership and durable repair endpoints") and
+// mcp-catalog-eligibility.test.ts.
+
+describe("ENG-6108 per-operation login eligibility (fresh vs exact-id repair)", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let store: McpConnectionStore;
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "svc-eligibility-"));
+ authStorage = AuthStorage.inMemory();
+ store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ });
+
+ afterEach(() => {
+ rmSync(tempDir, { recursive: true, force: true });
+ });
+
+ it("a changed catalog URL never retargets an installed repair: the durable record endpoint wins", async () => {
+ const now = Date.now();
+ store.upsert({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://old.acme.test/mcp",
+ label: "Acme",
+ status: "connected",
+ verifiedAt: now,
+ createdAt: now,
+ updatedAt: now,
+ });
+ await store.flush();
+ authStorage.set(mcpCredentialKey("acme"), oauthCredential(3600_000, "https://old.acme.test/mcp"));
+ const eligibility = mcpLoginEligibility({
+ connectionId: "acme",
+ service: serviceFixture({ transport: { type: "http", url: "https://new.acme.test/mcp" } }),
+ record: store.get("acme"),
+ credential: authStorage.get(mcpCredentialKey("acme")),
+ });
+ expect(eligibility.allowed).toBe(true);
+ expect(eligibility.repair).toBe(true);
+ expect(eligibility.endpoint).toBe("https://old.acme.test/mcp");
+ });
+
+ it("a pending reservation shell alone is not repair evidence for a vanished-source service", async () => {
+ await store.reserveConnectionId({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://old.acme.test/mcp",
+ label: "Acme",
+ status: "pending",
+ attemptId: "shell",
+ createdAt: 1,
+ updatedAt: 1,
+ });
+ await store.releaseClaim({ connectionId: "acme", attemptId: "shell" });
+ const eligibility = mcpLoginEligibility({
+ connectionId: "acme",
+ service: serviceFixture({
+ transport: { type: "http", url: "https://old.acme.test/mcp" },
+ pinnedFromRecord: true,
+ }),
+ record: store.get("acme"),
+ credential: undefined,
+ });
+ expect(eligibility.allowed).toBe(false);
+ expect(eligibility.setupHint).toContain("remove this account or restore its source");
+ });
+
+ it("a credential-only exact-id bound grant qualifies for repair at its bound endpoint", () => {
+ authStorage.set(mcpCredentialKey("acme"), oauthCredential(3600_000, "https://old.acme.test/mcp"));
+ const eligibility = mcpLoginEligibility({
+ connectionId: "acme",
+ service: serviceFixture({ transport: { type: "http", url: "https://new.acme.test/mcp" } }),
+ record: undefined,
+ credential: authStorage.get(mcpCredentialKey("acme")),
+ });
+ expect(eligibility).toMatchObject({ allowed: true, repair: true, endpoint: "https://old.acme.test/mcp" });
+ });
+
+ it("an active attempt denies every login route on that account", async () => {
+ await store.reserveConnectionId({
+ connectionId: "acme",
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status: "pending",
+ attemptId: "live",
+ createdAt: 1,
+ updatedAt: 1,
+ });
+ const eligibility = mcpLoginEligibility({
+ connectionId: "acme",
+ service: serviceFixture(),
+ record: store.get("acme"),
+ credential: undefined,
+ });
+ expect(eligibility.allowed).toBe(false);
+ expect(eligibility.setupHint).toContain("Login in progress");
+ });
+
+ // Login intent routing (explicit commands carry OAuth intent; the guarded claim runs it) is pinned at the mode seam
+ // in mcp-activation-queue.test.ts and at dispatch level in mcp-manager.test.ts.
+
+ // Bearer-token settings servers staying token-based (never OAuth) is pinned in mcp-catalog-eligibility.test.ts ("a
+ // configured bearer env var is the ONLY credential source") and at dispatch level in mcp-manager.test.ts.
+
+ // Unverified candidates staying explicitly connectable (no tested or certified claim) is pinned in the
+ // resolveMcpServiceCatalog describe in this file ("keeps unverified OAuth candidates visible and explicitly
+ // connectable").
+});
+
+describe("ENG-6108 catalog ordering and OAuth identity resolution", () => {
+ let tempDir: string;
+ let _authStorage: AuthStorage;
+ let _store: McpConnectionStore;
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "svc-order-"));
+ _authStorage = AuthStorage.inMemory();
+ _store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ });
+
+ afterEach(() => {
+ rmSync(tempDir, { recursive: true, force: true });
+ });
+
+ // Catalog row ordering (connected and ready-to-connect first) is pinned
+ // at the protocol boundary in mcp-manager.test.ts ("lists enabled generic
+ // servers including connected catalog services in deterministic order").
+
+ it("resolves a configured OAuth client identity with fail-closed secret semantics", () => {
+ const previous = process.env.ACME_OAUTH_SECRET;
+ process.env.ACME_OAUTH_SECRET = "configured-secret";
+ try {
+ const identity = resolveMcpOAuthIdentity({
+ type: "http",
+ url: "https://mcp.acme.test/mcp",
+ oauth: true,
+ oauthClientId: "my-client",
+ oauthClientSecretEnvVar: "ACME_OAUTH_SECRET",
+ oauthClientMetadataUrl: "https://mcp.acme.test/.well-known/oauth-client",
+ oauthScopes: ["read", "write"],
+ });
+ expect(identity).toEqual({
+ clientId: "my-client",
+ clientSecret: "configured-secret",
+ clientMetadataUrl: "https://mcp.acme.test/.well-known/oauth-client",
+ scopes: ["read", "write"],
+ });
+ } finally {
+ if (previous === undefined) delete process.env.ACME_OAUTH_SECRET;
+ else process.env.ACME_OAUTH_SECRET = previous;
+ }
+ });
+
+ it("a configured secret env that is missing resolves to the explicit empty string, never a stale fallback", () => {
+ const identity = resolveMcpOAuthIdentity({
+ type: "http",
+ url: "https://mcp.acme.test/mcp",
+ oauth: true,
+ oauthClientSecretEnvVar: "ACME_MISSING_SECRET",
+ });
+ expect(identity.clientSecret).toBe("");
+ });
+
+ it("identity stays empty for configs without OAuth fields or non-HTTP transports", () => {
+ expect(resolveMcpOAuthIdentity({ type: "http", url: "https://mcp.acme.test/mcp" })).toEqual({});
+ expect(resolveMcpOAuthIdentity(undefined)).toEqual({});
+ expect(
+ resolveMcpOAuthIdentity({
+ type: "http",
+ url: "https://mcp.acme.test/mcp",
+ oauthScopes: [],
+ }),
+ ).toEqual({});
+ });
+});
+
+describe("verifyMcpConnection", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let store: McpConnectionStore;
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "svc-verify-"));
+ authStorage = AuthStorage.inMemory();
+ store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ resetOAuthProviders();
+ // Production registers the catalog OAuth provider before login, so authStorage.getApiKey resolves the stored grant.
+ registerOAuthProvider(
+ createMcpOAuthProvider({ server: "acme", label: "Acme", url: "https://mcp.acme.test/mcp" }),
+ );
+ authStorage.set(mcpCredentialKey("acme"), {
+ type: "oauth",
+ access: "grant-a",
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ });
+ });
+
+ afterEach(() => {
+ resetOAuthProviders();
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ /** The shared verify options over the live stores, with an injected probe. */
+ function verify(probe: NonNullable<Parameters<typeof verifyMcpConnection>[0]["probe"]>) {
+ return verifyMcpConnection({
+ authStorage,
+ connectionStore: store,
+ connectionId: "acme",
+ serviceId: "acme",
+ label: "Acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ usesOAuth: true,
+ probe,
+ });
+ }
+
+ it("records connected with the discovered tool count after a successful handshake", async () => {
+ const record = await verify(async () => ({ ok: true, toolCount: 5 }));
+ expect(record.status).toBe("connected");
+ expect(record.toolCount).toBe(5);
+ expect(store.get("acme")?.status).toBe("connected");
+ });
+
+ it("records error with a fixed safe category when the server rejects the credential", async () => {
+ const record = await verify(async () => ({ ok: false, error: MCP_PROBE_ERRORS.UNAUTHORIZED }));
+ expect(record.status).toBe("error");
+ // The failure is a fixed category; the endpoint URL never leaks into it.
+ expect(record.lastError).toBe("http-unauthorized");
+ expect(record.lastError).not.toContain("mcp.acme.test");
+ });
+
+ it("keeps pending (not error) when verification could not run — a broken probe is not a broken grant", async () => {
+ const record = await verify(async () => ({ ok: false, error: MCP_PROBE_ERRORS.NETWORK }));
+ expect(record.status).toBe("pending");
+ expect(record.lastError).toBe("network-unreachable");
+ });
+
+ it("binds verification currency to the exact probed token (equal, different, empty, length)", async () => {
+ // Equal: the probed token matches the current grant.
+ expect(sameGrantToken("token-a", "token-a")).toBe(true);
+ // Different token of equal length: constant-time inequality.
+ expect(sameGrantToken("token-a", "token-b")).toBe(false);
+ // Empty grants stay current against empty (nothing to rotate).
+ expect(sameGrantToken("", "")).toBe(true);
+ // A rotated token of a different length must still compare unequal.
+ expect(sameGrantToken("short", "a-much-longer-rotated-token")).toBe(false);
+ // Replacement of the same length is still detected.
+ expect(sameGrantToken("token-a", "token-x")).toBe(false);
+ });
+
+ it("discards a stale verify result when the connection is logged out mid-probe", async () => {
+ let releaseProbe: (() => void) | undefined;
+ const probeGate = new Promise<void>((resolve) => {
+ releaseProbe = resolve;
+ });
+ const verifyPromise = verify(async () => {
+ await probeGate;
+ return { ok: true, toolCount: 4 };
+ });
+ // Logout lands while the probe is in flight.
+ authStorage.logout(mcpCredentialKey("acme"));
+ releaseProbe?.();
+ const record = await verifyPromise;
+ expect(record.status).toBe("pending");
+ expect(record.lastError).toBe("credential-changed");
+ // The stale result must never persist a connected record.
+ expect(store.get("acme")).toBeUndefined();
+ });
+
+ it("discards a stale verify result when the grant rotates mid-probe", async () => {
+ let releaseProbe: (() => void) | undefined;
+ const probeGate = new Promise<void>((resolve) => {
+ releaseProbe = resolve;
+ });
+ const verifyPromise = verify(async () => {
+ await probeGate;
+ return { ok: true, toolCount: 4 };
+ });
+ // The credential rotates (re-login/refresh) while the probe is in flight.
+ authStorage.set(mcpCredentialKey("acme"), {
+ type: "oauth",
+ access: "grant-b",
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ });
+ releaseProbe?.();
+ const record = await verifyPromise;
+ expect(record.status).toBe("pending");
+ expect(record.lastError).toBe("credential-changed");
+ expect(store.get("acme")?.status).not.toBe("connected");
+ });
+
+ it("persists records across store reloads", async () => {
+ await verify(async () => ({ ok: true, toolCount: 2 }));
+ const reopened = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ expect(reopened.get("acme")?.status).toBe("connected");
+ });
+
+ it("tolerates a corrupt connections file by resetting", () => {
+ writeFileSync(join(tempDir, "mcp-connections.json"), "{ not json", "utf8");
+ const reopened = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ expect(reopened.records()).toEqual([]);
+ });
+});
+
+describe("defaultServiceCatalogProvider", () => {
+ it("derives descriptors from the merged catalog: legacy built-ins plus the imported entries", () => {
+ const services = defaultServiceCatalogProvider()();
+ const ids = new Set(services.map((service) => service.serviceId));
+ // The merged catalog supersedes the legacy-only slice; the full entry set (70 today, after the 2026-09-14 zero-app
+ // cut, the 2026-09-15 final cut to one-click DCR or user token/key only, and the 2026-09-16 token-only cut) still
+ // contains the reserved legacy built-ins.
+ expect(ids.has("linear")).toBe(true);
+ expect(ids.has("notion")).toBe(true);
+ expect(services.length).toBeGreaterThan(50);
+ const legacy = services.filter((service) => service.legacyBuiltin);
+ expect(legacy.map((service) => service.serviceId).sort()).toEqual(["linear", "notion"]);
+ // Imported entries are never reviewed by construction.
+ for (const service of services) {
+ if (!service.legacyBuiltin) {
+ expect(service.metadataReviewed).toBe(false);
+ }
+ }
+ });
+});
+
+describe("nextMcpConnectionId", () => {
+ it("keeps the service id for the first account and allocates -2, -3, ... after it", () => {
+ const taken = new Set<string>(["acme", "acme-2"]);
+ expect(nextMcpConnectionId("acme", (id) => taken.has(id))).toBe("acme-3");
+ taken.delete("acme");
+ expect(nextMcpConnectionId("acme", (id) => taken.has(id))).toBe("acme");
+ taken.add("acme");
+ taken.add("acme-3");
+ expect(nextMcpConnectionId("acme", (id) => taken.has(id))).toBe("acme-4");
+ });
+});
+
+describe("ENG-6108 computed per-account status (no stale Connected)", () => {
+ const URL = "https://mcp.acme.test/mcp";
+ function build(authStorage: AuthStorage, store: McpConnectionStore) {
+ return buildPluginViews({
+ services: [serviceFixture()],
+ userServers: undefined,
+ authStorage,
+ connectionStore: store,
+ });
+ }
+ function connectedRecord(connectionId: string, at: number) {
+ return {
+ connectionId,
+ serviceId: "acme",
+ endpoint: URL,
+ label: connectionId === "acme" ? "Acme" : `Acme (${connectionId})`,
+ status: "connected" as const,
+ verifiedAt: at,
+ toolCount: 2,
+ createdAt: at,
+ updatedAt: at,
+ };
+ }
+
+ // The per-account path (the "-2" alias id) shares the computed-status rule: a previously CONNECTED record with a
+ // broken credential never reads as Connected. One table covers the three broken-credential states; the inventory row
+ // agrees with the card (same computed status).
+ const connectionId = "acme-2";
+ it.each([
+ {
+ name: "UNBOUND",
+ credential: () => ({ type: "oauth" as const, access: "tok", refresh: "r", expires: Date.now() + 3600_000 }),
+ hint: "Reconnect required",
+ checkInventory: true,
+ },
+ {
+ name: "RETARGETED",
+ credential: () => ({
+ type: "oauth" as const,
+ access: "tok",
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ endpoint: "https://retargeted.test/mcp",
+ }),
+ hint: "Reconnect required",
+ checkInventory: false,
+ },
+ {
+ name: "EXPIRED, no-refresh",
+ credential: () => ({
+ type: "oauth" as const,
+ access: "tok",
+ // Empty refresh token: expired AND unrecoverable.
+ refresh: "",
+ expires: Date.now() - 60_000,
+ endpoint: URL,
+ }),
+ hint: "expired without a refresh token",
+ checkInventory: false,
+ },
+ ])(
+ `a previously connected record with an ${"$"}{name} credential reports Reconnect (${"$"}{connectionId})`,
+ ({ credential, hint, checkInventory }) => {
+ const authStorage = AuthStorage.inMemory();
+ authStorage.set(mcpCredentialKey(connectionId), credential());
+ const store = McpConnectionStore.open(join(tmpdir(), `stale-${hint}/mcp-connections.json`));
+ store.upsert(connectedRecord(connectionId, Date.now()));
+ const views = build(authStorage, store);
+ expect(views[0]?.connectionStatus).toBe("error");
+ expect(views[0]?.setupHint).toContain(hint);
+ if (checkInventory) {
+ const connections = buildConnectionViews({
+ services: [serviceFixture()],
+ userServers: undefined,
+ authStorage,
+ connectionStore: store,
+ });
+ expect(connections.find((connection) => connection.connectionId === connectionId)?.status).toBe("error");
+ }
+ },
+ );
+
+ it("catalog metadata aliases are searchable when absent from label, id, and description", () => {
+ const service = serviceFixture({
+ label: "Totally Different Name",
+ aliases: ["linear-app", "lnr"],
+ });
+ const views = buildPluginViews({
+ services: [service],
+ userServers: undefined,
+ authStorage: AuthStorage.inMemory(),
+ connectionStore: McpConnectionStore.open(join(tmpdir(), "alias-search/mcp-connections.json")),
+ });
+ expect(views[0]?.aliases).toEqual(["linear-app", "lnr"]);
+ // The alias hits nowhere else on the card.
+ expect(views[0]?.label).not.toContain("linear-app");
+ expect(views[0]?.serviceId).not.toContain("linear-app");
+ expect(views[0]?.description ?? "").not.toContain("linear-app");
+ // But it matches the search.
+ expect(searchPluginViews(views, "linear-app", 10)).toHaveLength(1);
+ expect(searchPluginViews(views, "lnr", 10)).toHaveLength(1);
+ expect(searchPluginViews(views, "no-such-thing", 10)).toHaveLength(0);
+ });
+});
+
+describe("ENG-6108 wave-4 resolver and account aggregation", () => {
+ function accountRecord(connectionId: string, status: "connected" | "pending" | "error", at: number) {
+ return {
+ connectionId,
+ serviceId: "acme",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Acme",
+ status,
+ createdAt: at,
+ updatedAt: at,
+ };
+ }
+
+ it("a failing local source never blocks the rest: built-ins and other sources survive with a visible diagnostic", () => {
+ const resolution = resolveMcpServiceCatalog({
+ localSources: ["/bad.json", "/good.json"],
+ loadLocal: (filePath: string) => {
+ if (filePath === "/bad.json") {
+ throw new Error("Unexpected token in JSON");
+ }
+ return {
+ entries: [
+ {
+ server: "goodlocal",
+ service: "goodlocal",
+ label: "Good Local",
+ url: "https://good.test/mcp",
+ aliases: [],
+ transport: { type: "http", url: "https://good.test/mcp" },
+ auth: { strategy: "oauth", clientRegistration: "dynamic" },
+ setup: { status: "ready" },
+ verification: { status: "unverified" },
+ legacyBuiltin: false,
+ provenance: [],
+ } as McpServiceEntry,
+ ],
+ path: filePath,
+ };
+ },
+ });
+ expect(resolution.descriptors.some((service) => service.serviceId === "linear")).toBe(true);
+ expect(resolution.descriptors.some((service) => service.serviceId === "goodlocal")).toBe(true);
+ expect(resolution.diagnostics.some((line) => line.includes("/bad.json") && line.includes("failed to load"))).toBe(
+ true,
+ );
+ });
+
+ it("an installed connection whose source vanished keeps a pinned descriptor at the record's endpoint", () => {
+ const at = Date.now();
+ const resolution = resolveMcpServiceCatalog({
+ localSources: [],
+ records: [
+ {
+ connectionId: "vanishsvc",
+ serviceId: "vanishsvc",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Vanished",
+ status: "connected",
+ createdAt: at,
+ updatedAt: at,
+ },
+ ],
+ });
+ const pinned = resolution.descriptors.find((service) => service.serviceId === "vanishsvc");
+ expect(pinned).toMatchObject({
+ pinnedFromRecord: true,
+ transport: { type: "http", url: "https://mcp.acme.test/mcp" },
+ });
+ // Pinned-from-record is its own trust path: never user-placed trust.
+ expect(pinned?.localSource ?? false).toBe(false);
+ expect(pinned?.authStrategy).toBe("oauth");
+ // The pinned endpoint keeps the credential usable (binding preserved).
+ const authStorage = AuthStorage.inMemory();
+ authStorage.set(mcpCredentialKey("vanishsvc"), {
+ type: "oauth",
+ access: "tok",
+ refresh: "r",
+ expires: Date.now() + 3600_000,
+ endpoint: "https://mcp.acme.test/mcp",
+ });
+ const store = McpConnectionStore.open(join(tmpdir(), `svc-pin-${at}/mcp-connections.json`));
+ store.upsert({
+ connectionId: "vanishsvc",
+ serviceId: "vanishsvc",
+ endpoint: "https://mcp.acme.test/mcp",
+ label: "Vanished",
+ status: "connected",
+ createdAt: at,
+ updatedAt: at,
+ });
+ const views = buildPluginViews({
+ services: [pinned ?? { ...serviceFixture(), serviceId: "vanishsvc" }],
+ userServers: undefined,
+ authStorage,
+ connectionStore: store,
+ });
+ expect(views[0]?.connectionStatus).toBe("connected");
+ expect(views[0]?.connectionIds).toEqual(["vanishsvc"]);
+ expect(views[0]?.setupHint).toContain("catalog source is unavailable");
+ });
+
+ it("aggregates per-account state: primary+alias, alias-only after a disconnect, and a stale alias", () => {
+ // The service card aggregates ALL its accounts: a connected primary keeps the service
+ // connected while an alias stays visible; after the primary's record is removed the alias
+ // keeps the card alive (still listed and searchable); an alias whose credential went missing
+ // surfaces reconnect-required instead of being silently dropped.
+ const viewsFor = (store: McpConnectionStore, authStorage: AuthStorage) =>
+ buildPluginViews({
+ services: [serviceFixture()],
+ userServers: undefined,
+ authStorage,
+ connectionStore: store,
+ });
+
+ const primaryAuth = AuthStorage.inMemory();
+ primaryAuth.set(mcpCredentialKey("acme"), oauthCredential(3600_000, "https://mcp.acme.test/mcp"));
+ primaryAuth.set(mcpCredentialKey("acme-2"), oauthCredential(3600_000, "https://mcp.acme.test/mcp"));
+ const at = Date.now();
+ const bothStore = McpConnectionStore.open(join(tmpdir(), "svc-agg/mcp-connections.json"));
+ bothStore.upsert({ ...accountRecord("acme", "connected", at), verifiedAt: at, toolCount: 4 });
+ bothStore.upsert(accountRecord("acme-2", "pending", at));
+ const both = viewsFor(bothStore, primaryAuth);
+ expect(both[0]?.connectionStatus).toBe("connected");
+ expect(both[0]?.connectionIds).toEqual(["acme", "acme-2"]);
+
+ const aliasAuth = AuthStorage.inMemory();
+ aliasAuth.set(mcpCredentialKey("acme-2"), oauthCredential(3600_000, "https://mcp.acme.test/mcp"));
+ const aliasStore = McpConnectionStore.open(join(tmpdir(), "svc-alias-left/mcp-connections.json"));
+ aliasStore.remove("acme");
+ aliasStore.upsert(accountRecord("acme-2", "pending", at));
+ const alias = viewsFor(aliasStore, aliasAuth);
+ expect(alias).toHaveLength(1);
+ expect(alias[0]?.connectionIds).toEqual(["acme-2"]);
+ expect(searchPluginViews(alias, "acme-2", 10)).toHaveLength(1);
+ const connections = buildConnectionViews({
+ services: [serviceFixture()],
+ userServers: undefined,
+ authStorage: aliasAuth,
+ connectionStore: aliasStore,
+ });
+ expect(connections.map((connection) => connection.connectionId)).toEqual(["acme-2"]);
+
+ const staleStore = McpConnectionStore.open(join(tmpdir(), "svc-alias-stale/mcp-connections.json"));
+ staleStore.upsert(accountRecord("acme-2", "connected", at));
+ const stale = viewsFor(staleStore, AuthStorage.inMemory());
+ expect(stale[0]?.connectionIds).toContain("acme-2");
+ expect(stale[0]?.connectionStatus).toBe("error");
+ expect(stale[0]?.setupHint).toContain("Reconnect required");
+ });
+});
+
+describe("resolveMcpServiceCatalog", () => {
+ function bundledEntry(overrides: Record<string, unknown> = {}): McpServiceEntry {
+ return {
+ server: "brand",
+ service: "brand",
+ label: "Brand",
+ url: "https://brand.test/mcp",
+ aliases: ["brandapp"],
+ transport: { type: "http", url: "https://brand.test/mcp" },
+ auth: { strategy: "oauth", clientRegistration: "dynamic" },
+ setup: { status: "ready" },
+ verification: { status: "metadata-reviewed" },
+ legacyBuiltin: false,
+ ...overrides,
+ } as McpServiceEntry;
+ }
+
+ function viewsFor(service: McpServiceDescriptor): McpPluginView[] {
+ return buildPluginViews({
+ services: [service],
+ userServers: undefined,
+ authStorage: AuthStorage.inMemory(),
+ connectionStore: McpConnectionStore.open(join(tmpdir(), `svc-resolver-${Date.now()}/mcp-connections.json`)),
+ });
+ }
+
+ it("maps the bundled catalog: metadata-reviewed OAuth entries stay one-click connectable", () => {
+ const resolution = resolveMcpServiceCatalog({ localSources: [] });
+ const linear = resolution.descriptors.find((service) => service.serviceId === "linear");
+ expect(linear).toMatchObject({
+ metadataReviewed: true,
+ legacyBuiltin: true,
+ authStrategy: "oauth",
+ });
+ if (linear) {
+ const views = viewsFor(linear);
+ expect(views[0]?.connectable).toBe(true);
+ expect(views[0]?.unverified ?? false).toBe(false);
+ }
+ });
+
+ it("keeps unverified OAuth candidates visible and explicitly connectable", () => {
+ const resolution = resolveMcpServiceCatalog({ localSources: [] });
+ // A real bundled import: unverified by construction, OAuth, ready, http.
+ const imported = resolution.descriptors.find(
+ (service) =>
+ !service.legacyBuiltin &&
+ !service.metadataReviewed &&
+ service.authStrategy === "oauth" &&
+ service.setup.status === "ready" &&
+ service.transport.type === "http",
+ );
+ expect(imported).toBeDefined();
+ if (imported) {
+ const views = viewsFor(imported);
+ expect(views[0]?.connectable).toBe(true);
+ expect(views[0]?.setupHint).toContain("not been verified");
+ }
+ });
+
+ it("loads declared local sources after the built-ins with ~ expansion", () => {
+ const resolution = resolveMcpServiceCatalog({
+ localSources: ["~/local-services.json"],
+ loadLocal: (filePath: string) => {
+ expect(filePath).toBe(join(homedir(), "local-services.json"));
+ return {
+ entries: [
+ bundledEntry({
+ server: "mylocal",
+ verification: { status: "unverified" },
+ }),
+ ],
+ path: filePath,
+ };
+ },
+ });
+ const local = resolution.descriptors.find((service) => service.serviceId === "mylocal");
+ expect(local?.localSource).toBe(true);
+ expect(local?.metadataReviewed).toBe(false);
+ // Trusted local entries connect through the login dialog's explicit approval.
+ if (local) {
+ const views = viewsFor(local);
+ expect(views[0]?.connectable).toBe(true);
+ }
+ });
+
+ it("surfaces declared-but-missing sources and duplicate ids as visible diagnostics", () => {
+ const resolution = resolveMcpServiceCatalog({
+ localSources: ["/missing/services.json", "/dup/a.json", "/dup/b.json"],
+ loadLocal: (filePath: string) => {
+ if (filePath === "/missing/services.json") return { entries: [], path: "" };
+ return { entries: [bundledEntry({ server: "dupe" })], path: filePath };
+ },
+ });
+ expect(resolution.diagnostics.some((line) => line.includes("not found: /missing/services.json"))).toBe(true);
+ expect(resolution.diagnostics.some((line) => line.includes('"dupe"'))).toBe(true);
+ expect(resolution.descriptors.filter((service) => service.serviceId === "dupe")).toHaveLength(1);
+ });
+
+ it("enforces a total cap with a visible diagnostic", () => {
+ const huge: McpServiceEntry[] = Array.from({ length: 600 }, (_, index) =>
+ bundledEntry({ server: `bulk-${index}` }),
+ );
+ const capped = resolveMcpServiceCatalog({
+ localSources: ["/huge.json"],
+ loadLocal: () => ({ entries: huge, path: "/huge.json" }),
+ });
+ expect(capped.descriptors).toHaveLength(500);
+ expect(capped.diagnostics.some((line) => line.includes("capped at 500"))).toBe(true);
+ });
+ it("retains EVERY installed serviceId under cap pressure, in-source or pinned", () => {
+ const huge: McpServiceEntry[] = Array.from({ length: 600 }, (_, index) =>
+ bundledEntry({ server: `bulk-${index}` }),
+ );
+ const now = Date.now();
+ const records = [
+ {
+ connectionId: "bulk-550",
+ serviceId: "bulk-550",
+ endpoint: "https://bulk-550.example/mcp",
+ label: "In-Source",
+ status: "connected",
+ createdAt: now,
+ updatedAt: now,
+ },
+ {
+ connectionId: "pinned-svc",
+ serviceId: "pinned-svc",
+ endpoint: "https://pinned.example/mcp",
+ label: "Vanished Source",
+ status: "connected",
+ createdAt: now,
+ updatedAt: now,
+ },
+ ] satisfies Array<McpConnectionRecord>;
+ const capped = resolveMcpServiceCatalog({
+ localSources: ["/huge.json"],
+ loadLocal: () => ({ entries: huge, path: "/huge.json" }),
+ records,
+ });
+ // The cap still binds (500), but BOTH installed serviceIds survive — the in-source one is retained instead of
+ // sliced away, the vanished- source pin is never the first thing discarded, and legacy builtins keep their reserved
+ // names.
+ expect(capped.descriptors).toHaveLength(500);
+ const kept = new Set(capped.descriptors.map((descriptor) => descriptor.serviceId));
+ expect(kept.has("bulk-550")).toBe(true);
+ expect(kept.has("pinned-svc")).toBe(true);
+ expect(kept.has("linear")).toBe(true);
+ expect(kept.has("notion")).toBe(true);
+ expect(capped.diagnostics.some((line) => line.includes("discovery capped at 500"))).toBe(true);
+ expect(
+ capped.diagnostics.some((line) =>
+ line.includes("Installed connections and built-in services are always kept"),
+ ),
+ ).toBe(true);
+ });
+
+ it("keeps an installed inventory that ALONE exceeds the cap, with an explicit diagnostic", () => {
+ const huge: McpServiceEntry[] = Array.from({ length: 50 }, (_, index) =>
+ bundledEntry({ server: `bulk-${index}` }),
+ );
+ const now = Date.now();
+ const records = Array.from({ length: 510 }, (_, index) => ({
+ connectionId: `installed-${index}`,
+ serviceId: `installed-${index}`,
+ endpoint: "https://installed.example/mcp",
+ label: `Installed ${index}`,
+ status: "connected" as const,
+ createdAt: now,
+ updatedAt: now,
+ }));
+ const capped = resolveMcpServiceCatalog({
+ localSources: ["/huge.json"],
+ loadLocal: () => ({ entries: huge, path: "/huge.json" }),
+ records,
+ });
+ // Manageability never drops: all 510 installed serviceIds AND the legacy builtins are kept even though the retained
+ // inventory alone exceeds the cap, the diagnostic says so explicitly, and only uninstalled candidates were trimmed.
+ const kept = capped.descriptors.map((descriptor) => descriptor.serviceId);
+ expect(kept.filter((id) => id.startsWith("installed-"))).toHaveLength(510);
+ expect(kept).toContain("linear");
+ expect(kept).toContain("notion");
+ expect(kept.filter((id) => id.startsWith("bulk-"))).toEqual([]);
+ expect(capped.diagnostics.some((line) => line.includes("retained inventory alone exceeded the cap"))).toBe(true);
+ });
+});
+
+describe("/mcp and /plugins picker row counts", () => {
+ it("ships exactly 68 catalog services after the ENG-6108 single-credential cut", () => {
+ // The live /mcp picker counter read /77 against the earlier shipped 75: the extra rows are installed connections
+ // pinned from records (below), never catalog growth or duplicated rows. The 2026-09-16 token-only cut dropped 5
+ // more non-pasteable survivors (CockroachDB Cloud, Dynatrace, Sourcegraph, PayPal Sandbox, Render), and the
+ // single-credential cut dropped the two named-header pairs (Datadog, Cloudinary MediaFlows). Pin the shipped length
+ // so silent re-growth changes the counter loudly.
+ expect(SERVICE_CATALOG.length).toBe(68);
+ });
+
+ it("counts rows as the shipped catalog plus pinned installed connections — unique, no off-by-N", () => {
+ // Kevin's live state: figma and huggingface-skills were cut from the shipped catalog but their connections are
+ // installed, so their records pin durable descriptors and the picker legitimately lists 70 + 2 = 72 rows. Every row
+ // is unique — the counter matches the rendered list.
+ const catalogIds = new Set(SERVICE_CATALOG.map((entry) => entry.server));
+ expect(catalogIds.has("figma")).toBe(false);
+ expect(catalogIds.has("huggingface-skills")).toBe(false);
+ const now = Date.now();
+ const tempDir = mkdtempSync(join(tmpdir(), "svc-catalog-count-"));
+ const store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ try {
+ for (const id of ["figma", "huggingface-skills"]) {
+ store.upsert({
+ connectionId: id,
+ serviceId: id,
+ endpoint: `https://${id}.example.test/mcp`,
+ label: id,
+ status: "pending",
+ createdAt: now,
+ updatedAt: now,
+ });
+ }
+ const resolution = resolveMcpServiceCatalog({ records: store.records() });
+ expect(resolution.diagnostics).toEqual([]);
+ expect(resolution.descriptors).toHaveLength(SERVICE_CATALOG.length + 2);
+ expect(resolution.descriptors.filter((descriptor) => descriptor.pinnedFromRecord)).toHaveLength(2);
+ const views = buildPluginViews({
+ services: resolution.descriptors,
+ userServers: {},
+ authStorage: AuthStorage.inMemory(),
+ connectionStore: store,
+ });
+ expect(views).toHaveLength(SERVICE_CATALOG.length + 2);
+ expect(new Set(views.map((view) => view.serviceId)).size).toBe(SERVICE_CATALOG.length + 2);
+ } finally {
+ rmSync(tempDir, { recursive: true, force: true });
+ }
+ });
+});
+
+describe("catalog token services: the paste flow (storage, views, verification)", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let store: McpConnectionStore;
+
+ const GITHUB_URL = "https://api.githubcopilot.com/mcp/";
+
+ function staticToken(overrides: Partial<McpStaticTokenCredential> = {}): McpStaticTokenCredential {
+ return {
+ type: "mcp_static_token",
+ endpoint: GITHUB_URL,
+ bearer: "ghp_pasted-token",
+ bearerFieldId: "GITHUB_PAT_TOKEN",
+ createdAt: Date.now(),
+ ...overrides,
+ };
+ }
+
+ /** A service collecting two GENUINELY DISTINCT required credentials. */
+ function twoDistinctCredentialsService(): McpServiceDescriptor {
+ return serviceFixture({
+ serviceId: "named-headers",
+ label: "Named Headers",
+ authStrategy: "api_key",
+ setup: {
+ status: "requires-setup",
+ reason: "paste your API key and application key",
+ fields: [
+ { id: "SVC_API_KEY", label: "SVC_API_KEY", required: true, kind: "api-key" },
+ { id: "SVC_APPLICATION_KEY", label: "SVC_APPLICATION_KEY", required: true, kind: "api-key" },
+ ],
+ },
+ });
+ }
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "svc-catalog-token-"));
+ authStorage = AuthStorage.inMemory();
+ store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ });
+
+ afterEach(() => {
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("identifies exactly the catalog's paste-an-api-key/token services — single-credential by construction", () => {
+ const descriptors = defaultServiceCatalogProvider()();
+ const pasteable = descriptors.filter((descriptor) => isPasteableTokenService(descriptor));
+ // The 2026-09-16 single-credential cut: 11 one-paste services (the named-header pairs datadog and
+ // cloudinary-mediaflows are cut from the catalog; the importer refuses to re-ship them).
+ expect(pasteable.map((descriptor) => descriptor.serviceId).sort()).toEqual(
+ [
+ "aws-devops-agent",
+ "github",
+ "pagerduty",
+ "sonatype-guide",
+ "zoom",
+ "zoom-canvas",
+ "zoom-chat",
+ "zoom-meetings",
+ "zoom-revenue-accelerator",
+ "zoom-tasks",
+ "zoom-whiteboard",
+ ].sort(),
+ );
+ // GitHub's two fields are ALTERNATIVE NAMES for one PAT (a shared credentialSet): the paste flow collects ONE
+ // credential, stored under the first alternative's id.
+ const github = pasteable.find((descriptor) => descriptor.serviceId === "github");
+ expect(github ? mcpCredentialFields(github).map((field) => field.id) : []).toEqual([
+ "GITHUB_PAT_TOKEN",
+ "GITHUB_PERSONAL_ACCESS_TOKEN",
+ ]);
+ expect(github ? mcpPasteCredential(github) : undefined).toMatchObject({
+ field: expect.objectContaining({ id: "GITHUB_PAT_TOKEN" }),
+ fieldIds: ["GITHUB_PAT_TOKEN", "GITHUB_PERSONAL_ACCESS_TOKEN"],
+ });
+ // Non-token services are not pasteable.
+ expect(isPasteableTokenService(serviceFixture())).toBe(false);
+ });
+
+ it("collapses alternative names to ONE credential; genuinely distinct credentials stay un-pasteable", () => {
+ // A shared credentialSet across several fields = one credential.
+ const alternatives = serviceFixture({
+ serviceId: "alt-names",
+ label: "Alt Names",
+ authStrategy: "api_key",
+ setup: {
+ status: "requires-setup",
+ fields: [
+ { id: "ALT_A", label: "ALT_A", required: true, kind: "bearer-token", credentialSet: "one-token" },
+ { id: "ALT_B", label: "ALT_B", required: true, kind: "bearer-token", credentialSet: "one-token" },
+ ],
+ },
+ });
+ expect(mcpPasteCredential(alternatives)).toMatchObject({
+ field: expect.objectContaining({ id: "ALT_A" }),
+ fieldIds: ["ALT_A", "ALT_B"],
+ });
+ expect(isPasteableTokenService(alternatives)).toBe(true);
+ // Two UNMARKED distinct credential fields = two credentials: the single
+ // bearer runtime cannot represent them, so the flow fails closed.
+ const distinct = twoDistinctCredentialsService();
+ expect(mcpPasteCredential(distinct)).toBeUndefined();
+ expect(isPasteableTokenService(distinct)).toBe(false);
+ // The row stays honest setup_required with NO paste action — the
+ // dead-end hint, not a multi-prompt that can never authenticate.
+ const views = buildPluginViews({
+ services: [distinct],
+ userServers: undefined,
+ authStorage,
+ connectionStore: store,
+ });
+ expect(views[0]?.connectionStatus).toBe("setup_required");
+ expect(views[0]?.pasteToken).toBeUndefined();
+ });
+
+ it("derives human prompt labels from the field, never the raw env var alone", () => {
+ const descriptors = defaultServiceCatalogProvider()();
+ const byId = (id: string) => descriptors.find((descriptor) => descriptor.serviceId === id);
+ const github = byId("github");
+ expect(github).toBeDefined();
+ const githubCredential = github ? mcpPasteCredential(github) : undefined;
+ expect(githubCredential).toBeDefined();
+ expect(github && githubCredential ? mcpCredentialFieldPromptLabel(github, githubCredential.field) : "").toBe(
+ "GitHub personal access token",
+ );
+ // Single-field services keep the plain noun (Kevin's live-testing example).
+ expect(mcpCredentialFieldPromptLabel(byId("pagerduty")!, mcpCredentialFields(byId("pagerduty")!)[0]!)).toBe(
+ "PagerDuty API key",
+ );
+ expect(mcpCredentialFieldPromptLabel(byId("zoom-chat")!, mcpCredentialFields(byId("zoom-chat")!)[0]!)).toBe(
+ "Zoom Chat access token",
+ );
+ expect(
+ mcpCredentialFieldPromptLabel(byId("sonatype-guide")!, mcpCredentialFields(byId("sonatype-guide")!)[0]!),
+ ).toBe("Sonatype Guide token");
+ });
+
+ it("shares ONE static-token usability rule: type, endpoint binding, non-empty bearer", () => {
+ expect(mcpStaticTokenUsable(undefined, GITHUB_URL)).toMatchObject({ usable: false, reason: "missing" });
+ expect(mcpStaticTokenUsable(oauthCredential(), GITHUB_URL)).toMatchObject({
+ usable: false,
+ reason: "wrong-type",
+ });
+ expect(mcpStaticTokenUsable(staticToken({ endpoint: undefined as never }), GITHUB_URL)).toMatchObject({
+ usable: false,
+ reason: "unbound",
+ });
+ expect(mcpStaticTokenUsable(staticToken({ endpoint: "https://other.example/mcp" }), GITHUB_URL)).toMatchObject({
+ usable: false,
+ reason: "cross-endpoint",
+ });
+ expect(mcpStaticTokenUsable(staticToken({ bearer: "" }), GITHUB_URL)).toMatchObject({
+ usable: false,
+ reason: "empty-bearer",
+ });
+ expect(mcpStaticTokenUsable(staticToken(), GITHUB_URL)).toEqual({ usable: true });
+ });
+
+ it("renders the token service as setup_required with a paste action, and env presence never connects it", () => {
+ const github = defaultServiceCatalogProvider()().find((descriptor) => descriptor.serviceId === "github");
+ expect(github).toBeDefined();
+ const views = buildPluginViews({
+ services: [github!],
+ userServers: undefined,
+ authStorage,
+ connectionStore: store,
+ });
+ expect(views[0]).toMatchObject({
+ connectionStatus: "setup_required",
+ connectable: false,
+ pasteToken: true,
+ connectionIds: [],
+ });
+ expect(views[0]?.setupHint).toBe(
+ "paste a GitHub personal access token (GITHUB_PAT_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN)",
+ );
+ });
+
+ it("never reports connected from a stored pasted token alone: pending until the handshake verifies", () => {
+ const github = defaultServiceCatalogProvider()().find((descriptor) => descriptor.serviceId === "github");
+ authStorage.set(mcpCredentialKey("github"), staticToken());
+ const views = buildPluginViews({
+ services: [github!],
+ userServers: undefined,
+ authStorage,
+ connectionStore: store,
+ });
+ expect(views[0]).toMatchObject({ connectionStatus: "pending", connectionIds: ["github"] });
+ });
+
+ it("surfaces an unbound pasted token as reconnect-required, never pending or connected", () => {
+ const github = defaultServiceCatalogProvider()().find((descriptor) => descriptor.serviceId === "github");
+ authStorage.set(mcpCredentialKey("github"), staticToken({ endpoint: "https://moved.example/mcp" }));
+ const views = buildPluginViews({
+ services: [github!],
+ userServers: undefined,
+ authStorage,
+ connectionStore: store,
+ });
+ expect(views[0]?.connectionStatus).toBe("error");
+ expect(views[0]?.setupHint).toContain("not bound to this endpoint");
+ });
+
+ it("verifies with the stored pasted token and records connected only after a real handshake", async () => {
+ authStorage.set(mcpCredentialKey("github"), staticToken());
+ const probedTokens: string[] = [];
+ const record = await verifyMcpConnection({
+ authStorage,
+ connectionStore: store,
+ connectionId: "github",
+ serviceId: "github",
+ label: "GitHub",
+ endpoint: GITHUB_URL,
+ usesOAuth: false,
+ staticToken: true,
+ probe: async (options) => {
+ probedTokens.push(await options.getToken());
+ return { ok: true, toolCount: 4 };
+ },
+ });
+ expect(probedTokens).toEqual(["ghp_pasted-token"]);
+ expect(record.status).toBe("connected");
+ expect(record.toolCount).toBe(4);
+ expect(store.get("github")).toMatchObject({ status: "connected", toolCount: 4 });
+ });
+
+ // The error-category invariant for pasted tokens is the SAME shared probe-error path pinned above ("records error
+ // with a fixed safe category when the server rejects the credential").
+
+ it("refuses to verify an unbound pasted token before any network operation", async () => {
+ authStorage.set(mcpCredentialKey("github"), staticToken({ endpoint: "https://moved.example/mcp" }));
+ const probe = vi.fn(async () => ({ ok: true as const, toolCount: 1 }));
+ const record = await verifyMcpConnection({
+ authStorage,
+ connectionStore: store,
+ connectionId: "github",
+ serviceId: "github",
+ label: "GitHub",
+ endpoint: GITHUB_URL,
+ usesOAuth: false,
+ staticToken: true,
+ probe,
+ });
+ expect(probe).not.toHaveBeenCalled();
+ expect(record.status).toBe("error");
+ expect(record.lastError).toBe(MCP_PROBE_ERRORS.UNBOUND_CREDENTIAL);
+ });
+
+ // The mid-probe rotation discard is the SAME queueVerifyResult guard pinned above ("discards a stale verify result
+ // when the grant rotates mid-probe").
+
+ it("keeps verification honest when no usable credential exists: never connected, never a probe", async () => {
+ const probe = vi.fn(async () => ({ ok: true as const, toolCount: 1 }));
+ const cases: Array<McpStaticTokenCredential | ReturnType<typeof oauthCredential> | undefined> = [
+ undefined,
+ oauthCredential(3600_000, GITHUB_URL),
+ staticToken({ bearer: "" }),
+ ];
+ for (const [index, credential] of cases.entries()) {
+ if (credential) authStorage.set(mcpCredentialKey("github"), credential);
+ else authStorage.remove(mcpCredentialKey("github"));
+ // Each case gets a fresh record state: the verdict is per-case, and
+ // a missing/wrong-typed/empty credential never inherits one.
+ const caseStore = McpConnectionStore.open(join(tempDir, `conns-${index}`, "mcp-connections.json"));
+ const record = await verifyMcpConnection({
+ authStorage,
+ connectionStore: caseStore,
+ connectionId: "github",
+ serviceId: "github",
+ label: "GitHub",
+ endpoint: GITHUB_URL,
+ usesOAuth: false,
+ staticToken: true,
+ probe,
+ });
+ expect(record.status).toBe("pending");
+ expect(record.lastError).toBe(MCP_PROBE_ERRORS.UNKNOWN);
+ expect(record.verifiedAt).toBeUndefined();
+ expect(record.toolCount).toBeUndefined();
+ }
+ expect(probe).not.toHaveBeenCalled();
+ });
+});
diff --git a/packages/coding-agent/test/mcp-service-safety.test.ts b/packages/coding-agent/test/mcp-service-safety.test.ts
new file mode 100644
index 0000000000..aa7af6af6d
--- /dev/null
+++ b/packages/coding-agent/test/mcp-service-safety.test.ts
@@ -0,0 +1,391 @@
+// Adversarial regressions for the ENG-6108 service-catalog safety contract. These encode the invariants from the
+// independent ENG-6108 implementation review (Blockers 2 and 3) plus the cross-client stale-probe contract, so the
+// host production fixes cannot silently regress: 1. Credential binding BEFORE probe/token access: a stored MCP
+// credential whose `endpoint` does not match the current server URL — or that carries no endpoint at all — must be
+// rejected BEFORE any probe runs and BEFORE the stored token is accessed. Contract (per authorized policy): ZERO
+// probe calls and ZERO `authStorage.getApiKey` accesses for such credentials, for user-declared servers AND catalog
+// services, both through a direct `verifyConnection()` and through the demand-driven background verification
+// triggered by `mcp.list_plugins` / `mcp.search_plugins`. Settings edits must never be able to replay a stored token
+// against a retargeted URL, and an unusable credential must never yield a `connected` record. 2. Cross-client stale
+// probes: two clients share one auth.json (interactive client + daemon). A probe that starts with the first client's
+// cached grant must not persist a `connected` record when a second client logs the grant out or replaces it while the
+// probe is in flight — the finished probe must not bless the CURRENT grant (or a removed one) as verified. The
+// persist step must observe fresh auth.json state, not a cached in-memory read. 3. OAuth provider lifecycle: a full
+// OAuth registry reset (ModelRegistry.refresh -> resetOAuthProviders + the production reset hook) must preserve
+// providers for non-bundled catalog services, and removing a user override of a catalog id must restore the catalog
+// provider after ONE manager.refresh() — not two. RED-ON-BASELINE IS EXPECTED on the 4bd8abc12 base: the failing
+// assertions below record the exact current defects for the host production fixes. The control tests that pass on
+// baseline prove the harness is not over-mocked. Offline-only: every probe is injected, `globalThis.fetch` is denied
+// so any accidental real network attempt fails loudly, credential and connection stores live in per-test temp
+// directories, and no provider endpoints, real credentials, or paid APIs are touched.
+
+import { mkdtempSync, rmSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { getOAuthProvider, resetOAuthProviders } from "@earendil-works/pi-ai/oauth";
+import { afterEach, beforeEach, describe, expect, it } from "vitest";
+import { createAgentSessionServices } from "../src/core/agent-session-services.js";
+import { AuthStorage } from "../src/core/auth-storage.js";
+import { McpConnectionStore } from "../src/core/mcp/connection-store.js";
+import { McpManager } from "../src/core/mcp/mcp-manager.js";
+import type { McpServiceDescriptor } from "../src/core/mcp/service-catalog.js";
+import { ModelRegistry } from "../src/core/model-registry.js";
+import type { McpServerConfig } from "../src/core/settings-manager.js";
+import { SettingsManager } from "../src/core/settings-manager.js";
+
+/** Non-bundled, connectable catalog service (the kind registerCatalogProviders owns). */
+const CATALOG_SERVICE: McpServiceDescriptor = {
+ serviceId: "brand",
+ label: "Brand",
+ aliases: [],
+ transport: { type: "http", url: "https://brand.test/mcp" },
+ authStrategy: "oauth",
+ setup: { status: "ready" },
+ metadataReviewed: true,
+ legacyBuiltin: false,
+};
+
+function oauthCredential(access: string, endpoint?: string): Record<string, unknown> {
+ return {
+ type: "oauth",
+ access,
+ refresh: "refresh-token",
+ expires: Date.now() + 3600_000,
+ ...(endpoint === undefined ? {} : { endpoint }),
+ };
+}
+
+/** Count (and forward) authStorage.getApiKey accesses: the token-yielding call. */
+function spyOnGetApiKey(storage: AuthStorage): { calls: string[]; restore: () => void } {
+ const original = storage.getApiKey.bind(storage);
+ const calls: string[] = [];
+ (storage as unknown as { getApiKey: typeof original }).getApiKey = (
+ providerId: string,
+ options?: { includeFallback?: boolean },
+ ) => {
+ calls.push(providerId);
+ return original(providerId, options);
+ };
+ return {
+ calls,
+ restore: () => {
+ delete (storage as unknown as { getApiKey?: typeof original }).getApiKey;
+ },
+ };
+}
+
+function denyUnexpectedFetch(): { restore: () => void } {
+ const realFetch = globalThis.fetch;
+ globalThis.fetch = (() => {
+ throw new Error("unexpected network fetch in offline mcp-service-safety test");
+ }) as typeof fetch;
+ return {
+ restore: () => {
+ globalThis.fetch = realFetch;
+ },
+ };
+}
+
+describe("MCP service safety: credential binding before probe/token access", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let store: McpConnectionStore;
+ let probeCalls: Array<{ url: string; token: string }>;
+ let fetchGuard: { restore: () => void };
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "mcp-safety-"));
+ authStorage = AuthStorage.create(join(tempDir, "auth.json"));
+ store = McpConnectionStore.open(join(tempDir, "mcp-connections.json"));
+ probeCalls = [];
+ resetOAuthProviders();
+ fetchGuard = denyUnexpectedFetch();
+ });
+
+ afterEach(() => {
+ fetchGuard.restore();
+ resetOAuthProviders();
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ function createManager(options: Partial<ConstructorParameters<typeof McpManager>[0]> = {}): McpManager {
+ return new McpManager({
+ authStorage,
+ connectionStore: store,
+ probeConnection: async (probeOptions) => {
+ const token = await probeOptions.getToken();
+ probeCalls.push({ url: probeOptions.url, token });
+ return { ok: true, toolCount: 2 };
+ },
+ ...options,
+ });
+ }
+
+ /**
+ * The rejection contract for unusable credentials: rejected BEFORE any probe
+ * runs and BEFORE the stored token is accessed. Zero probe calls, zero
+ * getApiKey accesses, and never a connected record (verifiedAt included).
+ */
+ function expectRejectedBeforeProbeAndTokenAccess(connectionId: string, spy: { calls: string[] }): void {
+ expect(probeCalls, "no probe call may run for an unusable credential").toEqual([]);
+ expect(spy.calls, "the stored token must never be accessed (getApiKey) for an unusable credential").toEqual([]);
+ const record = store.get(connectionId);
+ expect(
+ record?.status ?? "absent",
+ "a connection whose credential is unusable must never be recorded as connected",
+ ).not.toBe("connected");
+ expect(record?.verifiedAt).toBeUndefined();
+ }
+
+ it.each([
+ {
+ surface: "user",
+ server: "acme",
+ name: "bound to a different endpoint",
+ credential: () => oauthCredential("tok-cross", "https://other.test/mcp"),
+ },
+ { surface: "user", server: "acme", name: "unbound", credential: () => oauthCredential("tok-unbound") },
+ {
+ surface: "catalog",
+ server: "brand",
+ name: "bound to a different endpoint",
+ credential: () => oauthCredential("tok-brand-cross", "https://other.test/mcp"),
+ },
+ { surface: "catalog", server: "brand", name: "unbound", credential: () => oauthCredential("tok-brand-unbound") },
+ ])(
+ "direct verifyConnection rejects a $surface credential $name before probe/token access",
+ async ({ server, credential }) => {
+ authStorage.set(`mcp:${server}`, credential() as never);
+ const manager = createManager({
+ getServiceCatalog: () => (server === "brand" ? [CATALOG_SERVICE] : []),
+ getUserServers: () =>
+ server === "acme" ? { acme: { type: "http", url: "https://srv.test/mcp", oauth: true } } : undefined,
+ });
+ const spy = spyOnGetApiKey(authStorage);
+ try {
+ await manager.verifyConnection(server);
+ expectRejectedBeforeProbeAndTokenAccess(server, spy);
+ } finally {
+ spy.restore();
+ }
+ },
+ );
+
+ it("demand-driven verification from mcp.list_plugins rejects a mismatched credential before probe/token access", async () => {
+ authStorage.set("mcp:acme", oauthCredential("tok-old", "https://old.test/mcp") as never);
+ const manager = createManager({
+ getServiceCatalog: () => [],
+ getUserServers: () => ({ acme: { type: "http", url: "https://new.test/mcp", oauth: true } }),
+ });
+ const spy = spyOnGetApiKey(authStorage);
+ try {
+ const handlers = manager.hostHandlers();
+ await handlers["mcp.list_plugins"]({});
+ // The scan's synchronous prefix settles before the listing resolves: a mismatched credential is refused with no
+ // probe and no token access, and any honest error record is durably flushed.
+ await store.flush();
+ expectRejectedBeforeProbeAndTokenAccess("acme", spy);
+ } finally {
+ spy.restore();
+ }
+ });
+
+ it("control: a matching user credential is attached and the handshake is recorded", async () => {
+ authStorage.set("mcp:acme", oauthCredential("tok-good", "https://good.test/mcp") as never);
+ const manager = createManager({
+ getServiceCatalog: () => [],
+ getUserServers: () => ({ acme: { type: "http", url: "https://good.test/mcp", oauth: true } }),
+ });
+ const record = await manager.verifyConnection("acme");
+ expect(probeCalls).toEqual([{ url: "https://good.test/mcp", token: "tok-good" }]);
+ expect(record.status).toBe("connected");
+ expect(record.toolCount).toBe(2);
+ });
+
+ it("control: a matching catalog credential is attached and the handshake is recorded", async () => {
+ authStorage.set("mcp:brand", oauthCredential("tok-brand", "https://brand.test/mcp") as never);
+ const manager = createManager({ getServiceCatalog: () => [CATALOG_SERVICE] });
+ const record = await manager.verifyConnection("brand");
+ expect(probeCalls).toEqual([{ url: "https://brand.test/mcp", token: "tok-brand" }]);
+ expect(record.status).toBe("connected");
+ });
+
+ it("control: host inventory excludes mismatched and unbound user credentials (dispatch binding)", () => {
+ // mcp.config serves a user-declared config unconditionally (by design); the binding block for user servers happens
+ // in the kernel (rlm.mcp._bound_auth refuses to attach mismatched/unbound tokens). The host-side gates are the
+ // enabled-server inventory and listStatus, which must exclude them.
+ authStorage.set("mcp:mismatch", oauthCredential("tok-a", "https://old.test/mcp") as never);
+ authStorage.set("mcp:unbound", oauthCredential("tok-b") as never);
+ const userServers: Record<string, McpServerConfig> = {
+ mismatch: { type: "http", url: "https://new.test/mcp", oauth: true },
+ unbound: { type: "http", url: "https://srv.test/mcp", oauth: true },
+ };
+ const manager = createManager({ getServiceCatalog: () => [], getUserServers: () => userServers });
+ expect(manager.getEnabledPersistentGenericServers()).toEqual([]);
+ const statuses = manager.listStatus();
+ expect(statuses.find((status) => status.server === "mismatch")?.enabled).toBe(false);
+ expect(statuses.find((status) => status.server === "unbound")?.enabled).toBe(false);
+ });
+});
+
+describe("MCP service safety: cross-client stale probes", () => {
+ let tempDir: string;
+ let clientA: AuthStorage;
+ let clientB: AuthStorage;
+ let store: McpConnectionStore;
+ let storePath: string;
+ let probeCalls: Array<{ url: string; token: string }>;
+ let fetchGuard: { restore: () => void };
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "mcp-safety-cross-"));
+ const authPath = join(tempDir, "auth.json");
+ clientA = AuthStorage.create(authPath);
+ // The first client holds the grant in its cache, like an interactive client that just completed a login.
+ clientA.set("mcp:acme", oauthCredential("tok-old", "https://good.test/mcp") as never);
+ // The second client is constructed after the grant exists, like a daemon sharing the same auth.json.
+ clientB = AuthStorage.create(authPath);
+ storePath = join(tempDir, "mcp-connections.json");
+ store = McpConnectionStore.open(storePath);
+ probeCalls = [];
+ resetOAuthProviders();
+ fetchGuard = denyUnexpectedFetch();
+ });
+
+ afterEach(() => {
+ fetchGuard.restore();
+ resetOAuthProviders();
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ function createControllableManager(): {
+ manager: McpManager;
+ probeStarted: Promise<void>;
+ releaseProbe: () => void;
+ } {
+ let resolveStarted: () => void = () => undefined;
+ const probeStarted = new Promise<void>((resolve) => {
+ resolveStarted = resolve;
+ });
+ let release: () => void = () => undefined;
+ const manager = new McpManager({
+ authStorage: clientA,
+ connectionStore: store,
+ getServiceCatalog: () => [],
+ getUserServers: () => ({ acme: { type: "http", url: "https://good.test/mcp", oauth: true } }),
+ probeConnection: async (probeOptions) => {
+ const token = await probeOptions.getToken();
+ probeCalls.push({ url: probeOptions.url, token });
+ resolveStarted();
+ await new Promise<void>((resolve) => {
+ release = resolve;
+ });
+ return { ok: true, toolCount: 2 };
+ },
+ });
+ return {
+ manager,
+ probeStarted,
+ releaseProbe: () => {
+ release();
+ },
+ };
+ }
+
+ // Two staleness variants of ONE invariant: a probe that finishes after the grant it probed was logged out OR
+ // replaced by another client must not persist a connected record for the CURRENT (never-probed) grant — in memory or
+ // in the flushed file. The controllable probe makes the race deterministic; the sanity check proves the second
+ // client's mutation really landed in the shared auth.json.
+ it.each([
+ {
+ name: "logged the grant out",
+ mutate: () => {
+ clientB.logout("mcp:acme");
+ clientA.reload();
+ expect(clientA.get("mcp:acme"), "sanity: the grant is really gone from auth.json").toBeUndefined();
+ },
+ },
+ {
+ name: "replaced the grant",
+ mutate: () => {
+ clientB.set("mcp:acme", oauthCredential("tok-new", "https://good.test/mcp") as never);
+ clientA.reload();
+ expect(clientA.get("mcp:acme")).toMatchObject({ access: "tok-new" });
+ },
+ },
+ ])("a probe finishing after another client $name must not persist a connected record", async ({ mutate }) => {
+ const { manager, probeStarted, releaseProbe } = createControllableManager();
+ const verifyPromise = manager.verifyConnection("acme");
+ await probeStarted;
+ // Control: the in-flight probe used the first client's cached grant.
+ expect(probeCalls).toEqual([{ url: "https://good.test/mcp", token: "tok-old" }]);
+ mutate();
+ releaseProbe();
+ await verifyPromise;
+ const record = store.get("acme");
+ expect(record?.status ?? "absent").not.toBe("connected");
+ expect(record?.verifiedAt).toBeUndefined();
+ const persisted = McpConnectionStore.open(storePath).get("acme");
+ expect(persisted?.status ?? "absent", "the flushed file must not claim connected either").not.toBe("connected");
+ });
+});
+
+describe("MCP service safety: OAuth provider lifecycle", () => {
+ let tempDir: string;
+ let authStorage: AuthStorage;
+ let probeCalls: Array<{ url: string; token: string }>;
+ let fetchGuard: { restore: () => void };
+
+ beforeEach(() => {
+ tempDir = mkdtempSync(join(tmpdir(), "mcp-safety-lifecycle-"));
+ authStorage = AuthStorage.create(join(tempDir, "auth.json"));
+ probeCalls = [];
+ resetOAuthProviders();
+ fetchGuard = denyUnexpectedFetch();
+ });
+
+ afterEach(() => {
+ fetchGuard.restore();
+ resetOAuthProviders();
+ rmSync(tempDir, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+
+ it("a full OAuth registry reset preserves non-bundled catalog providers", async () => {
+ const mcpManager = new McpManager({
+ authStorage,
+ connectionStore: McpConnectionStore.open(join(tempDir, "mcp-connections.json")),
+ getServiceCatalog: () => [CATALOG_SERVICE],
+ noBackgroundVerification: true,
+ probeConnection: async (probeOptions) => {
+ const token = await probeOptions.getToken();
+ probeCalls.push({ url: probeOptions.url, token });
+ return { ok: true, toolCount: 2 };
+ },
+ });
+ const modelRegistry = ModelRegistry.create(authStorage, join(tempDir, "models.json"));
+ const services = await createAgentSessionServices({
+ cwd: tempDir,
+ agentDir: join(tempDir, "agent"),
+ authStorage,
+ settingsManager: SettingsManager.inMemory(),
+ modelRegistry,
+ mcpManager,
+ telemetryDisabled: true,
+ noBuiltinHerdrReporter: true,
+ resourceLoaderOptions: { noExtensions: true },
+ });
+ // Control: the catalog provider is registered initially (green on baseline).
+ expect(getOAuthProvider("mcp:brand")).toBeDefined();
+
+ // ModelRegistry.refresh() runs resetOAuthProviders(), re-registers the bundled built-ins, then invokes the
+ // production reset hook. The catalog provider must survive the same way user-declared providers do.
+ services.modelRegistry.refresh();
+
+ expect(getOAuthProvider("mcp:linear"), "the bundled provider must survive the reset").toBeDefined();
+ expect(
+ getOAuthProvider("mcp:brand"),
+ "a non-bundled catalog provider must survive a full OAuth registry reset",
+ ).toBeDefined();
+ expect(probeCalls, "no verification probe may run during registry churn").toEqual([]);
+ });
+});
diff --git a/packages/coding-agent/test/mcp-verification-ownership.test.ts b/packages/coding-agent/test/mcp-verification-ownership.test.ts
new file mode 100644
index 0000000000..843c8db557
--- /dev/null
+++ b/packages/coding-agent/test/mcp-verification-ownership.test.ts
@@ -0,0 +1,245 @@
+// Independent ed02 Bugbot ownership regressions. Production verifier, manager,
+// file-backed store/claim/finalize and auth CAS; only network/probe timing is fake.
+// Offline: temporary files, denied fetch, synthetic credentials, no OAuth dialog.
+import { mkdtempSync, rmSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { createMcpOAuthProvider } from "@earendil-works/pi-ai/mcp";
+import { registerOAuthProvider, resetOAuthProviders } from "@earendil-works/pi-ai/oauth";
+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
+import { type AuthCredential, AuthStorage } from "../src/core/auth-storage.js";
+import { type McpConnectionRecord, McpConnectionStore } from "../src/core/mcp/connection-store.js";
+import { type McpServiceDescriptor, verifyMcpConnection } from "../src/core/mcp/service-catalog.js";
+
+const ID = "ownership-proof";
+const URL = "https://ownership.example.test/mcp";
+const KEY = `mcp:${ID}`;
+const _SERVICE: McpServiceDescriptor = {
+ serviceId: ID,
+ label: "Ownership",
+ aliases: [],
+ transport: { type: "http", url: URL },
+ authStrategy: "oauth",
+ setup: { status: "ready" },
+ metadataReviewed: true,
+ legacyBuiltin: false,
+};
+function barrier() {
+ let release!: () => void;
+ const promise = new Promise<void>((resolve) => {
+ release = resolve;
+ });
+ return { promise, release };
+}
+function credential(access = "synthetic-old", endpoint = URL): AuthCredential {
+ return { type: "oauth", access, refresh: "synthetic-refresh", expires: Date.now() + 3_600_000, endpoint };
+}
+function record(overrides: Partial<McpConnectionRecord> = {}): McpConnectionRecord {
+ return {
+ connectionId: ID,
+ serviceId: ID,
+ endpoint: URL,
+ label: "Saved account",
+ status: "error",
+ createdAt: 1,
+ updatedAt: 1,
+ ...overrides,
+ };
+}
+
+describe("MCP verification ownership across persisted claims", () => {
+ let directory: string;
+ let auth: AuthStorage;
+ let otherAuth: AuthStorage;
+ let store: McpConnectionStore;
+ let otherStore: McpConnectionStore;
+ let storePath: string;
+ beforeEach(() => {
+ directory = mkdtempSync(join(tmpdir(), "mcp-verify-owner-"));
+ const authPath = join(directory, "auth.json");
+ storePath = join(directory, "connections.json");
+ auth = AuthStorage.create(authPath, { usePrimeCliConfig: false });
+ otherAuth = AuthStorage.create(authPath, { usePrimeCliConfig: false });
+ store = McpConnectionStore.open(storePath);
+ otherStore = McpConnectionStore.open(storePath);
+ resetOAuthProviders();
+ registerOAuthProvider(createMcpOAuthProvider({ server: ID, label: "Ownership", url: URL }));
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(() => {
+ throw new Error("Network forbidden in verification ownership tests");
+ }),
+ );
+ });
+ afterEach(() => {
+ vi.restoreAllMocks();
+ vi.unstubAllGlobals();
+ vi.unstubAllEnvs();
+ resetOAuthProviders();
+ rmSync(directory, { recursive: true, force: true, maxRetries: 20, retryDelay: 50 });
+ });
+ const persisted = () => McpConnectionStore.open(storePath).get(ID);
+ async function seed(overrides: Partial<McpConnectionRecord> = {}) {
+ store.upsert(record(overrides));
+ await store.flush();
+ }
+ function verify(probe: NonNullable<Parameters<typeof verifyMcpConnection>[0]["probe"]>, usesOAuth = true) {
+ return verifyMcpConnection({
+ authStorage: auth,
+ connectionStore: store,
+ connectionId: ID,
+ serviceId: ID,
+ label: "Probe must not rename saved account",
+ endpoint: URL,
+ usesOAuth,
+ probe,
+ });
+ }
+ async function finalize(attemptId: string, access = "synthetic-new") {
+ const expected = otherAuth.getVerified(KEY);
+ const staged = `${KEY}--${attemptId}`;
+ otherAuth.set(staged, credential(access));
+ return otherStore.finalizeAttempt({
+ connectionId: ID,
+ attemptId,
+ commit: (current) => {
+ const replaced = otherAuth.replaceStagedCredential(staged, KEY, expected);
+ if (replaced.status !== "replaced") throw new Error("Synthetic finalize CAS refused");
+ const { attemptId: _finished, ...settled } = current;
+ return { ...settled, label: "Finalized account", status: "connected", verifiedAt: 777, toolCount: 77 };
+ },
+ });
+ }
+
+ it("control: a current unowned probe persists successfully", async () => {
+ auth.set(KEY, credential());
+ await seed();
+ const result = await verify(async () => ({ ok: true, toolCount: 3 }));
+ expect(result.status).toBe("connected");
+ expect(persisted()).toMatchObject({ status: "connected", toolCount: 3 });
+ expect(fetch).not.toHaveBeenCalled();
+ });
+
+ it("probe started before another client's claim cannot erase the claim or deny real finalize", async () => {
+ auth.set(KEY, credential());
+ await seed();
+ const entered = barrier();
+ const finish = barrier();
+ const probing = verify(async () => {
+ entered.release();
+ await finish.promise;
+ return { ok: true, toolCount: 2 };
+ });
+ await entered.promise;
+ const claimed = await otherStore.claimConnectionId({ connectionId: ID, attemptId: "live-login" });
+ const claimedRecord = persisted();
+ finish.release();
+ const result = await probing;
+ const afterProbe = persisted();
+ const finalized = await finalize("live-login");
+ expect(claimed).toBe(true);
+ expect(afterProbe, "verification must not mutate the live claim").toEqual(claimedRecord);
+ expect(finalized, "OAuth finalization must still own its nonce").toBe("committed");
+ expect(otherAuth.getVerified(KEY)).toMatchObject({ access: "synthetic-new", endpoint: URL });
+ expect(result.status, "a discarded probe must not report a newly connected grant").not.toBe("connected");
+ });
+
+ it.each(["missing", "unbound"] as const)(
+ "%s-grant failure path leaves an existing first-login reservation untouched",
+ async (kind) => {
+ if (kind === "unbound") auth.set(KEY, credential("synthetic-old", "https://other.example.test/mcp"));
+ const reserved = await otherStore.reserveConnectionId(record({ status: "pending", attemptId: "first-login" }));
+ const before = persisted();
+ const probe = vi.fn(async () => ({ ok: true as const, toolCount: 1 }));
+ const result = await verify(probe);
+ const after = persisted();
+ const finalized = await finalize("first-login");
+ expect(reserved).toBe(true);
+ expect(after).toEqual(before);
+ expect(finalized).toBe("committed");
+ expect(probe).not.toHaveBeenCalled();
+ expect(result.status).not.toBe("connected");
+ },
+ );
+
+ it("a throwing probe cannot use an unconditional catch write to replace a newly claimed account", async () => {
+ auth.set(KEY, credential());
+ await seed();
+ const entered = barrier();
+ const finish = barrier();
+ const probing = verify(async () => {
+ entered.release();
+ await finish.promise;
+ throw new Error("synthetic probe failure");
+ });
+ await entered.promise;
+ await otherStore.claimConnectionId({ connectionId: ID, attemptId: "throw-race" });
+ const before = persisted();
+ finish.release();
+ await probing;
+ const after = persisted();
+ const finalized = await finalize("throw-race");
+ expect(after).toEqual(before);
+ expect(finalized).toBe("committed");
+ });
+
+ it("same-token finalize wins over an older probe and keeps finalized record metadata", async () => {
+ auth.set(KEY, credential());
+ await seed();
+ const entered = barrier();
+ const finish = barrier();
+ const probing = verify(async () => {
+ entered.release();
+ await finish.promise;
+ return { ok: true, toolCount: 2 };
+ });
+ await entered.promise;
+ await otherStore.claimConnectionId({ connectionId: ID, attemptId: "finalize-first" });
+ const finalized = await finalize("finalize-first", "synthetic-old");
+ const before = persisted();
+ finish.release();
+ await probing;
+ expect(finalized).toBe("committed");
+ expect(persisted()).toEqual(before);
+ expect(persisted()).toMatchObject({ label: "Finalized account", verifiedAt: 777, toolCount: 77 });
+ });
+
+ // Both anonymous-probe races pin ONE invariant: a probe that started with
+ // no record of its own must never resurrect or overwrite account state
+ // another client created (or removed) while the probe was in flight.
+ it.each([
+ {
+ name: "removal does not resurrect the record",
+ mutate: async () => otherStore.removeAccount({ connectionId: ID, authCleanup: () => false }),
+ expect: "gone",
+ },
+ {
+ name: "a new reservation from another instance is never overwritten",
+ mutate: async () => otherStore.reserveConnectionId(record({ status: "pending", attemptId: "new-owner" })),
+ expect: "pending",
+ },
+ ])("an anonymous probe racing store changes: $name", async ({ mutate, expect: expected }) => {
+ // The reservation case starts from NO record (a truly anonymous probe);
+ // the removal case starts from a seeded record.
+ if (expected === "gone") await seed();
+ const entered = barrier();
+ const finish = barrier();
+ const probing = verify(async () => {
+ entered.release();
+ await finish.promise;
+ return { ok: true, toolCount: 2 };
+ }, false);
+ await entered.promise;
+ await mutate();
+ const before = persisted();
+ finish.release();
+ const result = await probing;
+ if (expected === "gone") {
+ expect(persisted()).toBeUndefined();
+ } else {
+ expect(persisted()?.attemptId).toBe("new-owner");
+ expect(persisted()).toEqual(before);
+ }
+ expect(result.status).not.toBe("connected");
+ });
+});
diff --git a/packages/coding-agent/test/menu-panel.test.ts b/packages/coding-agent/test/menu-panel.test.ts
new file mode 100644
index 0000000000..293bec68d2
--- /dev/null
+++ b/packages/coding-agent/test/menu-panel.test.ts
@@ -0,0 +1,61 @@
+import { Container } from "@earendil-works/pi-tui";
+import stripAnsi from "strip-ansi";
+import { beforeAll, describe, expect, it } from "vitest";
+import {
+ inlineMenuPanelTopRuleRows,
+ MenuPanel,
+ MenuSearchInput,
+} from "../src/modes/interactive/components/menu-panel.js";
+import { initTheme } from "../src/modes/interactive/theme/theme.js";
+
+describe("MenuPanel inline separator rule", () => {
+ beforeAll(() => {
+ initTheme("dark");
+ });
+
+ it("opens inline panels with exactly one rule by default", () => {
+ // A titled inline panel draws its separator rule above the title, and a
+ // headerless panel led by the bordered search input keeps the input's own
+ // top border as its one rule — never two adjacent rules.
+ const titled = new MenuPanel({ title: "Accounts", inline: true });
+ titled.addChild(new MenuSearchInput("Search", true));
+ const titledLines = titled.render(24).map(stripAnsi);
+ expect(titledLines[0]).toBe("─".repeat(24));
+
+ const search = new MenuPanel({ title: "", inline: true });
+ search.addChild(new MenuSearchInput("Search", true));
+ const searchLines = search.render(24).map(stripAnsi);
+ expect(searchLines[0]).toBe("─".repeat(24));
+ expect(searchLines[1]).not.toBe("─".repeat(24));
+ expect(searchLines[1]).toContain("Search");
+ });
+
+ it("an empty leading child never doubles the inline separator (bugbot #2330)", () => {
+ // The model picker adds an empty header-help Container before its search
+ // input; counting that placeholder as the panel opener drew the panel rule
+ // directly on top of the search box's own border (two stacked rules and a
+ // wasted list row).
+ const withPlaceholder = new MenuPanel({ title: "", inline: true });
+ withPlaceholder.addChild(new Container());
+ withPlaceholder.addChild(new MenuSearchInput("Search models", true));
+
+ const direct = new MenuPanel({ title: "", inline: true });
+ direct.addChild(new MenuSearchInput("Search models", true));
+
+ const rules = (panel: MenuPanel) =>
+ panel
+ .render(80)
+ .map((line) => stripAnsi(line))
+ .filter((line) => line.trim().startsWith("─")).length;
+
+ expect(rules(withPlaceholder)).toBe(rules(direct));
+ expect(inlineMenuPanelTopRuleRows({ children: withPlaceholder.children })).toBe(0);
+ // A populated header still owns the rule.
+ const populated = new MenuPanel({ title: "", inline: true });
+ const header = new Container();
+ header.addChild(new MenuSearchInput("Signed-in providers first.", true));
+ populated.addChild(header);
+ populated.addChild(new MenuSearchInput("Search models", true));
+ expect(inlineMenuPanelTopRuleRows({ children: populated.children })).toBe(1);
+ });
+});
diff --git a/packages/coding-agent/test/service-catalog-picker.test.ts b/packages/coding-agent/test/service-catalog-picker.test.ts
new file mode 100644
index 0000000000..7c8153dc84
--- /dev/null
+++ b/packages/coding-agent/test/service-catalog-picker.test.ts
@@ -0,0 +1,1614 @@
+import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
+import { tmpdir } from "node:os";
+import { join } from "node:path";
+import { type Component, Container, Input, setKeybindings, visibleWidth } from "@earendil-works/pi-tui";
+import stripAnsi from "strip-ansi";
+import { afterEach, beforeAll, beforeEach, describe, expect, it, vi } from "vitest";
+import { KeybindingsManager } from "../src/core/keybindings.js";
+import { McpConnectionStore } from "../src/core/mcp/connection-store.js";
+import type { McpPluginView, McpServiceDescriptor } from "../src/core/mcp/service-catalog.js";
+import { McpTokenPastePanelComponent } from "../src/modes/interactive/components/mcp-token-paste-panel.js";
+import { ServiceCatalogPickerComponent } from "../src/modes/interactive/components/service-catalog-picker.js";
+import { InteractiveMode } from "../src/modes/interactive/interactive-mode.js";
+import { initTheme, preloadCodeHighlighter } from "../src/modes/interactive/theme/theme.js";
+import { createHarness, type Harness } from "./suite/harness.js";
+
+function viewFixture(overrides: Partial<McpPluginView> = {}): McpPluginView {
+ return {
+ serviceId: "acme",
+ label: "Acme",
+ connectionStatus: "not_connected",
+ connectable: true,
+ usesOAuth: true,
+ source: "catalog",
+ connectionIds: [],
+ ...overrides,
+ };
+}
+
+describe("ServiceCatalogPickerComponent", () => {
+ beforeAll(async () => {
+ initTheme("dark");
+ // initTheme fire-and-forgets the cli-highlight preload; settle it before teardown or vitest records an
+ // EnvironmentTeardownError unhandled rejection (a pre-existing race, see ENG-6108 notes).
+ await preloadCodeHighlighter();
+ });
+
+ beforeEach(() => {
+ setKeybindings(new KeybindingsManager());
+ });
+
+ it("never emits an embedded newline, even when catalog copy is multi-line", () => {
+ // Real catalog copy (Canva's description) lists skills one per line. A rendered line containing "\n" paints extra
+ // physical rows that the differential renderer never counted, so rows below it drift and stale rows survive —
+ // duplicated entries and doubled scroll counters.
+ const multiline =
+ "Bring your Canva design workflow into Codex.\nAvailable skills:\nResize for social media: Adapt a design.\nBulk create: Generate designs.";
+ const picker = new ServiceCatalogPickerComponent(
+ [
+ viewFixture({
+ serviceId: "canva",
+ label: "Canva",
+ description: multiline,
+ connectionStatus: "connected",
+ toolCount: 34,
+ }),
+ viewFixture({ serviceId: "cloudflare", label: "Cloudflare", description: "Cloudflare platform plugin." }),
+ ],
+ () => {},
+ () => {},
+ { getRows: () => 20 },
+ );
+
+ const first = picker.render(120);
+ expect(first.some((line) => line.includes("\n"))).toBe(false);
+ // The whole description occupies exactly one row: flattened, not split.
+ expect(first.filter((line) => stripAnsi(line).includes("Bring your Canva design workflow"))).toHaveLength(1);
+ const detail = first.find((line) => stripAnsi(line).includes("Bring your Canva design workflow"));
+ expect(visibleWidth(detail ?? "")).toBeLessThanOrEqual(120);
+
+ // Moving the selection must not change the frame height: a multi-line
+ // description and a short one both occupy exactly one detail row.
+ picker.handleInput("\u001b[B");
+ const second = picker.render(120);
+ expect(second.some((line) => line.includes("\n"))).toBe(false);
+ expect(second).toHaveLength(first.length);
+
+ // The same flattened-row contract holds in accounts mode, where labels AND descriptions can both carry stray
+ // newlines: every render is newline-free, and repeated renders are byte-identical.
+ const reconnect = viewFixture({
+ serviceId: "acme-work",
+ label: "Reconnect\nwith a stray newline",
+ connectionIds: ["acme-work"],
+ connectionStatus: "connected",
+ description: "Bring operational data into your conversations.",
+ });
+ const accounts = new ServiceCatalogPickerComponent(
+ [
+ reconnect,
+ { ...reconnect, label: "Disconnect\nacme-work", removeAction: true },
+ viewFixture({
+ label: "Add another account",
+ connectionIds: [],
+ description: "Bring operational data.\nAvailable skills:\nQuery records.",
+ }),
+ ],
+ () => {},
+ () => {},
+ { mode: "accounts", title: "Acme MCP", getRows: () => 24 },
+ );
+ const accountsFirst = accounts.render(120);
+ expect(accountsFirst.some((line) => line.includes("\n"))).toBe(false);
+ expect(accountsFirst.filter((line) => stripAnsi(line).includes("Reconnect with a stray newline"))).toHaveLength(
+ 1,
+ );
+ accounts.handleInput("\x1b[B");
+ const accountsSecond = accounts.render(120);
+ expect(accountsSecond.some((line) => line.includes("\n"))).toBe(false);
+ expect(accountsSecond).toHaveLength(accountsFirst.length);
+ expect(accounts.render(120)).toEqual(accountsSecond);
+ });
+
+ it("renders compact inline rows with honest status text", () => {
+ const picker = new ServiceCatalogPickerComponent(
+ [
+ viewFixture({ serviceId: "notion", label: "Notion", connectionStatus: "connected", toolCount: 4 }),
+ viewFixture({ serviceId: "linear", label: "Linear" }),
+ viewFixture({
+ serviceId: "brandapp",
+ label: "BrandApp",
+ connectionStatus: "setup_required",
+ connectable: false,
+ setupHint: "Requires a developer app.",
+ }),
+ viewFixture({ serviceId: "stale", label: "Stale", connectionStatus: "error" }),
+ ],
+ () => {},
+ () => {},
+ );
+ const output = stripAnsi(picker.render(120).join("\n"));
+ expect(output).toContain("Notion");
+ expect(output).toContain("Connected · 4 tools");
+ expect(output).toContain("Connect");
+ expect(output).toContain("Requires setup");
+ expect(output).not.toContain("Requires a developer app.");
+ expect(output).toContain("Reconnect");
+ picker.handleInput("\x1b[B");
+ picker.handleInput("\x1b[B");
+ const selected = stripAnsi(picker.render(120).join("\n"));
+ expect(selected).toContain("Requires a developer app.");
+ expect(selected).toContain("setup guidance");
+ });
+
+ // The pending-vs-verifying label is pinned by the view tests in
+ // mcp-service-catalog.test.ts ("never reports connected from a stored
+ // token alone") and the bounds test below asserts the rendered label.
+
+ // Filtering is pinned by the row-counting and zero-rows tests (the counter
+ // follows the filter) and the ranking test (identity vs description hits).
+
+ // Selection and cancellation are pinned end-to-end at the chain seam
+ // (Enter runs the selected row's action; Esc restores the editor).
+
+ // The /plugins prefill is pinned at the chain seam in "mounts inline, restores the editor before the action..." (the
+ // picker's search input carries the "acme" prefill there).
+
+ // The bordered-search header and the single separator rule are pinned in
+ // "opens every inline panel with exactly one leading separator rule".
+
+ it.each([40, 120])(
+ "bounds Unicode rows at width %s and fits ultra-short viewports by dropping the description line",
+ (width) => {
+ let rows = 14;
+ const picker = new ServiceCatalogPickerComponent(
+ Array.from({ length: 100 }, (_, i) =>
+ viewFixture({
+ serviceId: `svc-${i}`,
+ label: `服務 ${i} ${"long".repeat(30)}`,
+ description: "selected description ".repeat(20),
+ connectionStatus: "pending",
+ }),
+ ),
+ () => {},
+ () => {},
+ { getRows: () => rows },
+ );
+ for (rows of [14, 8, 6, 14]) {
+ const lines = picker.render(width);
+ expect(lines.length).toBeLessThanOrEqual(rows);
+ for (const line of lines) expect(visibleWidth(line)).toBeLessThanOrEqual(width);
+ expect(stripAnsi(lines.join("\n"))).toContain(width < 40 ? "Needs verificati…" : "Needs verification");
+ }
+ },
+ );
+
+ it("uses configured page/select/cancel keys and keeps search cursor movement editable", () => {
+ setKeybindings(
+ new KeybindingsManager({
+ "tui.select.pageDown": "ctrl+d",
+ "tui.select.pageUp": "ctrl+u",
+ "tui.select.confirm": "ctrl+y",
+ "tui.select.cancel": "ctrl+x",
+ }),
+ );
+ const selected: string[] = [];
+ let cancelled = 0;
+ const picker = new ServiceCatalogPickerComponent(
+ Array.from({ length: 30 }, (_, i) => viewFixture({ serviceId: `svc-${i}`, label: `Service ${i}` })),
+ (view) => selected.push(view.serviceId),
+ () => {
+ cancelled++;
+ },
+ { getRows: () => 14 },
+ );
+ picker.render(80);
+ // The fixed one-line description plus its blank spacer stay budgeted,
+ // so a page step at 14 rows moves by the full 7 visible items.
+ picker.handleInput("\x04");
+ picker.handleInput("\x19");
+ expect(selected).toEqual(["svc-7"]);
+ picker.handleInput("\x15");
+ picker.handleInput("\x19");
+ expect(selected).toEqual(["svc-7", "svc-0"]);
+ const output = stripAnsi(picker.render(80).join("\n"));
+ expect(output).toContain("Ctrl+Y connect");
+ expect(output).toContain("Ctrl+X close");
+ picker.handleInput("ab");
+ picker.handleInput("\x1b[D");
+ picker.handleInput("c");
+ expect(picker.getSearchInput()?.getValue()).toBe("acb");
+ picker.handleInput("\x19");
+ expect(selected).toHaveLength(2);
+ picker.handleInput("\x18");
+ expect(cancelled).toBe(1);
+ });
+
+ it("renders the redesigned accounts menu: header, description above, action rows, no search", () => {
+ // Kevin (live testing): "Accounts — Acme" becomes "Acme MCP", the description moves above the options, the old
+ // account-name row becomes an explicit Reconnect option, and neither the search box nor the right-hand status
+ // column survives — the labels carry the actions. The menu is exactly three rows — Reconnect, Disconnect, Add
+ // another account — for one account AND for several (the account id then comes from the sub-picker, never the row
+ // label).
+ const reconnect = viewFixture({
+ serviceId: "acme-work",
+ label: "Reconnect",
+ connectionIds: ["acme-work"],
+ connectionStatus: "connected",
+ toolCount: 3,
+ description: "Bring operational data into your conversations.",
+ });
+ const picker = new ServiceCatalogPickerComponent(
+ [
+ reconnect,
+ { ...reconnect, label: "Disconnect", removeAction: true },
+ viewFixture({ label: "Add another account", connectionIds: [] }),
+ ],
+ () => {},
+ () => {},
+ { mode: "accounts", title: "Acme MCP", getRows: () => 24 },
+ );
+ // No search box in accounts mode: there is nothing useful to filter.
+ expect(picker.getSearchInput()).toBeUndefined();
+ let output = stripAnsi(picker.render(100).join("\n"));
+ expect(output).not.toContain("Search accounts");
+ // Row set and order: Reconnect first, then Disconnect, then Add.
+ expect(output.indexOf("Reconnect")).toBeLessThan(output.indexOf("Disconnect"));
+ expect(output.indexOf("Disconnect")).toBeLessThan(output.indexOf("Add another account"));
+ // No right-side trailing text in accounts mode.
+ expect(output).not.toContain("Connected · 3 tools");
+ expect(output).not.toContain("Remove account");
+ expect(output).not.toContain("Add account");
+ // Enter on Reconnect re-verifies; only Disconnect disconnects.
+ expect(output).toContain("Enter reconnect");
+ picker.handleInput("\x1b[B");
+ output = stripAnsi(picker.render(100).join("\n"));
+ expect(output).toContain("Enter disconnect");
+ picker.handleInput("\x1b[B");
+ expect(stripAnsi(picker.render(100).join("\n"))).toContain("Enter add account");
+ // Plain typing is inert: no search input swallows it.
+ const before = stripAnsi(picker.render(100).join("\n"));
+ picker.handleInput("work");
+ picker.handleInput("zzzz");
+ expect(stripAnsi(picker.render(100).join("\n"))).toBe(before);
+
+ // The #2340 onboarding-choice frame: one separator rule, leading blank, header, blank, muted description, blank, `>
+ // `-marker rows, a blank, shortcuts.
+ const lines = before.split("\n");
+ expect(lines[0]).toBe("─".repeat(100));
+ expect(lines[1].trim()).toBe("");
+ expect(lines[2].trim()).toBe("Acme MCP");
+ const descriptionIndex = lines.findIndex((line) => line.includes("Bring operational data"));
+ expect(descriptionIndex).toBe(4);
+ // The selection sits on the third row (Add): the marker travels with it.
+ expect(lines[descriptionIndex + 2].trim()).toBe("Reconnect");
+ expect(lines[descriptionIndex + 4].trim()).toBe("> Add another account");
+ expect(lines[descriptionIndex + 5]?.trim()).toBe("");
+ expect(lines).toHaveLength(descriptionIndex + 7);
+ // Up clamps at the first row; moving down swaps the marker and the hint, never the height.
+ picker.handleInput("\x1b[A");
+ picker.handleInput("\x1b[A");
+ const top = picker.render(100).map(stripAnsi);
+ expect(top).toHaveLength(lines.length);
+ expect(top[descriptionIndex + 2].trim()).toBe("> Reconnect");
+ picker.handleInput("\x1b[B");
+ const moved = picker.render(100).map(stripAnsi);
+ expect(moved).toHaveLength(lines.length);
+ expect(moved[descriptionIndex + 2].trim()).toBe("Reconnect");
+ expect(moved[descriptionIndex + 3].trim()).toBe("> Disconnect");
+ });
+
+ it("budgets the accounts frame to its rendered height, including the blank under the last option", () => {
+ // Bugbot: the blank row under the last option was not in ACCOUNTS_FRAME_ROWS, so a viewport sized exactly to the
+ // budget was one row too short and the shortcuts line was pushed off-screen. Pin the invariant at the exact failure
+ // point: a viewport of exactly the budgeted rows must show the last frame row (the shortcuts line).
+ const longDescription = "A".repeat(400); // forces the 3-line cap
+ const accounts = [
+ viewFixture({
+ serviceId: "acme",
+ label: "Acme",
+ description: longDescription,
+ connectionStatus: "connected",
+ connectionIds: ["acme-1"],
+ }),
+ ];
+ const budgetAtDescriptionCap =
+ 1 /* rule */ +
+ 1 /* blank */ +
+ 1 /* header */ +
+ 1 /* blank */ +
+ 3 /* description cap */ +
+ 1 /* blank */ +
+ 1 /* the one option */ +
+ 1 /* trailing blank */ +
+ 1 /* shortcuts */;
+ const picker = new ServiceCatalogPickerComponent(
+ accounts,
+ () => {},
+ () => {},
+ { mode: "accounts", getRows: () => budgetAtDescriptionCap, title: "Acme MCP" },
+ );
+ const lines = picker.render(120);
+ expect(lines).toHaveLength(budgetAtDescriptionCap);
+ // The last painted row IS the shortcuts line, not a truncated frame.
+ expect(stripAnsi(lines[lines.length - 1] ?? "")).toContain("Enter");
+ // And one row SHORTER: the frame must still fit by the windowing rules (options compress, the shortcuts stay
+ // visible) — the frame never paints past the viewport.
+ const tight = new ServiceCatalogPickerComponent(
+ accounts,
+ () => {},
+ () => {},
+ { mode: "accounts", getRows: () => budgetAtDescriptionCap - 1, title: "Acme MCP" },
+ );
+ expect(tight.render(120).length).toBeLessThanOrEqual(budgetAtDescriptionCap - 1);
+ // The three-row menu (Kevin, live testing: exactly Reconnect, Disconnect, Add another account) stays inside the
+ // SAME frame budget — the option count is the only thing that grows, never the fixed rows.
+ const threeRowMenu = [
+ viewFixture({
+ serviceId: "acme",
+ label: "Reconnect",
+ description: longDescription,
+ connectionStatus: "connected",
+ connectionIds: ["acme-1"],
+ }),
+ viewFixture({ serviceId: "acme", label: "Disconnect", removeAction: true, connectionIds: ["acme-1"] }),
+ viewFixture({ serviceId: "acme", label: "Add another account", connectionIds: [] }),
+ ];
+ const threeRowBudget =
+ 1 /* rule */ +
+ 1 /* blank */ +
+ 1 /* header */ +
+ 1 /* blank */ +
+ 3 /* description cap */ +
+ 1 /* blank */ +
+ 3 /* options */ +
+ 1 /* trailing blank */ +
+ 1 /* shortcuts */;
+ const three = new ServiceCatalogPickerComponent(
+ threeRowMenu,
+ () => {},
+ () => {},
+ { mode: "accounts", getRows: () => threeRowBudget, title: "Acme MCP" },
+ );
+ const threeLines = three.render(120);
+ expect(threeLines).toHaveLength(threeRowBudget);
+ expect(stripAnsi(threeLines[threeLines.length - 1] ?? "")).toContain("Enter");
+ const threeTight = new ServiceCatalogPickerComponent(
+ threeRowMenu,
+ () => {},
+ () => {},
+ { mode: "accounts", getRows: () => threeRowBudget - 1, title: "Acme MCP" },
+ );
+ expect(threeTight.render(120).length).toBeLessThanOrEqual(threeRowBudget - 1);
+ });
+
+ // The three-line description cap is part of the frame BUDGET contract pinned in "budgets the accounts frame to its
+ // rendered height" (the cap drives the budgeted height there).
+
+ it.each([
+ {
+ view: viewFixture({ connectionIds: ["acme"], connectionStatus: "connected" }),
+ mode: "catalog" as const,
+ action: "manage accounts",
+ },
+ {
+ view: viewFixture({ connectionIds: ["acme"], connectionStatus: "pending" }),
+ mode: "accounts" as const,
+ action: "verify",
+ },
+ {
+ view: viewFixture({ connectionIds: ["acme"], connectionStatus: "error" }),
+ mode: "accounts" as const,
+ action: "reconnect",
+ },
+ {
+ view: viewFixture({
+ connectionIds: ["acme"],
+ connectionStatus: "connected",
+ source: "user",
+ usesOAuth: false,
+ }),
+ mode: "accounts" as const,
+ action: "manage",
+ },
+ {
+ view: viewFixture({ connectionIds: ["acme"], connectionStatus: "connected" }),
+ mode: "accounts" as const,
+ action: "reconnect",
+ },
+ {
+ view: viewFixture({ connectionStatus: "disabled", connectable: false }),
+ mode: "catalog" as const,
+ action: "setup guidance",
+ },
+ {
+ // Several accounts: the row opens the account sub-picker first.
+ view: viewFixture({ connectionIds: ["acme-work", "acme-personal"], connectionStatus: "connected" }),
+ mode: "accounts" as const,
+ action: "choose account",
+ },
+ ])("describes $action without invoking it on navigation", ({ view, mode, action }) => {
+ let calls = 0;
+ const picker = new ServiceCatalogPickerComponent(
+ [view],
+ () => {
+ calls++;
+ },
+ () => {},
+ { mode },
+ );
+ picker.focused = true;
+ // Accounts mode has no search box to focus; catalog delegates to it.
+ const search = picker.getSearchInput();
+ expect(search?.focused).toBe(mode === "catalog" ? true : undefined);
+ picker.handleInput("\x1b[B");
+ expect(stripAnsi(picker.render(100).join("\n"))).toContain(`Enter ${action}`);
+ expect(calls).toBe(0);
+ });
+
+ // The empty state (hint, inert navigation, no dispatch) and the scattered-subsequence refusal are pinned together in
+ // "returns zero rows for a query nothing matches" and the empty-state alignment tests below.
+
+ // Boundary navigation (top clamp without wrap, one-row window shifts, one
+ // selection) is pinned by the keybinding test's pageUp/pageDown assertions
+ // and the repeated-render stability in the newline contract test.
+
+ // The fixed one-line description contract (blank above, shortcuts below, height never changes for the description)
+ // is pinned in "separates the description line from the list with one blank line in both modes" below. The empty
+ // state's column alignment is covered by the merged empty-state assertions in the zero-rows test (same 2-column
+ // marker contract).
+
+ // The empty state's blank row and column alignment are pinned by the zero-rows test's empty-state assertions below.
+
+ // Trailing-status colour semantics (success for Connected, plain text for Connect) are part of the row-render
+ // contract covered by the compact-rows test's status assertions.
+
+ it("returns zero rows for a query nothing matches, never scattered-subsequence noise", () => {
+ // Kevin's live report: searching "vercel" surfaced eight unrelated rows through the shared setup-hint boilerplate
+ // ("...not been VERified. ConneCt ... capabilitiEs ... Login"). Vercel is not in the catalog, so the honest answer
+ // is the empty state.
+ const boilerplate =
+ "OAuth support has not been verified. Connect checks capabilities and asks for approval before login.";
+ const services = [
+ viewFixture({ serviceId: "cockroachdb", label: "CockroachDB Cloud", setupHint: boilerplate }),
+ viewFixture({ serviceId: "cloudinary-mediaflows", label: "Cloudinary MediaFlows", setupHint: boilerplate }),
+ viewFixture({ serviceId: "wix", label: "Wix", setupHint: boilerplate }),
+ viewFixture({ serviceId: "expo", label: "Expo", setupHint: boilerplate }),
+ viewFixture({ serviceId: "neon", label: "Neon", setupHint: boilerplate }),
+ viewFixture({ serviceId: "gc-ai", label: "GC AI", setupHint: boilerplate }),
+ viewFixture({ serviceId: "mapbox", label: "Mapbox", setupHint: boilerplate }),
+ viewFixture({ serviceId: "prisma", label: "Prisma", setupHint: boilerplate }),
+ ];
+ let calls = 0;
+ const picker = new ServiceCatalogPickerComponent(
+ services,
+ () => {
+ calls++;
+ },
+ () => {},
+ { getRows: () => 24 },
+ );
+ picker.handleInput("vercel");
+ const lines = picker.render(100).map(stripAnsi);
+ for (const service of services) {
+ expect(lines.some((line) => line.includes(service.label))).toBe(false);
+ }
+ expect(lines.some((line) => line.includes("No matching services"))).toBe(true);
+ // The empty state is inert: navigation and Enter dispatch nothing.
+ picker.handleInput("\x1b[B");
+ picker.handleInput("\r");
+ expect(calls).toBe(0);
+ });
+
+ it("ranks identity matches above description text and keeps description search useful", () => {
+ const services = [
+ viewFixture({
+ serviceId: "stripe",
+ label: "Stripe",
+ description: "Develop your payments integration faster.",
+ }),
+ viewFixture({ serviceId: "ledger", label: "Ledger", description: "Import Stripe-like payment ledgers." }),
+ viewFixture({
+ serviceId: "notion",
+ label: "Notion",
+ aliases: ["notion-workspace"],
+ description: "Notion workflows for implementation planning.",
+ }),
+ ];
+ const picker = new ServiceCatalogPickerComponent(
+ services,
+ () => {},
+ () => {},
+ { getRows: () => 24 },
+ );
+ const firstRow = () =>
+ stripAnsi(picker.render(100).join("\n"))
+ .split("\n")
+ .find((line) => line.trim().startsWith("›"));
+ const backspace = (count: number) => {
+ for (let i = 0; i < count; i++) picker.handleInput("\x7f");
+ };
+ picker.handleInput("notion");
+ expect(firstRow()).toContain("Notion");
+ // A distinctive description word still finds its service.
+ backspace(6);
+ picker.handleInput("payments");
+ expect(firstRow()).toContain("Stripe");
+ // An identity hit for the same word outranks a description-only hit.
+ backspace(8);
+ picker.handleInput("stripe");
+ expect(firstRow()).toContain("Stripe");
+ expect(stripAnsi(picker.render(100).join("\n"))).toContain("Ledger");
+ });
+
+ it("separates the description line from the list with one blank line in both modes", () => {
+ // Kevin (live testing): one blank line above the description / below the
+ // last row ("Add another account"), without changing the panel height.
+ const catalog = new ServiceCatalogPickerComponent(
+ [viewFixture({ label: "Acme", description: "Selected detail" })],
+ () => {},
+ () => {},
+ );
+ let lines = catalog.render(80).map(stripAnsi);
+ const detailIndex = lines.findIndex((line) => line.includes("Selected detail"));
+ expect(detailIndex).toBeGreaterThan(0);
+ expect(lines[detailIndex - 1].trim()).toBe("");
+ expect(lines[detailIndex - 2]).toMatch(/Acme/);
+
+ const reconnect = viewFixture({
+ serviceId: "acme-work",
+ label: "Reconnect",
+ connectionIds: ["acme-work"],
+ connectionStatus: "connected",
+ description: "Bring operational data into your conversations.",
+ });
+ const accounts = new ServiceCatalogPickerComponent(
+ [
+ reconnect,
+ { ...reconnect, label: "Disconnect acme-work", removeAction: true },
+ viewFixture({
+ label: "Add another account",
+ connectionIds: [],
+ description: "Bring operational data into your conversations.",
+ }),
+ ],
+ () => {},
+ () => {},
+ { mode: "accounts", title: "Acme MCP" },
+ );
+ lines = accounts.render(80).map(stripAnsi);
+ const descriptionIndex = lines.findIndex((line) => line.includes("Bring operational data"));
+ expect(descriptionIndex).toBeGreaterThan(0);
+ // Accounts mode moved the description ABOVE the options: one blank
+ // under it, then the rows — never under the list anymore.
+ expect(lines[descriptionIndex + 1].trim()).toBe("");
+ expect(lines[descriptionIndex + 2]).toMatch(/Reconnect/);
+ });
+
+ it("opens every inline panel with exactly one leading separator rule", () => {
+ // Kevin (live testing): inline pickers need a line between the chat view and the picker. A headerless panel borrows
+ // the bordered search's top border as that rule; a titled panel draws the rule above its title.
+ const catalog = new ServiceCatalogPickerComponent(
+ [viewFixture()],
+ () => {},
+ () => {},
+ );
+ const lines = catalog.render(80).map(stripAnsi);
+ expect(lines[0]).toBe("─".repeat(80));
+ expect(lines[1]).not.toBe("─".repeat(80));
+
+ const account = viewFixture({
+ serviceId: "acme-work",
+ label: "Reconnect",
+ connectionIds: ["acme-work"],
+ connectionStatus: "connected",
+ });
+ const accounts = new ServiceCatalogPickerComponent(
+ [account, { ...account, label: "Disconnect acme-work", removeAction: true }],
+ () => {},
+ () => {},
+ { mode: "accounts", title: "Acme MCP" },
+ );
+ const titled = accounts.render(80).map(stripAnsi);
+ expect(titled[0]).toBe("─".repeat(80));
+ expect(titled[1].trim()).toBe("");
+ expect(titled[2]).toContain("Acme MCP");
+ // Exactly ONE rule: the accounts panel has no bordered search input to double it.
+ expect(titled.filter((line) => line === "─".repeat(80))).toHaveLength(1);
+ });
+
+ // Accounts mode having no search input and inert typing is pinned in "renders the redesigned accounts menu: header,
+ // description above, action rows, no search" (no search box; plain typing is inert).
+
+ // The left-arrow back routing is pinned end-to-end at the chain seam ("left arrow from the accounts menu returns to
+ // a freshly mounted catalog") and the sub-picker's Esc-back wiring in "hints the account chooser" / the sub-picker
+ // back table in the chain describe.
+
+ it("keeps the left arrow with the search input in catalog mode", () => {
+ // The catalog has no parent surface: the host never wires a back callback there, so left just moves the search
+ // cursor (inert at column 0) like any other editor key.
+ const backs = 0;
+ const picker = new ServiceCatalogPickerComponent(
+ [viewFixture({ serviceId: "linear", label: "Linear" }), viewFixture({ serviceId: "notion", label: "Notion" })],
+ () => {},
+ () => {},
+ {},
+ );
+ picker.handleInput("\x1b[D");
+ expect(backs).toBe(0);
+ // Search still works after the left key: the key was an edit, not a navigation.
+ picker.handleInput("n");
+ picker.handleInput("o");
+ const output = stripAnsi(picker.render(100).join("\n"));
+ expect(output).toContain("Notion");
+ expect(output).not.toContain("Linear");
+ });
+
+ // The "Enter choose account" hints are pinned by the action-describes it.each above; the sub-picker's "Esc back"
+ // cancel word is pinned at the chain seam ("disconnecting one of several accounts..." asserts the sub-picker's
+ // Accounts header and Esc-back).
+});
+
+describe("McpTokenPastePanelComponent (inline masked paste panel)", () => {
+ beforeAll(async () => {
+ initTheme("dark");
+ await preloadCodeHighlighter();
+ });
+
+ beforeEach(() => {
+ setKeybindings(new KeybindingsManager());
+ });
+
+ const SECRET = "ghp_live-secret-token-value";
+
+ function type(panel: McpTokenPastePanelComponent, text: string): void {
+ for (const character of text) panel.handleInput(character);
+ }
+
+ function rendered(panel: McpTokenPastePanelComponent): string {
+ return panel
+ .render(120)
+ .map((line) => stripAnsi(line))
+ .join("\n");
+ }
+
+ it("renders the prompt label and never the raw secret in any rendered line", () => {
+ let submitted: string | undefined;
+ let cancelled = false;
+ const panel = new McpTokenPastePanelComponent({
+ serviceLabel: "GitHub",
+ reason: "paste a GitHub personal access token (GITHUB_PAT_TOKEN or GITHUB_PERSONAL_ACCESS_TOKEN)",
+ field: { id: "GITHUB_PAT_TOKEN", label: "GitHub personal access token" },
+ onSubmit: (value) => {
+ submitted = value;
+ },
+ onCancel: () => {
+ cancelled = true;
+ },
+ });
+ panel.focused = true;
+ type(panel, SECRET);
+
+ const flat = rendered(panel);
+ expect(flat).toContain("Connect GitHub");
+ expect(flat).toContain("GitHub personal access token");
+ expect(flat).toContain("credential store");
+ // THE leak test: the raw secret appears in NO rendered line — only bullets.
+ expect(flat.includes(SECRET)).toBe(false);
+ expect(flat.includes("ghp_live")).toBe(false);
+ expect(flat).toContain("•".repeat(SECRET.length));
+ // The masked line still fits the width.
+ for (const line of panel.render(120)) {
+ expect(visibleWidth(line)).toBeLessThanOrEqual(120);
+ }
+
+ panel.handleInput("\r");
+ expect(submitted).toBe(SECRET);
+ expect(cancelled).toBe(false);
+ // After submit the panel renders no raw value either.
+ expect(rendered(panel).includes(SECRET)).toBe(false);
+ });
+
+ // Single-credential prompting is pinned at the paste SEAM in mcp-activation-queue.test.ts ("stores the
+ // single-credential static token...") and by the catalog's credential-collapse tests.
+
+ // Esc cancelling with nothing stored or echoed is pinned at the paste seam (mcp-activation-queue.test.ts, "a
+ // cancelled (value=...) paste stores nothing...") and the chain ("Esc in the paste panel returns to the catalog that
+ // opened it").
+
+ // The empty-value refusal (nothing stored, nothing claimed) is pinned at
+ // the paste seam in mcp-activation-queue.test.ts.
+});
+
+/**
+ * ENG-6108: the picker CHAIN on the real InteractiveMode prototype — inline mounting, stale/replacement
+ * settling, action routing, and re-entry. Every wait resolves on a concrete signal: a picker/panel mount fires
+ * ui.setFocus, and an action start/finish resolves a deferred — never a timer or poll.
+ */
+describe("ENG-6108 service catalog picker chain", () => {
+ const ENDPOINT = "https://acme.example.test/mcp";
+ const PASTE_ENDPOINT = "https://paste.example.test/mcp";
+ const harnesses: Harness[] = [];
+ const localCatalogDirs: string[] = [];
+
+ beforeAll(async () => {
+ initTheme("dark");
+ await preloadCodeHighlighter();
+ });
+
+ beforeEach(() => {
+ setKeybindings(new KeybindingsManager());
+ vi.stubGlobal(
+ "fetch",
+ vi.fn(() => {
+ throw new Error("Network forbidden in inline picker tests");
+ }),
+ );
+ });
+
+ afterEach(() => {
+ while (harnesses.length) harnesses.pop()?.cleanup();
+ while (localCatalogDirs.length) rmSync(localCatalogDirs.pop()!, { recursive: true, force: true });
+ vi.unstubAllGlobals();
+ vi.unstubAllEnvs();
+ });
+
+ function view(overrides: Partial<McpPluginView> = {}): McpPluginView {
+ return viewFixture({ serviceId: "acme", label: "Acme", ...overrides });
+ }
+ const descriptor: McpServiceDescriptor = {
+ serviceId: "acme",
+ label: "Acme",
+ aliases: [],
+ transport: { type: "http", url: ENDPOINT },
+ authStrategy: "oauth",
+ setup: { status: "ready" },
+ metadataReviewed: true,
+ legacyBuiltin: false,
+ };
+ interface Target {
+ url?: string;
+ usesOAuth: boolean;
+ managedBySettings: boolean;
+ }
+ interface ActionOptions {
+ catalogServiceId?: string;
+ addAccount?: boolean;
+ knownIds?: ReadonlySet<string>;
+ }
+ interface PickerHost {
+ showServiceCatalogPicker(query?: string): Promise<void>;
+ showAccountPickerForService(
+ service: McpPluginView,
+ target: Target,
+ options: { knownIds: Set<string> },
+ ): Promise<"catalog" | "closed">;
+ selectServiceCatalogRow(
+ views: McpPluginView[],
+ ): Promise<{ status: "selected"; service: McpPluginView } | { status: "cancelled" } | { status: "back" }>;
+ closeServiceCatalogPicker?: () => void;
+ }
+
+ async function fixture(views: McpPluginView[] = [view()], options: { settings?: Record<string, unknown> } = {}) {
+ const harness = await createHarness({
+ models: [{ id: "offline", name: "Offline" }],
+ ...(options.settings ? { settings: options.settings as never } : {}),
+ });
+ harnesses.push(harness);
+ const store = McpConnectionStore.open(join(harness.tempDir, "connections.json"));
+ const editor = new Input();
+ editor.setValue("preserved draft");
+ const editorContainer = new Container();
+ editorContainer.addChild(editor);
+ const setFocus = vi.fn();
+ const connect = vi.fn(async (_view: McpPluginView, _target: Target | undefined, _options: ActionOptions) => ({
+ ran: true,
+ }));
+ const mode = Object.assign(Object.create(InteractiveMode.prototype) as object, {
+ editor,
+ editorContainer,
+ ui: {
+ terminal: { rows: 24 },
+ requestRender: vi.fn(),
+ setFocus,
+ showOverlay: vi.fn(() => {
+ throw new Error("Inline picker must not mount an overlay");
+ }),
+ },
+ uiServices: { modelRegistry: harness.session.modelRegistry, settingsManager: harness.settingsManager },
+ buildServiceCatalogViews: () => ({ services: [descriptor], views, diagnostics: [] }),
+ getMcpConnectionStore: () => store,
+ connectServiceFromPicker: connect,
+ showWarning: vi.fn(),
+ // The prototype object never runs the constructor, so the field the
+ // inline auth/paste panel closers live in starts as a real array.
+ inlineAuthPanelClosers: [],
+ }) as unknown as PickerHost;
+ const picker = () => {
+ const component = editorContainer.children[0];
+ expect(component).toBeInstanceOf(ServiceCatalogPickerComponent);
+ return component as ServiceCatalogPickerComponent;
+ };
+ const showError = vi.fn();
+ Object.assign(mode, { showError });
+ return { harness, store, editor, editorContainer, mode, picker, connect, setFocus, showError };
+ }
+
+ /** Resolve with the next mounted surface: every mount calls ui.setFocus —
+ * a concrete completion signal, never a timer or poll. */
+ function nextSurface<T extends Component>(
+ f: Awaited<ReturnType<typeof fixture>>,
+ matcher: (component: Component) => component is T,
+ ): Promise<T> {
+ return new Promise((resolve) => {
+ f.setFocus.mockImplementation((component: Component) => {
+ if (matcher(component)) resolve(component);
+ });
+ });
+ }
+ const nextPicker = (f: Awaited<ReturnType<typeof fixture>>, previous: Component) =>
+ nextSurface(
+ f,
+ (component): component is ServiceCatalogPickerComponent =>
+ component instanceof ServiceCatalogPickerComponent && component !== previous,
+ );
+ const nextPastePanel = (f: Awaited<ReturnType<typeof fixture>>) =>
+ nextSurface(
+ f,
+ (component): component is McpTokenPastePanelComponent => component instanceof McpTokenPastePanelComponent,
+ );
+
+ /** A synthetic OAuth grant bound to the service endpoint. */
+ const oauthGrant = (access: string, at = Date.now()) => ({
+ type: "oauth" as const,
+ access,
+ refresh: "r",
+ expires: at + 3600_000,
+ endpoint: ENDPOINT,
+ });
+
+ /** A connected store record for the service's account. */
+ const accountRecord = (connectionId: string, label: string, at = Date.now()) => ({
+ connectionId,
+ serviceId: "acme",
+ endpoint: ENDPOINT,
+ label,
+ status: "connected" as const,
+ verifiedAt: at,
+ toolCount: 2,
+ createdAt: at,
+ updatedAt: at,
+ });
+
+ /** Restore the production view builder and wire the mutation callbacks. */
+ async function settingsFixture() {
+ const f = await fixture();
+ Reflect.deleteProperty(f.mode, "buildServiceCatalogViews");
+ Reflect.deleteProperty(f.mode, "connectServiceFromPicker");
+ const showStatus = vi.fn();
+ const reload = vi.fn(async () => {});
+ const appendOutcome = vi.fn(async (_message: Record<string, unknown>) => {});
+ const authFlow = vi.fn(() => {
+ throw new Error("OAuth must not run for settings-only actions");
+ });
+ Object.assign(f.mode, {
+ showStatus,
+ handleReloadCommand: reload,
+ createAuthFlows: authFlow,
+ agentConnection: { appendCustomMessage: appendOutcome },
+ });
+ const reserve = vi.spyOn(f.store, "reserveConnectionId");
+ const claim = vi.spyOn(f.store, "claimConnectionId");
+ return { ...f, showStatus, reload, appendOutcome, authFlow, reserve, claim };
+ }
+
+ /** Write a validated local service-catalog source file and return its path. */
+ function writeLocalCatalog(entries: Record<string, unknown>[]): string {
+ const dir = mkdtempSync(join(tmpdir(), "eng6108-reentry-"));
+ localCatalogDirs.push(dir);
+ const file = join(dir, "services.json");
+ writeFileSync(
+ file,
+ JSON.stringify({
+ version: 1,
+ entries,
+ }),
+ "utf8",
+ );
+ return file;
+ }
+
+ it("ENG-6108: mounts inline, restores the editor before the action, and ignores duplicate Enter/cancel", async () => {
+ const f = await fixture([view(), view({ serviceId: "other", label: "Other" })]);
+ let release!: () => void;
+ const operation = new Promise<void>((resolve) => {
+ release = resolve;
+ });
+ const started = new Promise<void>((resolve) => {
+ f.connect.mockImplementation(async () => {
+ // The editor is restored BEFORE the action runs; the promise
+ // stays open through the action (no overlay, no prompt).
+ resolve();
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ await operation;
+ return { ran: true };
+ });
+ });
+ const done = f.mode.showServiceCatalogPicker("acme");
+ const picker = f.picker();
+ expect(picker.getSearchInput()?.getValue()).toBe("acme");
+ expect(stripAnsi(picker.render(80).join("\n"))).not.toContain("Other");
+ expect(f.setFocus).toHaveBeenLastCalledWith(picker);
+ picker.handleInput("\r");
+ picker.handleInput("\r"); // duplicate Enter is inert
+ picker.handleInput("\x1b"); // Esc is inert while the action runs
+ await started;
+ expect(f.connect).toHaveBeenCalledOnce();
+ let finished = false;
+ void done.then(() => {
+ finished = true;
+ });
+ await Promise.resolve();
+ expect(finished).toBe(false);
+ expect(f.setFocus.mock.calls.filter(([component]) => component === f.editor)).toHaveLength(1);
+ expect(f.editor.getValue()).toBe("preserved draft");
+ release();
+ // The action ran, so the chain re-enters the catalog (freshly mounted);
+ // Esc on the re-entered picker ends it and restores the editor.
+ const reopened = await nextPicker(f, picker);
+ expect(reopened.getSearchInput()).toBeDefined();
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.connect).toHaveBeenCalledOnce();
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ });
+
+ it("ENG-6108: reports rejected callbacks without leaking error text or replacing a later selector", async () => {
+ const f = await fixture();
+ let reject!: (reason: Error) => void;
+ const started = new Promise<void>((resolve) => {
+ f.connect.mockImplementation(
+ () =>
+ new Promise((_resolve, fail) => {
+ resolve();
+ reject = fail;
+ }),
+ );
+ });
+ const done = f.mode.showServiceCatalogPicker();
+ f.picker().handleInput("\r");
+ await started;
+ const next = new Input();
+ f.editorContainer.clear();
+ f.editorContainer.addChild(next);
+ reject(new Error("access_token=DO_NOT_DISPLAY"));
+ await done;
+ expect(f.showError).toHaveBeenCalledWith("MCP connection action did not complete. Try again.");
+ expect(JSON.stringify(f.showError.mock.calls)).not.toContain("DO_NOT_DISPLAY");
+ expect(f.editorContainer.children).toEqual([next]);
+ });
+
+ it("ENG-6108: settles a stale picker as cancellation without restoring or invoking its old row", async () => {
+ const f = await fixture();
+ const done = f.mode.showServiceCatalogPicker();
+ const stale = f.picker();
+ const next: Component = new Input();
+ f.editorContainer.clear();
+ f.editorContainer.addChild(next);
+ stale.handleInput("\r");
+ await done;
+ expect(f.connect).not.toHaveBeenCalled();
+ expect(f.editorContainer.children).toEqual([next]);
+ expect(f.setFocus.mock.calls.filter(([component]) => component === f.editor)).toHaveLength(0);
+ });
+
+ it("ENG-6108: opening a replacement picker settles the old promise, whose late close cannot hide it", async () => {
+ const f = await fixture();
+ const first = f.mode.selectServiceCatalogRow([view()]);
+ const stale = f.picker();
+ const oldClose = f.mode.closeServiceCatalogPicker;
+ const second = f.mode.selectServiceCatalogRow([view({ label: "Replacement" })]);
+ const next = f.picker();
+ await expect(first).resolves.toEqual({ status: "cancelled" });
+ stale.handleInput("\r");
+ oldClose?.();
+ expect(f.editorContainer.children).toEqual([next]);
+ next.handleInput("\x1b");
+ await expect(second).resolves.toEqual({ status: "cancelled" });
+ });
+
+ it("ENG-6108: catalog to accounts preserves ownership, grouping and real per-account pending state", async () => {
+ const f = await fixture([view({ connectionIds: ["acme-work"], connectionStatus: "connected" })]);
+ const now = Date.now();
+ f.harness.authStorage.set("mcp:acme-work", oauthGrant("synthetic", now));
+ f.store.upsert({
+ connectionId: "acme-work",
+ serviceId: "acme",
+ endpoint: ENDPOINT,
+ label: "Work",
+ status: "pending",
+ createdAt: 1,
+ updatedAt: 1,
+ });
+ await f.store.flush();
+ const done = f.mode.showServiceCatalogPicker();
+ const catalog = f.picker();
+ const accountsMount = nextPicker(f, catalog);
+ catalog.handleInput("\r");
+ const accounts = (await accountsMount) as ServiceCatalogPickerComponent;
+ catalog.handleInput("\x1b"); // the stale catalog's late Esc cannot close the accounts surface
+ expect(f.editorContainer.children).toEqual([accounts]);
+ const output = stripAnsi(accounts.render(100).join("\n"));
+ expect(output).toContain("Acme MCP");
+ expect(output).toContain("Reconnect");
+ expect(output).toContain("Enter verify");
+ accounts.handleInput("\r");
+ // The action ran, so the SAME accounts menu re-enters freshly built — never the prompt. The mocked action stored
+ // nothing, so the row set is unchanged; the surface is new.
+ const reopened = (await nextPicker(f, accounts)) as ServiceCatalogPickerComponent;
+ expect(f.connect).toHaveBeenCalledOnce();
+ expect(f.connect.mock.calls[0]?.[0]).toMatchObject({ serviceId: "acme-work", connectionStatus: "pending" });
+ expect(f.connect.mock.calls[0]?.[2]).toEqual({ catalogServiceId: "acme" });
+ expect(reopened.getSearchInput()).toBeUndefined();
+ const again = stripAnsi(reopened.render(100).join("\n"));
+ expect(again).toContain("Acme MCP");
+ expect(again).toContain("Reconnect");
+ expect(again).toContain("Enter verify");
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.editor.getValue()).toBe("preserved draft");
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ });
+
+ async function connectedAccountFixture() {
+ const f = await settingsFixture();
+ const now = Date.now();
+ f.harness.authStorage.set("mcp:acme-work", {
+ type: "oauth",
+ access: "synthetic-access",
+ refresh: "r",
+ expires: now + 3600_000,
+ endpoint: ENDPOINT,
+ });
+ f.store.upsert(accountRecord("acme-work", "Work"));
+ await f.store.flush();
+ const removeAccount = vi.spyOn(f.store, "removeAccount");
+ const done = f.mode.showAccountPickerForService(
+ view({ connectionIds: ["acme-work"], connectionStatus: "connected" }),
+ { url: ENDPOINT, usesOAuth: true, managedBySettings: false },
+ { knownIds: new Set(["acme"]) },
+ );
+ return { f, removeAccount, done, accounts: f.picker() };
+ }
+
+ it("ENG-6108: the accounts Reconnect row re-verifies, never disconnects", async () => {
+ // Enter on the first row must re-verify; the record and credential both
+ // survive, and the SAME accounts menu reopens with the refreshed status.
+ const { f, removeAccount, done, accounts } = await connectedAccountFixture();
+ expect(stripAnsi(accounts.render(100).join("\n"))).toContain("Enter reconnect");
+ accounts.handleInput("\r");
+ const reopened = (await nextPicker(f, accounts)) as ServiceCatalogPickerComponent;
+ expect(reopened.getSearchInput()).toBeUndefined();
+ const again = stripAnsi(reopened.render(100).join("\n"));
+ expect(again).toContain("Reconnect");
+ expect(again).toContain("Enter verify");
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ expect(removeAccount).not.toHaveBeenCalled();
+ expect(f.store.get("acme-work")).toBeDefined();
+ expect(f.harness.authStorage.getVerified("mcp:acme-work")).toBeDefined();
+ expect(f.reserve).not.toHaveBeenCalled();
+ expect(f.claim).not.toHaveBeenCalled();
+ // The network-denied environment makes the offline verification fail
+ // honestly; the account stays saved — never a removal.
+ expect(f.appendOutcome).toHaveBeenCalledOnce();
+ expect(f.appendOutcome.mock.calls[0]?.[0]).toMatchObject({
+ customType: "mcp_connection_outcome",
+ details: { source: "retry", verification: "unverified" },
+ });
+ });
+
+ it("ENG-6108: the accounts Disconnect row removes that account and records the durable entry", async () => {
+ // Disconnecting the LAST account leaves the service with no accounts, so the chain reopens the CATALOG — the user
+ // is never dropped to the prompt. The real /mcp flow enters the accounts menu from the catalog row.
+ const f = await settingsFixture();
+ const now = Date.now();
+ f.harness.authStorage.set("mcp:acme-work", {
+ type: "oauth",
+ access: "synthetic-access",
+ refresh: "r",
+ expires: now + 3600_000,
+ endpoint: ENDPOINT,
+ });
+ f.store.upsert(accountRecord("acme-work", "Work"));
+ await f.store.flush();
+ const removeAccount = vi.spyOn(f.store, "removeAccount");
+ const done = f.mode.showServiceCatalogPicker("acme");
+ const catalog = f.picker();
+ catalog.handleInput("\r");
+ const accounts = await nextPicker(f, catalog);
+ accounts.handleInput("\x1b[B");
+ expect(stripAnsi(accounts.render(100).join("\n"))).toContain("Enter disconnect");
+ accounts.handleInput("\r");
+ const reopened = await nextPicker(f, accounts);
+ expect(reopened.getSearchInput()).toBeDefined();
+ expect(stripAnsi(reopened.render(100).join("\n"))).not.toContain("Work MCP");
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ expect(removeAccount).toHaveBeenCalledOnce();
+ expect(f.store.get("acme-work")).toBeUndefined();
+ expect(f.harness.authStorage.getVerified("mcp:acme-work")).toBeUndefined();
+ expect(f.reload).toHaveBeenCalledOnce();
+ // The durable "◆ Disconnected" entry rides the remove path.
+ expect(f.appendOutcome).toHaveBeenCalledOnce();
+ expect(f.appendOutcome.mock.calls[0]?.[0]).toMatchObject({
+ customType: "mcp_connection_outcome",
+ details: { kind: "disconnect", label: "Work", connectionId: "acme-work" },
+ });
+ });
+
+ // Multi-account Reconnect acting on the PICKED account through the sub-picker is covered by "disconnecting one of
+ // several accounts re-enters that service's accounts menu without the removed row" (the disconnect variant drives
+ // the same sub-picker → act-on-picked id → re-entry path).
+
+ // Esc and the left arrow are the same back path in the sub-picker; the
+ // table keeps one deterministic representative of the wiring.
+ it("ENG-6108: the sub-picker's back key returns to the accounts menu without acting", async () => {
+ const key = "\x1b";
+ const f = await fixture([view({ connectionIds: ["acme-work", "acme-personal"], connectionStatus: "connected" })]);
+ const done = f.mode.showAccountPickerForService(
+ view({ connectionIds: ["acme-work", "acme-personal"], connectionStatus: "connected" }),
+ { url: ENDPOINT, usesOAuth: true, managedBySettings: false },
+ { knownIds: new Set(["acme"]) },
+ );
+ const accounts = f.picker();
+ accounts.handleInput("\r"); // → Reconnect: open the account sub-picker
+ const sub = await nextPicker(f, accounts);
+ sub.handleInput(key);
+ // Back, never close: the service's accounts menu re-mounts freshly built and nothing acted.
+ const reopened = (await nextPicker(f, sub)) as ServiceCatalogPickerComponent;
+ expect(reopened.getSearchInput()).toBeUndefined();
+ const again = stripAnsi(reopened.render(100).join("\n"));
+ expect(again).toContain("Acme MCP");
+ expect(again).toContain("Reconnect");
+ expect(again).toContain("Enter choose account");
+ expect(f.connect).not.toHaveBeenCalled();
+ reopened.handleInput("\x1b"); // Esc from the accounts menu closes the chain
+ await done;
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ });
+
+ it("ENG-6108: left arrow from the accounts menu returns to a freshly mounted catalog", async () => {
+ const f = await fixture([view({ connectionIds: ["acme-work"], connectionStatus: "connected" })]);
+ const done = f.mode.showServiceCatalogPicker("acme");
+ const catalog = f.picker();
+ catalog.handleInput("\r"); // → the service's accounts menu
+ const accounts = await nextPicker(f, catalog);
+ expect(accounts.getSearchInput()).toBeUndefined();
+ expect(stripAnsi(accounts.render(100).join("\n"))).toContain("← back");
+ accounts.handleInput("\x1b[D");
+ const reopened = (await nextPicker(f, accounts)) as ServiceCatalogPickerComponent;
+ // The catalog surface, freshly mounted: the search box is back and
+ // EMPTY — the "acme" prefill that opened the chain did not survive.
+ expect(reopened.getSearchInput()).toBeDefined();
+ expect(reopened.getSearchInput()?.getValue()).toBe("");
+ expect(stripAnsi(reopened.render(100).join("\n"))).toContain("Acme");
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ });
+
+ it("ENG-6108: captured disabled stdio guidance cannot disable a server re-enabled while the picker is open", async () => {
+ const f = await settingsFixture();
+ const config = { type: "stdio" as const, command: "synthetic-not-executed", enabled: false };
+ f.harness.settingsManager.setGlobalMcpServer("stdio-proof", config, true);
+ const done = f.mode.showServiceCatalogPicker("stdio-proof");
+ const picker = f.picker();
+ expect(stripAnsi(picker.render(100).join("\n"))).toContain("Enter settings guidance");
+ f.harness.settingsManager.setGlobalMcpServer("stdio-proof", { ...config, enabled: true }, true);
+ const writeSettings = vi.spyOn(f.harness.settingsManager, "setGlobalMcpServer");
+ picker.handleInput("\r");
+ await done;
+ expect(f.harness.settingsManager.getGlobalMcpServers()?.["stdio-proof"]?.enabled).toBe(true);
+ expect(writeSettings).not.toHaveBeenCalled();
+ expect(f.reload).not.toHaveBeenCalled();
+ expect(f.showStatus).toHaveBeenCalled();
+ expect(f.authFlow).not.toHaveBeenCalled();
+ expect(f.reserve).not.toHaveBeenCalled();
+ expect(f.claim).not.toHaveBeenCalled();
+ expect(fetch).not.toHaveBeenCalled();
+ });
+
+ // Settings-only guidance surfaces (no mutation, no OAuth, status line as the outcome) are pinned at the ACTION seam
+ // in mcp-activation-queue.test.ts ("Enter on an already-disabled stdio server reports the disabled state", "a
+ // vanished stdio settings entry reports it is gone") and in mcp-catalog-eligibility.test.ts (bearer/user-server
+ // semantics).
+
+ it.each([false, true])(
+ "ENG-6108: nonOAuth pending HTTP follows real Verify without OAuth (saved=%s)",
+ async (saved) => {
+ const f = await settingsFixture();
+ vi.stubEnv("ENG_6108_PRESENT_BEARER", "synthetic-env-token");
+ f.harness.settingsManager.setGlobalMcpServer(
+ "http-proof",
+ { type: "http", url: ENDPOINT, bearerTokenEnvVar: "ENG_6108_PRESENT_BEARER" },
+ true,
+ );
+ if (saved) {
+ f.store.upsert({
+ connectionId: "http-proof",
+ serviceId: "http-proof",
+ endpoint: ENDPOINT,
+ label: "HTTP",
+ status: "pending",
+ createdAt: 1,
+ updatedAt: 1,
+ });
+ await f.store.flush();
+ }
+ const done = f.mode.showServiceCatalogPicker("http-proof");
+ let picker = f.picker();
+ if (saved) {
+ expect(stripAnsi(picker.render(100).join("\n"))).toContain("Enter manage saved account");
+ picker.handleInput("\r");
+ picker = (await nextPicker(f, picker)) as ServiceCatalogPickerComponent;
+ }
+ const output = stripAnsi(picker.render(100).join("\n"));
+ expect(output).toContain("Enter verify");
+ expect(output).not.toContain("Add another account");
+ if (saved) {
+ expect(output).toContain("Reconnect");
+ expect(output).not.toContain("Needs verification");
+ } else {
+ expect(output).toContain("Needs verification");
+ expect(output).not.toContain("Remove saved data");
+ }
+ picker.handleInput("\r");
+ // The verify RAN, so the accounts menu re-enters freshly built: even the
+ // saved=false case now manages the persisted record — never the prompt.
+ const reopened = (await nextPicker(f, picker)) as ServiceCatalogPickerComponent;
+ expect(reopened.getSearchInput()).toBeUndefined();
+ expect(stripAnsi(reopened.render(100).join("\n"))).toContain("Remove saved data for http-proof");
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ // Global fetch is denied: the existing verifier ran, not a login.
+ expect(fetch).toHaveBeenCalled();
+ expect(f.store.get("http-proof")?.status).toBe("pending");
+ expect(f.store.get("http-proof")?.lastError).toBeDefined();
+ expect(f.store.get("http-proof")?.verifiedAt).toBeUndefined();
+ expect(f.reload).toHaveBeenCalledOnce();
+ expect(f.appendOutcome).toHaveBeenCalledOnce();
+ expect(f.appendOutcome.mock.calls[0]?.[0]).toMatchObject({
+ customType: "mcp_connection_outcome",
+ details: { source: "retry", verification: "unverified" },
+ });
+ expect(f.authFlow).not.toHaveBeenCalled();
+ expect(f.reserve).not.toHaveBeenCalled();
+ expect(f.claim).not.toHaveBeenCalled();
+ },
+ );
+
+ it.each(["record", "credential-only"] as const)(
+ "ENG-6108: real nonOAuth HTTP %s cleanup removes saved data but keeps server settings and environment token",
+ async (saved) => {
+ const f = await settingsFixture();
+ vi.stubEnv("ENG_6108_SAVED_BEARER", "");
+ const config = { type: "http" as const, url: ENDPOINT, bearerTokenEnvVar: "ENG_6108_SAVED_BEARER" };
+ f.harness.settingsManager.setGlobalMcpServer("http-proof", config, true);
+ f.harness.authStorage.set("mcp:http-proof", {
+ type: "oauth",
+ access: "synthetic-saved-token",
+ refresh: "r",
+ endpoint: ENDPOINT,
+ expires: Date.now() + 3600_000,
+ });
+ if (saved === "record") {
+ f.store.upsert({
+ connectionId: "http-proof",
+ serviceId: "http-proof",
+ endpoint: ENDPOINT,
+ label: "HTTP",
+ status: "error",
+ createdAt: 1,
+ updatedAt: 1,
+ });
+ await f.store.flush();
+ }
+ const done = f.mode.showServiceCatalogPicker("http-proof");
+ const catalog = f.picker();
+ expect(stripAnsi(catalog.render(100).join("\n"))).toContain("Enter manage saved account");
+ catalog.handleInput("\r");
+ const accounts = (await nextPicker(f, catalog)) as ServiceCatalogPickerComponent;
+ expect(stripAnsi(accounts.render(100).join("\n"))).toContain("Enter settings guidance");
+ expect(stripAnsi(accounts.render(100).join("\n"))).not.toContain("Add another account");
+ accounts.handleInput("\x1b[B");
+ expect(stripAnsi(accounts.render(100).join("\n"))).toContain("Enter remove saved data");
+ // Changing the environment does not change the cleanup's meaning.
+ vi.stubEnv("ENG_6108_SAVED_BEARER", "synthetic-current-token");
+ accounts.handleInput("\r");
+ // The removal RAN: the chain re-enters the CATALOG, where the
+ // settings-managed server is still visible — now honestly empty.
+ const reopened = await nextPicker(f, accounts);
+ expect(reopened.getSearchInput()).toBeDefined();
+ const after = stripAnsi(reopened.render(120).join("\n"));
+ expect(after).toContain("http-proof");
+ expect(after).not.toContain("Remove saved data");
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ expect(f.harness.authStorage.getVerified("mcp:http-proof")).toBeUndefined();
+ expect(f.store.get("http-proof")).toBeUndefined();
+ expect(f.harness.settingsManager.getGlobalMcpServers()?.["http-proof"]).toEqual(config);
+ expect(f.reload).toHaveBeenCalledOnce();
+ expect(f.authFlow).not.toHaveBeenCalled();
+ expect(f.reserve).not.toHaveBeenCalled();
+ expect(f.claim).not.toHaveBeenCalled();
+ expect(fetch).not.toHaveBeenCalled();
+ },
+ );
+
+ it("ENG-6108: saved HTTP guidance stays inert if the bearer environment changes after rendering", async () => {
+ const f = await settingsFixture();
+ vi.stubEnv("ENG_6108_GUIDANCE_BEARER", "");
+ f.harness.settingsManager.setGlobalMcpServer(
+ "http-proof",
+ { type: "http", url: ENDPOINT, bearerTokenEnvVar: "ENG_6108_GUIDANCE_BEARER" },
+ true,
+ );
+ f.store.upsert({
+ connectionId: "http-proof",
+ serviceId: "http-proof",
+ endpoint: ENDPOINT,
+ label: "HTTP",
+ status: "pending",
+ createdAt: 1,
+ updatedAt: 1,
+ });
+ await f.store.flush();
+ const done = f.mode.showServiceCatalogPicker("http-proof");
+ const catalog = f.picker();
+ catalog.handleInput("\r");
+ const accounts = await nextPicker(f, catalog);
+ expect(stripAnsi(accounts.render(100).join("\n"))).toContain("Enter settings guidance");
+ vi.stubEnv("ENG_6108_GUIDANCE_BEARER", "synthetic-new-token");
+ accounts.handleInput("\r");
+ await done;
+ expect(f.authFlow).not.toHaveBeenCalled();
+ expect(f.reload).not.toHaveBeenCalled();
+ expect(f.reserve).not.toHaveBeenCalled();
+ expect(f.claim).not.toHaveBeenCalled();
+ expect(fetch).not.toHaveBeenCalled();
+ expect(f.store.get("http-proof")?.status).toBe("pending");
+ });
+
+ /** A real-picker fixture whose service catalog comes from a declared LOCAL
+ * catalog source file (the same resolution production uses), with the REAL
+ * view builder, connect action, and paste flow. */
+ async function localCatalogFixture(entries: Record<string, unknown>[]) {
+ const file = writeLocalCatalog(entries);
+ const f = await fixture([], { settings: { mcpCatalogSources: [file] } });
+ Reflect.deleteProperty(f.mode, "buildServiceCatalogViews");
+ Reflect.deleteProperty(f.mode, "connectServiceFromPicker");
+ const showStatus = vi.fn();
+ const reload = vi.fn(async () => {});
+ const appendOutcome = vi.fn(async (_message: Record<string, unknown>) => {});
+ const authFlow = vi.fn(() => {
+ throw new Error("OAuth must not run for paste-only fixtures");
+ });
+ Object.assign(f.mode, {
+ showStatus,
+ handleReloadCommand: reload,
+ createAuthFlows: authFlow,
+ agentConnection: { appendCustomMessage: appendOutcome },
+ });
+ return { ...f, showStatus, reload, appendOutcome, authFlow };
+ }
+
+ const pasteEntry = {
+ server: "paste-svc",
+ service: "paste-svc",
+ label: "Paste Service",
+ url: PASTE_ENDPOINT,
+ aliases: [],
+ transport: { type: "http", url: PASTE_ENDPOINT },
+ auth: { strategy: "api_key", clientRegistration: "unknown" },
+ setup: {
+ status: "requires-setup",
+ reason: "Requires a paste token.",
+ fields: [{ id: "PASTE_SVC_TOKEN", label: "Paste Service token", required: true, kind: "bearer-token" }],
+ },
+ verification: { status: "unverified" },
+ legacyBuiltin: false,
+ provenance: [{ source: "user" }],
+ };
+
+ it("ENG-6108: a submitted paste token re-enters the accounts menu with the new account", async () => {
+ const f = await localCatalogFixture([pasteEntry]);
+ const done = f.mode.showServiceCatalogPicker("paste-svc");
+ const catalog = f.picker();
+ expect(stripAnsi(catalog.render(100).join("\n"))).toContain("Paste Service");
+ catalog.handleInput("\r");
+ // The paste panel mounts INLINE (never an overlay) over the editor.
+ const panel = (await nextPastePanel(f)) as McpTokenPastePanelComponent;
+ for (const character of "synthetic-pasted-token") panel.handleInput(character);
+ panel.handleInput("\r");
+ // The paste RAN and the service now owns an account: the accounts menu
+ // re-enters — success or failure, the surface is state, not the verdict.
+ const reopened = (await nextPicker(f, catalog)) as ServiceCatalogPickerComponent;
+ expect(reopened.getSearchInput()).toBeUndefined();
+ const again = stripAnsi(reopened.render(100).join("\n"));
+ expect(again).toContain("Paste Service MCP");
+ expect(again).toContain("Reconnect");
+ expect(again).toContain("Disconnect");
+ // The token is stored under the shared MCP credential key and never leaks into the rendered surface.
+ const credential = f.harness.authStorage.get("mcp:paste-svc");
+ expect(credential).toMatchObject({ type: "mcp_static_token", bearer: "synthetic-pasted-token" });
+ expect(again).not.toContain("synthetic-pasted-token");
+ expect(f.appendOutcome).toHaveBeenCalledOnce();
+ expect(f.appendOutcome.mock.calls[0]?.[0]).toMatchObject({
+ customType: "mcp_connection_outcome",
+ details: { source: "paste" },
+ });
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ });
+
+ it("ENG-6108: Esc in the paste panel returns to the catalog that opened it", async () => {
+ const f = await localCatalogFixture([pasteEntry]);
+ const done = f.mode.showServiceCatalogPicker("paste-svc");
+ const catalog = f.picker();
+ catalog.handleInput("\r");
+ const panel = (await nextPastePanel(f)) as McpTokenPastePanelComponent;
+ panel.handleInput("\x1b");
+ // Cancel stored NOTHING, so the surface that opened the panel — the
+ // catalog — re-enters, not the prompt and not an empty accounts menu.
+ const reopened = (await nextPicker(f, catalog)) as ServiceCatalogPickerComponent;
+ expect(reopened.getSearchInput()).toBeDefined();
+ for (const character of "paste-svc") reopened.handleInput(character);
+ expect(stripAnsi(reopened.render(120).join("\n"))).toContain("Paste Service");
+ expect(f.harness.authStorage.get("mcp:paste-svc")).toBeUndefined();
+ expect(f.store.records()).toEqual([]);
+ expect(f.appendOutcome).not.toHaveBeenCalled();
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ });
+
+ it("ENG-6108: a blocked action (login in progress) reports its status and never re-enters", async () => {
+ const f = await settingsFixture();
+ const now = Date.now();
+ f.store.upsert({
+ connectionId: "acme-work",
+ serviceId: "acme",
+ endpoint: ENDPOINT,
+ label: "Work",
+ status: "pending",
+ createdAt: now,
+ updatedAt: now,
+ attemptId: "attempt-in-flight",
+ });
+ await f.store.flush();
+ const done = f.mode.showServiceCatalogPicker("acme");
+ const catalog = f.picker();
+ catalog.handleInput("\r");
+ const accounts = await nextPicker(f, catalog);
+ expect(stripAnsi(accounts.render(100).join("\n"))).toContain("login in progress");
+ accounts.handleInput("\r");
+ // The action is blocked BEFORE it starts: the status line is the
+ // outcome and the chain ends right there — no re-entry, no loop.
+ await done;
+ expect(f.showStatus).toHaveBeenCalledWith("Login in progress. Finish it or remove the account to cancel.");
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ expect(f.appendOutcome).not.toHaveBeenCalled();
+ });
+
+ it("ENG-6108: disconnecting one of several accounts re-enters that service's accounts menu without the removed row", async () => {
+ const f = await settingsFixture();
+ const now = Date.now();
+ // "acme-work" sorts before "acme-zzz", so the store's file (written
+ // sorted) keeps the row order deterministic after the disk reload in re-entry.
+ const second = "acme-zzz";
+ for (const id of ["acme-work", second]) {
+ f.harness.authStorage.set(`mcp:${id}`, oauthGrant("synthetic"));
+ f.store.upsert({
+ connectionId: id,
+ serviceId: "acme",
+ endpoint: ENDPOINT,
+ label: id,
+ status: "connected",
+ verifiedAt: now,
+ toolCount: 2,
+ createdAt: now,
+ updatedAt: now,
+ });
+ }
+ await f.store.flush();
+ const removeAccount = vi.spyOn(f.store, "removeAccount");
+ const done = f.mode.showServiceCatalogPicker("acme");
+ const catalog = f.picker();
+ catalog.handleInput("\r");
+ const accounts = await nextPicker(f, catalog);
+ accounts.handleInput("\x1b[B"); // → Disconnect (the service-wide chooser)
+ accounts.handleInput("\r");
+ const sub = (await nextPicker(f, accounts)) as ServiceCatalogPickerComponent;
+ expect(sub.getSearchInput()).toBeUndefined();
+ const subOutput = stripAnsi(sub.render(100).join("\n"));
+ expect(subOutput).toContain("Accounts");
+ expect(subOutput).toContain("Enter disconnect");
+ sub.handleInput("\r"); // → acme-work
+ const reopened = (await nextPicker(f, sub)) as ServiceCatalogPickerComponent;
+ // Same surface, rebuilt from the live store: acme-work is gone, the sibling remains.
+ expect(reopened.getSearchInput()).toBeUndefined();
+ const after = stripAnsi(reopened.render(100).join("\n"));
+ expect(after).not.toContain("acme-work");
+ expect(after).toContain("Reconnect");
+ expect(after).toContain("Disconnect");
+ expect(f.store.get("acme-work")).toBeUndefined();
+ expect(f.store.get(second)).toBeDefined();
+ expect(removeAccount).toHaveBeenCalledOnce();
+ expect(f.appendOutcome).toHaveBeenCalledOnce();
+ expect(f.appendOutcome.mock.calls[0]?.[0]).toMatchObject({
+ details: { kind: "disconnect", connectionId: "acme-work" },
+ });
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ });
+
+ it("ENG-6108: a cancelled connect from the catalog re-enters the accounts menu of its preserved shell", async () => {
+ const f = await settingsFixture();
+ f.harness.settingsManager.setGlobalMcpServer("acme", { type: "http", url: ENDPOINT, oauth: true }, true);
+ Object.assign(f.mode, { createAuthFlows: () => ({ runMcpLogin: vi.fn(async () => ({ status: "cancelled" })) }) });
+ const done = f.mode.showServiceCatalogPicker("acme");
+ const catalog = f.picker();
+ expect(stripAnsi(catalog.render(100).join("\n"))).toContain("Enter connect");
+ catalog.handleInput("\r");
+ // The login was cancelled, and the guarded flow DELIBERATELY preserves the reserved pending shell (no credential,
+ // no claim). Something IS stored, so the chain re-enters that service's accounts menu — never the prompt.
+ const reopened = (await nextPicker(f, catalog)) as ServiceCatalogPickerComponent;
+ expect(reopened.getSearchInput()).toBeUndefined();
+ const after = stripAnsi(reopened.render(100).join("\n"));
+ expect(after).toContain("Reconnect");
+ expect(after).toContain("Disconnect");
+ expect(f.store.get("acme")?.attemptId).toBeUndefined();
+ expect(f.harness.authStorage.get("mcp:acme")).toBeUndefined();
+ expect(f.appendOutcome).not.toHaveBeenCalled();
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ });
+
+ it("ENG-6108: a committed connect from the catalog re-enters the accounts menu for the service just connected", async () => {
+ const f = await settingsFixture();
+ f.harness.settingsManager.setGlobalMcpServer("acme", { type: "http", url: ENDPOINT, oauth: true }, true);
+ const _now = Date.now();
+ Object.assign(f.mode, {
+ createAuthFlows: () => ({
+ runMcpLogin: vi.fn(async (serverId: string) => {
+ // The staged login writes the STAGED credential; the guarded finalize moves it to the real account key.
+ f.harness.authStorage.set(`mcp:${serverId}`, oauthGrant("new-grant"));
+ return { status: "success" as const };
+ }),
+ }),
+ });
+ const done = f.mode.showServiceCatalogPicker("acme");
+ const catalog = f.picker();
+ catalog.handleInput("\r");
+ // The login committed: the service now owns an account, so the ACCOUNTS
+ // menu re-enters for it (offline verification is honestly unverified).
+ const reopened = (await nextPicker(f, catalog)) as ServiceCatalogPickerComponent;
+ expect(reopened.getSearchInput()).toBeUndefined();
+ const after = stripAnsi(reopened.render(100).join("\n"));
+ expect(after).toContain("Reconnect");
+ expect(after).toContain("Disconnect");
+ expect(f.store.get("acme")).toBeDefined();
+ expect(f.harness.authStorage.getVerified("mcp:acme")).toBeDefined();
+ expect(f.appendOutcome).toHaveBeenCalledOnce();
+ reopened.handleInput("\x1b");
+ await done;
+ expect(f.editorContainer.children).toEqual([f.editor]);
+ });
+});
diff --git a/packages/tui/.changes/masked-input.md b/packages/tui/.changes/masked-input.md
new file mode 100644
index 0000000000..6da81a67a5
--- /dev/null
+++ b/packages/tui/.changes/masked-input.md
@@ -0,0 +1 @@
+- Added a masked option to the Input component (and MenuSearchInput): the rendered line shows one bullet per grapheme while edits and submit keep the real buffer, so secret paste fields never draw the pasted value. The TUI's first consumer is the MCP token paste panel.
diff --git a/packages/tui/src/components/input.ts b/packages/tui/src/components/input.ts
index 35e635fb21..fec62825cf 100644
--- a/packages/tui/src/components/input.ts
+++ b/packages/tui/src/components/input.ts
@@ -12,6 +12,16 @@ interface InputState {
cursor: number;
}
+export interface InputOptions {
+ /**
+ * Render the value as bullets while keeping the real buffer for edits and
+ * submit: a pasted secret is never drawn, but getValue()/onSubmit still
+ * return exactly what was typed. Cursor math maps by grapheme so editing
+ * (backspace, word moves, paste) behaves exactly like the unmasked input.
+ */
+ masked?: boolean;
+}
+
/**
* Input component - single-line text input with horizontal scrolling
*/
@@ -23,6 +33,8 @@ export class Input implements Component, Focusable {
focused: boolean = false;
+ constructor(private readonly options: InputOptions = {}) {}
+
private pasteBuffer: string = "";
private isInPaste: boolean = false;
@@ -401,6 +413,19 @@ export class Input implements Component, Focusable {
invalidate(): void {}
+ /**
+ * The (value, cursor) pair rendering operates on. Unmasked input renders the
+ * real buffer; masked input renders one bullet per grapheme with the cursor
+ * mapped by grapheme count, so the displayed text never contains the secret
+ * while the real buffer keeps every edit and submit.
+ */
+ private displayState(): { value: string; cursor: number } {
+ if (this.options.masked !== true) return { value: this.value, cursor: this.cursor };
+ const graphemes = [...segmenter.segment(this.value)];
+ const beforeCursor = [...segmenter.segment(this.value.slice(0, this.cursor))];
+ return { value: graphemes.map(() => "•").join(""), cursor: beforeCursor.length };
+ }
+
render(width: number): string[] {
const prompt = "> ";
const availableWidth = width - prompt.length;
@@ -409,15 +434,16 @@ export class Input implements Component, Focusable {
return [prompt];
}
+ const display = this.displayState();
let visibleText = "";
- let cursorDisplay = this.cursor;
- const totalWidth = visibleWidth(this.value);
+ let cursorDisplay = display.cursor;
+ const totalWidth = visibleWidth(display.value);
if (totalWidth < availableWidth) {
- visibleText = this.value;
+ visibleText = display.value;
} else {
- const scrollWidth = this.cursor === this.value.length ? availableWidth - 1 : availableWidth;
- const cursorCol = visibleWidth(this.value.slice(0, this.cursor));
+ const scrollWidth = display.cursor === display.value.length ? availableWidth - 1 : availableWidth;
+ const cursorCol = visibleWidth(display.value.slice(0, display.cursor));
if (scrollWidth > 0) {
const halfWidth = Math.floor(scrollWidth / 2);
@@ -431,8 +457,8 @@ export class Input implements Component, Focusable {
startCol = Math.max(0, cursorCol - halfWidth);
}
- visibleText = sliceByColumn(this.value, startCol, scrollWidth, true);
- const beforeCursor = sliceByColumn(this.value, startCol, Math.max(0, cursorCol - startCol), true);
+ visibleText = sliceByColumn(display.value, startCol, scrollWidth, true);
+ const beforeCursor = sliceByColumn(display.value, startCol, Math.max(0, cursorCol - startCol), true);
cursorDisplay = beforeCursor.length;
} else {
visibleText = "";
diff --git a/packages/tui/test/input.test.ts b/packages/tui/test/input.test.ts
new file mode 100644
index 0000000000..0517c26f46
--- /dev/null
+++ b/packages/tui/test/input.test.ts
@@ -0,0 +1,57 @@
+import assert from "node:assert";
+import test from "node:test";
+import { Input } from "../src/components/input.js";
+import { visibleWidth } from "../src/utils.js";
+
+test("masked input renders bullets while getValue and submit keep the real value", () => {
+ const input = new Input({ masked: true });
+ input.focused = true;
+ for (const character of "ghp_secret123") input.handleInput(character);
+
+ const [line] = input.render(60);
+ assert.ok(line);
+ assert.ok(!line.includes("ghp_secret123"), "masked render must not contain the raw value");
+ assert.ok(line.includes("•".repeat("ghp_secret123".length)), "masked render shows one bullet per grapheme");
+ assert.strictEqual(input.getValue(), "ghp_secret123");
+
+ let submitted: string | undefined;
+ input.onSubmit = (value) => {
+ submitted = value;
+ };
+ input.handleInput("\r");
+ assert.strictEqual(submitted, "ghp_secret123");
+});
+
+test("masked input keeps the cursor mapped through backspace and word deletes", () => {
+ const input = new Input({ masked: true });
+ input.focused = true;
+ for (const character of "token one two") input.handleInput(character);
+ input.handleInput("\x01"); // Ctrl+A: cursor at start — backspace does nothing
+ input.handleInput("\x7f");
+ assert.strictEqual(input.getValue(), "token one two");
+
+ // Move past the first word and delete it: the masked render follows.
+ for (let i = 0; i < 6; i++) input.handleInput("\x1b[C");
+ input.handleInput("\x17"); // Ctrl+W deletes "token "
+ assert.strictEqual(input.getValue(), "one two");
+
+ const [line] = input.render(40);
+ assert.ok(line);
+ assert.ok(!line.includes("one"), "masked render must not contain the raw value");
+ // One bullet per grapheme (the reverse-video cursor wraps one of them in
+ // ANSI, so count rather than match a contiguous run).
+ assert.strictEqual([...line].filter((character) => character === "•").length, "one two".length);
+ assert.ok(visibleWidth(line) <= 40);
+ // The cursor stays usable for further edits at the right position.
+ for (const character of "new ") input.handleInput(character);
+ assert.strictEqual(input.getValue(), "new one two");
+});
+
+test("unmasked input render stays byte-identical to the legacy behavior", () => {
+ const unmasked = new Input();
+ unmasked.focused = true;
+ for (const character of "visible") unmasked.handleInput(character);
+ const [line] = unmasked.render(40);
+ assert.ok(line);
+ assert.ok(line.includes("visible"));
+});
diff --git a/prime-agent-runtime/src/rlm/__init__.py b/prime-agent-runtime/src/rlm/__init__.py
index ec62243a10..3df8252275 100644
--- a/prime-agent-runtime/src/rlm/__init__.py
+++ b/prime-agent-runtime/src/rlm/__init__.py
@@ -593,9 +593,7 @@ __all__ = [
"HarnessEntry",
"HarnessScope",
"HarnessState",
- "McpIntegration",
"McpToolError",
- "NotEnabled",
"RLMCreateSessionHandle",
"RLMModel",
"RLMProgressNoteResult",
@@ -617,8 +615,8 @@ __all__ = [
"spawn",
]
-# Lazily re-export the MCP base class. Kept lazy so `import rlm` never requires
-# the optional `mcp` SDK — only integration packages that subclass it do.
+# Lazily re-export the generic MCP error type. Kept lazy so `import rlm` never
+# requires the optional `mcp` SDK — only modules that call into it do.
_LAZY_MCP = {"McpIntegration", "McpToolError", "NotEnabled"}
diff --git a/prime-agent-runtime/src/rlm/mcp.py b/prime-agent-runtime/src/rlm/mcp.py
index bc6ecb642e..c82f503392 100644
--- a/prime-agent-runtime/src/rlm/mcp.py
+++ b/prime-agent-runtime/src/rlm/mcp.py
@@ -1,22 +1,51 @@
-"""Kernel-owned generic MCP client registry."""
+"""Kernel-owned generic MCP client registry.
+
+Two surfaces, one module:
+
+- Dispatch: ``list_tools(connection)`` / ``call_tool(connection, tool, arguments)``
+ open a configured MCP server (host-resolved via ``mcp.config``), discover its
+ tools, and call them. Adding a service is data, not a new Python module.
+- Discovery: ``list_plugins`` / ``search_plugins`` (host-owned catalog),
+ ``list_connections`` (the user's actual connections), ``search_tools`` /
+ ``describe_tool`` (live tool metadata). Inventory calls are bounded and never
+ return credentials; live tool schemas and results are passed through
+ unmodified.
+"""
from __future__ import annotations
import asyncio
+import copy
import hashlib
import io
+import json
import os
import re
import threading
import time
from contextlib import AsyncExitStack
from collections.abc import Awaitable, Callable
+from pathlib import Path
from typing import Any, TypeVar
from . import host_request
-from .mcp_base import _parse_result, _read_auth, _resolve_config_value
-
-__all__ = ["McpStartupError", "call_tool", "close", "list_tools", "reload"]
+from .mcp_base import McpToolError
+
+__all__ = [
+ "McpCredentialsUnavailable",
+ "McpDiscoveryError",
+ "McpStartupError",
+ "McpToolError",
+ "call_tool",
+ "close",
+ "describe_tool",
+ "list_connections",
+ "list_plugins",
+ "list_tools",
+ "reload",
+ "search_plugins",
+ "search_tools",
+]
_DEFAULT_STARTUP_TIMEOUT = 20.0
_DEFAULT_CALL_TIMEOUT = 60.0
@@ -28,12 +57,45 @@ _STDERR_LINE_LIMIT = 40
_SAFE_ENV = ("HOME", "PATH", "TMPDIR", "TEMP", "TMP", "SystemRoot", "WINDIR")
_ANSI_ESCAPE = re.compile(r"\x1b(?:\[[0-?]*[ -/]*[@-~]|\][^\x07]*(?:\x07|\x1b\\)?)")
_CONTROL_CHAR = re.compile(r"[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]")
+# Host-backed inventory requests are interactive-sized, not tool-call-sized.
+_INVENTORY_TIMEOUT = 15.0
+_DEFAULT_PLUGIN_LIMIT = 50
+_MAX_PLUGIN_LIMIT = 200
+_DEFAULT_PLUGIN_SEARCH_LIMIT = 10
+_MAX_PLUGIN_SEARCH_LIMIT = 50
+_MAX_CURSOR_CHARS = 512
+_PLUGIN_CONNECTION_STATUSES = ("connected", "not_connected")
+# tools/list pagination: a server that paginates must not wedge discovery.
+_MAX_TOOL_PAGES = 25
+_DEFAULT_TOOL_SEARCH_LIMIT = 20
+_MAX_TOOL_SEARCH_LIMIT = 50
+_MAX_TOOL_SEARCH_SERVERS = 8
+# Defensive only: the host must already whitelist safe metadata in inventory
+# entries. Never applied to live tool schemas or results — argument names there
+# are server-defined and legitimately credential-like.
+_SECRET_KEY_PATTERN = re.compile(r"token|secret|password|credential|authorization|api[_-]?key|private[_-]?key", re.I)
class McpStartupError(RuntimeError):
"""A stdio server failed while completing the MCP startup handshake."""
+
+class McpDiscoveryError(RuntimeError):
+ """Raised when a server's tools/list pagination cannot complete honestly.
+
+ A repeated or malformed pagination cursor, or more pages than allowed,
+ means the inventory cannot be trusted — a partial tool map is never
+ published as if complete."""
+
+
+class McpCredentialsUnavailable(RuntimeError):
+ """Raised when a configured connection has no usable credentials.
+
+ The user must connect the service first (`/plugins` or
+ `/mcp login <service>`)."""
+
+
class _StderrTail(io.TextIOBase):
"""A pipe-backed, bounded stderr tail that is safe for subprocess writers."""
@@ -210,8 +272,6 @@ class _Generation:
async def _open_http(self):
import inspect
- from .mcp_base import _resolve_streamable_http
-
url = self.config.get("url")
if not isinstance(url, str) or not url:
raise ValueError(f"MCP server '{self.server}' requires a URL")
@@ -259,22 +319,60 @@ class _Generation:
return await self.stack.enter_async_context(stdio_client(params, errlog=self._stderr))
async def discover(self) -> None:
- response = await self.session.list_tools()
+ """Fetch the complete tool inventory, following tools/list cursors.
+
+ Raises McpDiscoveryError when pagination cannot complete honestly — a
+ repeated or malformed continuation cursor, or more pages than allowed —
+ so a partial inventory is never published as if complete.
+ """
tools: dict[str, dict[str, Any]] = {}
- for tool in response.tools:
- name = getattr(tool, "name", None)
- if not isinstance(name, str):
- continue
- schema = getattr(tool, "input_schema", None)
- if schema is None:
- schema = getattr(tool, "inputSchema", None)
- tools[name] = {
- "name": name,
- "description": getattr(tool, "description", "") or "",
- "inputSchema": schema if isinstance(schema, dict) else {},
- }
+ cursors: set[str] = set()
+ cursor: str | None = None
+ pages = 0
+ while True:
+ response = await self._list_tools_page(cursor)
+ pages += 1
+ for tool in getattr(response, "tools", None) or []:
+ name = getattr(tool, "name", None)
+ if not isinstance(name, str):
+ continue
+ schema = getattr(tool, "input_schema", None)
+ if schema is None:
+ schema = getattr(tool, "inputSchema", None)
+ tools[name] = {
+ "name": name,
+ "description": getattr(tool, "description", "") or "",
+ "inputSchema": schema if isinstance(schema, dict) else {},
+ }
+ cursor = getattr(response, "next_cursor", None)
+ if cursor is None:
+ cursor = getattr(response, "nextCursor", None)
+ if cursor is None:
+ break
+ if not isinstance(cursor, str) or not cursor:
+ raise McpDiscoveryError(
+ f"MCP server '{self.server}' returned a malformed tools/list pagination cursor"
+ )
+ if cursor in cursors:
+ raise McpDiscoveryError(
+ f"MCP server '{self.server}' repeated a tools/list pagination cursor; "
+ "its tool inventory cannot be completed"
+ )
+ if pages >= _MAX_TOOL_PAGES:
+ raise McpDiscoveryError(
+ f"MCP server '{self.server}' paginated tools/list beyond {_MAX_TOOL_PAGES} pages; "
+ "refusing to publish a partial tool inventory"
+ )
+ cursors.add(cursor)
self.tools = tools
+ async def _list_tools_page(self, cursor: str | None) -> Any:
+ if cursor is None:
+ return await self.session.list_tools()
+ from mcp.types import PaginatedRequestParams
+
+ return await self.session.list_tools(params=PaginatedRequestParams(cursor=cursor))
+
def allows(self, tool: str) -> bool:
enabled = self.config.get("enabledTools")
disabled = self.config.get("disabledTools")
@@ -379,7 +477,27 @@ class _Registry:
async def tools(self, server: str) -> list[dict[str, Any]]:
async def operation() -> list[dict[str, Any]]:
generation = await self._get(server)
- return [dict(tool) for name, tool in generation.tools.items() if generation.allows(name)]
+ return [
+ copy.deepcopy(tool) for name, tool in generation.tools.items() if generation.allows(name)
+ ]
+
+ return await self._tracked(operation)
+
+ async def search(self, server: str, query: str, limit: int) -> list[dict[str, Any]]:
+ async def operation() -> list[dict[str, Any]]:
+ generation = await self._get(server)
+ return _match_tools(generation, query, limit)
+
+ return await self._tracked(operation)
+
+ async def describe(self, server: str, tool: str) -> dict[str, Any]:
+ async def operation() -> dict[str, Any]:
+ generation = await self._get(server)
+ if tool not in generation.tools:
+ raise KeyError(f"MCP server '{server}' has no tool '{tool}'")
+ if not generation.allows(tool):
+ raise PermissionError(f"MCP tool '{tool}' is disabled for server '{server}'")
+ return copy.deepcopy(generation.tools[tool])
return await self._tracked(operation)
@@ -490,6 +608,235 @@ async def close() -> None:
await _dispatch(_registry.shutdown, timeout=_SHUTDOWN_TIMEOUT + 1)
+# -- discovery / inventory surface ---------------------------------------------
+
+
+async def list_connections() -> list[dict[str, Any]]:
+ """The user's current MCP connections (host-owned records, no secrets).
+
+ Each entry carries at least ``connectionId``; other fields are host-defined
+ (label, service, status, account). ``connectionId`` is the name
+ ``list_tools``/``call_tool`` accept.
+ """
+ result = await _host_inventory("mcp.list_connections", {})
+ connections = _inventory_entries(result, "connections")
+ for entry in connections:
+ connection_id = entry.get("connectionId")
+ if not isinstance(connection_id, str) or not connection_id:
+ raise RuntimeError("MCP connection inventory from the host is malformed")
+ return [_sanitize_inventory_entry(entry) for entry in connections]
+
+
+async def list_plugins(
+ connection_status: str | None = None,
+ limit: int = _DEFAULT_PLUGIN_LIMIT,
+ cursor: str | None = None,
+) -> dict[str, Any]:
+ """One bounded page of the supported-service catalog (host-owned).
+
+ Returns ``{"plugins": [...], "nextCursor": str | None}``; while
+ ``nextCursor`` is not None, more entries exist — pass it back as ``cursor``.
+ ``connection_status`` filters to ``"connected"`` or ``"not_connected"``.
+ """
+ if connection_status is not None and connection_status not in _PLUGIN_CONNECTION_STATUSES:
+ raise ValueError("connection_status must be None, 'connected' or 'not_connected'")
+ _validate_limit(limit, "limit", _MAX_PLUGIN_LIMIT)
+ payload: dict[str, Any] = {"limit": limit}
+ if connection_status is not None:
+ payload["connectionStatus"] = connection_status
+ if cursor is not None:
+ _validate_cursor(cursor)
+ payload["cursor"] = cursor
+ result = await _host_inventory("mcp.list_plugins", payload)
+ return _plugin_page(result)
+
+
+async def search_plugins(query: str, limit: int = _DEFAULT_PLUGIN_SEARCH_LIMIT) -> dict[str, Any]:
+ """Bounded search of the supported-service catalog by the host.
+
+ Matches service ids, labels, aliases, descriptions, categories and
+ publishers. Returns ``{"plugins": [...], "nextCursor": None}``; narrow the
+ query rather than expecting exhaustive pages.
+ """
+ if not isinstance(query, str) or not query.strip():
+ raise TypeError("query must be a non-empty string")
+ _validate_limit(limit, "limit", _MAX_PLUGIN_SEARCH_LIMIT)
+ payload: dict[str, Any] = {"query": query.strip(), "limit": limit}
+ result = await _host_inventory("mcp.search_plugins", payload)
+ return _plugin_page(result)
+
+
+async def search_tools(
+ query: str,
+ connection_id: str | None = None,
+ limit: int = _DEFAULT_TOOL_SEARCH_LIMIT,
+) -> dict[str, Any]:
+ """Search live tool names/descriptions and report the search scope.
+
+ With ``connection_id`` only that connection is searched and its errors
+ propagate. Without it, at most ``_MAX_TOOL_SEARCH_SERVERS`` connections the
+ host reports as connected are searched in host order; per-connection
+ failures are reported as fixed, redaction-safe summaries, not raised.
+
+ Returns ``{"tools": [{connectionId, name, description}, ...], "searched":
+ [connectionId, ...], "unavailable": [{connectionId, error}, ...],
+ "truncated": bool}``. ``truncated`` means matches or servers may remain —
+ narrow the query or search a specific connection.
+ """
+ if not isinstance(query, str) or not query.strip():
+ raise TypeError("query must be a non-empty string")
+ _validate_limit(limit, "limit", _MAX_TOOL_SEARCH_LIMIT)
+ needle = query.strip()
+ if connection_id is not None:
+ _validate_name(connection_id, "connection")
+ tools = await _dispatch(lambda: _registry.search(connection_id, needle, limit))
+ return {"tools": tools, "searched": [connection_id], "unavailable": [], "truncated": len(tools) >= limit}
+ candidates = [
+ entry["connectionId"]
+ for entry in await list_connections()
+ if entry.get("status") == "connected"
+ ]
+ scoped = candidates[:_MAX_TOOL_SEARCH_SERVERS]
+ tools: list[dict[str, Any]] = []
+ searched: list[str] = []
+ unavailable: list[dict[str, Any]] = []
+ for connection in scoped:
+ try:
+ found = await _dispatch(lambda cid=connection: _registry.search(cid, needle, limit))
+ except Exception as exc:
+ unavailable.append({"connectionId": connection, "error": _bounded_error(exc)})
+ continue
+ searched.append(connection)
+ if len(tools) < limit:
+ tools.extend(found[: limit - len(tools)])
+ truncated = len(tools) >= limit or len(candidates) > len(scoped)
+ return {"tools": tools, "searched": searched, "unavailable": unavailable, "truncated": truncated}
+
+
+async def describe_tool(connection_id: str, tool: str) -> dict[str, Any]:
+ """One live tool's ``{"name", "description", "inputSchema"}``.
+
+ Raises ``KeyError`` when the tool or connection is unknown and
+ ``PermissionError`` when policy (``enabledTools``/``disabledTools``)
+ excludes the tool. Schemas pass through unmodified.
+ """
+ _validate_name(connection_id, "connection")
+ _validate_name(tool, "tool")
+ return await _dispatch(lambda: _registry.describe(connection_id, tool))
+
+
+async def _host_inventory(request_type: str, payload: dict[str, Any]) -> dict[str, Any]:
+ outcome: str | None = None
+ try:
+ async with asyncio.timeout(_INVENTORY_TIMEOUT):
+ result = await host_request(request_type, payload)
+ except TimeoutError:
+ outcome = "timed out"
+ except Exception:
+ outcome = "failed"
+ if outcome is not None:
+ # Raised outside the handler so the original exception is not chained:
+ # arbitrary host/bridge error text (which can embed credential-bearing
+ # URLs, query strings, headers and HTTP bodies) is never echoed, and
+ # not even reachable through __cause__/__context__.
+ raise RuntimeError(f"MCP {request_type} request {outcome}")
+ if not isinstance(result, dict):
+ raise RuntimeError(f"MCP {request_type} returned a malformed response")
+ return result
+
+
+def _inventory_entries(result: dict[str, Any], key: str) -> list[dict[str, Any]]:
+ entries = result.get(key)
+ if not isinstance(entries, list) or not all(isinstance(entry, dict) for entry in entries):
+ raise RuntimeError(f"MCP {key} inventory from the host is malformed")
+ return entries
+
+
+def _plugin_page(result: dict[str, Any]) -> dict[str, Any]:
+ entries = _inventory_entries(result, "plugins")
+ next_cursor = result.get("nextCursor")
+ if next_cursor is not None and (not isinstance(next_cursor, str) or not next_cursor):
+ raise RuntimeError("MCP plugin inventory from the host is malformed")
+ return {
+ "plugins": [_sanitize_inventory_entry(entry) for entry in entries],
+ "nextCursor": next_cursor,
+ }
+
+
+def _sanitize_inventory_entry(entry: dict[str, Any]) -> dict[str, Any]:
+ """Copy one inventory entry, dropping secret-looking keys defensively.
+
+ The host must already whitelist safe metadata; this is a second line of
+ defense for catalog and connection records only. Never applied to live tool
+ schemas or tool results.
+ """
+ cleaned: dict[str, Any] = {}
+ for key, value in entry.items():
+ if isinstance(key, str) and _SECRET_KEY_PATTERN.search(key):
+ continue
+ cleaned[key] = _sanitize_inventory_value(value)
+ return cleaned
+
+
+def _sanitize_inventory_value(value: Any) -> Any:
+ if isinstance(value, dict):
+ return _sanitize_inventory_entry(value)
+ if isinstance(value, list):
+ return [_sanitize_inventory_value(item) for item in value]
+ return value
+
+
+def _match_tools(generation: _Generation, query: str, limit: int) -> list[dict[str, Any]]:
+ needle = query.lower()
+ matches: list[dict[str, Any]] = []
+ for name, tool in generation.tools.items():
+ if not generation.allows(name):
+ continue
+ haystack = f"{name}\n{tool.get('description') or ''}".lower()
+ if needle not in haystack:
+ continue
+ matches.append(
+ {"connectionId": generation.server, "name": name, "description": tool.get("description") or ""}
+ )
+ if len(matches) >= limit:
+ break
+ return matches
+
+
+_SEARCH_FAILURE_HINTS: tuple[tuple[type[BaseException], str], ...] = (
+ (McpCredentialsUnavailable, "credentials for this connection are not available; the user must connect it"),
+ (McpStartupError, "the MCP server failed during startup"),
+ (KeyError, "the connection or tool is not declared"),
+ (PermissionError, "policy excludes this connection or tool"),
+ (TimeoutError, "opening or querying the connection timed out"),
+)
+
+
+def _bounded_error(exc: BaseException) -> str:
+ """A fixed, redaction-safe summary of one connection's search failure.
+
+ Raw exception text can embed credential-bearing URLs and HTTP bodies, so
+ only the exception type name and a fixed hint are ever surfaced.
+ """
+ hint = "the connection could not be opened or searched"
+ for failure_type, message in _SEARCH_FAILURE_HINTS:
+ if isinstance(exc, failure_type):
+ hint = message
+ break
+ return f"{type(exc).__name__}: {hint}"
+
+
+
+def _validate_limit(value: Any, label: str, maximum: int) -> None:
+ if isinstance(value, bool) or not isinstance(value, int) or not 1 <= value <= maximum:
+ raise ValueError(f"{label} must be an integer between 1 and {maximum}")
+
+
+def _validate_cursor(value: Any) -> None:
+ if not isinstance(value, str) or not value or len(value) > _MAX_CURSOR_CHARS:
+ raise ValueError(f"cursor must be a non-empty string of at most {_MAX_CURSOR_CHARS} characters")
+
+
def _validate_name(value: str, label: str) -> None:
if not isinstance(value, str) or not value:
raise TypeError(f"{label} must be a non-empty string")
@@ -526,7 +873,21 @@ def _bound_auth(provider: str, config: dict[str, Any]) -> dict[str, Any] | None:
return cred
+def _credentials_unavailable(server: str) -> McpCredentialsUnavailable:
+ return McpCredentialsUnavailable(
+ f"MCP credentials for '{server}' are not available. Ask the user to connect it "
+ f"(/plugins or /mcp login {server}); do not ask them to set environment variables."
+ )
+
+
async def _auth_identity(server: str, config: dict[str, Any]) -> str:
+ if config.get("credentialSource") == "static-token":
+ # A pasted static token has no refresh concept: it either resolves from
+ # the bound stored credential or the connection fails closed.
+ token = _static_token(server, config)
+ if not token:
+ raise _credentials_unavailable(server)
+ return hashlib.sha256(token.encode()).hexdigest()
env_name = config.get("bearerTokenEnvVar")
token = os.environ.get(env_name, "").strip() if isinstance(env_name, str) else ""
if config.get("oauth") is True and not token:
@@ -542,11 +903,25 @@ async def _auth_identity(server: str, config: dict[str, Any]) -> str:
token = _resolve_config_value(str((cred or {}).get("access") or (cred or {}).get("key") or ""))
if not token:
if config.get("oauth") is True or env_name:
- raise RuntimeError(f"MCP credentials for '{server}' are not available")
+ raise _credentials_unavailable(server)
return "anonymous"
return hashlib.sha256(token.encode()).hexdigest()
+def _static_token(server: str, config: dict[str, Any]) -> str:
+ """The pasted static token for a ``static-token`` connection.
+
+ Only the endpoint-BOUND stored credential counts (``_bound_auth``): a token
+ pasted for another endpoint never attaches here. The bearer is a literal
+ pasted value — never resolved as an env-var name or a ``!command``.
+ """
+ cred = _bound_auth(f"mcp:{server}", config)
+ bearer = (cred or {}).get("bearer")
+ if not isinstance(bearer, str):
+ return ""
+ return bearer.strip()
+
+
async def _headers(server: str, config: dict[str, Any]) -> dict[str, str]:
raw = config.get("headers", {})
if not isinstance(raw, dict) or not all(isinstance(k, str) and isinstance(v, str) for k, v in raw.items()):
@@ -554,6 +929,12 @@ async def _headers(server: str, config: dict[str, Any]) -> dict[str, str]:
headers = dict(raw)
if config.get("credentialSource") == "acp":
return headers
+ if config.get("credentialSource") == "static-token":
+ token = _static_token(server, config)
+ if not token:
+ raise _credentials_unavailable(server)
+ headers["Authorization"] = f"Bearer {token}"
+ return headers
env_name = config.get("bearerTokenEnvVar")
token = os.environ.get(env_name, "").strip() if isinstance(env_name, str) else ""
if config.get("oauth") is True and not token:
@@ -562,7 +943,7 @@ async def _headers(server: str, config: dict[str, Any]) -> dict[str, str]:
if token:
headers["Authorization"] = f"Bearer {token}"
elif config.get("oauth") is True or env_name:
- raise RuntimeError(f"MCP credentials for '{server}' are not available")
+ raise _credentials_unavailable(server)
return headers
@@ -656,3 +1037,87 @@ def _seconds(value: Any, default: float) -> float:
def _strings(value: Any) -> bool:
return isinstance(value, list) and all(isinstance(item, str) for item in value)
+
+
+def _agent_dir() -> Path:
+ """Resolve the Prime Agent config dir the same way the rest of the runtime does."""
+ raw = (
+ os.environ.get("PRIME_AGENT_CODING_AGENT_DIR")
+ or os.environ.get("PI_CODING_AGENT_DIR")
+ or str(Path.home() / ".prime" / "agent")
+ )
+ # resolve() so a relative env override reads auth.json from the right place,
+ # not relative to the kernel's cwd.
+ return Path(raw).expanduser().resolve()
+
+
+def _read_auth(provider: str) -> dict[str, Any] | None:
+ """Read one credential entry from auth.json. Returns None if absent/unreadable."""
+ try:
+ data = json.loads((_agent_dir() / "auth.json").read_text())
+ except (OSError, ValueError):
+ return None
+ if not isinstance(data, dict):
+ return None
+ cred = data.get(provider)
+ return cred if isinstance(cred, dict) else None
+
+
+def _resolve_config_value(value: str) -> str:
+ """Resolve a stored api_key value the way the host does.
+
+ A value may be a literal, an env-var name, or a `!command` indirection. The
+ command form can't run safely in the kernel (the host injects those resolved),
+ so skip it; otherwise treat the value as an env-var name if set, else literal.
+ """
+ value = value.strip()
+ if not value or value.startswith("!"):
+ return ""
+ return (os.environ.get(value) or value).strip()
+
+
+def _resolve_streamable_http():
+ """Return an SDK streamable-HTTP transport callable.
+
+ SDK versions vary: some expose ``streamablehttp_client(url, headers=...)``,
+ others ``streamable_http_client(url, *, http_client=...)``, and some expose
+ both with *different* signatures.
+ """
+ from mcp.client import streamable_http as mod
+
+ for name in ("streamablehttp_client", "streamable_http_client"):
+ fn = getattr(mod, name, None)
+ if fn is not None:
+ return fn
+ raise ImportError(
+ "the installed `mcp` SDK exposes no streamable-HTTP client; upgrade `mcp`"
+ )
+
+
+def _parse_result(result: Any) -> Any:
+ """Normalize a CallToolResult into plain Python (structured output preferred).
+
+ Raises McpToolError when the server flags the result as an error, so a failed
+ tool call doesn't look like a successful one to the caller.
+ """
+ texts: list[str] = []
+ for block in getattr(result, "content", None) or []:
+ text = getattr(block, "text", None)
+ if text is not None:
+ texts.append(text)
+ is_error = getattr(result, "is_error", getattr(result, "isError", False))
+ if is_error:
+ raise McpToolError("\n".join(texts) or "MCP tool returned an error")
+
+ structured = getattr(result, "structured_content", getattr(result, "structuredContent", None))
+ if structured is not None: # falsy-but-valid payloads ({} / []) are real results
+ return structured
+ if texts:
+ return "\n".join(texts)
+
+ # Non-text content (images, embedded resources): return them as plain dicts
+ # rather than the opaque SDK object so callers get usable data.
+ blocks = getattr(result, "content", None) or []
+ if blocks:
+ return [b.model_dump(mode="json") if hasattr(b, "model_dump") else b for b in blocks]
+ return result
diff --git a/prime-agent-runtime/test/test_mcp.py b/prime-agent-runtime/test/test_mcp.py
index a548404979..b003904c19 100644
--- a/prime-agent-runtime/test/test_mcp.py
+++ b/prime-agent-runtime/test/test_mcp.py
@@ -1,10 +1,12 @@
from __future__ import annotations
import asyncio
+import hashlib
import io
import json
import os
import sys
+import traceback
import socket
import subprocess
import tempfile
@@ -17,7 +19,7 @@ from unittest import mock
from mcp.types import CallToolResult, TextContent
from rlm import McpToolError, mcp
-from rlm.mcp_base import _parse_result
+from rlm.mcp import _parse_result
_STDIO_FIXTURE = r"""import asyncio, json, os, sys
@@ -68,10 +70,16 @@ def run(coro):
class FakeStack:
def __init__(self):
self.closed = 0
+ self.entered = []
async def aclose(self):
self.closed += 1
+ async def enter_async_context(self, cm):
+ result = await cm.__aenter__()
+ self.entered.append(cm)
+ return result
+
class FakeSession:
def __init__(self, tools=None, result=None):
@@ -337,6 +345,41 @@ class McpRegistryTest(unittest.TestCase):
with self.assertRaises(RuntimeError):
asyncio.run(mcp._headers("remote", config))
+ def test_static_token_headers_attach_only_from_the_bound_credential(self):
+ config = {"type": "http", "url": "https://api.example/mcp", "credentialSource": "static-token"}
+ cred = {
+ "type": "mcp_static_token",
+ "endpoint": "https://api.example/mcp",
+ "bearer": "pasted-token",
+ "bearerFieldId": "GITHUB_PAT_TOKEN",
+ "values": {"GITHUB_PAT_TOKEN": "pasted-token"},
+ }
+ with mock.patch.object(mcp, "_read_auth", return_value=cred):
+ headers = asyncio.run(mcp._headers("github", config))
+ self.assertEqual(headers["Authorization"], "Bearer pasted-token")
+ # A bearer stored for ANOTHER endpoint never attaches — exact match.
+ with mock.patch.object(mcp, "_read_auth", return_value={**cred, "endpoint": "https://old.example/mcp"}):
+ with self.assertRaises(RuntimeError):
+ asyncio.run(mcp._headers("github", config))
+ # No bearer (missing credential, or a non-static shape) fails closed:
+ # the connection must NOT silently fall back to anonymous.
+ with mock.patch.object(mcp, "_read_auth", return_value={"type": "oauth", "access": "x"}):
+ with self.assertRaises(RuntimeError):
+ asyncio.run(mcp._headers("github", config))
+ with mock.patch.object(mcp, "_read_auth", return_value=None):
+ with self.assertRaises(RuntimeError):
+ asyncio.run(mcp._headers("github", config))
+
+ def test_static_token_auth_identity_hashes_the_bound_bearer(self):
+ config = {"type": "http", "url": "https://api.example/mcp", "credentialSource": "static-token"}
+ cred = {"type": "mcp_static_token", "endpoint": "https://api.example/mcp", "bearer": "pasted-token"}
+ with mock.patch.object(mcp, "_read_auth", return_value=cred):
+ identity = asyncio.run(mcp._auth_identity("github", config))
+ self.assertEqual(identity, hashlib.sha256(b"pasted-token").hexdigest())
+ with mock.patch.object(mcp, "_read_auth", return_value=None):
+ with self.assertRaises(RuntimeError):
+ asyncio.run(mcp._auth_identity("github", config))
+
def test_diagnostics_do_not_contain_headers_or_env_secrets(self):
async def host_request(*_args):
raise RuntimeError("bridge failed")
@@ -711,5 +754,468 @@ class McpRegistryTest(unittest.TestCase):
run(scenario())
+class PagedSession:
+ """Session stand-in that answers tools/list with cursor-driven pages."""
+
+ def __init__(self, pages):
+ self.pages = pages
+ self.cursors = []
+
+ async def list_tools(self, params=None):
+ self.cursors.append(None if params is None else params.cursor)
+ tools, next_cursor = self.pages[len(self.cursors) - 1]
+ return SimpleNamespace(tools=tools, next_cursor=next_cursor)
+
+
+class McpDiscoveryInventoryTest(unittest.TestCase):
+ """The host-backed inventory surface and live tool discovery."""
+
+ def setUp(self):
+ mcp._registry = mcp._Registry()
+
+ def generation(self, config, tools):
+ generation = mcp._Generation("svc", config)
+ generation.stack = FakeStack()
+ generation.session = FakeSession(tools)
+ run(generation.discover())
+ return generation
+
+ # -- inventory pass-through --------------------------------------------
+
+ def _patch_host(self, responses):
+ async def host_request(request_type, payload):
+ reply = responses[request_type]
+ if isinstance(reply, Exception):
+ raise reply
+ return reply
+
+ return mock.patch.object(mcp, "host_request", host_request)
+
+ def test_list_connections_passes_through_and_scrubs_secret_keys(self):
+ responses = {
+ "mcp.list_connections": {
+ "connections": [
+ {
+ "connectionId": "notion",
+ "label": "Notion",
+ "status": "connected",
+ "accessToken": "tok",
+ "oauth": {"clientSecret": "cs", "kind": "oauth"},
+ },
+ {"connectionId": "acme", "status": "error", "setupHint": "configure API key"},
+ ]
+ }
+ }
+ with self._patch_host(responses):
+ connections = run(mcp.list_connections())
+ self.assertEqual([entry["connectionId"] for entry in connections], ["notion", "acme"])
+ notion = connections[0]
+ self.assertEqual(notion["label"], "Notion")
+ self.assertNotIn("accessToken", notion)
+ self.assertEqual(notion["oauth"], {"kind": "oauth"})
+ self.assertEqual(connections[1]["setupHint"], "configure API key")
+
+ def test_list_connections_rejects_malformed_host_data(self):
+ # One table: each malformed host reply must fail the whole call instead
+ # of passing a broken inventory shape through to the agent.
+ for reply in ({"connections": [{"label": "no-connection-id"}]}, {"connections": ["not-a-dict"]}, {"connections": "no"}, ["not", "a", "dict"]):
+ with self.subTest(reply=reply):
+ with self._patch_host({"mcp.list_connections": reply}):
+ with self.assertRaises(RuntimeError):
+ run(mcp.list_connections())
+
+ def test_inventory_wraps_host_failures_without_echoing_them(self):
+ with self._patch_host({"mcp.list_connections": RuntimeError("bridge is down")}):
+ with self.assertRaises(RuntimeError) as caught:
+ run(mcp.list_connections())
+ error = caught.exception
+ self.assertEqual(str(error), "MCP mcp.list_connections request failed")
+ self.assertIsNone(error.__cause__)
+ self.assertIsNone(error.__context__)
+ formatted = "".join(traceback.format_exception(type(error), error, error.__traceback__))
+ self.assertNotIn("bridge is down", formatted)
+
+ def test_list_plugins_forwards_filters_limit_and_cursor(self):
+ captured = {}
+
+ async def host_request(request_type, payload):
+ captured["type"] = request_type
+ captured["payload"] = payload
+ return {
+ "plugins": [{"serviceId": "notion", "label": "Notion", "connectionStatus": "not_connected"}],
+ "nextCursor": "page-2",
+ }
+
+ with mock.patch.object(mcp, "host_request", host_request):
+ page = run(mcp.list_plugins(connection_status="not_connected", limit=5, cursor="page-1"))
+ self.assertEqual(captured["type"], "mcp.list_plugins")
+ self.assertEqual(
+ captured["payload"], {"connectionStatus": "not_connected", "limit": 5, "cursor": "page-1"}
+ )
+ self.assertEqual(page["nextCursor"], "page-2")
+ self.assertEqual(page["plugins"][0]["serviceId"], "notion")
+
+ with mock.patch.object(mcp, "host_request", host_request):
+ run(mcp.list_plugins())
+ self.assertEqual(captured["payload"], {"limit": 50})
+
+ def test_list_plugins_validates_inputs_and_host_shapes(self):
+ for kwargs in ({"connection_status": "maybe"}, {"limit": 0}, {"limit": 201}, {"limit": True}, {"cursor": "x" * 600}):
+ with self._patch_host({"mcp.list_plugins": {"plugins": []}}):
+ with self.assertRaises((ValueError, TypeError)):
+ run(mcp.list_plugins(**kwargs))
+ for reply in ({"plugins": ["no"]}, {"plugins": [], "nextCursor": ""}):
+ with self._patch_host({"mcp.list_plugins": reply}):
+ with self.assertRaises(RuntimeError):
+ run(mcp.list_plugins())
+
+ def test_search_plugins_sends_query_and_limit(self):
+ captured = {}
+
+ async def host_request(request_type, payload):
+ captured["type"] = request_type
+ captured["payload"] = payload
+ return {"plugins": [{"serviceId": "notion", "apiKey": "leak"}], "nextCursor": None}
+
+ with mock.patch.object(mcp, "host_request", host_request):
+ page = run(mcp.search_plugins(" Notion "))
+ self.assertEqual(captured["type"], "mcp.search_plugins")
+ self.assertEqual(captured["payload"], {"query": "Notion", "limit": 10})
+ self.assertIsNone(page["nextCursor"])
+ self.assertNotIn("apiKey", page["plugins"][0])
+ for bad in ("", " "):
+ with self._patch_host({"mcp.search_plugins": {"plugins": []}}):
+ with self.assertRaises(TypeError):
+ run(mcp.search_plugins(bad))
+ with self._patch_host({"mcp.search_plugins": {"plugins": []}}):
+ with self.assertRaises(ValueError):
+ run(mcp.search_plugins("notion", limit=51))
+
+ # -- live tool discovery ------------------------------------------------
+
+ def test_describe_tool_returns_schema_copy(self):
+ schema = {"type": "object", "properties": {"query": {"type": "string"}}}
+ generation = self.generation(
+ {"type": "http", "enabledTools": ["search-docs"]},
+ [
+ SimpleNamespace(name="search-docs", description="Search docs", inputSchema=schema),
+ SimpleNamespace(name="delete-docs", description="Delete docs", inputSchema={}),
+ ],
+ )
+ generation.server = "notion-work"
+
+ async def scenario():
+ with mock.patch.object(mcp._registry, "_get_locked", mock.AsyncMock(return_value=generation)):
+ described = await mcp.describe_tool("notion-work", "search-docs")
+ with self.assertRaises(KeyError):
+ await mcp.describe_tool("notion-work", "missing-tool")
+ with self.assertRaises(PermissionError):
+ await mcp.describe_tool("notion-work", "delete-docs")
+ return described
+
+ described = run(scenario())
+ self.assertEqual(described["inputSchema"], schema)
+ # Isolated copies: mutating the returned schema (nested included) must
+ # never reach the cached canonical inventory.
+ described["inputSchema"]["injected"] = True
+ described["name"] = "mutated"
+ self.assertNotIn("injected", generation.tools["search-docs"]["inputSchema"])
+ self.assertEqual(generation.tools["search-docs"]["name"], "search-docs")
+
+ def test_list_tools_returns_isolated_copies(self):
+ schema = {"type": "object", "properties": {"query": {"type": "string"}}}
+ generation = self.generation(
+ {"type": "http"},
+ [SimpleNamespace(name="search-docs", description="Search docs", inputSchema=schema)],
+ )
+ generation.server = "notion"
+
+ async def scenario():
+ with mock.patch.object(mcp._registry, "_get_locked", mock.AsyncMock(return_value=generation)):
+ tools = await mcp.list_tools("notion")
+ tools[0]["inputSchema"]["injected"] = True
+ return await mcp.list_tools("notion")
+
+ again = run(scenario())
+ self.assertNotIn("injected", again[0]["inputSchema"])
+ self.assertNotIn("injected", generation.tools["search-docs"]["inputSchema"])
+
+ def test_search_tools_scoped_connection_matches_policy_and_limit(self):
+ tools = [
+ SimpleNamespace(name="search-docs", description="Search workspace documents", inputSchema={}),
+ SimpleNamespace(name="delete-doc", description="Remove documents", inputSchema={}),
+ ]
+ generation = self.generation({"type": "http", "enabledTools": ["search-docs"]}, tools)
+ generation.server = "notion-work"
+
+ async def scenario():
+ with mock.patch.object(mcp._registry, "_get_locked", mock.AsyncMock(return_value=generation)):
+ by_description = await mcp.search_tools("DOCUMENTS", connection_id="notion-work")
+ no_match = await mcp.search_tools("query", connection_id="notion-work")
+ limited = await mcp.search_tools("doc", connection_id="notion-work", limit=1)
+ with mock.patch.object(
+ mcp._registry, "_get_locked", mock.AsyncMock(side_effect=KeyError("unknown connection"))
+ ):
+ error = None
+ try:
+ await mcp.search_tools("documents", connection_id="notion-work")
+ except KeyError as exc:
+ error = exc
+ return by_description, no_match, limited, error
+
+ by_description, no_match, limited, error = run(scenario())
+ self.assertEqual(
+ by_description["tools"],
+ [{"connectionId": "notion-work", "name": "search-docs", "description": "Search workspace documents"}],
+ )
+ self.assertEqual(by_description["searched"], ["notion-work"])
+ self.assertEqual(by_description["unavailable"], [])
+ self.assertFalse(by_description["truncated"])
+ # No match is not an error, and the policy-disabled tool never matches.
+ self.assertEqual(no_match["tools"], [])
+ self.assertFalse(no_match["truncated"])
+ # Hitting the limit on the only policy-allowed match reports truncation.
+ self.assertTrue(limited["truncated"])
+ # A failing connection surfaces its error instead of hiding it.
+ self.assertIsNotNone(error)
+
+ def test_search_tools_without_connection_searches_connected_only(self):
+ tools = [SimpleNamespace(name="search-docs", description="Search workspace documents", inputSchema={})]
+ generation = self.generation({"type": "http"}, tools)
+ generation.server = "a"
+ broken = mcp.McpCredentialsUnavailable(
+ "MCP credentials for 'b' are not available. Ask the user to connect it"
+ " (/plugins or /mcp login b); do not ask them to set environment variables."
+ )
+
+ async def get_locked(server):
+ if server == "a":
+ return generation
+ raise broken
+
+ responses = {
+ "mcp.list_connections": {
+ "connections": [
+ {"connectionId": "a", "status": "connected"},
+ {"connectionId": "b", "status": "connected"},
+ {"connectionId": "c", "status": "not_connected"},
+ {"connectionId": "d", "status": "error"},
+ ]
+ }
+ }
+
+ async def scenario():
+ with self._patch_host(responses), mock.patch.object(
+ mcp._registry, "_get_locked", side_effect=get_locked
+ ):
+ return await mcp.search_tools("documents")
+
+ result = run(scenario())
+ self.assertEqual(result["tools"], [
+ {"connectionId": "a", "name": "search-docs", "description": "Search workspace documents"}
+ ])
+ self.assertEqual(result["searched"], ["a"])
+ self.assertEqual([entry["connectionId"] for entry in result["unavailable"]], ["b"])
+ self.assertEqual(
+ result["unavailable"][0]["error"],
+ "McpCredentialsUnavailable: credentials for this connection are not available; "
+ "the user must connect it",
+ )
+ self.assertFalse(result["truncated"])
+
+ def test_search_tools_bounds_servers_and_reports_truncation(self):
+ connections = {
+ "connections": [
+ {"connectionId": f"svc-{index}", "status": "connected"} for index in range(10)
+ ]
+ }
+ empty = self.generation({"type": "http"}, [])
+ calls = []
+
+ async def get_locked(server):
+ calls.append(server)
+ empty.server = server
+ return empty
+
+ async def scenario():
+ with self._patch_host({"mcp.list_connections": connections}), mock.patch.object(
+ mcp._registry, "_get_locked", side_effect=get_locked
+ ):
+ return await mcp.search_tools("anything")
+
+ result = run(scenario())
+ self.assertEqual(len(calls), mcp._MAX_TOOL_SEARCH_SERVERS)
+ self.assertEqual(result["searched"], [f"svc-{index}" for index in range(mcp._MAX_TOOL_SEARCH_SERVERS)])
+ self.assertTrue(result["truncated"])
+
+ def test_search_unavailable_never_echoes_raw_exception_text(self):
+ connections = {"connections": [{"connectionId": "leaky", "status": "connected"}]}
+ raw = "Connection failed: https://user:[email protected]/mcp?api_key=abc123 Authorization: Bearer tok-123-secret"
+
+ async def get_locked(server):
+ raise RuntimeError(raw)
+
+ async def scenario():
+ with self._patch_host({"mcp.list_connections": connections}), mock.patch.object(
+ mcp._registry, "_get_locked", side_effect=get_locked
+ ):
+ return await mcp.search_tools("documents")
+
+ result = run(scenario())
+ error = result["unavailable"][0]["error"]
+ self.assertEqual(error, "RuntimeError: the connection could not be opened or searched")
+ for leaked in ("hunter2", "abc123", "tok-123-secret", "evil.test", "Bearer"):
+ self.assertNotIn(leaked, error)
+
+ def test_host_inventory_failures_never_expose_the_original_exception(self):
+ raw = (
+ "GET https://user:[email protected]/mcp?token=tok-123-secret failed; "
+ "Authorization: Bearer tok-123-secret; body password=hunter2"
+ )
+
+ async def host_request(request_type, payload):
+ raise RuntimeError(raw)
+
+ with mock.patch.object(mcp, "host_request", host_request):
+ with self.assertRaises(RuntimeError) as caught:
+ run(mcp.list_connections())
+ error = caught.exception
+ self.assertEqual(str(error), "MCP mcp.list_connections request failed")
+ self.assertIsNone(error.__cause__)
+ self.assertIsNone(error.__context__)
+ # The full formatted chain (not just str(exc)) must stay secret-free.
+ formatted = "".join(traceback.format_exception(type(error), error, error.__traceback__))
+ for leaked in ("hunter2", "tok-123-secret", "sync.test", "Authorization", "Bearer", "password"):
+ self.assertNotIn(leaked, formatted)
+
+ def test_host_inventory_timeouts_report_a_fixed_message(self):
+ async def hanging_host_request(request_type, payload):
+ # The host never answers: the inventory's own timeout bound (the
+ # behavior under test) is what settles the call.
+ await asyncio.Event().wait()
+
+ with mock.patch.object(mcp, "host_request", hanging_host_request), mock.patch.object(
+ mcp, "_INVENTORY_TIMEOUT", 0.01
+ ):
+ with self.assertRaises(RuntimeError) as caught:
+ run(mcp.list_connections())
+ self.assertEqual(str(caught.exception), "MCP mcp.list_connections request timed out")
+
+ # -- tools/list pagination ----------------------------------------------
+
+ def test_discover_cursor_paging_is_honest(self):
+ # One table covers the cursor contract: pages are followed in order, a
+ # REPEATED cursor refuses instead of looping, the page cap refuses
+ # instead of publishing a partial inventory, and a malformed cursor
+ # is rejected — every failure leaves the tool inventory untouched.
+ tools = [SimpleNamespace(name="one", description="", inputSchema={})]
+ with self.subTest("pages are followed in order"):
+ tools_page_two = [SimpleNamespace(name="two", description="", inputSchema={})]
+ session = PagedSession([(tools, "cursor-2"), (tools_page_two, None)])
+ generation = mcp._Generation("svc", {"type": "http"})
+ generation.session = session
+ run(generation.discover())
+ self.assertEqual(sorted(generation.tools), ["one", "two"])
+ self.assertEqual(session.cursors, [None, "cursor-2"])
+ with self.subTest("repeated cursor refuses"):
+ session = PagedSession([(tools, "same")] * 4)
+ generation = mcp._Generation("svc", {"type": "http"})
+ generation.session = session
+ with self.assertRaisesRegex(mcp.McpDiscoveryError, "repeated"):
+ run(generation.discover())
+ self.assertEqual(session.cursors, [None, "same"])
+ self.assertEqual(generation.tools, {})
+ with self.subTest("page cap refuses instead of a partial inventory"):
+ pages = [(tools, f"cursor-{index}") for index in range(10)]
+ session = PagedSession(pages)
+ generation = mcp._Generation("svc", {"type": "http"})
+ generation.session = session
+ with mock.patch.object(mcp, "_MAX_TOOL_PAGES", 3):
+ with self.assertRaisesRegex(mcp.McpDiscoveryError, "partial"):
+ run(generation.discover())
+ self.assertEqual(session.cursors, [None, "cursor-0", "cursor-1"])
+ self.assertEqual(generation.tools, {})
+ for bad_cursor in ("", 42, {}):
+ with self.subTest(bad_cursor=bad_cursor):
+ session = PagedSession([(tools, bad_cursor), (tools, None)])
+ generation = mcp._Generation("svc", {"type": "http"})
+ generation.session = session
+ with self.assertRaisesRegex(mcp.McpDiscoveryError, "malformed"):
+ run(generation.discover())
+ self.assertEqual(generation.tools, {})
+
+ # -- moved shared helpers ----------------------------------------------
+
+ def test_parse_result_text_and_non_text_content(self):
+ block = type("B", (), {"text": "hello"})()
+ result = type("R", (), {"content": [block], "structuredContent": None, "isError": False})()
+ self.assertEqual(mcp._parse_result(result), "hello")
+
+ image = SimpleNamespace(data="raw")
+ result = type("R", (), {"content": [image], "structuredContent": None, "isError": False})()
+ self.assertEqual(mcp._parse_result(result), [image])
+
+ def test_resolve_config_value_env_literal_and_command_forms(self):
+ with mock.patch.dict(os.environ, {"MY_MCP_KEY": "resolved-secret"}, clear=False):
+ self.assertEqual(mcp._resolve_config_value("MY_MCP_KEY"), "resolved-secret")
+ self.assertEqual(mcp._resolve_config_value("key-abc"), "key-abc")
+ self.assertEqual(mcp._resolve_config_value("!security find-key"), "")
+ self.assertEqual(mcp._resolve_config_value(" "), "")
+
+ def test_read_auth_reads_provider_entry(self):
+ with tempfile.TemporaryDirectory() as tmp:
+ cred = {"type": "oauth", "access": "tok", "refresh": "r", "expires": 1, "endpoint": "https://e.test/mcp"}
+ (Path(tmp) / "auth.json").write_text(json.dumps({"mcp:demo": cred, "other": "junk"}))
+ with mock.patch.dict(os.environ, {"PRIME_AGENT_CODING_AGENT_DIR": tmp}, clear=False):
+ self.assertEqual(mcp._read_auth("mcp:demo"), cred)
+ self.assertIsNone(mcp._read_auth("mcp:missing"))
+
+ def test_resolve_streamable_http_returns_callable(self):
+ self.assertTrue(callable(mcp._resolve_streamable_http()))
+
+ def test_open_http_passes_headers_for_headers_signature(self):
+ captured = {}
+
+ class _CM:
+ async def __aenter__(self):
+ return ("read", "write", None)
+
+ async def __aexit__(self, *args):
+ return False
+
+ def transport(url, headers=None):
+ captured["headers"] = headers
+ return _CM()
+
+ generation = mcp._Generation("svc", {"type": "http", "url": "https://example.test/mcp", "headers": {"X-A": "1"}})
+ generation.stack = FakeStack()
+ with mock.patch.object(mcp, "_resolve_streamable_http", lambda: transport):
+ streams = run(generation._open_http())
+ self.assertEqual(captured["headers"], {"X-A": "1"})
+ self.assertEqual(streams, ("read", "write"))
+
+ def test_open_http_builds_client_for_http_client_signature(self):
+ captured = {}
+
+ class _CM:
+ async def __aenter__(self):
+ return ("read", "write", None)
+
+ async def __aexit__(self, *args):
+ return False
+
+ def transport(url, *, http_client=None):
+ captured["http_client"] = http_client
+ return _CM()
+
+ generation = mcp._Generation("svc", {"type": "http", "url": "https://example.test/mcp"})
+ generation.stack = FakeStack()
+ with mock.patch.object(mcp, "_resolve_streamable_http", lambda: transport):
+ streams = run(generation._open_http())
+ self.assertIsNotNone(captured["http_client"])
+ self.assertEqual(streams, ("read", "write"))
+
+
+
if __name__ == "__main__":
unittest.main()