合规扫描MCP服务器

AIVory Guard 是一个 MCP 服务器,为 AI 编程助手提供实时代码合规与安全扫描。

  • by aivorynet
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 aivorynet/aivory-guard

使用说明

AIVory Guard

AI-Powered Compliance Scanning for Your Coding Assistant

AIVory Guard is an MCP (Model Context Protocol) server that enables AI coding assistants like Claude Code, Cursor, and Windsurf to perform real-time compliance and security scanning during code generation.

Features

  • Real-time Security Scanning - Catch vulnerabilities as code is generated
  • 15+ Compliance Standards - OWASP, GDPR, HIPAA, PCI-DSS, SOC2, ISO27001, and more
  • AI-Powered Analysis - Deep learning models detect complex security issues
  • Fast Integration - 5-minute setup with any MCP-compatible AI agent
  • Zero False Positives - AI analysis reduces noise vs. traditional static analysis

Quick Start

Prerequisites

  • Node.js 18+ installed
  • AIVory backend running (see Backend Setup)
  • API token from AIVory

Installation

# Install globally
npm install -g @aivorynet/guard

# Or use npx (no install needed)
npx @aivorynet/guard init

Configuration

# Run interactive setup wizard
npx @aivorynet/guard init

# Test the connection
npx @aivorynet/guard test

Connect to AI Agent

Claude Code (~/.config/claude/mcp.json):

{
  "mcpServers": {
    "aivory": {
      "command": "npx",
      "args": ["@aivorynet/guard"],
      "env": {
        "AIVORY_API_KEY": "your_api_key_here"
      }
    }
  }
}

Cursor (.cursor/mcp.json):

{
  "mcpServers": {
    "aivory": {
      "command": "npx",
      "args": ["--yes", "@aivorynet/guard"]
    }
  }
}

Usage

Once configured, your AI coding assistant will automatically scan code for compliance issues:

You: "Write a user authentication function in Java"

AI: [Generates code and uses AIVory Guard to scan it]

AI: "I've created the authentication function with BCrypt password hashing
     and rate limiting. The compliance scan found 0 violations - the code
     meets OWASP and GDPR standards!"

Available Tools

AIVory Guard exposes 5 MCP tools to AI agents:

  • scan_code - Scan a single file for compliance violations
  • batch_scan - Scan multiple files efficiently
  • get_config - Get current compliance configuration
  • get_rules - List available compliance rules
  • health_check - Verify backend connectivity

Backend Setup

AIVory Guard requires the AIVory Python backend to be running:

cd /path/to/aivory-backend
python main.py

The backend runs on http://localhost:19999 by default.

Get API Token

  1. Open http://localhost:19999/mcp-docs
  2. Fill in the "Generate API Token" form
  3. Copy the generated token
  4. Run npx @aivorynet/guard init and paste the token

Testing

Test your setup:

npx @aivorynet/guard test

Expected output:

✅ Configuration loaded
✅ Backend is healthy
✅ Compliance scan completed

✅ All tests passed!

Documentation

Support

  • Issues: https://github.com/aivorynet/aivory-guard/-/issues
  • Email: support@aivory.net
  • Website: https://aivory.net

Acknowledgments

Built with:


Made with ❤️ by AIVory