Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

feat(plugins): add Hoplite MCP integration (#142)

Leo93d293325584
diff --git a/apps/web/src/components/plugins/pluginPresentation.test.ts b/apps/web/src/components/plugins/pluginPresentation.test.ts
index 8cafa1fab..4d5fdd3ca 100644
--- a/apps/web/src/components/plugins/pluginPresentation.test.ts
+++ b/apps/web/src/components/plugins/pluginPresentation.test.ts
@@ -92,7 +92,7 @@ describe("plugin presentation", () => {
buildPluginSections({ plugins: catalog, query: "", filter: "All" }).flatMap((section) =>
section.plugins.map((plugin) => plugin.id),
),
- ).toHaveLength(52);
+ ).toHaveLength(53);
expect(
buildPluginSections({
plugins: catalog,
@@ -105,7 +105,7 @@ describe("plugin presentation", () => {
buildPluginSections({ plugins: catalog, query: "", filter: "Featured" })[0]?.plugins.map(
(plugin) => plugin.id,
),
- ).toEqual(["context", "zernio"]);
+ ).toEqual(["context", "zernio", "hoplite"]);
expect(
buildPluginSections({ plugins: catalog, query: "", filter: "Web" })[0]?.plugins.map(
(plugin) => plugin.id,
@@ -133,7 +133,11 @@ describe("plugin presentation", () => {
),
]);
expect(sections.every((section) => section.plugins.length > 0)).toBe(true);
- expect(sections[0]?.plugins.map((plugin) => plugin.id)).toEqual(["context", "zernio"]);
+ expect(sections[0]?.plugins.map((plugin) => plugin.id)).toEqual([
+ "context",
+ "zernio",
+ "hoplite",
+ ]);
for (const section of sections.slice(1)) {
expect(
section.plugins.every((plugin) => !plugin.featured && plugin.category === section.title),
diff --git a/patches/@[email protected] b/patches/@[email protected]
new file mode 100644
index 000000000..dc68a4363
--- /dev/null
+++ b/patches/@[email protected]
@@ -0,0 +1,108 @@
+diff --git a/dist/client/client.d.ts b/dist/client/client.d.ts
+index a0b93c5ad5d7f0d62c2fb2798b28ca2ffa6ead0d..f52cc4235ad06dc247b6b3649db2f47b390b1bb6 100644
+--- a/dist/client/client.d.ts
++++ b/dist/client/client.d.ts
+@@ -187,7 +187,7 @@ export declare class InternalMastraMCPClient extends MastraBase {
+ *
+ * @internal
+ */
+- finishAuth(authorizationCode: string): Promise<void>;
++ finishAuth(authorizationCode: string, iss?: string): Promise<void>;
+ private isConnected;
+ private reconnectPromise;
+ private lifecycleGeneration;
+diff --git a/dist/client/oauth-callback-server.d.ts b/dist/client/oauth-callback-server.d.ts
+index 1a724587cf4f4ca4383e005423afda2bc178b8bc..cd89f063b6d8953a8411476a4b2f641a53bf1e26 100644
+--- a/dist/client/oauth-callback-server.d.ts
++++ b/dist/client/oauth-callback-server.d.ts
+@@ -44,6 +44,10 @@ export interface OAuthCallbackResult {
+ * The state parameter echoed back by the authorization server.
+ */
+ state: string;
++ /**
++ * The authorization server issuer returned with the authorization response.
++ */
++ iss?: string;
+ }
+ /**
+ * A running loopback OAuth callback server.
+diff --git a/dist/index.cjs b/dist/index.cjs
+index 38a6c5e70d3fb6603ce6c40b443088eaeb8cf695..65821cdff5135c8f7e7dfa0590f52e3fb0da0e39 100644
+--- a/dist/index.cjs
++++ b/dist/index.cjs
+@@ -21759,12 +21759,12 @@ var InternalMastraMCPClient = class extends _mastra_core_base.MastraBase {
+ *
+ * @internal
+ */
+- async finishAuth(authorizationCode) {
++ async finishAuth(authorizationCode, iss) {
+ const pending = this.pendingAuthTransport;
+ if (!pending) throw new Error("No OAuth authorization is pending for this server. Call connect() first.");
+ this.pendingAuthTransport = void 0;
+ try {
+- await pending.finishAuth(authorizationCode);
++ await pending.finishAuth(authorizationCode, iss);
+ } finally {
+ pending.close().catch(() => {});
+ }
+@@ -22471,7 +22471,8 @@ async function createOAuthCallbackServer(options) {
+ respond(200, SUCCESS_HTML);
+ settle({ result: {
+ code,
+- state
++ state,
++ iss: url.searchParams.get("iss") ?? void 0
+ } });
+ });
+ const hostname = candidates[0].hostname.replace(/^\[|\]$/g, "");
+@@ -23646,8 +23647,8 @@ onListChanged: async (serverName, handler) => {
+ } catch (error) {
+ if (!(error instanceof _modelcontextprotocol_client.UnauthorizedError)) throw this.handleConnectError(serverName, error);
+ }
+- const { code } = await callbackServer.waitForCode(options);
+- await client.finishAuth(code);
++ const { code, iss } = await callbackServer.waitForCode(options);
++ await client.finishAuth(code, iss);
+ try {
+ await client.connect();
+ } catch (error) {
+diff --git a/dist/index.js b/dist/index.js
+index 5d71441f80773dc594cfd49a8d7bf6159629edd7..dde1b30b13d2be892c8c72d05b9bfc43e98d14c0 100644
+--- a/dist/index.js
++++ b/dist/index.js
+@@ -21738,12 +21738,12 @@ var InternalMastraMCPClient = class extends MastraBase {
+ *
+ * @internal
+ */
+- async finishAuth(authorizationCode) {
++ async finishAuth(authorizationCode, iss) {
+ const pending = this.pendingAuthTransport;
+ if (!pending) throw new Error("No OAuth authorization is pending for this server. Call connect() first.");
+ this.pendingAuthTransport = void 0;
+ try {
+- await pending.finishAuth(authorizationCode);
++ await pending.finishAuth(authorizationCode, iss);
+ } finally {
+ pending.close().catch(() => {});
+ }
+@@ -22450,7 +22450,8 @@ async function createOAuthCallbackServer(options) {
+ respond(200, SUCCESS_HTML);
+ settle({ result: {
+ code,
+- state
++ state,
++ iss: url.searchParams.get("iss") ?? void 0
+ } });
+ });
+ const hostname = candidates[0].hostname.replace(/^\[|\]$/g, "");
+@@ -23625,8 +23626,8 @@ onListChanged: async (serverName, handler) => {
+ } catch (error) {
+ if (!(error instanceof UnauthorizedError)) throw this.handleConnectError(serverName, error);
+ }
+- const { code } = await callbackServer.waitForCode(options);
+- await client.finishAuth(code);
++ const { code, iss } = await callbackServer.waitForCode(options);
++ await client.finishAuth(code, iss);
+ try {
+ await client.connect();
+ } catch (error) {
diff --git a/plugins/catalog.test.ts b/plugins/catalog.test.ts
index d96477572..9451353ea 100644
--- a/plugins/catalog.test.ts
+++ b/plugins/catalog.test.ts
@@ -33,6 +33,7 @@ const EXPECTED_DIRECTORY_IDS = [
"framer",
"github",
"help-scout",
+ "hoplite",
"hubspot",
"intercom",
"lemon-squeezy",
@@ -65,7 +66,13 @@ const EXPECTED_DIRECTORY_IDS = [
"zernio",
] as const;
-const EXPECTED_INSTALLABLE_IDS = ["context", "exa", "firecrawl", "parallel-search"] as const;
+const EXPECTED_INSTALLABLE_IDS = [
+ "context",
+ "hoplite",
+ "exa",
+ "firecrawl",
+ "parallel-search",
+] as const;
function manifest(id: string) {
return parsePluginManifestJson(
@@ -166,7 +173,7 @@ describe("plugin catalog loader", () => {
const directory = loadDirectoryCatalog();
const catalog = loadCatalog();
expect(directory.map((plugin) => plugin.id).toSorted()).toEqual(EXPECTED_DIRECTORY_IDS);
- expect(new Set(directory.map((plugin) => plugin.id)).size).toBe(52);
+ expect(new Set(directory.map((plugin) => plugin.id)).size).toBe(53);
expect(catalog.map((plugin) => plugin.id)).toEqual(EXPECTED_INSTALLABLE_IDS);
expect(catalog.map((plugin) => `builtin-${plugin.id}`)).toEqual(
EXPECTED_INSTALLABLE_IDS.map((id) => `builtin-${id}`),
@@ -181,6 +188,7 @@ describe("plugin catalog loader", () => {
).toEqual([
{ id: "context", rank: 1 },
{ id: "zernio", rank: 2 },
+ { id: "hoplite", rank: 3 },
]);
expect(
new Set(
@@ -188,7 +196,7 @@ describe("plugin catalog loader", () => {
plugin.featuredRank === undefined ? [] : [plugin.featuredRank],
),
).size,
- ).toBe(2);
+ ).toBe(3);
expect(catalog.every((plugin) => plugin.logo.src.length > 0)).toBe(true);
const byId = new Map(catalog.map((plugin) => [plugin.id, plugin]));
@@ -212,6 +220,13 @@ describe("plugin catalog loader", () => {
url: "https://search.parallel.ai/mcp-oauth",
authentication: "oauth",
});
+ expect(byId.get("hoplite")).toMatchObject({
+ kind: "mcp-url",
+ url: "https://api.hoplite.sh/mcp",
+ authentication: "oauth",
+ featuredRank: 3,
+ connection: { type: "ready" },
+ });
});
it("keeps every unverified entry pending with complete approval coverage", () => {
diff --git a/plugins/entries/hoplite/logo-dark.svg b/plugins/entries/hoplite/logo-dark.svg
new file mode 100644
index 000000000..633e0a3c2
--- /dev/null
+++ b/plugins/entries/hoplite/logo-dark.svg
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
+ <g transform="translate(0 512) scale(.1 -.1)" fill="#fff">
+ <path d="M1075 3959c-55-5-110-13-123-19-13-5-31-10-41-10s-43-7-72-16c-51-15-72-23-174-62-49-18-168-74-175-82-3-3-25-16-50-29-25-13-64-37-88-52-24-16-47-29-53-29-5 0-9-4-9-10 0-5-6-10-14-10s-21-6-28-12c-8-7-23-18-33-25-161-98-156-94-153-127l3-31 285-5c157-3 291-9 298-13 12-8 17-93 6-121-5-14-44-16-330-16H0v-874-875l1393-4c888-2 1403-7 1422-13 55-19 44-49-43-126l-42-38h-108c-103 0-109-1-119-22-6-14-8-90-5-193 6-225 15-238 124-165 33 22 62 40 65 40 2 0 9 5 16 10 48 41 62 50 73 50 7 0 14 3 16 8 5 10 66 52 77 52 5 0 11 3 13 8 5 10 66 52 77 52 5 0 11 4 13 8 2 5 98 71 213 147 116 76 212 143 213 147 2 4 8 8 14 8s27 13 48 30c21 16 41 30 44 30 6 0 64 38 76 50 3 3 14 10 25 16 12 6 21 23 22 40 3 27-6 34-99 94-55 36-106 67-112 69-6 2-13 7-16 11-3 3-66 46-140 95-307 200-320 209-320 231 0 12 10 32 23 46 12 13 39 44 61 69 253 288 278 313 307 306 13-3 42-30 64-59s51-64 65-78c15-15 48-55 75-91 28-35 59-73 70-84 16-17 61-70 108-130 58-74 47-70 170-73 96-3 117-1 130 13 16 15 17 80 17 731 0 474-3 722-10 735-14 26-46 24-78-5-114-102-128-110-150-83-6 7-12 46-14 87l-3 75-47 32c-26 17-69 39-95 49-27 10-50 21-53 25-3 3-25 10-50 14-25 4-51 12-59 19-19 15-333 15-352 0-8-7-34-15-59-19-24-4-51-11-60-16-8-4-37-18-65-31-27-13-51-26-53-30-2-5-8-8-14-8-13 0-132-71-136-82-2-4-8-8-13-8s-66-34-135-75-129-75-135-75c-5 0-9-4-9-10 0-5-11-12-25-16-14-3-25-10-25-14s-8-10-17-13c-20-6-75-38-83-48-3-4-15-9-27-13-13-4-23-12-23-17s-5-9-10-9c-6 0-107-58-226-130-119-71-220-130-224-130-5 0-15-6-22-12-14-13-28-21-97-60-20-11-43-26-52-34-8-8-19-14-22-14-4 0-63-34-131-75s-129-75-134-75-12-4-14-8c-1-4-19-18-39-30-30-18-51-22-127-22-77 0-93 3-100 18-5 9-7 24-4 32 9 31 36 40 118 40 53 0 87 5 96 13 7 7 33 28 58 47 24 19 52 42 60 50 9 8 32 28 53 44 64 51 52 76-71 146-70 40-76 49-56 79 14 19 24 21 140 21 68 0 124-4 124-8s-11-23-25-42c-28-37-31-60-13-78 20-20 47-14 108 23 32 19 60 35 64 35 3 0 15 8 26 17 17 15 20 30 20 100 0 83 12 113 46 113 8 0 14 5 14 10 0 6 4 10 10 10 5 0 47 22 92 49 46 27 108 62 138 78 190 103 200 111 200 141 0 23-12 34-79 75-44 26-84 47-89 47-6 0-12 3-14 8-6 14-156 81-253 113-33 11-67 24-75 28-9 5-40 12-70 16-30 4-60 11-65 15-13 11-257 30-349 29-39-1-116-6-171-10z"/>
+ <path d="M0 1365c0-34 12-46 25-24 9 14-3 59-15 59-6 0-10-16-10-35zM3290 1227c-14-7-27-14-30-17-3-4-57-37-120-75-187-112-194-131-71-194 114-58 145-75 151-82 3-4 16-10 30-14s27-11 30-14c3-4 32-21 65-37 73-37 186-98 214-116 19-11 21-23 21-96 0-59 4-88 14-98 12-11 51-14 189-14 173 0 174 0 187 24 10 20 10 28-3 46-15 21-142 162-222 245-22 23-63 68-91 101-28 32-71 80-95 105-24 26-82 88-129 139-47 50-92 95-100 100-8 4-26 3-40-3z"/>
+ </g>
+</svg>
diff --git a/plugins/entries/hoplite/logo.svg b/plugins/entries/hoplite/logo.svg
new file mode 100644
index 000000000..df6bbf62a
--- /dev/null
+++ b/plugins/entries/hoplite/logo.svg
@@ -0,0 +1,6 @@
+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
+ <g transform="translate(0 512) scale(.1 -.1)" fill="currentColor">
+ <path d="M1075 3959c-55-5-110-13-123-19-13-5-31-10-41-10s-43-7-72-16c-51-15-72-23-174-62-49-18-168-74-175-82-3-3-25-16-50-29-25-13-64-37-88-52-24-16-47-29-53-29-5 0-9-4-9-10 0-5-6-10-14-10s-21-6-28-12c-8-7-23-18-33-25-161-98-156-94-153-127l3-31 285-5c157-3 291-9 298-13 12-8 17-93 6-121-5-14-44-16-330-16H0v-874-875l1393-4c888-2 1403-7 1422-13 55-19 44-49-43-126l-42-38h-108c-103 0-109-1-119-22-6-14-8-90-5-193 6-225 15-238 124-165 33 22 62 40 65 40 2 0 9 5 16 10 48 41 62 50 73 50 7 0 14 3 16 8 5 10 66 52 77 52 5 0 11 3 13 8 5 10 66 52 77 52 5 0 11 4 13 8 2 5 98 71 213 147 116 76 212 143 213 147 2 4 8 8 14 8s27 13 48 30c21 16 41 30 44 30 6 0 64 38 76 50 3 3 14 10 25 16 12 6 21 23 22 40 3 27-6 34-99 94-55 36-106 67-112 69-6 2-13 7-16 11-3 3-66 46-140 95-307 200-320 209-320 231 0 12 10 32 23 46 12 13 39 44 61 69 253 288 278 313 307 306 13-3 42-30 64-59s51-64 65-78c15-15 48-55 75-91 28-35 59-73 70-84 16-17 61-70 108-130 58-74 47-70 170-73 96-3 117-1 130 13 16 15 17 80 17 731 0 474-3 722-10 735-14 26-46 24-78-5-114-102-128-110-150-83-6 7-12 46-14 87l-3 75-47 32c-26 17-69 39-95 49-27 10-50 21-53 25-3 3-25 10-50 14-25 4-51 12-59 19-19 15-333 15-352 0-8-7-34-15-59-19-24-4-51-11-60-16-8-4-37-18-65-31-27-13-51-26-53-30-2-5-8-8-14-8-13 0-132-71-136-82-2-4-8-8-13-8s-66-34-135-75-129-75-135-75c-5 0-9-4-9-10 0-5-11-12-25-16-14-3-25-10-25-14s-8-10-17-13c-20-6-75-38-83-48-3-4-15-9-27-13-13-4-23-12-23-17s-5-9-10-9c-6 0-107-58-226-130-119-71-220-130-224-130-5 0-15-6-22-12-14-13-28-21-97-60-20-11-43-26-52-34-8-8-19-14-22-14-4 0-63-34-131-75s-129-75-134-75-12-4-14-8c-1-4-19-18-39-30-30-18-51-22-127-22-77 0-93 3-100 18-5 9-7 24-4 32 9 31 36 40 118 40 53 0 87 5 96 13 7 7 33 28 58 47 24 19 52 42 60 50 9 8 32 28 53 44 64 51 52 76-71 146-70 40-76 49-56 79 14 19 24 21 140 21 68 0 124-4 124-8s-11-23-25-42c-28-37-31-60-13-78 20-20 47-14 108 23 32 19 60 35 64 35 3 0 15 8 26 17 17 15 20 30 20 100 0 83 12 113 46 113 8 0 14 5 14 10 0 6 4 10 10 10 5 0 47 22 92 49 46 27 108 62 138 78 190 103 200 111 200 141 0 23-12 34-79 75-44 26-84 47-89 47-6 0-12 3-14 8-6 14-156 81-253 113-33 11-67 24-75 28-9 5-40 12-70 16-30 4-60 11-65 15-13 11-257 30-349 29-39-1-116-6-171-10z"/>
+ <path d="M0 1365c0-34 12-46 25-24 9 14-3 59-15 59-6 0-10-16-10-35zM3290 1227c-14-7-27-14-30-17-3-4-57-37-120-75-187-112-194-131-71-194 114-58 145-75 151-82 3-4 16-10 30-14s27-11 30-14c3-4 32-21 65-37 73-37 186-98 214-116 19-11 21-23 21-96 0-59 4-88 14-98 12-11 51-14 189-14 173 0 174 0 187 24 10 20 10 28-3 46-15 21-142 162-222 245-22 23-63 68-91 101-28 32-71 80-95 105-24 26-82 88-129 139-47 50-92 95-100 100-8 4-26 3-40-3z"/>
+ </g>
+</svg>
diff --git a/plugins/entries/hoplite/plugin.json b/plugins/entries/hoplite/plugin.json
new file mode 100644
index 000000000..2e89a5cd3
--- /dev/null
+++ b/plugins/entries/hoplite/plugin.json
@@ -0,0 +1,60 @@
+{
+ "schemaVersion": 1,
+ "id": "hoplite",
+ "name": "Hoplite",
+ "description": "Start, supervise, and inspect cloud coding-agent work.",
+ "primaryCategory": "Build",
+ "tags": ["coding-agents", "projects", "threads", "automation"],
+ "capabilities": [
+ "list Hoplite projects and threads",
+ "inspect thread timelines and tool calls",
+ "start coding-agent runs",
+ "manage projects and thread actions"
+ ],
+ "featuredRank": 3,
+ "publisher": {
+ "name": "Hoplite",
+ "url": "https://hoplite.sh"
+ },
+ "maintainer": {
+ "name": "Hoplite",
+ "url": "https://hoplite.sh"
+ },
+ "documentationUrl": "https://hoplite.sh/docs/cli/mcp-server",
+ "sourceUrl": "https://hoplite.sh/openapi.json",
+ "license": "Proprietary",
+ "logo": {
+ "provenance": {
+ "sourceUrl": "https://hoplite.sh/logo512.png",
+ "license": "Hoplite brand asset"
+ }
+ },
+ "platforms": ["web", "desktop", "mobile"],
+ "transport": {
+ "type": "url",
+ "url": "https://api.hoplite.sh/mcp"
+ },
+ "connection": { "type": "ready" },
+ "authentication": "oauth",
+ "requiredCredentials": [],
+ "setup": ["Sign in through the Hoplite OAuth flow."],
+ "permissions": [
+ {
+ "id": "read-hoplite-workspace",
+ "description": "Read projects, threads, models, repositories, timelines, and tool calls.",
+ "approval": "read"
+ },
+ {
+ "id": "start-agent-runs",
+ "description": "Start coding-agent runs that can change project repositories.",
+ "approval": "production"
+ },
+ {
+ "id": "manage-hoplite-projects",
+ "description": "Create or change shared Hoplite projects and thread state.",
+ "approval": "account-wide"
+ }
+ ],
+ "approvals": ["production", "account-wide"],
+ "catalogStatus": "available"
+}
diff --git a/plugins/lifecycle-matrix.test.ts b/plugins/lifecycle-matrix.test.ts
index d3be6926a..bb6d96418 100644
--- a/plugins/lifecycle-matrix.test.ts
+++ b/plugins/lifecycle-matrix.test.ts
@@ -9,10 +9,10 @@ import {
} from "./catalog";
const EXPECTED_IDS =
- "ahrefs apify apollo asana atlassian attio canva cloudflare coda computer-use context customer-io datadog docusign dropbox exa executor figma firecrawl framer github help-scout hubspot intercom lemon-squeezy linear mobbin monday netlify notion paddle paper parallel-search paypal pipedrive posthog railway render salesforce semrush sentry sequenzy shopify slack stripe superside tavily typefully vercel webflow zendesk zernio".split(
+ "ahrefs apify apollo asana atlassian attio canva cloudflare coda computer-use context customer-io datadog docusign dropbox exa executor figma firecrawl framer github help-scout hoplite hubspot intercom lemon-squeezy linear mobbin monday netlify notion paddle paper parallel-search paypal pipedrive posthog railway render salesforce semrush sentry sequenzy shopify slack stripe superside tavily typefully vercel webflow zendesk zernio".split(
" ",
);
-const INSTALLABLE_IDS = ["context", "exa", "firecrawl", "parallel-search"];
+const INSTALLABLE_IDS = ["context", "hoplite", "exa", "firecrawl", "parallel-search"];
describe("milestone 13 plugin lifecycle matrix", () => {
it("keeps verified plugins installable and every unverified plugin blocked", () => {
@@ -32,6 +32,7 @@ describe("milestone 13 plugin lifecycle matrix", () => {
).toEqual([
["context", 1],
["zernio", 2],
+ ["hoplite", 3],
]);
const pending = directory.filter((plugin) => !INSTALLABLE_IDS.includes(plugin.id));
@@ -66,6 +67,13 @@ describe("milestone 13 plugin lifecycle matrix", () => {
transport: { type: "url", url: "https://api.githubcopilot.com/mcp/" },
connection: { type: "verification-pending" },
});
+ expect(byId.get("hoplite")).toMatchObject({
+ transport: { type: "url", url: "https://api.hoplite.sh/mcp" },
+ authentication: "oauth",
+ featuredRank: 3,
+ connection: { type: "ready" },
+ approvals: ["production", "account-wide"],
+ });
expect(byId.get("computer-use")).toMatchObject({
platforms: ["macos"],
connection: {
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index d595d9070..d7555f12e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -71,6 +71,7 @@ patchedDependencies:
'@expo/[email protected]': 8cb08b5bb7051ed9d2dbe46a2c293c5a1e17f1bd6ddf30de27909e18c921ff46
'@ff-labs/[email protected]': ab9ff544009e1891cfe3930105862d3699007f38922a79f3c98d90018deca368
'@legendapp/[email protected]': 064530db83875fa671559a81ae42dc159726dc2dd6ec4c982da44ff7c7a74706
+ '@mastra/[email protected]': 016edd26ea06f6ebcde74dc84648bb45937a3dc5c6876407c2474c4525f91871
'@pierre/[email protected]': 7ef7cb0cbabb17c15cdb137554068b36f15f6f5265e73fb51452aa3380db91aa
'@react-native-menu/[email protected]': c7f66d121c726ade4f5c4e1aed11a691e5711d244c544084e289ac26132a0045
'@react-native/[email protected]': c1b594a16e682d621b6a960926f8ce13fc92edfb397884cfe7fcb0518996a784
@@ -16863,7 +16864,7 @@ snapshots:
'@mastra/fastembed': 1.3.0
@@ -16976,7 +16977,7 @@ snapshots:
- bufferutil
- utf-8-validate
dependencies:
'@modelcontextprotocol/client': 2.0.0
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 2ac8a9d55..cfae79434 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -120,6 +120,7 @@ patchedDependencies:
"@expo/[email protected]": patches/@expo%[email protected]
"@legendapp/[email protected]": patches/@[email protected]
"@pierre/[email protected]": patches/@pierre%[email protected]
"@react-native-menu/[email protected]": patches/@[email protected]
"@react-native/[email protected]": patches/@[email protected]
diff --git a/scripts/mastra-mcp-oauth-patch.test.ts b/scripts/mastra-mcp-oauth-patch.test.ts
new file mode 100644
index 000000000..ab98ae00e
--- /dev/null
+++ b/scripts/mastra-mcp-oauth-patch.test.ts
@@ -0,0 +1,31 @@
+// @effect-diagnostics nodeBuiltinImport:off - This test inspects installed package artifacts on disk.
+import * as NodeFS from "node:fs";
+import * as NodeModule from "node:module";
+import * as NodePath from "node:path";
+import { describe, expect, it } from "vite-plus/test";
+
+const packageEntry = NodeModule.createRequire(
+ new URL("../node_modules/.pnpm/node_modules/resolve.cjs", import.meta.url),
+).resolve("@mastra/mcp");
+const packageRoot = NodePath.dirname(NodePath.dirname(packageEntry));
+
+function readPackageFile(path: string): string {
+ return NodeFS.readFileSync(NodePath.join(packageRoot, path), "utf8");
+}
+
+describe("@mastra/mcp OAuth issuer patch", () => {
+ it("forwards the authorization issuer from the callback to the MCP transport", () => {
+ for (const bundle of ["dist/index.js", "dist/index.cjs"]) {
+ const source = readPackageFile(bundle);
+ expect(source).toContain('iss: url.searchParams.get("iss") ?? void 0');
+ expect(source).toContain("const { code, iss } = await callbackServer.waitForCode(options)");
+ expect(source).toContain("await client.finishAuth(code, iss)");
+ expect(source).toContain("await pending.finishAuth(authorizationCode, iss)");
+ }
+
+ expect(readPackageFile("dist/client/client.d.ts")).toContain(
+ "finishAuth(authorizationCode: string, iss?: string): Promise<void>",
+ );
+ expect(readPackageFile("dist/client/oauth-callback-server.d.ts")).toContain("iss?: string");
+ });
+});
diff --git a/scripts/validate-plugin-catalog.test.ts b/scripts/validate-plugin-catalog.test.ts
index 7e64f1893..3ee9d12b1 100644
--- a/scripts/validate-plugin-catalog.test.ts
+++ b/scripts/validate-plugin-catalog.test.ts
@@ -29,7 +29,7 @@ afterEach(() => {
describe("plugin catalog validation", () => {
it("validates the live plugin directory", () => {
- expect(validatePluginCatalog()).toHaveLength(52);
+ expect(validatePluginCatalog()).toHaveLength(53);
});
it("validates isolated manifests and official local assets", () => {