• Documentation
  • Pricing
© 2026 Serverless, Inc. All rights reserved.

Framework

  • Overview
  • Documentation
  • Plugins360
  • Pricing

Learn

  • Blog
  • GuidesUpdated
  • Examples240
  • Courses

Resources

  • Support
  • Security
  • Trust Center
  • Status

Community

  • Slack
  • GitHub47k
  • Forum
  • Meetups

Company

  • About
  • Careers
  • Contact
  • Partners

Legal

  • Terms of Service
  • Privacy Policy
  • Trademark
  • DMCA
Serverless, inc.

Bedrock AgentCore: Standalone MCP Server (JavaScript)

by

Standalone JavaScript MCP server deployed to AWS Bedrock AgentCore Runtime, consumable by any MCP client.

  1. Bedrock AgentCore: Standalone MCP Server (JavaScript)

MCP Server Example

A JavaScript MCP server deployed to AWS Bedrock AgentCore Runtime. Exposes simple tools via the Model Context Protocol that can be consumed by any MCP client (Cursor, Claude Desktop, Amazon Q CLI, etc.).

Tools

ToolDescription
addAdd two numbers together
multiplyMultiply two numbers together
get_current_timeGet the current date and time (with optional timezone)

Prerequisites

  • Node.js 24.x
  • AWS account with credentials configured
  • Serverless Framework installed (npm i -g serverless)

Project structure

mcp-server/
├── index.js          # MCP server (Express + @modelcontextprotocol/sdk)
├── package.json      # Dependencies and start script
├── serverless.yml    # Serverless Framework configuration
└── README.md

Deploy

npm install
sls deploy

Local development

npm install
sls dev

How it works

The server uses Express to expose a stateless Streamable HTTP endpoint at POST /mcp on port 8000, which is the standard expected by AgentCore Runtime for MCP-protocol runtimes. Each request creates a fresh MCP server instance, processes the JSON-RPC message, and cleans up on close.

The serverless.yml sets protocol: MCP on the agent, which tells AgentCore to route MCP traffic to the runtime.

Connecting MCP clients

Once deployed, the runtime can be connected to any MCP client that supports remote MCP servers via Streamable HTTP. Refer to the AgentCore MCP documentation for invocation details and authentication setup.

Contents

  • MCP Server Example
  • Tools
  • Prerequisites
  • Project structure
  • Deploy
  • Local development
  • How it works
  • Connecting MCP clients

Related

GuidesPluginsExamplesSlack CommunitySupport