mdfifty50-boop avatar

Agent Guard

mdfifty50-boop/agent-guard-mcp

Built to solve the infinite loop problem in agentic workflows. Wraps your AI agents with circuit breakers, pattern detection, and stuck-agent analysis. You register each agent with thresholds, log actions as they happen, and call detect_loop or check_circuit_breaker before executing tools. It tracks the last 50 actions per agent, calculates diversity ratios, and flags exact repeats or low-progress patterns. When something goes wrong, get_stuck_report gives you token waste estimates and recovery suggestions. Useful when you're chaining LLM calls and need automatic intervention before an agent burns through your budget repeating the same failed action. Runs via stdio, integrates with Claude Desktop in one config block.

tools
7
transport
STDIO
last updated
Apr 24, 2026

Tools

7 tools

Public tool metadata for what this MCP can expose to an agent.

register_agentRegister an agent for monitoring.

Register an agent for monitoring.

No parameter schema in public metadata yet.

log_actionLog an agent action for loop detection. Maintains a rolling window of the last 50 actions.

Log an agent action for loop detection. Maintains a rolling window of the last 50 actions.

No parameter schema in public metadata yet.

detect_loopCheck if an agent is stuck in an infinite loop.

Check if an agent is stuck in an infinite loop.

No parameter schema in public metadata yet.

set_circuit_breakerConfigure automatic intervention when action patterns repeat.

Configure automatic intervention when action patterns repeat.

No parameter schema in public metadata yet.

check_circuit_breakerPre-flight check before executing a tool. Call this BEFORE the actual tool call.

Pre-flight check before executing a tool. Call this BEFORE the actual tool call.

No parameter schema in public metadata yet.

get_stuck_reportDetailed analysis of why an agent is stuck.

Detailed analysis of why an agent is stuck.

No parameter schema in public metadata yet.

get_health_dashboardOverview of all monitored agents. No parameters.

Overview of all monitored agents. No parameters.

No parameter schema in public metadata yet.

Sponsors

Readme

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.

ParamTypeDefaultDescription
agent_idstringrequiredUnique agent identifier
max_iterationsnumber100Max iterations before forced stop
progress_thresholdnumber0.3Min 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.


View the full README on GitHub

Details

Repository
github.com/mdfifty50-boop/agent-guard-mcp
Category
AI & LLM Tools
Package
agent-guard-mcp
Transport
STDIO
Registry
MCP registry, active

More from mdfifty50-boop

Related AI & LLM Tools MCP servers

View all
1mdfifty50-boop avatarAgent Securitymdfifty50-boop/agent-security-mcpSecurity scanning and threat detection for AI agents0stars
2qmediat avatarGemini Code Context Mcpqmediat/gemini-code-context-mcpCodebase Q&A for Claude Code through Gemini's 1M-token window, with workspace scans and caching.0stars
3arben-adm avatarSequential Thinking Working Notesarben-adm/mcp-sequential-thinkingLocal working notes, decisions, evidence and resumable sessions with SQLite persistence.960stars
4varun29ankus avatarShodh Memoryvarun29ankus/shodh-memoryCognitive memory for AI agents — semantic search, Hebbian learning, knowledge graphs.217stars
5googlecloudplatform avatarGemini Cloud Assist Mcpgooglecloudplatform/gemini-cloud-assist-mcpMCP Server for understanding, managing & troubleshooting your GCP environment.63stars
6houtini-ai avatarGeminihoutini-ai/gemini-mcpModel Context Protocol server for Google Gemini AI with chat, research, and grounding34stars