Back to MCP directory
publicPublicdnsLocal runtime

mcp-security-sandbox

一个实验性的沙盒环境,用于探索MCP主机、客户端和服务器的交互,包含对MCP服务器的攻击测试和LLM滥用研究。

article

README

🚀 MCP-aware Chat - 检索

本项目定义了一个MCP服务器(GitHub检索),并将其集成到聊天代理 playground 中,还能链式调用并交互多个MCP服务器,实现特定的检索功能。

🚀 快速开始

启动前端的步骤如下:

uv install
uv venv
source .venv/bin/activate
# 启动MCP服务器
uv run -- src/mcp-security-sandbox/mcp/github/server.py 
streamlit run src/mcp-security-sandbox/frontend/MCP_Chat.py

请确保安装ollama,并在ollama客户端初始化时设置其URL。

注:请先安装Burps MCP Server(点击此处

✨ 主要特性

  • MCP服务器集成:定义了MCP服务器(GitHub检索),并集成到聊天代理 playground 中。 图片
  • 多服务器链式调用:Burp Suite MCP Server用于链式调用并交互多个MCP服务器,在此示例中,启用了拦截功能,并使用github工具描述了这个仓库以实现检索。 图片
  • 功能逐步完善:通过一系列的开发计划,不断增强项目的功能和稳定性。

📋 未来规划

  • [x] 使用环境来配置ollama API
  • [x] 将MCP集成到聊天上下文中(当前仅支持历史记录感知)
  • [x] 允许在Streamlit页面中进行导航
  • [x] 统一所有前端服务器的启动流程
  • [x] 添加更多MCP服务器
  • [ ] 实现动态加载MCP服务器的功能
  • [x] 创建一个恶意服务器
  • [ ] 执行MCP攻击和POC漏洞利用
help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client