From bcafe60bc37799ced49b9ab72ac4d8036e994e88 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Sun, 29 Jun 2025 09:05:16 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/publishing/guides/existing-openapi-service.mdx | 6 ++++++ packages/platform/src/origin-adapters/mcp.ts | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/publishing/guides/existing-openapi-service.mdx b/docs/publishing/guides/existing-openapi-service.mdx index e938fcd0..6278c240 100644 --- a/docs/publishing/guides/existing-openapi-service.mdx +++ b/docs/publishing/guides/existing-openapi-service.mdx @@ -139,6 +139,12 @@ Every time you make a change to your project, you can run `agentic deploy` which prioritize this feature. + + The returned deployment will not have any information about your origin + server, because the origin is considered hidden once deployed to Agentic's MCP + gateway. + + diff --git a/packages/platform/src/origin-adapters/mcp.ts b/packages/platform/src/origin-adapters/mcp.ts index ddd7c595..4d52b80a 100644 --- a/packages/platform/src/origin-adapters/mcp.ts +++ b/packages/platform/src/origin-adapters/mcp.ts @@ -28,7 +28,14 @@ export async function resolveMCPOriginAdapter({ ) const transport = new StreamableHTTPClientTransport(new URL(origin.url)) const client = new McpClient({ name, version }) - await client.connect(transport) + try { + await client.connect(transport) + } catch (err: any) { + throw new Error( + `Failed to connect to MCP server at ${origin.url} using the Streamable HTTP transport.Make sure your MCP server is running and accessible, and that your URL is using the correct path (/, /mcp, etc): ${err.message}`, + { cause: err } + ) + } const serverInfo = { name,