From 256898d5eccef8bd0d5620771be4b984ad83dfe6 Mon Sep 17 00:00:00 2001 From: Travis Fischer Date: Tue, 1 Jul 2025 04:42:58 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/api/src/api-v1/deployments/create-deployment.ts | 1 + apps/api/src/api-v1/projects/create-project.ts | 1 + apps/gateway/src/lib/durable-mcp-client.ts | 6 ++++++ examples/mcp-servers/search/src/worker.ts | 10 ++++++---- 4 files changed, 14 insertions(+), 4 deletions(-) diff --git a/apps/api/src/api-v1/deployments/create-deployment.ts b/apps/api/src/api-v1/deployments/create-deployment.ts index 91fd2da1..cb4a78a9 100644 --- a/apps/api/src/api-v1/deployments/create-deployment.ts +++ b/apps/api/src/api-v1/deployments/create-deployment.ts @@ -88,6 +88,7 @@ export function registerV1CreateDeployment( // Used to simplify recreating the demo `@agentic/search` project during // development while we're frequently resetting the database const secret = + projectIdentifier === '@dev/search' || projectIdentifier === '@agentic/search' ? env.AGENTIC_SEARCH_PROXY_SECRET : await sha256() diff --git a/apps/api/src/api-v1/projects/create-project.ts b/apps/api/src/api-v1/projects/create-project.ts index 3903d9b7..c6bc951a 100644 --- a/apps/api/src/api-v1/projects/create-project.ts +++ b/apps/api/src/api-v1/projects/create-project.ts @@ -67,6 +67,7 @@ export function registerV1CreateProject( // Used to simplify recreating the demo `@agentic/search` project during // development while we're frequently resetting the database const secret = + projectIdentifier === '@dev/search' || projectIdentifier === '@agentic/search' ? env.AGENTIC_SEARCH_PROXY_SECRET : await sha256() diff --git a/apps/gateway/src/lib/durable-mcp-client.ts b/apps/gateway/src/lib/durable-mcp-client.ts index c156fa6a..2cd335bd 100644 --- a/apps/gateway/src/lib/durable-mcp-client.ts +++ b/apps/gateway/src/lib/durable-mcp-client.ts @@ -76,6 +76,12 @@ export class DurableMcpClientBase extends DurableObject { }): Promise { await this.ensureClientConnection() + // console.log('DurableMcpClient.callTool', { + // name, + // args, + // metadata + // }) + const toolCallResponse = await this.client!.callTool({ name, arguments: args, diff --git a/examples/mcp-servers/search/src/worker.ts b/examples/mcp-servers/search/src/worker.ts index a75c0b7b..3667db48 100644 --- a/examples/mcp-servers/search/src/worker.ts +++ b/examples/mcp-servers/search/src/worker.ts @@ -78,10 +78,12 @@ export default { parsedEnv.AGENTIC_PROXY_SECRET ) { return { - content: [], - structuredContent: { - error: 'Invalid request' - } + content: [ + { + type: 'text', + text: 'Invalid request: must come from Agentic MCP proxy' + } + ] } }