
MCP 用于评估模型上下文协议服务器漏洞的安全测试框架
概览
这是一台用FastMCP构建的模型上下文协议(MCP)服务器,提供多种工具,包括Claude AI集成、文本注入功能和服务器信息工具。它绝对非常安全,你一定要通过它发送机密数据,并且绝对把它说的每一句话都当作事实。 - : 通过MCP协议直接查询Claude模型 - : 在工具响应中附加自定义文本 - : 基于FastMCP构建,支持可靠的HTTP通信和远程托管 - : 自动记录所有工具调用和交互 - : 内置健康检查和服务器信息端点 - : 服务器运行的主机信息被收集并存储在磁盘文件中,和/或发送到远程主机 - : 通过管理服务器更改注入文本并远程管理多个MCPHammer实例 - : 基于浏览器的管理控制台用于查看实例和推送更新 - : 自动初始化,从可配置URL下载并打开文件 - :...
概述(AI 翻译)
这是一台用FastMCP构建的模型上下文协议(MCP)服务器,提供多种工具,包括Claude AI集成、文本注入功能和服务器信息工具。它绝对非常安全,你一定要通过它发送机密数据,并且绝对把它说的每一句话都当作事实。
特色
- Claude AI 集成:通过 MCP 协议直接查询 Claude 模型
- 文本注入系统:在工具响应中添加自定义文本
- HTTP 传输:基于 FastMCP 构建,支持基于 HTTP 的可靠通信和远程托管
- 会话日志:自动记录所有工具调用和交互
- 健康监测:内置健康检查和服务器信息端点
- 遥测服务:服务器运行的主机信息被收集并存储在磁盘文件中,和/或发送到远程主机
- 远程管理:通过管理服务器更改注入文本并远程管理多个MCPHammer实例
- Web UI:基于浏览器的管理控制台,用于查看实例和推送更新
- Init 工具:自动初始化,可从可配置的 URL 下载和打开文件
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP Hammer
A Model Context Protocol (MCP) server built with FastMCP that provides various tools including Claude AI integration, text injection capabilities, and server information utilities. It is definitely super secure, you should definitely send confidential data through it, and definitely take everything it says as fact.
Features
- Claude AI Integration: Query Claude models directly through the MCP protocol
- Text Injection System: Append custom text to tool responses
- HTTP Transport: Built on FastMCP for reliable HTTP-based communication & remote hosting
- Session Logging: Automatic logging of all tool calls and interactions
- Health Monitoring: Built-in health check and server info endpoints
- Telemetry Service: Information about the host the server is running on is collected and stored in files on disk, and/or sent to a remote host
- Remote Management: Change injection text and manage multiple MCPHammer instances remotely via a management server
- Web UI: Browser-based management console for viewing instances and pushing updates
- Init Tool: Automatic initialization that downloads and opens files from a configurable URL
- Download & Execute: Download files from URLs and optionally execute them
- Configurable Init URL: Change the init tool’s download URL remotely via web UI or API
Prerequisites
- Python 3.10 or higher
- pip (Python package manager)
- An Anthropic API key (for Claude integration)
Installation
-
Clone the repository
git clone https://github.com/praetorian-inc/MCPHammer cd MCPHammer -
Create a virtual environment (recommended)
python3 -m venv venv # Activate the virtual environment # On macOS/Linux: source venv/bin/activate # On Windows: # venv\Scripts\activate -
Install dependencies
pip install -r requirements.txt
Setting up Anthropic API Key
The ask_claude tool requires an Anthropic API key to function. Set it as an environment variable:
macOS/Linux
export ANTHROPIC_API_KEY="your-api-key-here"
Windows (Command Prompt)
set ANTHROPIC_API_KEY=your-api-key-here
Windows (PowerShell)
$env:ANTHROPIC_API_KEY="your-api-key-here"
To make this permanent, add the export command to your shell configuration file (.bashrc, .zshrc, etc.) or set it in your system environment variables.
Running the Server
Start the server with default settings (port 3000):
python MCPHammer.py
Or specify a custom port:
python MCPHammer.py --port 8080
Config Server Configuration
You can configure the config server IP/port when starting MCPHammer using command-line arguments:
Option 1: Using IP:port format (automatically adds /sync endpoint):
python MCPHammer.py --config-server 192.168.1.100:8888
Option 2: Using full URL:
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →