guardian-policy-mcp
Collects decision audit logs and operational traces in Amazon CloudWatch.
Stores household profiles, routines, rules, incidents, decisions, and events in Amazon DynamoDB.
Executes MCP tool and workflow steps in the production AWS architecture.
Receives Ring front-door events via webhook (e.g., PERSON_DETECTED at front_door) and routes them into Guardian's safety decision workflow for visitor detection and response.
Click on "Deploy 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., "@guardian-policy-mcpcheck home status and evaluate the unknown visitor at the front door"
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.
Guardian AI
Guardian AI is an Alexa+ household safety agent prototype. It coordinates smart-home events, household context, natural-language rules, and safety policy before deciding what action to take.
The central idea:
Smart homes detect events. Guardian decides what should happen next.Why It Can Win
Guardian is not a generic chatbot and it is not a simple Ring alert. It demonstrates an agentic safety workflow:
Event -> Context -> Policy -> Risk -> Action -> ExplanationThe demo shows:
Alexa+ activating Guardian when the owner leaves.
Ring-style front-door events entering the agent workflow.
Household memory for family members, routines, and expected visitors.
Guardian Rules that convert natural-language policies into structured rules.
A visible safety refusal when the user asks for an unsafe door unlock.
A wellness workflow for an elderly parent.
A Fire TV-style command center for household status and incident actions.
An MCP-style tool catalog for Alexa+ agent orchestration.
Related MCP server: AutoFlow Gateway
Local Setup
Requires Python 3.11+.
cd guardian-ai
python server/app.pyOpen:
http://127.0.0.1:8080Run the CLI demo:
python server/app.py guardian:demoWinning Demo Flow
Click Alexa: I'm Leaving.
Click Ring: Expected Delivery to show Guardian avoiding unnecessary interruption.
Click Ring: Unknown Visitor.
Show the Decision Engine output and blocked actions.
Click Check On Mom.
Click Mom Missed 2nd Check-In.
Show the Fire TV command center recommending family contact.
Click Unsafe Unlock Request.
Show Guardian refusing the unlock because of household policy.
Click Mom Responds.
Show the all-clear state, audit timeline, and MCP invocation log.
MCP Tool Surface
The prototype exposes a Streamable HTTP-style MCP endpoint at:
POST /mcp
GET /mcpThe endpoint accepts JSON-RPC MCP messages for initialize, tools/list, and tools/call. The local dashboard also exposes the readable catalog at:
GET /api/mcp/toolsImplemented tools:
guardian.get_home_statusguardian.get_recent_eventsguardian.get_household_contextguardian.evaluate_eventguardian.start_wellness_checkguardian.request_actionguardian.create_rule
Example MCP tool call:
Initialize the MCP session first:
$init = '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"guardian-demo","version":"1.0.0"}}}'
Invoke-WebRequest http://127.0.0.1:8080/mcp `
-Method POST `
-ContentType 'application/json' `
-Headers @{ Accept = 'application/json, text/event-stream' } `
-Body $init
$initialized = '{"jsonrpc":"2.0","method":"notifications/initialized","params":{}}'
Invoke-WebRequest http://127.0.0.1:8080/mcp `
-Method POST `
-ContentType 'application/json' `
-Headers @{ Accept = 'application/json, text/event-stream' } `
-Body $initialized
Invoke-WebRequest http://127.0.0.1:8080/mcp `
-Method POST `
-ContentType 'application/json' `
-Headers @{ Accept = 'application/json, text/event-stream' } `
-Body '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"guardian.request_action","arguments":{"action":"unlock_door"}}}'API
Get Guardian state:
GET /api/guardianSimulate a smart-home event:
POST /api/simulateExample body:
{
"action": "unknown_visitor"
}Supported actions:
resetactivate_guardianexpected_deliveryunknown_visitorstart_wellness_checkmom_second_missunsafe_unlock_requestmom_respondspackage_delivery
Add a natural-language Guardian Rule:
POST /api/rulesExample body:
{
"rule": "Never unlock the front door automatically."
}Receive a production-style Ring webhook:
POST /webhooks/ringExample body:
{
"event_type": "PERSON_DETECTED",
"location": "front_door"
}If RING_WEBHOOK_SECRET is set, the endpoint verifies X-Signature using HMAC-SHA256 before accepting the event.
AWS Builder Architecture
The local app is deterministic so judging is reliable without credentials. The production version maps cleanly to AWS:
Amazon Bedrock: event interpretation, policy extraction, explanation generation.
AWS Lambda: MCP tool execution and workflow steps.
Amazon DynamoDB: household profiles, routines, rules, incidents, decisions, and events.
Amazon EventBridge: Ring event routing and incident workflow triggers.
Amazon CloudWatch: decision audit logs and operational traces.
Amazon Bedrock AgentCore Runtime: hosts the Streamable HTTP MCP server at
/mcp.Amazon Bedrock AgentCore Gateway: tool discovery and invocation across Guardian and Amazon capability adapters.
AgentCore Observability: traces tool calls, decisions, refusals, and workflow steps.
Fire TV app/web view: household command center.
Alexa+ Agent Skill/MCP server: voice and agent orchestration layer.
Safety Model
Guardian uses three safety levels:
Green: inform automatically.
Yellow: ask for human approval.
Red: block or escalate only under explicit policy.
The prototype intentionally demonstrates refusal:
Guardian cannot unlock the door because the visitor is unidentified and policy forbids automatic unlocks.That refusal is a feature. It shows responsible agentic behavior.
Open Source Angle
For the open-source mini challenge, extract the reusable layer as guardian-mcp:
guardian-mcp/
server/
tools/
policies/
context/
workflows/
examples/The pitch:
An open-source MCP framework for building context-aware household safety agents.The reusable package starter lives at:
packages/guardian-policy-mcpSubmission Artifacts
docs/architecture.md: technical architecture and production mapping.deployment/agentcore-checklist.md: AgentCore deployment checklist.friction-logs/: bonus-ready friction log drafts.sample-data/demo-script.md: 2-minute demo script.
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP for MCP consent scope receipt, structured receipts, audit logs, and reviewer-ready eviden
Zero-secret MCP gateway for AI agents: risk-scored, audited calls with human-in-the-loop approval.
Authenticated MCP for a user's care circle: read CareEvents, list loved ones, inspect workspace.
- gatewayOAuthai.sealgate
MCP gateway with runtime security policy, tool-call-level control, and audit of agent actions.
Related MCP Servers
AlicenseNot gradedqualityAmaintenanceEnables AI agents to securely call MCP tools with risk scoring, checkpoints, rollback, and approval workflows.1 npmMIT- AlicenseNot gradedqualityBmaintenanceCentral MCP gateway for smart home automation, enabling agents to safely control Home Assistant and Node-RED with identity-based access, human confirmation for writes, and a WebUI for governance.1MIT
- AlicenseBqualityBmaintenanceProvides a unified MCP interface for smart home automation, enabling device discovery, state management, energy optimization, and policy-aware plan validation across multiple home automation protocols.20Mozilla Public 2.0
- AlicenseNot gradedqualityCmaintenanceEnables managing Samsung SmartThings devices, scenes, notifications, and routines through full CRUD operations on rules via the MCP protocol.MIT