From 452947a636446f0e7b2b9b7afb0dd5630724a656 Mon Sep 17 00:00:00 2001 From: Yusuke Wada Date: Tue, 1 Jul 2025 13:32:11 +0900 Subject: [PATCH 1/2] fix --- packages/cdk/lib/construct/mcp-api.ts | 3 ++- packages/cdk/mcp-api/app.py | 2 +- packages/web/src/prompts/claude.ts | 2 ++ 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/cdk/lib/construct/mcp-api.ts b/packages/cdk/lib/construct/mcp-api.ts index a24734b89..5789ceb46 100644 --- a/packages/cdk/lib/construct/mcp-api.ts +++ b/packages/cdk/lib/construct/mcp-api.ts @@ -1,4 +1,4 @@ -import { Duration } from 'aws-cdk-lib'; +import { Duration, Size } from 'aws-cdk-lib'; import { Construct } from 'constructs'; import { DockerImageFunction, @@ -31,6 +31,7 @@ export class McpApi extends Construct { : NetworkMode.DEFAULT, }), memorySize: 1024, + ephemeralStorageSize: Size.mebibytes(1024), timeout: Duration.minutes(15), architecture: Architecture.X86_64, environment: { diff --git a/packages/cdk/mcp-api/app.py b/packages/cdk/mcp-api/app.py index ae25f68ef..8192711ac 100644 --- a/packages/cdk/mcp-api/app.py +++ b/packages/cdk/mcp-api/app.py @@ -168,8 +168,8 @@ def spawn(): command=server['command'], args=server['args'], env={ - **server['env'], **UV_ENV, + **server['env'], }, ) ) diff --git a/packages/web/src/prompts/claude.ts b/packages/web/src/prompts/claude.ts index 1bedbdcdb..94bc7b855 100644 --- a/packages/web/src/prompts/claude.ts +++ b/packages/web/src/prompts/claude.ts @@ -119,6 +119,8 @@ Please follow the instructions in the and provide your answer. Output your answer in the format answer. Do not output any other text. Also, do not enclose your output in {} tags.`, + '/mcp': + 'You are an AI agent that is good with lots of different tools. You find the answers to user questions and instructions using the right tools. The answers can be in different types of formats. If you want to make images, please use Markdown and show them.', }; export const claudePrompter: Prompter = { From 535c449d7624f88495670460c9ff4d3864a0097f Mon Sep 17 00:00:00 2001 From: Yusuke Wada Date: Wed, 2 Jul 2025 11:45:55 +0900 Subject: [PATCH 2/2] fix --- packages/cdk/mcp-api/app.py | 1 + packages/web/src/prompts/claude.ts | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/cdk/mcp-api/app.py b/packages/cdk/mcp-api/app.py index 8192711ac..8def7a868 100644 --- a/packages/cdk/mcp-api/app.py +++ b/packages/cdk/mcp-api/app.py @@ -34,6 +34,7 @@ - You are running on AWS Lambda. Therefore, when writing files, always write them under `{WORKSPACE_DIR}`. - Similarly, if you need a workspace, please use the `{WORKSPACE_DIR}` directory. Do not ask the user about their current workspace. It's always `{WORKSPACE_DIR}`. - Also, users cannot directly access files written under `{WORKSPACE_DIR}`. So when submitting these files to users, *always upload them to S3 using the `upload_file_to_s3_and_retrieve_s3_url` tool and provide the S3 URL*. The S3 URL must be included in the final output. +- If the output file is an image file, the S3 URL output must be in Markdown format. """ def stream_chunk(text, trace): diff --git a/packages/web/src/prompts/claude.ts b/packages/web/src/prompts/claude.ts index 94bc7b855..1bedbdcdb 100644 --- a/packages/web/src/prompts/claude.ts +++ b/packages/web/src/prompts/claude.ts @@ -119,8 +119,6 @@ Please follow the instructions in the and provide your answer. Output your answer in the format answer. Do not output any other text. Also, do not enclose your output in {} tags.`, - '/mcp': - 'You are an AI agent that is good with lots of different tools. You find the answers to user questions and instructions using the right tools. The answers can be in different types of formats. If you want to make images, please use Markdown and show them.', }; export const claudePrompter: Prompter = {