AgentOps Guardian MCP

AgentOps Guardian MCP

An MCP server that provides on-demand safety for AI coding workflows, enabling inspection, review, checkpointing, and rollback of risky actions.

Category
访问服务器

README

AgentOps Guardian MCP

Capstone Summary

Track: Agents for Business
Problem: AI coding agents can make risky local changes without rollback.
Solution: MCP safety agent that reviews actions, checkpoints files, and restores workflow state.
Demo: guardian_run_workflow blocks unsafe writes, creates checkpoints, and guardian_restore_workflow restores files.
Course concepts: MCP, agent loop, skills/rules, security guardrails.

On-demand safety agent for AI coding workflows.

AgentOps Guardian MCP is a local-first Model Context Protocol server that helps developers inspect AI-agent workspaces, review risky actions, create rollback checkpoints, and restore files when an AI coding workflow goes wrong.

The project is designed for the Agents for Business track: it reduces the operational cost of using AI coding agents in real development teams.


Key Features

  • One-call agent workflow: guardian_run_workflow plans, inspects, scores, reviews a proposed action, checkpoints files, persists compact workflow state, and returns a compact decision.
  • Workflow rollback: guardian_restore_workflow restores all files checkpointed by a saved Guardian workflow.
  • Backup first: safe_checkpoint, restore_latest, and prepare_safe_edit remain direct recovery tools before risky edits.
  • Agent/MCP inspection: inspect_agent_environment_components reports local agents, MCP servers, skills, plugins, hooks, model providers, and app integrations.
  • Cheap by default: compact output, short in-memory inspector cache, no background daemon, no constant logging, and no automatic token-heavy summaries.
  • Security review: deterministic checks flag shell execution, file writes without approval, destructive commands, publishing commands, and secret-looking actions.

Architecture

The main loop is:

proposed action
  -> guardian_run_workflow
  -> plan
  -> inspect agent/MCP environment
  -> score and triage risks
  -> review proposed action
  -> create checkpoints
  -> persist workflow state
  -> return decision and next action

If the result is wrong:

guardian_restore_workflow(workflowId)
  -> read .agentops/workflows/<workflowId>.json
  -> restore all successful checkpoints

See docs/architecture.md for details.


Setup

Install dependencies and build:

npm install
npm run build

Run checks:

npm run check
npm test

Start the MCP server:

npm start

MCP Configuration Example

Use the built JavaScript entrypoint:

{
  "mcpServers": {
    "agentops-guardian": {
      "command": "node",
      "args": ["C:/absolute/path/to/agentops-guardian-mcp/dist/index.js"]
    }
  }
}

On Windows, use absolute paths and escape backslashes if your MCP host requires JSON escaping.


Main Tools

  • guardian_run_workflow — top-level agent workflow.
  • guardian_restore_workflow — restore all checkpointed files from a workflow.
  • safe_checkpoint — quick backup for one file.
  • restore_latest — restore the latest checkpoint for one file.
  • prepare_safe_edit — review an edit and checkpoint target files.
  • inspect_agent_environment_components — inspect local agent/MCP components.
  • score_agent_surface — compact risk score for the local agent surface.
  • triage_guardian_findings — group findings into must-fix, review, informational, and ignored buckets.
  • review_agent_action_plan — deterministic safety review for a proposed action.

Demo

Run the deterministic workflow demo:

npm run build
npm run demo:workflow

The demo creates a test file, proposes a risky shell action, runs the Guardian workflow, creates a checkpoint, persists workflow state, and returns needs_user_approval instead of executing the command.

For the live MCP test evidence, see docs/live-mcp-test.md.


Capstone Materials


Agent Instructions

To make another AI assistant use the Guardian workflow consistently, copy the relevant rules from AGENTS.md.example into that assistant's project rules file.

Recommended default:

Before risky file edits, call guardian_run_workflow.
Proceed only when the workflow decision is ready.
If the edit goes wrong, call guardian_restore_workflow with the workflowId.

Design Principles

  • Local-first.
  • On-demand only.
  • Deterministic checks before LLM interpretation.
  • Compact output by default.
  • No background monitoring.
  • No continuous event logging.
  • Rollback before risky action.

License

MIT. See LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选