home / mcp / impact preview mcp server

Impact Preview MCP Server

Provides an automatic approval workflow for AI agent actions by showing impact previews, diffs, and risk assessments with audit trails.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "agent-polis-impact-preview": {
      "url": "http://localhost:8000/mcp",
      "headers": {
        "LOG_LEVEL": "INFO",
        "REDIS_URL": "redis://localhost:6379/0",
        "SECRET_KEY": "your-secret-key",
        "DATABASE_URL": "postgresql+asyncpg://user:pass@host:5432/agent_polis",
        "FREE_TIER_ACTIONS_PER_MONTH": "100"
      }
    }
  }
}

Impact Preview for AI Agents provides a safe, auditable way to plan autonomous agent actions by showing exact diffs, risk assessments, and an audit trail before anything executes. You can use it to review and approve proposed actions, preventing unintended changes to production systems.

How to use

Connect an MCP client to the server to submit actions for approval. You will see an impact preview, including file diffs and risk assessments, and you can approve or reject actions before execution. The workflow is Submit β†’ Preview β†’ Approve/Reject β†’ Execute, with an audit trail of every step.

How to install

Prerequisites: Python 3.8+ and Docker (recommended for the server). You also need a client to communicate with the MCP server, or you can use the provided SDKs.

# Install the server via Docker (recommended)
docker-compose up -d

# Or install locally (Python)
pip install impact-preview
impact-preview

Configuration and usage notes

To run the server locally and connect a client, ensure you provide the required environment variables and start the server. The Quick Start example includes a local HTTP endpoint at http://localhost:8000/mcp and a local CLI for rapid testing. You can also run the server through Docker with a preconfigured docker-compose setup.

Available tools

preview_file_write

Shows the diff and impact preview before writing content to a file

preview_file_delete

Shows what would be deleted when removing a file

preview_shell_command

Flags dangerous shell commands and highlights potentially harmful actions

check_path_risk

Performs a quick risk assessment for a given file path