AgentGuard MCP
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., "@AgentGuard MCP@AgentGuard, check if a $750 refund requires human approval."
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.
AgentGuard
Identity Security for AI Agents
AgentGuard is an identity-aware authorization layer for autonomous AI agents.
It gives each agent its own machine identity, limits access with OAuth scopes, evaluates contextual policy before sensitive actions execute, and introduces a separately authenticated human approval boundary when autonomous authority should stop.
Live Product:
https://agentguard-eight.vercel.app
MCP Authorization Backend:
https://github.com/haisamar/agentguard-mcp
The Problem
AI agents are increasingly being connected to real systems:
CRMs
financial tools
support platforms
internal APIs
databases
MCP servers
But connecting an agent to a tool creates a security question:
Just because an agent can authenticate, should it be allowed to do everything the tool supports?
Usually, no.
A sales agent may need to:
read CRM accounts
update opportunities
inspect support contextbut it should not automatically be able to:
issue refunds
export customer data
modify security settingsAnd even a finance agent that legitimately has refund permissions may need human approval before issuing a high-value refund.
AgentGuard demonstrates how identity, authorization, contextual policy, and human control can be layered together around AI agent execution.
What AgentGuard Does
AgentGuard separates authorization into multiple security boundaries:
AI Agent
↓
Machine Identity
↓
OAuth Scope Authorization
↓
Contextual Policy
↓
Human Approval if Required
↓
Controlled Execution
↓
Audit TrailAuthentication alone does not imply unlimited authority.
Live Demo
The public demo can be explored without authentication:
https://agentguard-eight.vercel.app/demo
It contains three real persisted authorization scenarios.
Related MCP server: Oakallow MCP Server
Scenario 1 — Human Approved
A Finance Agent requests a $750 refund.
Finance Agent
↓
Authenticated machine identity
↓
finance:refund scope verified
↓
Refund exceeds $500 autonomous threshold
↓
APPROVAL_REQUIRED
↓
Authenticated human administrator approves
↓
Finance Agent executes approved refund
↓
ALLOWFinal state:
EXECUTEDScenario 2 — Human Denied
The same Finance Agent requests another $750 refund.
The agent has the correct OAuth permission, so the request passes the scope check.
However, contextual policy requires human approval.
Finance Agent
↓
finance:refund ✓
↓
Refund > $500
↓
APPROVAL_REQUIRED
↓
Human Administrator
↓
DENY
↓
Finance Agent attempts execution
↓
DENYFinal state:
DENIEDThis demonstrates that:
Being authorized to request an action does not necessarily mean the agent is authorized to execute it autonomously.
Scenario 3 — Scope Blocked
A Sales Agent attempts to issue a refund.
Its identity contains:
crm:read
crm:write
support:readbut the protected tool requires:
finance:refundAgentGuard blocks the request immediately.
Sales Agent
↓
Authenticated
↓
Missing finance:refund
↓
DENYContextual policy is never evaluated.
Human review is never reached.
The request fails at the least-privilege authorization boundary.
Architecture
AgentGuard separates machine authentication, least-privilege authorization, contextual risk decisions, and human approval so an authenticated AI agent never automatically receives unlimited authority.
flowchart LR
AGENT["AI Agent<br/>Sales / Finance"]
AUTH0M["Auth0<br/>Machine Identity"]
TOKEN["OAuth Access Token<br/>Scoped Permissions"]
MCP["AgentGuard MCP<br/>Protected Tools"]
SCOPE{"Scope<br/>Authorized?"}
POLICY{"Contextual<br/>Policy"}
APPROVAL["Approval Request<br/>Persisted"]
AUTH0H["Auth0<br/>Human Identity"]
HUMAN{"Human<br/>Decision"}
EXEC["Controlled<br/>Execution"]
BLOCK["Execution<br/>Blocked"]
DB[("Supabase<br/>Approvals + Audit")]
AGENT --> AUTH0M
AUTH0M --> TOKEN
TOKEN --> MCP
MCP --> SCOPE
SCOPE -->|"Missing scope"| BLOCK
SCOPE -->|"Authorized"| POLICY
POLICY -->|"Low risk"| EXEC
POLICY -->|"Forbidden"| BLOCK
POLICY -->|"Sensitive"| APPROVAL
APPROVAL --> DB
APPROVAL --> AUTH0H
AUTH0H --> HUMAN
HUMAN -->|"Approve"| EXEC
HUMAN -->|"Deny"| BLOCK
EXEC --> DB
BLOCK --> DBIdentity Model
AgentGuard deliberately separates machine identities from human identities.
Machine Identities
Each agent runtime receives a separate Auth0 Machine-to-Machine identity.
The demo contains three runtimes.
Identity | Role | OAuth Scopes |
Sales Agent | Revenue Operations |
|
Finance Agent | Finance Operations |
|
Admin Runtime | Security Administration |
|
This prevents multiple agents from sharing one broadly privileged credential.
Human Identity
Sensitive decisions are reviewed through a separately authenticated Auth0 user.
The human administrator is not the same identity as the requesting machine.
Example:
Requested by
Finance Agent
Machine Identity
Reviewed by
Human Administrator
Human IdentityThis creates a clear separation between:
machine authorityand:
human approval authorityAuthorization Model
AgentGuard uses layered authorization.
1. Authentication
Auth0 establishes the identity of the calling agent.
The MCP server receives an OAuth access token containing the machine identity.
2. OAuth Scope Authorization
Each protected MCP tool declares the permission required to call it.
Example:
issue_refund
requires
finance:refundIf the agent does not have the required scope:
DENYNo policy evaluation or human escalation is needed.
3. Contextual Policy
Passing an OAuth scope check does not automatically guarantee execution.
AgentGuard evaluates the context of the requested action.
Current demonstration rules include:
Refund <= $500
→ ALLOW
Refund > $500
→ APPROVAL_REQUIRED
Customer data export
→ APPROVAL_REQUIRED
Customer deletion
→ DENYThis separates:
Can this identity request this type of operation?from:
Should this exact operation execute autonomously?4. Human-in-the-Loop Authorization
Sensitive operations are paused and persisted.
The protected administrator dashboard shows the pending request.
The authenticated human can then choose:
Approveor:
DenyThe decision is persisted and added to the security audit trail.
5. Approval-Bound Execution
A human approval does not directly execute the action.
The original machine identity returns and requests execution.
AgentGuard then verifies:
Does the approval exist?
Is it APPROVED?
Does the approval belong to this agent?
Does it match this action?
Has it already been executed?Only then can execution continue.
6. Replay Protection
Successfully executed approvals transition to:
EXECUTEDA second attempt to execute the same approval is blocked.
EXECUTED
↓
second execution attempt
↓
DENYThe replay attempt is recorded as a security event.
Administrator Console
The protected dashboard is available at:
/dashboardIt requires Auth0 authentication.
The administrator console provides:
machine identity inventory
granted OAuth scopes
authenticated human operator context
pending approvals
approve / deny controls
authorization trace explorer
security activity feed
detailed audit-event inspection
approval history
machine vs human identity visualization
Raw identity and audit context remains behind authentication.
Public Demo
The public demo exists separately at:
/demoIt is intentionally read-only.
Before data reaches the browser, private security information is removed.
The public demo does not expose:
Auth0 subject IDs
machine client IDs
administrator email addresses
OAuth access tokens
Supabase credentials
raw audit metadata
private approval identifiersThe public interface receives only sanitized scenario data.
Authorization Trace Explorer
AgentGuard includes an interactive trace explorer that reconstructs persisted security scenarios.
Users can switch between:
Human Approved
Human Denied
Scope BlockedEach trace visualizes:
01 Agent Identity
02 Scope Check
03 Contextual Policy
04 Human Review
05 ExecutionThis makes the authorization lifecycle understandable without needing access to the MCP Inspector, Auth0 dashboard, or database.
Security Activity
Every important authorization decision is recorded as an audit event.
Example decisions include:
ALLOW
DENY
APPROVAL_REQUIRED
APPROVEDSelecting an event opens a detailed security drawer containing information such as:
Identity
Identity Type
Decision
Action
Required Scope
Reason
Approval Reference
Timestamp
Event ID
Security MetadataExample authorization failure:
Sales Agent
Action
issue_refund
Decision
DENY
Required Scope
finance:refund
Granted Scopes
crm:read
crm:write
support:read
Missing Scope
finance:refund
Security Event
authorization_failureApproval Lifecycle
Sensitive actions are represented by persisted approval records.
Available states:
PENDING
APPROVED
DENIED
EXECUTEDSuccessful flow:
PENDING
↓
APPROVED
↓
EXECUTEDDenied flow:
PENDING
↓
DENIEDAgentGuard also separates:
reviewed_byfrom:
approved_byso a denied request can correctly represent:
status = DENIED
reviewed_by = Human Administrator
approved_by = nullTechnology
AgentGuard is built with:
Identity & Authorization
Auth0
OAuth 2.0
Machine-to-Machine Applications
Human Authentication
Scoped Access TokensAgent Interface
Model Context Protocol
FastMCPBackend
Python
Starlette
UvicornApplication
Next.js 16
React
TypeScript
Tailwind CSSPersistence
Supabase
PostgreSQL
Row Level SecurityDeployment
Vercel
GitHubRepository Structure
agentguard/
│
├── src/
│ ├── app/
│ │ ├── dashboard/
│ │ │ ├── ApprovalButtons.tsx
│ │ │ ├── SecurityActivity.tsx
│ │ │ ├── TraceExplorer.tsx
│ │ │ ├── actions.ts
│ │ │ ├── layout.tsx
│ │ │ └── page.tsx
│ │ │
│ │ ├── demo/
│ │ │ ├── PublicTraceExplorer.tsx
│ │ │ └── page.tsx
│ │ │
│ │ └── page.tsx
│ │
│ ├── lib/
│ │ ├── agentguard-data.ts
│ │ ├── auth0.ts
│ │ └── public-demo-data.ts
│ │
│ └── proxy.ts
│
├── package.json
└── README.mdThe Python MCP authorization server is maintained separately:
https://github.com/haisamar/agentguard-mcp
Backend MCP Server
The companion backend implements:
Auth0 access-token validation
protected-resource OAuth metadata
MCP tool authorization
required-scope enforcement
contextual policy evaluation
approval creation
human approval enforcement
approval-bound execution
replay protection
Supabase persistence
security audit logging
Backend repository:
https://github.com/haisamar/agentguard-mcp
MCP Tools
The current security prototype includes:
search_accounts
issue_refund
list_pending_approvals
approve_action
execute_approved_refundExample:
Finance Agent
finance:refund
↓
issue_refund($100)
↓
ALLOWversus:
Finance Agent
finance:refund
↓
issue_refund($750)
↓
APPROVAL_REQUIREDversus:
Sales Agent
no finance:refund
↓
issue_refund($750)
↓
DENYDatabase Security
Approval and audit records live in Supabase/PostgreSQL.
Row Level Security is enabled on the underlying tables.
No public browser policies are intentionally defined for sensitive AgentGuard records.
Server-side components use protected environment credentials.
The Supabase secret key is never shipped to client-side JavaScript.
Public demo information is sanitized server-side before being passed to interactive client components.
Local Development
Requirements
Node.js
Auth0 tenant
Supabase project
AgentGuard MCP backendClone:
git clone https://github.com/haisamar/agentguard.git
cd agentguardInstall:
npm installCreate:
.env.localwith your own environment configuration.
Example variables:
SUPABASE_URL=
SUPABASE_SECRET_KEY=
AUTH0_DOMAIN=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
AUTH0_SECRET=
APP_BASE_URL=http://localhost:3000
AGENTGUARD_ADMIN_EMAIL=Never commit .env.local.
Run:
npm run devThen open:
http://localhost:3000Route Model
/
Public product page
/demo
Public sanitized security demo
/dashboard
Auth0-protected administrator consoleThis separation allows the project to remain easily reviewable as a portfolio project without exposing privileged administrative functionality.
Production
The frontend is deployed on Vercel:
https://agentguard-eight.vercel.app
Production authentication uses an Auth0 Regular Web Application with explicit production callback, logout, and origin URLs.
Secrets are stored as Vercel environment variables and are not committed to Git.
Security Boundaries Demonstrated
AgentGuard demonstrates several identity-security concepts in one system:
Authentication ≠ Authorization
An authenticated agent can still be denied.
Least Privilege
Agents receive only the scopes their role requires.
Context-Aware Authorization
Authorization can depend on details of the action, not just the caller.
Separation of Duties
A machine can request an action while a human independently approves it.
Human-in-the-Loop Control
Autonomous execution can stop at defined risk boundaries.
Approval-Bound Execution
Approval is associated with the requesting identity and action.
Replay Protection
Previously executed approvals cannot be reused.
Auditability
Authorization decisions are persisted with identity and decision context.
Public / Private Separation
Portfolio viewers can explore sanitized scenarios without gaining access to administrative data.
What I Wanted to Explore
AgentGuard was built to explore a question:
What does identity security look like when the user is not always a human?
Traditional application security often assumes that people authenticate and then interact with systems directly.
AI agents change that model.
Autonomous runtimes can:
call APIs
use tools
modify records
trigger workflows
take financial actionsThat makes identity and authorization increasingly important at the agent layer.
AgentGuard explores how familiar IAM concepts such as:
machine identity
OAuth scopes
least privilege
separation of duties
human approval
auditabilitycan be applied to AI-agent execution.
Current Scope
AgentGuard is a security portfolio prototype, not a production IAM product.
Some intentional boundaries include:
contextual policies are currently defined in code
machine identities are mapped to demonstration roles
human administrator authorization currently uses an application-level allowlist
policy management does not yet have its own control plane
database audit records are not cryptographically immutable
production distributed locking is outside the prototype scope
MCP backend deployment is designed for controlled testing
approval expiration is not currently implemented
These limitations are documented deliberately rather than hidden.
Possible Extensions
Future versions could explore:
Auth0 role-based administration
policy-as-code
policy versioning
agent identity registry
workload identity federation
delegated authorization
resource-level authorization
organization isolation
approval expiration
time-bound privileges
step-up authentication
signed audit events
SIEM integration
policy simulation
risk scoring
dynamic authorization
production MCP deploymentRelated Repository
AgentGuard MCP
Python authorization server, policy engine, approval enforcement, and audit persistence:
https://github.com/haisamar/agentguard-mcp
Live Project
AgentGuard
https://agentguard-eight.vercel.app
Interactive Demo
https://agentguard-eight.vercel.app/demo
Administrator Console
https://agentguard-eight.vercel.app/dashboardAuthentication required.
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.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA governance and control layer for MCP tools that manages tool requests as intents through policy-based approval, queuing, or blocking. It enables secure human oversight and audit trails for consequential agent actions across platforms like Claude Desktop and Cursor.1MIT No Attribution

Oakallow MCP Serverofficial
AlicenseNot gradedqualityBmaintenanceRuntime permission, approval, and audit governance for AI agent tool execution, enabling human oversight of risky actions via an MCP server.1MIT- FlicenseNot gradedqualityCmaintenanceMCP server that provides a security gateway for AI agents, enforcing allow/confirm/deny policies on tool calls and requiring human approval for risky operations, with full audit logging.
- FlicenseNot gradedqualityCmaintenanceA protected Model Context Protocol server that gives AI agents distinct machine identities, enforces least-privilege OAuth permissions, applies contextual authorization policies, and pauses sensitive actions for human approval.
Related MCP Connectors
Runtime permission, approval, and audit layer for AI agent tool execution.
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
See, price, and control every tool call your AI agents make: policy checks, cost, and audit tools.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/haisamar/agentguard'
If you have feedback or need assistance with the MCP directory API, please join our Discord server