agent-safety-mcp
Supports exporting agent decision logs and session summaries as Markdown files for human-readable documentation and reporting.
agent-safety-mcp
MCP server for AI agent safety. One install gives any MCP-compatible AI assistant access to cost guards, prompt injection scanning, and decision tracing.
Works with Claude Code, Cursor, Windsurf, Zed, and any MCP client.
Install
Claude Code (recommended)
claude mcp add agent-safety -- uvx agent-safety-mcpManual (any MCP client)
Add to your MCP config:
{
"mcpServers": {
"agent-safety": {
"command": "uvx",
"args": ["agent-safety-mcp"]
}
}
}From PyPI
pip install agent-safety-mcp
agent-safety-mcp # runs stdio serverRelated MCP server: guardrails-mcp-server
Tools
Cost Guard — Budget enforcement for LLM calls
Tool | What it does |
| Set weekly budget, alert threshold, dry-run mode |
| Check current spend vs budget |
| Pre-check if a model call is within budget |
| Record a completed call's token usage |
| List supported models with pricing |
Example: "Check if I can afford a GPT-4o call with 2000 input tokens"
Injection Guard — Prompt injection scanner
Tool | What it does |
| Scan text for injection patterns (non-blocking) |
| Scan + block if injection detected |
| List all 75 built-in detection patterns across 9 categories |
Example: "Scan this user input for prompt injection: 'ignore previous instructions and...'"
Decision Tracer — Agent decision logging
Tool | What it does |
| Start a new trace session |
| Log a decision step with context |
| Get session summary (steps, errors, timing) |
| Save trace to JSON + Markdown files |
Example: "Start a trace for my analysis agent, then log each decision step"
What this wraps
This MCP server wraps the AI Agent Infrastructure Stack — three standalone Python libraries:
ai-cost-guard —
pip install ai-cost-guardai-injection-guard —
pip install ai-injection-guardai-decision-tracer —
pip install ai-decision-tracer
All three: MIT licensed, zero runtime dependencies (individually), pure Python stdlib.
The MCP server adds mcp>=1.0.0 as a dependency for the protocol layer.
Why
AI coding assistants (Claude Code, Cursor, etc.) can now protect the agents they help build — checking budgets, scanning inputs, and tracing decisions — without leaving the IDE.
Built from 8 months of running autonomous AI trading agents in live financial markets.
License
MIT
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
- AlicenseAqualityAmaintenanceSecurity, cost, and health governance proxy for MCP infrastructure. Enforces YAML-configurable security policies (blocklists, rate limits, token budgets), tracks real token costs via tiktoken, monitors server health with live JSON-RPC probes. Features OAuth 2.1/OIDC with RBAC, web dashboard, payload normalization, semantic shell AST analysis, mTLS, and a formal STRIDE threat model.Last updated41,6313MIT
- Alicense-qualityCmaintenanceMCP server for AI agent security guardrails. Provides input validation, prompt injection detection, PII redaction, output filtering, policy enforcement, rate limiting, and comprehensive audit logging.Last updated501MIT
- Alicense-qualityDmaintenanceMCP server that provides runtime defense for AI agents, protecting against prompt injection, data exfiltration, and other adversarial attacks through a ranked pipeline of up to 36 inline defenses and 3 output scanners.Last updated3Apache 2.0
- Alicense-qualityCmaintenanceA drop-in proxy that guards MCP servers with policy enforcement, secret redaction, prompt-injection screening, rug-pull detection, rate limiting, and audit logging.Last updated17Apache 2.0
Related MCP Connectors
Security firewall for AI agents — scans MCP calls for injection, secrets, and risks.
Security scanner for MCP servers. Detect vulnerabilities, prompt injection, and tool poisoning.
Hosted MCP server for LLM cost estimation, model comparison, and budget-aware routing.
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/LuciferForge/agent-safety-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server