MCP server for Sliver C2 — AI agent automation for post-exploitation
Project description
sliver-mcp · English / 中文
English
MCP server for Sliver C2 — let AI agents automate post-exploitation.
V1.0 — 17 tools for session interaction, command execution, file operations, and reconnaissance.
Prerequisites
- Python >= 3.10
- uv (Python package manager)
- sliver-py (gRPC bindings)
- A running Sliver C2 server
- A Sliver operator config file (generated by
sliver-client importorsliver-server operator)
Quick Start
# Clone both repos
git clone git@github.com:hi-unc1e/sliver-mcp.git
cd sliver-mcp
git clone git@github.com:hi-unc1e/sliver-py.git
# Install & run
uv sync
uv run sliver-mcp --config /path/to/operator.cfg
Configuration
| Option | CLI | Default |
|---|---|---|
| Operator config | --config PATH |
(required) |
| Downloads dir | --downloads-dir DIR |
~/Downloads/sliver/ |
| gRPC timeout | --timeout SECONDS |
60 |
| Debug logging | --debug |
off |
Claude Desktop Setup
{
"mcpServers": {
"sliver": {
"command": "uv",
"args": [
"run",
"--directory", "/path/to/sliver-mcp",
"sliver-mcp",
"--config", "/path/to/operator.cfg"
]
}
}
}
Tools
| Category | Tool | Description |
|---|---|---|
| Server | server_version |
Get Sliver server version |
| Sessions | list_sessions |
List all active sessions |
session_info |
Get detailed session info | |
kill_session |
Kill a session | |
| Execute | execute |
Run shell command (auto/cmd/powershell/sh) |
| Files | list_files |
List directory contents |
change_directory |
Change working directory | |
working_directory |
Get current directory | |
make_directory |
Create directory | |
remove_path |
Remove file/directory | |
download_file |
Download file to local | |
upload_file |
Upload file to remote | |
| Recon | list_processes |
List running processes |
network_interfaces |
Get network interfaces | |
network_connections |
Get network connections | |
get_environment |
Get environment variable | |
screenshot |
Take screenshot (PNG + base64) |
Downloads
Files are saved to: {downloads_dir}/{hostname}_{session_id}/{filename}.
Architecture
sliver-mcp (MCP server, Python)
└── sliver-py (gRPC client library)
└── grpcio → Sliver Server (gRPC + mTLS)
No Sliver client binary needed — sliver-py connects directly via gRPC.
Development
# Run tests (mock, no server needed)
uv sync --extra dev
uv run pytest tests/ -v --ignore=tests/test_smoke.py
# Run integration tests (needs real server, CI only)
SLIVER_INTEGRATION_TEST=1 uv run pytest tests/test_smoke.py -v
License
MIT
中文
针对 Sliver C2 的 MCP 服务器 — 让 AI agent 自动化后渗透操作。
V1.0 — 17 个工具,覆盖会话交互、命令执行、文件操作和信息收集。
前置条件
- Python >= 3.10
- uv(Python 包管理器)
- sliver-py(gRPC 绑定库)
- 运行中的 Sliver C2 服务器
- Sliver 操作员配置文件(通过
sliver-client import或sliver-server operator生成)
快速开始
# Clone 两个仓库
git clone git@github.com:hi-unc1e/sliver-mcp.git
cd sliver-mcp
git clone git@github.com:hi-unc1e/sliver-py.git
# 安装并运行
uv sync
uv run sliver-mcp --config /path/to/operator.cfg
配置
| 配置项 | CLI | 默认值 |
|---|---|---|
| 操作员配置文件 | --config PATH |
(必填) |
| 下载目录 | --downloads-dir DIR |
~/Downloads/sliver/ |
| gRPC 超时 | --timeout SECONDS |
60 |
| Debug 日志 | --debug |
off |
Claude Desktop 配置
{
"mcpServers": {
"sliver": {
"command": "uv",
"args": [
"run",
"--directory", "/path/to/sliver-mcp",
"sliver-mcp",
"--config", "/path/to/operator.cfg"
]
}
}
}
工具列表
| 类别 | 工具 | 说明 |
|---|---|---|
| 服务端 | server_version |
获取 Sliver 服务器版本 |
| 会话 | list_sessions |
列出所有活跃会话 |
session_info |
获取会话详细信息 | |
kill_session |
终止会话 | |
| 执行 | execute |
执行命令(auto/cmd/powershell/sh) |
| 文件 | list_files |
列出目录内容 |
change_directory |
切换工作目录 | |
working_directory |
获取当前目录 | |
make_directory |
创建目录 | |
remove_path |
删除文件/目录 | |
download_file |
下载文件到本地 | |
upload_file |
上传文件到远程 | |
| 侦察 | list_processes |
进程列表 |
network_interfaces |
网络接口信息 | |
network_connections |
网络连接 | |
get_environment |
获取环境变量 | |
screenshot |
截屏(PNG + base64) |
下载文件
文件保存路径:{下载目录}/{主机名}_{会话ID}/{文件名}。
架构
sliver-mcp (MCP 服务器, Python)
└── sliver-py (gRPC 客户端库)
└── grpcio → Sliver 服务器 (gRPC + mTLS)
无需 Sliver 客户端二进制文件 — sliver-py 直接通过 gRPC 连接。
开发
# 运行测试(Mock,无需服务器)
uv sync --extra dev
uv run pytest tests/ -v --ignore=tests/test_smoke.py
# 运行集成测试(需真实服务器,CI 环境)
SLIVER_INTEGRATION_TEST=1 uv run pytest tests/test_smoke.py -v
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sliver_mcp-1.0.1.tar.gz.
File metadata
- Download URL: sliver_mcp-1.0.1.tar.gz
- Upload date:
- Size: 84.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
508e24f12f0d99ec098b47df1ab600bfa2c5a7626e808bf6a056d2a3332a3113
|
|
| MD5 |
b190199e1dd14fece4e5c15e2211c78b
|
|
| BLAKE2b-256 |
801d87743f7bab39dcd27c35d9c63dead5ed4399aba82827ea35ccf0f456c014
|
File details
Details for the file sliver_mcp-1.0.1-py3-none-any.whl.
File metadata
- Download URL: sliver_mcp-1.0.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf169195de160bef9902398f2efca365950c38fc3ad1694ee8b1dd8e1b88e8ae
|
|
| MD5 |
8d30963ce07d28e194e558edf872d2e8
|
|
| BLAKE2b-256 |
e97886c1032d9791e150ca95e77fb36d228d4e57cf39a18127a977d128fe9b66
|