Agentguard47 MCP server
io.github.bmdhodl/agentguard47·v0.2.2·4 starsRead-only MCP server for coding-agent traces, alerts, costs, usage, and budget health.
4 stars33 downloads/wk
Reviews
Write oneNobody has reviewed Agentguard47 yet.
If you have run it, two minutes of your experience saves the next person an afternoon.
Agentguard47 tools (7)
write = sends, deletes, buys or postsRead from the package source without running it. The installed server may list more.
check_budgetQuick pass/fail budget health check. Combines usage quota and cost data
get_alertsGet recent guard alerts (loop detection, budget exceeded) and errors.
get_costsGet cost breakdown for the current month: total spend, cost by model,
get_traceGet the full event tree for a specific trace by its trace ID.
get_trace_decisionsExtract normalized decision.* events from one trace.
get_usageCheck your current event quota usage and plan limits.
query_tracesSearch recent traces from your AgentGuard-instrumented agents.
Public scan report
scanner v0.1.9 · 2026-09-27 · same rubric, same numbers if you re-run it
- Code scan11 source files scanned25/25
- –Live reliabilityno gateway calls yet and no remote to proben/a
- –Tool poisoningtools not inspected (local package is not executed); not countedn/a
- Auth qualitystatic API keys via environment variables6/15
- Maintenancelast push 0 days ago15/15
- Maintainer identityregistry namespace matches repository owner; GitHub account older than a year8/10
How Agentguard47 compares
Against every graded AI and agents MCP server, from our own scans and uptime checks. Updated after each scan run.
- Safety score
- 83/100
- higher than 68% of 4,460 AI and agents servers
- Tools
- 7
- the typical AI and agents server has 6
- Tools that change things
- 0%
- typical: 0%. Fewer write tools means less an agent can break
- GitHub stars
- 4
- more than 77% of 2,711 AI and agents servers
- Downloads a week
- 33
- more than 22% of 1,538 AI and agents servers with a package
What its tools let an agent do: 7 read
Install Agentguard47 in Claude Code, Cursor or VS Code
Runs npx -y @agentguard47/mcp-server on your machine. Read the scan report first; the gateway never runs local packages.
claude mcp add agentguard47 -- npx -y @agentguard47/mcp-server
What the publisher says
From the Agentguard47 repository's README, as published. We do not edit it. Read it on GitHub
AgentGuard
Stop runaway agents with runtime checks in Python.
AgentGuard checks budgets, repeated tool calls, retries, and elapsed time in instrumented Python code. Guards raise exceptions so your application can stop the next operation. The base SDK has no runtime dependencies and needs no account.
Names: this repository is agent47, the PyPI package is agentguard47, and the Python import is agentguard. Requires Python 3.9 or newer.
Getting started
Install in a virtual environment, then run the offline checks:
python -m pip install agentguard47
agentguard doctor
agentguard demodoctor checks the installation and local trace writing. demo exercises budget, loop, and retry stops without provider keys or network access. Follow the trace path printed by the command to inspect its output. agentguard demo --feedback prints a local redacted report; nothing is sent.
agentguard receipt agentguarddemotraces.jsonl prints a receipt of each stop with the trace's SHA-256 drawn as a barcode. Add --format markdown to paste it into a PR or issue. The hash identifies the trace file; it is not a signature.
Guard a Claude Code session
agentguard hook claude-code --install --writeThis installs a Claude Code hook that refuses the third identical tool call in a row and a call that already failed twice. Refusals go to .agentguard/claude-code/trace.jsonl. It checks tool calls, not tokens or subscription quota. See the Claude Code hook guide.
Guard a script without editing it
agentguard run --budget-usd 5 agent.pyThis patches the OpenAI and Anthropic clients, then runs agent.py in the same interpreter. Settings come from flags, then environment variables, then .agentguard.json. A guard stop exits 1. Every run ends with the trace path on stderr, ready for agentguard receipt. agentguard run python -m mypkg works too. The bounds are the same as patching the client yourself; see enforcement boundary.
Stop before a third call
Save this as budgetdemo.py and run python budgetdemo.py. It makes no network requests.
from agentguard import BudgetExceeded, BudgetGuard
budget = BudgetGuard(max_calls=2)
completed = 0
for _ in range(3):
try:
budget.check() # Check before the operation.
# Put your provider or tool call here.
completed += 1
budget.consume(calls=1) # Record the completed operation.
except BudgetExceeded:
print(f"Stopped before call {completed + 1}")
assert completed == 2Expected output: Stopped before call 3.
Connect a provider
Install the provider's client separately. For OpenAI:
python -m pip install openaifrom agentguard import BudgetGuard, JsonlFileSink, Tracer, patch_openai
budget = BudgetGuard(max_cost_usd=5.00)
tracer = Tracer(
service="my-agent",
sink=JsonlFileSink(".agentguard/traces.jsonl"),
)
patch_openai(tracer, budget_guard=budget)
# Make your OpenAI chat.completions.create or responses.create calls after this setup.The patch checks recorded usage before dispatch and records response usage afterward, including streamed calls once the final usage arrives. A response can exceed the remaining cost or token allowance. Concurrent requests do not reserve capacity. Chat Completions streams request include_usage unless the caller already set it.
Shortened. The full README is on GitHub.
Nothing above is checked by us. What we check is on the safety report.
Agentguard47: common questions
- Is Agentguard47 MCP server safe?
- Mostly: it is graded B (83/100). Read the Agentguard47 safety report
- How do I install Agentguard47?
- It runs on your machine. Copy the Claude Code, Cursor, VS Code or Claude Desktop config from the install section.
- Does Agentguard47 need an API key?
- Yes. The registry entry asks for
AGENTGUARD_API_KEY. - Is Agentguard47 maintained?
- The last commit was 38 days ago (2026-09-27). The latest release is v0.2.2.
- What can I use instead of Agentguard47?
- Servers from other publishers that do the same job: Serena MCP: the IDE for your agent MCP server, Figma Context MCP server and SuperCompress MCP server.
- How does Agentguard47 compare with other AI and agents MCP servers?
- safety score 83/100 (higher than 68% of 4,460 AI and agents servers); tools 7 (the typical AI and agents server has 6); tools that change things 0% (typical: 0%. Fewer write tools means less an agent can break). Full comparison.
Alternatives to Agentguard47
Same job from other publishers: the closest match first, then the best rated.
- Serena MCP: the IDE for your agentA powerful toolkit for coding, providing semantic retrieval and editing capabilities.not reviewedWidely usedC
- Figma ContextGive your coding agent access to your Figma data. Implement designs in any framework in one-shot.not reviewedWidely usedB
- SuperCompressCompress coding-agent context ~64%. Hosted Neural Keep MCP for Cursor/Claude/Codex.not reviewedEstablishedB
- Actual Budget MCP ServerMCP server exposing Actual Budget accounts, transactions, budgets and reporting to LLM assistants.not reviewedEstablishedB
- OpenWorkProofVerifiable agent evidence; opt-in Codex guard and reference SOC alert review.not reviewedEstablishedA