Mcp Port Scan
About
MCP Port Scanner 是一款专为 AI 工具设计的智能端口扫描服务。它通过 MCP 协议与 Cursor 等 AI 编辑器无缝集成,将强大的网络扫描能力直接带入您的开发工作流。
Details
- Author
- relaxcloud-cn
- Downloads
- 251
- Categories
- Other
Jump to
- Provides five scanning tools: scan_target, batch_scan, get_scan_status, list_active_scans, get_scan_result
- Supports scanning single or multiple targets
- Allows specifying custom port lists (e.g., 80,443,8080)
- Can run via Docker container or local Python
- Integrates directly with Cursor’s MCP configuration
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Mcp Port ScanCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install dependencies with pip install -r requirements.txt, then configure the MCP client (e.g., Cursor) by adding a JSON entry for the server — either using Docker (recommended) or a local Python process. After setup, interact with the AI assistant using natural language commands like “scan 192.168.1.1’s ports”.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"mcp port scan": {
"port-scanner": {
"command": "docker",
"args": [
"exec",
"-i",
"mcp-port-scanner",
"python",
"-m",
"mcp_port_scanner.interfaces.mcp_local_server"
],
"description": "\u667a\u80fd\u7aef\u53e3\u626b\u63cf\u5668 - stdio\u8fde\u63a5"
}
}
}
}
McpServers
{
"port-scanner": {
"command": "docker",
"args": [
"exec",
"-i",
"mcp-port-scanner",
"python",
"-m",
"mcp_port_scanner.interfaces.mcp_local_server"
],
"description": "\u667a\u80fd\u7aef\u53e3\u626b\u63cf\u5668 - stdio\u8fde\u63a5"
}
}
MCP智能端口扫描器
基于MCP协议的智能端口扫描服务,专为AI助手设计。
🚀 快速开始
1. 安装依赖
pip install -r requirements.txt
2. 配置MCP客户端 (Cursor)
在Cursor的MCP配置中添加以下配置:
Docker方式(推荐)
{
"mcpServers": {
"port-scanner": {
"command": "docker",
"args": [
"exec",
"-i",
"mcp-port-scanner",
"python",
"-m",
"mcp_port_scanner.interfaces.mcp_local_server"
],
"description": "智能端口扫描器 - stdio连接"
}
}
}
本地Python方式
{
"mcpServers": {
"port-scanner": {
"command": "python",
"args": ["-m", "mcp_port_scanner.interfaces.mcp_local_server"],
"cwd": "./mcp-port-scanner",
"env": {
"PYTHONPATH": "src"
},
"description": "智能端口扫描器 - 本地运行"
}
}
}
3. 启动Docker容器(如果使用Docker方式)
docker-compose up -d mcp-port-scanner
🛠️ 使用方式
配置完成后,在Cursor中直接与AI对话即可使用:
基本扫描
扫描 192.168.1.1 的端口
指定端口扫描
扫描 example.com 的 80,443,8080 端口
批量扫描
批量扫描这些目标:192.168.1.1, 192.168.1.2, 192.168.1.3
获取扫描状态
查看当前的扫描任务状态
📋 可用工具
MCP服务提供以下工具:
1. scan_target - 扫描单个目标
2. batch_scan - 批量扫描多个目标
3. get_scan_status - 查询扫描状态
4. list_active_scans - 列出活跃扫描
5. get_scan_result - 获取扫描结果
🔧 故障排除
验证配置
# 切换到项目目录
cd ./mcp-port-scanner
设置环境变量
export PYTHONPATH=src
测试MCP服务器
python -m mcp_port_scanner.interfaces.mcp_local_server
检查依赖
# 检查Python包
pip list | grep mcp
检查RustScan(Windows)
bin/rustscan-windows-x64.exe --version
检查RustScan(Linux/macOS)
bin/rustscan-linux-x64 --version
📖 更多信息
---
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



