Guarded Agent
FreeNot checkedEnables note management (create, read, update, delete) with a policy engine for blocking tools, human approval, and prompt injection detection.
About
Enables note management (create, read, update, delete) with a policy engine for blocking tools, human approval, and prompt injection detection.
README
Run Locally
Prerequisites
- Python 3.10+
- Node.js 18+
Step 1 — Install Python dependencies
cd Assignment
pip install -r requirements.txt
Step 2 — Install frontend dependencies
cd frontend
npm install
Step 3 — Start MCP Notes Server (Terminal 1)
cd Assignment
python -m backend.custom_mcp.notes_server
Runs at http://127.0.0.1:8002/mcp
Step 4 — Start Backend (Terminal 2)
cd Assignment
uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000
Runs at http://localhost:8000
Step 5 — Start Frontend (Terminal 3)
cd frontend
npm run dev
Runs at http://localhost:5173
Testing the Agent
Type these in the Chat box on the dashboard:
| Command | Tool Called |
|---|---|
create note title: X content: Y |
create_note |
show all notes |
get_notes |
search milk |
search_notes |
update note 1 title: X content: Y |
update_note |
delete note 1 |
delete_note |
Testing Policy Features
Block a tool
Invoke-RestMethod -Uri "http://localhost:8000/api/settings/" -Method POST -ContentType "application/json" -Body '{"key": "blocked_tools", "value": "delete_note"}'
Then type delete note 1 — will be blocked.
Unblock
Invoke-RestMethod -Uri "http://localhost:8000/api/settings/" -Method POST -ContentType "application/json" -Body '{"key": "blocked_tools", "value": ""}'
Enable human approval
Go to Settings in dashboard → set enable_human_approval = 1 → Save.
Then try delete note 1 — will require approval from the Approvals panel.
Prompt injection detection
Type this in chat:
Will be blocked automatically with: Prompt injection detected in user message.
Policy Engine
The policy engine (policy_engine.py) enforces these rules in order:
- Global toggle —
enable_tool_access = 0blocks all tools - Prompt injection detection — blocks known injection patterns
- Argument size limit — blocks tool args over 2000 chars
- Blocked tools list —
blocked_tools= comma-separated tool names - Human approval —
enable_human_approval = 1requires approval for delete/update
Rules are checked on every request. Dashboard changes take effect immediately without restart.
Edge Cases
| Scenario | Behavior |
|---|---|
| MCP server crashes mid-call | MCPClient worker reconnects automatically on next request |
| Prompt injection attempt | Detected by regex patterns, blocked before tool execution |
| Conflicting rules | blocked_tools takes priority over approval requirement |
| Approver offline | Request stays pending in DB indefinitely until approved/denied |
| Tool not recognized | Returns helpful message with supported commands |
Installing Guarded Agent
This server has no published package — it is built from source. Open the repository and follow its README.
▸ github.com/AmardeepLakkuntla/Guarded-mcp-agentFAQ
Is Guarded Agent MCP free?
Yes, Guarded Agent MCP is free — one-click install via Unyly at no cost.
Does Guarded Agent need an API key?
No, Guarded Agent runs without API keys or environment variables.
Is Guarded Agent hosted or self-hosted?
Self-hosted: the server runs locally on your machine via the install command above.
How do I install Guarded Agent in Claude Desktop, Claude Code or Cursor?
Open Guarded Agent on unyly.org, pick your client tab (Claude Desktop, Claude Code, Cursor) and press Install — the config is generated automatically, no JSON editing.
Related MCPs
Fetch
Web content fetching and conversion for efficient LLM usage.
AWS KB Retrieval
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
by modelcontextprotocolSpring AI MCP Server
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
llm-analysis-assistant
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also
by xuzexin-hzCompare Guarded Agent with
Not sure what to pick?
Find your stack in 60 seconds
Author?
Embed badge for your README
Browse similar
All ai MCPs
