AWSTemplateFormatVersion: "2010-09-09" Transform: - AWS::LanguageExtensions - AWS::Serverless-2016-10-31 Parameters: Project: Type: String Default: mcp Environment: Type: String Default: dev Globals: Function: Tracing: Active Runtime: nodejs22.x Tags: Project: !Ref Project Environment: !Ref Environment ServiceName: MCP Resources: ## # Resources ## ExampleResourceParameter: Type: AWS::SSM::Parameter Properties: Name: !Sub "/${Project}/${Environment}/resources/example" Type: String Value: | { "name": "example", "uri": "config://example", "content": "Just an example resource" } ## # Prompt ## EchoPromptParameter: Type: AWS::SSM::Parameter Properties: Name: !Sub "/${Project}/${Environment}/prompts/echo" Type: String Value: | { "name": "echo", "description": "Execute the example tool", "inputSchema": { "json": { "type": "object", "properties": { "message": { "type": "string" } }, "required": ["message"] } }, "content": "Execute the tool 'echo' with the message '<%= message %>'" } ## # Tools ## EchoToolFunction: Type: AWS::Serverless::Function Properties: FunctionName: !Sub "${Project}-${Environment}-tools-echo" Handler: index.handler InlineCode: | exports.handler = async ({ toolUseId, name, input }, context) => { console.log(JSON.stringify({ input, context }, null, 2)) return { name, toolUseId, status: 'success', content: [{ text: input.message }] } } EchoToolParameter: Type: AWS::SSM::Parameter Properties: Name: !Sub "/${Project}/${Environment}/tools/echo" Type: String Value: | { "name": "echo", "description": "Print the message provided in input", "inputSchema": { "json": { "type": "object", "properties": { "message": { "type": "string" } }, "required": ["message"] } } }