Token导航 LogoToken导航TokenDH.com
Security Infrastructure MCP Server logo
安全风控stdio官方级别未说明来源级核验

Security Infrastructure MCP Server

MCP Server

一套安全加固的企业级MCP服务器实现,用于安全平台集成,提供全面的安全功能和防护措施。

工具数

0

提示词数

0

GitHub Stars

21

资源数

0
安全PythonClaudeClaude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

jmstar85

提供方

jmstar85

最后核验

2026/5/17 20:21

运行时

Python

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements.txt

详细介绍

安全基础架构MCP服务器

全面收集 安全 MCP(模型上下文协议)服务器实现,用于安全平台与企业级安全强化的集成。

🛡️ 安全第一设计

该项目经过了全面的安全强化,以解决关键漏洞并实施安全最佳实践:

安全改进(最新更新)

  • 🔴 高严重性修复:

- 通过查询净化和危险命令阻止防止SPL注射 - 使用debvedxml进行安全的XML解析以防止XXE攻击 - 从所有配置文件中完全删除硬编码凭据

  • 🟡 中等严重性修复:

- 针对所有API通信,强制使用TLS 1.2+和强密码套件 - 跨所有服务器的全面输入验证和净化 - 预防命令执行风险和注入攻击 - 错误消息清理以防止信息泄露

  • 🔵 附加安全功能:

- 通过模式匹配预防FQL/SPL注入攻击 - SSL证书验证实施 - API响应的数据净化 - 使用安全占位符保护配置模板 - 全面的.gitignore,防止凭证暴露

🔒 安全文档

安全.md 了解全面的安全指南、配置最佳实践和漏洞报告程序。

🔐 支持的平台

Splunk SIEM

  • 安全SPL查询执行:执行带有防注入功能的搜索处理语言查询
  • 事件搜索:使用经过净化的筛选在所有索引中搜索安全事件
  • 基于时间的分析:验证的时间范围和自定义时间窗口
  • 异步作业管理:通过安全的结果检索创建和监视搜索作业
  • JSON结果格式:具有敏感数据过滤功能的结构化输出

CrowdStrike EDR

  • 安全检测搜索:使用经过验证的FQL(Falcon查询语言)进行查询检测
  • 检测详细信息:检索经过净化的检测摘要和元数据
  • OAuth 2.0身份验证:通过正确的令牌管理确保API访问安全
  • 输入验证:全面的参数验证和白名单
  • 实时威胁数据:通过安全过滤访问最新的端点检测数据

微软MISP

  • 事件搜索:通过输入净化和验证查询MISP事件
  • IOC属性搜索:使用XSS和注射预防搜索指标
  • 多格式支持:通过内容验证处理各种IOC类型
  • SSL安全:带有安全警告的强制证书验证
  • RESTful API集成:通过错误清除来确保对MISP REST API的安全支持

🚀 快速开始

安装

# 1. Clone the repository
git clone https://github.com/jmstar85/SecurityInfrastructure.git
cd SecurityInfrastructure

# 2. Install secure dependencies
pip install -r requirements.txt

# 3. Configure credentials securely
cp .env.example .env
# Edit .env with your platform credentials (see security guidelines)

# 4. Add to Claude Desktop configuration
# Copy config-example.json content to your Claude Desktop config
# Location: ~/Library/Application Support/Claude/claude_desktop_config.json (macOS)
# Update paths and environment variables with your secure values

安全配置

# Verify configuration security
python -c "
import json
with open('.env', 'r') as f:
    content = f.read()
    if 'REPLACE_WITH_YOUR' in content:
        print('⚠️  Please update placeholder credentials in .env')
    else:
        print('✅ Configuration appears to be customized')
"

# Test server security
python src/splunk_server.py        # Runs on localhost:8080
python src/crowdstrike_server.py   # Runs on localhost:8081  
python src/misp_server.py          # Runs on localhost:8082

🔧 MCP服务器工具

Splunk SIEM工具(安全强化)

  • search-events:执行经过消毒的SPL查询,防止注射
  # Example: Secure search for failed login attempts
  query = "index=security sourcetype=auth action=failure"  # Automatically sanitized
  earliest_time = "-24h"  # Validated time format

CrowdStrike EDR工具(增强安全性)

  • search-detections:使用FQL验证和白名单进行查询检测
  # Example: Secure search for high severity detections
  filter_query = "max_severity:'high'"  # Validated against injection patterns
  sort = "created_timestamp.desc"  # Whitelisted sort options only

MISP工具(安全强化)

  • search-events:通过输入净化查询威胁情报
  • search-attributes:使用XSS和注射预防搜索IOC
  # Example: Secure search for IP-based IOCs
  type = "ip-dst"  # Input sanitized and validated
  category = "Network activity"  # Content filtered for safety

📁 优化项目结构

SecurityInfrastructure/
├── src/                    # Secure MCP server implementations
│   ├── splunk_server.py    # Splunk SIEM integration (hardened)
│   ├── crowdstrike_server.py # CrowdStrike EDR integration (hardened)
│   └── misp_server.py      # Microsoft MISP integration (hardened)
├── config/                 # Secure configuration templates
│   ├── mcp-settings.json   # MCP client configuration (sanitized)
│   └── splunk.yaml         # Splunk configuration template
├── tests/                  # Security validation tests
├── SECURITY.md             # Security guidelines and best practices
├── config-example.json     # Safe configuration template
├── .env.example            # Environment variables template (secure)
├── .gitignore              # Comprehensive credential protection
├── requirements.txt        # Minimal secure dependencies
├── INSTALLATION.md         # Detailed setup guide
├── setup-guide.md          # Quick setup templates
└── docker-compose.yml      # Container configuration

