π‘οΈ 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.
- π‘οΈ 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
npx aim-guard-mcp
npm install -g aim-guard-mcp
aim-guard-mcp
npm install aim-guard-mcp
Add to your MCP client configuration:
{
"servers": {
"aim-guard": {
"type": "stdio",
"command": "npx",
"args": ["aim-guard-mcp"]
}
}
}
# Get safety instructions for database operations
{
"name": "ai-safety-guard",
"arguments": {
"mcp_type": "database",
"operation_type": "query",
"sensitivity_level": "confidential"
}
}
# This will analyze the text for harmful content
{
"name": "aim-text-guard",
"arguments": {
"text": "This is a sample text to analyze for safety."
}
}
# Enhance a user prompt with security instructions
{
"name": "aim-security-prompt-tool",
"arguments": {
"user_prompt": "Please help me with this task",
"security_level": "strict"
}
}
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
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
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
- 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
- Real-time Threat Detection: Analyze content for harmful patterns
- API-powered Analysis: Advanced AI-driven content safety assessment
- Comprehensive Reporting: Detailed security analysis results
- 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
# 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
This project uses automated CI/CD pipeline for seamless deployment to NPM.
When you push to the main
branch, GitHub Actions will automatically:
- Build and Test: Compile TypeScript and run tests
- Version Check: Compare current version with published version
- Publish to NPM: Automatically publish if version has changed
- Create Release: Generate GitHub release with version tag
# 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
To enable automatic deployment, add your NPM token to GitHub Secrets:
- Go to npmjs.com and create an automation token
- In your GitHub repository, go to Settings > Secrets and variables > Actions
- Add a new secret named
NPM_TOKEN
with your NPM token value
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]
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the ISC License - see the LICENSE file for details.
- π§ Email: support@aim-intelligence.com
- π Issues: GitHub Issues
- π Documentation: GitHub Wiki
Made with β€οΈ by AIM Intelligence