Skip to main content

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 import or sliver-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 importsliver-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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sliver_mcp-1.0.0.tar.gz (84.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sliver_mcp-1.0.0-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

File details

Details for the file sliver_mcp-1.0.0.tar.gz.

File metadata

  • Download URL: sliver_mcp-1.0.0.tar.gz
  • Upload date:
  • Size: 84.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.6

File hashes

Hashes for sliver_mcp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 03c7faf182b55cbae7a86d680582cc944d2ea850eb6f018f8902a38de7a6ed68
MD5 9d548e79391d5331e7a3d5f49ae3357d
BLAKE2b-256 4ffa143eb38ca1726e31bde9ef4e7f424394fcdc83e9c8e9d781ae55416ed1b7

See more details on using hashes here.

File details

Details for the file sliver_mcp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: sliver_mcp-1.0.0-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

Hashes for sliver_mcp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1292c5c516bf194b00d2e81e65bc8ccbccf561def1a9c3aa00ca6c6dbf0cd853
MD5 0c970114ee46474d8c3b3c5b09ca1508
BLAKE2b-256 82466196541c37af445841be5be7c4e54e1d4ae06306b90c39ffaa3da8f9bf8e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page