注: 前端组件、不必要的Node.js文件和开发工件已被删除,以最大限度地减少攻击面并优化安全态势。

🔧 安全MCP客户端配置

Claude桌面设置(安全)

配置文件位置:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • 窗户: %APPDATA%\Claude\claude_desktop_config.json

安全配置模板:

{
  "mcpServers": {
    "security-infrastructure-splunk": {
      "command": "python",
      "args": ["/FULL/PATH/TO/SecurityInfrastructure/src/splunk_server.py"],
      "env": {
        "SPLUNK_HOST": "REPLACE_WITH_YOUR_SPLUNK_HOST",
        "SPLUNK_TOKEN": "REPLACE_WITH_YOUR_API_TOKEN",
        "SPLUNK_VERIFY_SSL": "true"
      }
    }
  }
}

⚠️ 安全说明: 切勿将真实凭据提交给版本控制。使用提供的模板,用实际值替换占位符。

💻 安全使用示例

一旦安全地配置了Claude Desktop,您就可以使用自然语言与您的安全平台进行交互:

Splunk SIEM查询(注射安全)

"Search for failed SSH login attempts in the last 6 hours"
"Find all authentication events from IP 192.168.1.100"  
"Show me high priority security alerts from yesterday"
"Search for events in the security index containing 'malware'"

CrowdStrike EDR查询(已验证)

"Show me all high severity detections from today"
"Find endpoint detections with behavior patterns"
"List recent detections sorted by creation time"
"Search for detections on specific hostnames"

MISP威胁情报(山宁泰)

"Search for events related to specific threat actors"
"Find all IP address indicators of compromise"
"Look up domain indicators from the last week"
"Search for published threat intelligence events about phishing"

🛠️ 安全特性

核心安全实施

  • 输入验证:对所有用户输入进行全面消毒和验证
  • 预防注射:防止SPL、FQL、SQL和XSS注入攻击
  • 安全通信:强制使用强密码套件的HTTPS/TLS 1.2+
  • 错误清理:防止信息泄露的通用错误消息
  • 身份验证安全:通过适当的验证进行安全的令牌/凭证处理

安全架构

  • 多种身份验证方法:基于会话、基于令牌和OAuth 2.0,具有安全默认值
  • SSL/TLS实施:所有连接的强制性证书验证
  • API安全:速率限制、超时强制和连接池限制
  • 配置安全:安全模板、凭证屏蔽和.gitignore保护

数据保护

  • 输出消毒:从API响应中删除敏感字段
  • 凭证管理:没有硬编码的秘密,环境变量保护
  • 日志安全:日志和审计跟踪中的敏感数据过滤
  • 会话管理:适当的令牌过期和安全存储

📋 需求

  • Python 3.11+
  • 安全平台的安全访问凭据(正确配置)
  • MCP兼容客户端(建议使用Claude Desktop)
  • 用于生产部署的SSL/TLS证书

🔐 安全凭据管理

Splunk SIEM(安全设置)

  • API代币 (强烈推荐)具有最低限度的所需权限
  • HTTPS端点 需要验证
  • 搜索权限 仅限于必要的索引

CrowdStrike EDR(安全设置)

  • 客户端ID客户端密钥 遵循最小特权原则
  • API权限:检测(READ),有限范围
  • 基本URL 验证和HTTPS实施

Microsoft MISP(安全设置)

  • API密钥 尽可能使用只读权限
  • MISP实例URL 使用SSL证书验证
  • 超时设置 已配置为安全

🧪 安全验证

该项目包括全面的安全验证:

# Run security validation tests
python -m pytest tests/ -v

# Validate configuration security
python -c "
import os
config_files = ['.env', 'config/mcp-settings.json']
for f in config_files:
    if os.path.exists(f):
        with open(f) as file:
            content = file.read()
            if 'REPLACE_WITH_YOUR' in content:
                print(f'⚠️  {f} contains placeholder credentials')
            else:
                print(f'✅ {f} appears configured')
"

📊 信息系统安全度量

  • 漏洞状态:所有严重程度高和中等的问题均已解决
  • 安全保障83%的安全验证测试通过
  • 代码质量:全面的输入验证和错误处理
  • 攻击面:通过组件移除和优化实现最小化

🤝 贡献

  1. 复刻仓库
  2. 创建要素分支(git checkout -b feature/security-enhancement)
  3. 遵循安全指南 安全.md
  4. 为新功能添加安全测试
  5. 提交安全验证(git commit -am 'Add secure feature')
  6. 推到分支(git push origin feature/security-enhancement)
  7. 使用安全审查清单创建Pull Request

📄 许可证

该项目用于安全研究和教育目的,重点是安全实施实践。

🔗 安全资源

🚨 安全报告

如果您发现安全漏洞,请:

  1. 不要 制造公共问题
  2. 将安全详细信息通过电子邮件发送给维护人员
  3. 在披露之前,留出合理的时间进行修复
  4. 遵循负责任的披露做法

______________________________________________________________________

如果你觉得这个安全实现很有用,请给它一颗星!

最新安全更新: 2024年12月-通过漏洞修复和优化实现全面的安全强化。

目录标签

目录标签

安全PythonClaude安全服务器本地部署企业安全安全集成安全加固安全协议

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

oauth

运行时(runtime,运行环境)

Python

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiooauth部署方式未说明

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP