localcore-gateway
Provides a local emulation of AWS Bedrock AgentCore Gateway, enabling development and testing of Lambda-backed tools for Bedrock agents without connecting to AWS.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@localcore-gatewayserve gateway.yaml for testing"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
localcore-gateway
A local, faithful-enough reimplementation of AWS Bedrock AgentCore Gateway, with a pluggable local Lambda backend. Develop and test agent ↔ gateway ↔ Lambda integrations entirely on your machine, then point the same MCP client at the real AWS gateway with no code changes.
There is no official local emulator for AgentCore Gateway (AWS's agentcore dev
is for the Runtime, not the Gateway). This fills that gap.
0.x — unstable. The CLI flags and config schema may change between minor releases until 1.0. Pin a version if you depend on it.
What it reproduces
MCP Streamable-HTTP at
/mcp— the same wire surface as the real gateway (built on the FastMCP 3.x server; no hand-rolled JSON-RPC).Target aggregation — every
(target, tool)is exposed as one MCP tool namedtarget___tool(AgentCore's triple-underscore convention).AgentCore Lambda contract — the tool arguments are passed as the Lambda event; the tool identity is delivered via
context.client_context.custom['bedrockAgentCoreToolName']; the Lambda's return value becomes the tool result.OpenAPI targets — a REST API's spec becomes MCP tools; the tool name is the operation's
operationIdverbatim (as the real gateway does, not a slugified form), spec-level security is ignored (auth configured out of band).
Related MCP server: Amazon Bedrock AgentCore MCP Gateway
Local Lambda backends
backend | Docker | fidelity | use it for |
| no | one subprocess per target (real process isolation — monorepo-safe), faithful | the fast dev loop |
| yes | the real AWS Lambda Linux runtime via | full Linux-runtime fidelity check before AWS |
Documentation
Architecture — request flow, AgentCore contract mapping, component map
Configuration reference — every config field
Writing Lambda handlers — the handler contract, multi-tool, errors, logs, native vs sam
CLI reference —
serve/dev/tools/invokeConnecting agents — point an MCP client at it; promote to real AWS
Install
uv tool install localcore-gateway # or: pipx install localcore-gateway
uvx --from localcore-gateway lcgw --help # one-off, no installQuick start
A handler and a config (nothing else needed):
# handlers.py
def handler(event, context):
return {"sum": event["a"] + event["b"]}# gateway.yaml
targets:
- type: lambda
name: demo
lambda: { backend: native, handler: handlers.handler }
tools:
- name: add
inputSchema:
type: object
properties: { a: { type: number }, b: { type: number } }
required: [a, b]lcgw tools -c gateway.yaml
lcgw invoke -c gateway.yaml demo___add --data '{"a":2,"b":40}'
lcgw serve -c gateway.yaml # MCP at http://127.0.0.1:8080/mcp
lcgw dev -c gateway.yaml # same, with hot reloadPoint any MCP client at http://127.0.0.1:8080/mcp. Richer examples (multi
target, math_handlers.py, Strands agent) are in examples/.
From source (development)
git clone https://github.com/tawAsh1/localcore-gateway && cd localcore-gateway
uv sync
uv run pytest
uv run lcgw serve -c examples/config.yamlUsing the sam backend
Run sam local start-lambda in your SAM project, then set in the target:
lambda:
backend: sam
sam_endpoint: http://127.0.0.1:3001
sam_function: DemoFunctionConfiguration
See examples/config.yaml. A target declares a Lambda
(backend, handler/sam_function, memory_mb, timeout_sec, env) and the
tools it backs (each with an explicit JSON Schema). One Lambda can back many
tools; the handler branches on bedrockAgentCoreToolName.
Known limitations
nativeruns your handler in a subprocess but is not a security sandbox (no filesystem/network jail) — only point it at trusted code.nativeserializes invokes per target (one warm execution environment); it does not model Lambda's concurrent-environment scaling.samper-invoke logs appear in thesam localconsole (out-of-band for the Invoke API).AgentCore's builtin semantic tool search (
x_amz_bedrock_agentcore_search) is not implemented (intentionally omitted).Target types: Lambda and OpenAPI are implemented; MCP-passthrough and Smithy are not yet. OpenAPI outbound auth covers static API key (header/query) and bearer; OAuth 2LO is out of scope.
License
Apache License 2.0. See NOTICE for attribution and the
trademark disclaimer below.
Trademarks & disclaimer
This is an unofficial, community project. It is not affiliated with, endorsed by, or sponsored by Amazon Web Services, Inc. or its affiliates.
"AWS", "Amazon Web Services", "Amazon Bedrock", "Amazon Bedrock AgentCore", and "AWS Lambda" are trademarks of Amazon.com, Inc. or its affiliates. They are used here only nominatively, to accurately describe the AWS service this project interoperates with / reimplements locally. No AWS trademark, logo, or trade dress is used as the name or branding of this project.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/tawAsh1/localcore-gateway'
If you have feedback or need assistance with the MCP directory API, please join our Discord server