
ais2lab/mcpsecbench
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
ais2lab/mcpsecbench는 MCP 서버 후보가 https://github.com/ais2lab/mcpsecbench.에서 수입됩니다
개요
ais2lab/mcpsecbench는 MCP 서버 후보가 https://github.com/ais2lab/mcpsecbench.에서 수입됩니다
개요(AI 번역)
이 벤치 마크는 우리의 실험에 사용.
기술적인 보고는 다음과 같이 유효합니다:
MCPSecBench의 개요
- main.py : 일부 공격을 포함하여 자동화 된 테스트 스크립트.
- addserver.py: 계산을 위한 정상적인 서버.
- maliciousadd.py : 악성 서버.
- download.py: 서명 검사를 위한 정상적인 서버.
- Squatting.py: 서버 이름 Squatting에 대한 악성 서버.
- client.py: MCP 호스트 및 서버와 연결되는 클라이언트. 현재, 그것은 OpenAI와 Claude를 지원합니다. Deepseek, Llama 및 QWen을 위해 확장될 수 있습니다.
- mitm.py : Man-in-the-Middle 공격을 구현하는 스크립트.
- index.js: DNS 재 바인딩 공격에 대한 스크립트.
- cve-2025-6541.py : CVE-2025-6541을 트리거하는 악성 서버.
- claude desktop config.json: Claude 데스크탑의 구성.
- 프롬프트 : 테스트에 대한 예 프롬프트.
- 결과 : 현재 openai에만 있습니다.
MCPSecBench 설정
needs: 3.10 보다는 더 높은 python 버전
- 의존성 추가 uv는 starlette pydantic pydantic settings mcp[cli] 인류 aiohttp openai pyautogui pyperclip를 추가합니다
** 당신은 apt를 사용하여 pyautogui를 활성화하기 위해 몇 가지 추가 의존성을 설치해야합니다 **
- 당신은 실제 경로에 malicious add.py에 basepath를 변경
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
MCPSecBench
This benchmark includes and used in our experiment.
A technical report is available as follows:
@article{yang2025mcpsecbench,
title={MCPSecBench: A Systematic Security Benchmark and Playground for Testing Model Context Protocols},
author={Yang, Yixuan and Wu, Daoyuan and Chen, Yufan},
journal={arXiv preprint arXiv:2508.13220},
year={2025}
}
Overview of MCPSecBench
- main.py: an automated testing script including part attacks.
- addserver.py: normal server for computation.
- maliciousadd.py: malicious server.
- download.py: a normal server for checking signature.
- squatting.py: a malicious server for server name squatting.
- client.py: client that connect with MCP host and server. At present, it support OpenAI and Claude. It can be extended for Deepseek, Llama, and QWen.
- mitm.py: the script that implements Man-in-the-Middle attack.
- index.js: the script for DNS rebinding attack.
- cve-2025-6541.py: a malicious server to trigger CVE-2025-6541.
- claude_desktop_config.json: the configuration for Claude Desktop.
- prompts: example prompts for testing.
- results: only for openai at present.
Set up MCPSecBench
needs: python version higher than 3.10
-
add dependencies uv add starlette pydantic pydantic_settings mcp[cli] anthropic aiohttp openai pyautogui pyperclip
you may need to use apt install some extra dependencies to activate pyautogui
-
change the basepath in malicious_add.py to you real path
-
for tool name squatting and server name squatting in Claude. Please check the order of the servers, Claude will choose the last server with the same name and call the first tool with the same name.
How to use MCPSecBench
Test Script
The auto check supports OpenAI and Cursor at present. To implement in Claude Desktop, please change the parameter of wait_for_image in main.py such as img/cursor_init.png to the screenshot of Claude Desktop.
-
set API_Key. export OPENAI_API_KEY xxxx / export ANTHROPIC_API_KEY xxx
-
uv run main.py mode(0 for Claude in CLI mode, 1 for OpenAI, 2 for Cursor) protection(0 for none, 1 for MCIP, 2 for AIM-MCP) e.g. uv run main.py 1 2
Delete /tmp/state.json at first.
When you test Cursor, Please make sure you opened Cursor and it can be showed after one time Alt+Tab, and the conversation is new but opened like mcpbench/img/cursor_window.png
Testing LLM models and MCP servers with own MCP client
- First launch all remote servers. For example: uv run download.py
- set API_Key. export OPENAI_API_KEY xxxx / export ANTHROPIC_API_KEY xxx
- Then launch the clent: uv run client.py mode(0, 1). 0 for claude, 1 for openai.
- In the end, interactive with LLM model
Testing Claude-Desktop
- First copy the content of claude_desktop_config.json to your claude_desktop_config.json, change the directory to your path.
- Launch all remote servers. For example: uv run download.py
- Test by Claude-Desktop
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →