agent-guard MCP Server
Constitutional guardrails and loop detection for AI agents
agent-guard scores 43 (Fair), with no SPDX license recorded and written in JavaScript. It installs as a local process. It declares 10 tools. Filed under AI and memory. GitHub shows 0 stars. Package registries report about 53 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.
Fair trust
43 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- No license recorded.
License, quality and maintenance
Quality: Grade B
72/100 for listing completeness. Lost points: short README, 9 of 10 tools barely described, short summary.
How quality is graded
Where the 43 comes from
22 + 5 + 2 + 0 + 4 + 10 = 43. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 5 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 2 of 20 points.A clear, OSI-style open-source license.
License: 0 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 10 of 10 points.Install
Pick your client, copy the config, paste it in.
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "mdfifty50-boop-agent-guard-mcp": { "command": "npx", "args": [ "-y", "agent-guard-mcp@0.1.3" ] } }}
Environment variables
This server does not declare environment variables.
Tools10Tool docs quality grade F
All capabilitiesagent_idtoolstring
is_stucktoolboolean
max_iterationstoolnumber
max_repeatstoolnumber
number
proposed_argstoolobject
proposed_tooltoolstring
repeated_actionstoollist of repeated signatures with counts
result_previewtoolstring
tool_nametoolstring
About
agent-guard-mcp
MCP server that detects and prevents infinite agent loops — the #1 reliability problem in agentic systems.
Provides circuit breakers, pattern detection, stuck-agent analysis, and recovery recommendations via the Model Context Protocol.
Install
npx agent-guard-mcp
Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"agent-guard": {
"command": "npx",
"args": ["agent-guard-mcp"]
}
}
}
From source
git clone https://github.com/mdfifty50-boop/agent-guard-mcp.git
cd agent-guard-mcp
npm install
node src/index.js
Tools
register_agent
Register an agent for monitoring.
| Param | Type | Default | Description |
|---|---|---|---|
agent_id | string | required | Unique agent identifier |
max_iterations | number | 100 | Max iterations before forced stop |
progress_threshold | number | 0.3 | Min unique/total action ratio to be "making progress" |
log_action
Log an agent action for loop detection. Maintains a rolling window of the last 50 actions.
| Param | Type | Default | Description |
|---|---|---|---|
agent_id | string | required | Agent identifier |
tool_name | string | required | Tool being called |
args | object | required | Arguments passed |
result_preview | string | "" | Brief result preview (max 200 chars) |
Returns early warnings when repeated patterns are detected.
detect_loop
Check if an agent is stuck in an infinite loop.
| Param | Type | Description |
|---|---|---|
agent_id | string | Agent to check |
Returns:
is_stuck— booleanconfidence— 0.0 to 1.0pattern—healthy,exact_repeat,low_diversity, orexact_repeat_and_low_diversitysuggestion— human-readable recovery advicerepeated_actions— list of repeated signatures with counts
set_circuit_breaker
Configure automatic intervention when action patterns repeat.
| Param | Type | Default | Description |
|---|---|---|---|
agent_id | string | required | Agent identifier |
max_repeats | number | 3 | Trigger after N identical actions |
action | string | "warn" | "warn", "block", or "suggest_alternative" |
check_circuit_breaker
Pre-flight check before executing a tool. Call this BEFORE the actual tool call.
| Param | Type | Description |
|---|---|---|
agent_id | string | Agent identifier |
proposed_tool | string | Tool about to be called |
proposed_args | object | Arguments about to be passed |
Returns proceed: false when the circuit breaker fires (block mode only).
get_stuck_report
Detailed analysis of why an agent is stuck.
| Param | Type | Description |
|---|---|---|
agent_id | string | Agent to analyze |
Returns: action history, pattern analysis, token waste estimate, diversity ratio, top repeated patterns, and recovery recommendations.
get_health_dashboard
Overview of all monitored agents. No parameters.
Returns all agents sorted by risk score with their status (STUCK/HEALTHY), action counts, and circuit breaker config.
Resources
| URI | Description |
|---|---|
agent-guard://agents | All monitored agents with current status |
Usage Pattern
1. register_agent — at agent startup
2. Before each tool call:
a. check_circuit_breaker — should this action proceed?
b. Execute the tool
c. log_action — record what happened
3. Periodically:
- detect_loop — am I stuck?
- get_health_dashboard — how are all agents doing?
4. On stuck detection:
- get_stuck_report — what went wrong and how to recover
Tests
npm test
License
MIT
Frequently asked questions
What is agent-guard MCP Server?
Constitutional guardrails and loop detection for AI agents
How do I install agent-guard MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. agent-guard MCP Server runs locally from the npm package agent-guard-mcp with the command npx -y agent-guard-mcp@0.1.3.
Does agent-guard MCP Server support remote (HTTP) connections?
No remote endpoint is listed for agent-guard MCP Server. It runs locally on your machine over stdio, started by your MCP client.
What tools does agent-guard MCP Server provide?
agent-guard MCP Server provides 10 tools, including agent_id, is_stuck, max_iterations, and max_repeats. See the full tool list for descriptions and parameters.
How is agent-guard MCP Server's trust score calculated?
agent-guard MCP Server scores 43 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.