CyberMCP 是一款基于 Model Context Protocol (MCP) 的服务器,专为检测后端 API 安全漏洞而打造。它为大型语言模型(LLMs)提供了一系列专业工具与资源,可有效识别 API 中常见的安全问题。
git clone https://github.com/your-username/CyberMCP.git
cd CyberMCP
npm install
npm run build
您可以使用标准输入输出传输(默认)或 HTTP 传输来运行服务器:
npm start
npm run dev
在项目根目录下创建一个 config.json
文件,内容如下:
{
"server": {
"port": 3000,
"host": "localhost"
},
"tools": {
"enableDebug": true,
"logLevel": "info"
}
}
CyberMCP/
├── src/
│ ├── tools/ # MCP 工具,用于安全测试
│ ├── resources/ # MCP 资源(检查清单、指南)
│ ├── transports/ # 自定义传输实现
│ ├── utils/ # 工具函数和身份验证管理
│ └── index.ts # 入口文件
├── package.json # 依赖项和脚本
├── tsconfig.json # TypeScript 配置
└── README.md # 该文件
{
"auth": {
"type": "jwt",
"secret": "your-secret-key",
"issuer": "your-issuer",
"audience": "your-audience"
}
}
{
"auth": {
"type": "oauth2",
"clientID": "your-client-id",
"clientSecret": "your-client-secret",
"tokenURL": "https://example.com/oauth/token",
"redirectURI": "http://localhost:3000/callback"
}
}
本项目采用 MIT 许可证。