🛡️ AIM MCP 服务器 :: 守护并保护您的 MCP 和 AI 代理
这是一个提供 AI 驱动的安全分析和安全指导工具的 Model Context Protocol (MCP) 服务器。该服务器通过提供安全指南、内容分析和交互时的警示指令来帮助保护 AI 代理。
<a href="https://glama.ai/mcp/servers/@AIM-Intelligence/AIM-MCP"> <img width="380" height="200" src="https://gips2.baidu.com/it/u=2312019609,1146223728&fm=3081&app=3081&f=PNG?w=760&h=400" alt="AIM-Guard-MCP MCP 服务器" /> </a>要通过 Smithery 自动安装 aim-mcp 到 Claude Desktop:
npx -y @smithery/cli install @AIM-Intelligence/aim-mcp --client claude
npx aim-guard-mcp
npm install -g aim-guard-mcp
aim-guard-mcp
npm install aim-guard-mcp
在您的 MCP 客户端配置中添加:
{
"servers": {
"aim-guard": {
"type": "stdio",
"command": "npx",
"args": ["aim-guard-mcp"]
}
}
}
# 获取数据库操作的安全指令
{
"name": "ai-safety-guard",
"arguments": {
"mcp_type": "database",
"operation_type": "query",
"sensitivity_level": "confidential"
}
}
# 分析文本中的有害内容
{
"name": "aim-text-guard",
"arguments": {
"text": "这是用于安全分析的样本文本。"
}
}
# 增强用户提示的安全指令
{
"name": "aim-security-prompt-tool",
"arguments": {
"user_prompt": "请帮我完成这个任务",
"security_level": "strict"
}
}
ai-safety-guard为 AI 代理在与其他 MCP 交互之前提供情境安全指令和预防措施。
{
"name": "ai-safety-guard",
"arguments": {
"mcp_type": "email|slack|database|file|web|general",
"operation_type": "read|write|execute|delete|send|query",
"sensitivity_level": "public|internal|confidential|restricted"
}
}
功能:情境感知指南、操作特定警告、红旗检测
aim-text-guard使用 AIM Intelligence API 分析文本内容是否存在有害或不适当的内容。
{
"name": "aim-text-guard",
"arguments": {
"text": "要分析的文本内容"
}
}
功能:实时分析、有害内容检测、详细的 JSON 结果
aim-security-prompt-tool增强用户提示以实现更安全的 AI 交互。
{
"name": "aim-security-prompt-tool",
"arguments": {
"user_prompt": "原始用户提示",
"security_level": "basic|standard|strict"
}
}
功能:多层次增强、威胁分析、社会工程防护
prompt-injection-detector 🆕根据 OWASP LLM01:2025 模式检测提示注入尝试。
{
"name": "prompt-injection-detector",
"arguments": {
"text": "要分析注入模式的文本",
"sensitivity": "low|medium|high"
}
}
功能:
credential-scanner 🆕扫描文本中暴露的凭证,包括 API 密钥、密码、令牌和 SSH 密钥。
{
"name": "credential-scanner",
"arguments": {
"text": "要扫描凭证的文本",
"mask_findings": true
}
}
功能:
url-security-validator 🆕验证 URL 的安全性,防止钓鱼、恶意软件和其他安全问题。
{
"name": "url-security-validator",
"arguments": {
"url": "要验证的 URL",
"strict_mode": false
}
}
功能:
资源提供了可通过 URI 方案访问的只读安全文档和策略。
通过 security-checklist://[type] 访问
security-checklist://database - 数据库操作检查表security-checklist://email - 电子邮件操作检查表security-checklist://slack - 聊天/消息操作检查表security-checklist://file - 文件操作检查表security-checklist://web - Web 请求检查表security-checklist://general - 通用 MCP 操作检查表每个检查表包含:
通过 security-policy://[type] 访问
security-policy://data-classification - 数据分类级别和处理要求security-policy://access-control - 访问控制原则和身份验证要求security-policy://incident-response - 事件响应程序和严重程度提示提供了复杂安全操作的可重用工作流模板。
security-review对代码、数据或配置进行全面的安全审查工作流。
{
"name": "security-review",
"arguments": {
"target_type": "code|data|configuration",
"context": "附加上下文(可选)"
}
}
工作流:
总结输出示例:
📊 摘要
| 严重性 | 数量 | 文件/位置 |
|------------|----|------------------------|
| 🔴 CRITICAL | 1 | resources/handler.ts |
| 🟠 HIGH | 2 | textGuard.ts |
| 🟡 MEDIUM | 3 | prompts/handler.ts |
| 🟢 LOW | 5 | credentialScanner.ts |
threat-analysis使用 STRIDE 方法论分析潜在的安全威胁。
{
"name": "threat-analysis",
"arguments": {
"scenario": "要分析的安全场景",
"sensitivity_level": "public|internal|confidential|restricted"
}
}
框架:
总结输出示例:
📊 摘要
| 严重性 | 数量 | 威胁类型 |
|------------|----|---------------------------------|
| 🔴 CRITICAL | 2 | 信息披露、冒充 |
| 🟠 HIGH | 1 | 权限提升 |
| 🟡 MEDIUM | 3 | 篡改、拒绝服务 |
| 🟢 LOW | 1 | 抵赖 |
# 克隆仓库
git clone https://github.com/AIM-Intelligence/AIM-MCP.git
cd AIM-MCP
# 安装依赖
pnpm install
# 构建项目
pnpm run build
# 在开发模式下运行
pnpm run dev
# 运行测试
pnpm test
此项目使用自动化的 CI/CD 管道无缝部署到 NPM。
当您推送至 main 分支时,GitHub Actions 将自动:
# 提高补丁版本(1.0.0 -> 1.0.1)
pnpm run release:patch
# 提高次要版本(1.0.0 -> 1.1.0)
pnpm run release:minor
# 提高主要版本(1.0.0 -> 2.0.0)
pnpm run release:major
为了启用自动部署,请将您的 NPM 令牌添加到 GitHub Secrets:
NPM_TOKEN 的新密钥,并填写您的 NPM 令牌值graph LR
A[推送到 main] --> B[GitHub Actions]
B --> C[构建 & 测试]
C --> D[版本检查]
D --> E{版本更改?}
E -->|是| F[发布到 NPM]
E -->|否| G[跳过部署]
F --> H[创建 GitHub 发行版]
F --> I[创建 Git 标签]
git checkout -b feature/amazing-feature)git commit -m '添加一些惊人的功能')git push origin feature/amazing-feature)本项目采用 ISC 许可证 - 详情见 LICENSE 文件。
由 AIM Intelligence 制作 ❤️