AIM-Guard-MCP

AIM-Guard-MCP

A Model Context Protocol (MCP) server that provides AI-powered security analysis and safety instruction tools. This server helps protect AI agents by providing security guidelines, content analysis, and cautionary instructions when interacting with various MCPs and external services.

Category
访问服务器

Tools

ai-safety-guard

AI Safety Guard - MCP Caution Instructions for AI Agents

aim-text-guard

AIM-Intelligence Text Guard Tool

aim-security-prompt-tool

Security Prompt Enhancement Tool

README

AIM Guard MCP

NPM Version Smithery Server

🛡️ AIM MCP Server :: Guard and Protect your MCPs & AI Agents

A Model Context Protocol (MCP) server that provides AI-powered security analysis and safety instruction tools. This server helps protect AI agents by providing security guidelines, content analysis, and cautionary instructions when interacting with various MCPs and external services.

Features

  • 🛡️ AI Safety Guard: Provides contextual security instructions and precautions for AI Agents before MCP interactions
  • 🔍 Text Guard Analysis: Analyze text content for harmful or inappropriate content using AIM Intelligence API
  • 🔒 Security Prompt Enhancement: Add security instructions to user prompts for safer AI interactions
  • Fast & Lightweight: Built with TypeScript and Zod validation
  • 🔧 Easy Integration: Works with any MCP-compatible AI assistant
  • 🔗 API Integration: Connects to AIM Intelligence API for advanced content analysis

Installation

NPX (Recommended)

npx aim-guard-mcp

Global Installation

npm install -g aim-guard-mcp
aim-guard-mcp

Local Installation

npm install aim-guard-mcp

Usage

As MCP Server

Add to your MCP client configuration:

{
  "servers": {
    "aim-guard": {
      "type": "stdio",
      "command": "npx",
      "args": ["aim-guard-mcp"]
    }
  }
}

Testing the Tools

Test AI Safety Guard

# Get safety instructions for database operations
{
  "name": "ai-safety-guard",
  "arguments": {
    "mcp_type": "database",
    "operation_type": "query",
    "sensitivity_level": "confidential"
  }
}

Test Text Guard

# This will analyze the text for harmful content
{
  "name": "aim-text-guard",
  "arguments": {
    "text": "This is a sample text to analyze for safety."
  }
}

Test Security Prompt Enhancement

# Enhance a user prompt with security instructions
{
  "name": "aim-security-prompt-tool",
  "arguments": {
    "user_prompt": "Please help me with this task",
    "security_level": "strict"
  }
}

Available Tools

1. ai-safety-guard

Provides contextual security instructions and precautions for AI Agents before they interact with other MCPs.

{
  "name": "ai-safety-guard",
  "arguments": {
    "mcp_type": "email|slack|database|file|web|general", // Type of MCP being called
    "operation_type": "read|write|execute|delete|send|query", // Operation being performed
    "sensitivity_level": "public|internal|confidential|restricted" // Data sensitivity level
  }
}

Features:

  • Context-aware security guidelines based on MCP type
  • Operation-specific warnings and precautions
  • Sensitivity-level protocols and restrictions
  • Comprehensive checklists for safe MCP interactions
  • Red flag detection and abort recommendations

2. aim-text-guard

Analyze text content for harmful or inappropriate content using AIM Intelligence API.

{
  "name": "aim-text-guard",
  "arguments": {
    "text": "Text content to analyze for harmful content"
  }
}

Features:

  • Real-time content analysis
  • Harmful content detection
  • Detailed analysis results in JSON format
  • Error handling with informative messages
  • Timestamp tracking for analysis requests

3. aim-security-prompt-tool

Enhance user prompts with security instructions for safer AI interactions.

{
  "name": "aim-security-prompt-tool",
  "arguments": {
    "user_prompt": "Original user prompt to enhance",
    "security_level": "basic|standard|strict" // Optional, defaults to 'standard'
  }
}

Features:

  • Multi-level security enhancement (basic, standard, strict)
  • Comprehensive threat analysis instructions
  • Social engineering protection guidelines
  • Security policy compliance checks
  • Sanitization and validation requirements

Security Features

🛡️ AI Agent Protection

  • MCP Interaction Safety: Contextual guidelines for different MCP types
  • Operation Validation: Specific precautions for read/write/execute operations
  • Data Sensitivity Handling: Protocols based on data classification levels

🔍 Content Analysis

  • Real-time Threat Detection: Analyze content for harmful patterns
  • API-powered Analysis: Advanced AI-driven content safety assessment
  • Comprehensive Reporting: Detailed security analysis results

🔒 Prompt Security

  • Security-Enhanced Prompts: Add protective instructions to user prompts
  • Configurable Security Levels: Basic to strict security protocols
  • Threat Prevention: Proactive security measures in AI interactions

Development

# Clone the repository
git clone https://github.com/AIM-Intelligence/AIM-MCP.git
cd AIM-MCP

# Install dependencies
pnpm install

# Build the project
pnpm run build

# Run in development mode
pnpm run dev

# Run tests
pnpm test

Deployment

This project uses automated CI/CD pipeline for seamless deployment to NPM.

Automatic Deployment

When you push to the main branch, GitHub Actions will automatically:

  1. Build and Test: Compile TypeScript and run tests
  2. Version Check: Compare current version with published version
  3. Publish to NPM: Automatically publish if version has changed
  4. Create Release: Generate GitHub release with version tag

Manual Version Management

# Bump patch version (1.0.0 -> 1.0.1)
pnpm run release:patch

# Bump minor version (1.0.0 -> 1.1.0)
pnpm run release:minor

# Bump major version (1.0.0 -> 2.0.0)
pnpm run release:major

Setting up NPM Token

To enable automatic deployment, add your NPM token to GitHub Secrets:

  1. Go to npmjs.com and create an automation token
  2. In your GitHub repository, go to Settings > Secrets and variables > Actions
  3. Add a new secret named NPM_TOKEN with your NPM token value

Deployment Workflow

graph LR
    A[Push to main] --> B[GitHub Actions]
    B --> C[Build & Test]
    C --> D[Version Check]
    D --> E{Version Changed?}
    E -->|Yes| F[Publish to NPM]
    E -->|No| G[Skip Deployment]
    F --> H[Create GitHub Release]
    F --> I[Create Git Tag]

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the ISC License - see the LICENSE file for details.

Support


Made with ❤️ by AIM Intelligence

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选