Cobalt Strike MCP Server
Enables management of Cobalt Strike red team operations through natural language commands, providing access to 200+ tools for beacon control, listener management, credential operations, and payload generation.
README
Cobalt Strike MCP Server
Model Context Protocol server for managing Cobalt Strike operations through natural language commands. Currently only tested with Cursor and Claude on Windows
<img width="500" height="1089" alt="image" src="https://github.com/user-attachments/assets/3150c2eb-9360-4db3-ae3d-4543796f576e" />
Prerequisites
- Node.js 18.0.0 or higher
- npm package manager
- Cobalt Strike teamserver with REST API enabled
- Network connectivity to Cobalt Strike teamserver
Installation
Windows Installation
Prerequisites
- Install Node.js 18.0.0 or higher from nodejs.org
- Open PowerShell or Command Prompt as Administrator (for global installation)
Global Installation (Recommended)
Install the package globally to make the cobaltstrike-mcp command available system-wide:
PowerShell:
npm install -g .
macOS/Linux Installation
Global Installation (Recommended)
Install the package globally to make the cobaltstrike-mcp command available system-wide:
npm install -g .
Configuration
Before using the MCP server, you need to configure it with your Cobalt Strike teamserver credentials.
Initial Setup
Run the setup command to configure the server:
cobaltstrike-mcp --setup
This will prompt you for:
- Teamserver URL: The full URL to your Cobalt Strike REST API (e.g.,
https://teamserver.example.com:50050) - Username: Your Cobalt Strike username
- Password: Your Cobalt Strike password
- Verify SSL: Whether to verify SSL certificates (yes/no)
Credentials are stored securely in your OS credential manager (keyring).
Configuration Location
Configuration files are stored in:
- Windows:
%USERPROFILE%\.cobaltstrike-mcp\orC:\Users\<username>\.cobaltstrike-mcp\ - macOS/Linux:
~/.cobaltstrike-mcp/
Files:
config.json- Non-sensitive configuration (URL, SSL settings)- Credentials are stored in OS keyring (Windows Credential Manager on Windows)
Usage
With Claude Desktop
Add the MCP server to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"cobaltstrike": {
"command": "cobaltstrike-mcp",
"args": []
}
}
}
With Cursor
Cursor supports MCP servers through its settings. To configure this MCP server in Cursor:
-
Open Cursor Settings:
- Press
Ctrl+,(Windows/Linux) orCmd+,(macOS) - Or go to
File > Preferences > Settings
- Press
-
Navigate to MCP Settings:
- Search for "MCP" in the settings search bar
- Or look for "Model Context Protocol" settings
-
Add the MCP Server:
- Click "Add MCP Server" or edit the MCP configuration
- Add the following configuration:
{
"mcpServers": {
"cobaltstrike": {
"command": "cobaltstrike-mcp",
"args": []
}
}
}
- Restart Cursor after making changes to the configuration.
Available Tools
This MCP server provides comprehensive access to Cobalt Strike operations through 200+ tools organized into the following categories:
Teamserver Operations
get_teamserver_info- Get information about the Cobalt Strike teamserver (version, license, stats)test_connection- Test the connection to the Cobalt Strike REST API server
Beacon Operations
list_beacons- List all active beacons in the teamserverget_beacon- Get detailed information about a specific beacon by IDexecute_beacon_command- Execute a command on a beacon (e.g., "whoami", "ls", "shell", "powershell")get_beacon_output- Get the output from a beacon (console output)get_beacon_task- Get the status and output of a specific beacon taskkill_beacon- Kill/remove a beacon from the teamservernote_beacon- Add or update a note on a beacon
Beacon State Management
set_beacon_sleep- Set the sleep time and jitter for a beaconset_beacon_spawnto- Set the spawn-to process for a beaconset_beacon_ppid- Set the parent process ID for a beaconset_beacon_syscall_method- Set the system call method for a beaconset_beacon_dns_mode- Set DNS mode for beaconset_beacon_block_dlls- Enable or disable block DLLsset_beacon_beacon_gate- Enable or disable beacon gateset_beacon_c2_host- Set C2 host for beaconset_beacon_c2_host_hold- Hold C2 host (prevent failover)set_beacon_c2_host_release- Release C2 host (allow failover)set_beacon_c2_host_reset- Reset C2 hostset_beacon_spoofed_arguments- Set spoofed arguments for beaconset_beacon_c2_failover_notification- Enable or disable C2 failover notificationget_beacon_jobs- Get jobs running on a beaconget_beacon_c2_host_profiles- Get available C2 profiles for beaconget_beacon_tokenStore- Get token store state for beacon
Listener Operations
list_listeners- List all active listeners in the teamservercreate_listener- Create a new listener (HTTP, HTTPS, DNS, SMB, etc.)delete_listener- Delete/remove a listener from the teamserver
Listener-Specific Operations
create_listener_http/get_listener_http/update_listener_http/delete_listener_httpcreate_listener_https/get_listener_https/update_listener_https/delete_listener_httpscreate_listener_dns/get_listener_dns/update_listener_dns/delete_listener_dnscreate_listener_smb/get_listener_smb/delete_listener_smbcreate_listener_tcp/get_listener_tcp/delete_listener_tcpcreate_listener_externalC2/get_listener_externalC2/delete_listener_externalC2create_listener_foreignHttp/get_listener_foreignHttp/delete_listener_foreignHttpcreate_listener_foreignHttps/get_listener_foreignHttps/delete_listener_foreignHttpscreate_listener_userDefinedC2/get_listener_userDefinedC2/delete_listener_userDefinedC2get_listener- Get listener by ID
Credential Management
list_credentials- List all stored credentials in the teamserverget_credential- Get detailed information about a specific credential by IDcreate_credential- Create a new credential entrydelete_credential- Delete a credential from the teamserver
Task Management
list_tasks- List all tasks across all beacons or filter by beacon IDget_task- Get detailed information about a specific task by IDget_task_error- Get error information for a specific taskget_task_log- Get log information for a specific taskget_beacon_tasks_summary- Get task summary for a specific beaconget_beacon_tasks_detail- Get detailed task information for a specific beacon
File Operations
beacon_list_directory- List directory contents on a beaconbeacon_change_directory- Change current directory on a beaconbeacon_get_current_directory- Get current working directory on a beaconbeacon_list_drives- List available drives on a beaconbeacon_upload_file- Upload a file to a beaconbeacon_download_file- Download a file from a beaconbeacon_copy_file- Copy a file on a beaconbeacon_move_file- Move/rename a file on a beaconbeacon_delete_file- Delete a file or directory on a beaconbeacon_create_directory- Create a directory on a beacon
Spawn Operations (40+ tools)
Spawn operations execute commands in new processes. Available tools include:
spawn_beacon- Spawn a new beacon sessionspawn_powershell- Execute PowerShell commandspawn_command- Execute a command (spawns in new process)spawn_shell- Execute a shell commandspawn_screenshot- Take a screenshotspawn_hashdump- Dump password hashesspawn_mimikatz- Run Mimikatzspawn_logon_passwords- Dump logon passwords using Mimikatzspawn_process_list- List processesspawn_beacon_asUser- Spawn a beacon as a specific userspawn_beacon_under- Spawn a beacon under a specific processspawn_command_runAs- Run a command as a specific userspawn_dcsync- Perform DCSync attackspawn_keylogger- Start keyloggerspawn_chromedump- Dump Chrome passwordsspawn_dotnetAssembly- Execute .NET assemblyspawn_net_computers- Enumerate computersspawn_net_dclist- List domain controllersspawn_net_domainControllers- List domain controllersspawn_net_domainTrusts- Enumerate domain trustsspawn_net_group- Enumerate groupsspawn_net_localGroup- Enumerate local groupsspawn_net_logons- Enumerate logged on usersspawn_net_sessions- Enumerate sessionsspawn_net_share- Enumerate sharesspawn_net_time- Get time from targetspawn_net_user- Enumerate usersspawn_net_user_detail- Get user detailsspawn_net_view- View network resourcesspawn_portscan- Perform port scanspawn_postExDll- Load post-exploitation DLLspawn_powershell_unmanaged- Execute unmanaged PowerShellspawn_printscreen- Print screenspawn_pth- Pass-the-hashspawn_screenwatch- Start screen watchspawn_shellcode- Execute shellcodespawn_ssh- Inject SSH sessionspawn_sshKey- Inject SSH session with key- And more...
Inject Operations (30+ tools)
Inject operations execute commands within existing processes. Available tools include:
inject_dcsync- Perform DCSync attack to extract domain credentialsinject_net_computers- Enumerate computers (inject mode)inject_net_users- Enumerate users (inject mode)inject_net_user_detail- Get user details (inject mode)inject_net_groups- Enumerate groups (inject mode)inject_net_sessions- Enumerate sessions (inject mode)inject_net_shares- Enumerate shares (inject mode)inject_net_domain_controllers- List domain controllers (inject mode)inject_portscan- Perform port scan (inject mode)inject_keylogger- Start keylogger on a processinject_chromedump- Dump Chrome passwordsinject_net_view- View network resources (inject mode)inject_net_logons- Enumerate logged on users (inject mode)inject_beacon- Inject a beacon into a processinject_dll- Inject a DLL into a processinject_shellcode- Execute shellcodeinject_mimikatz- Run Mimikatzinject_hashdump- Dump password hashes (inject mode)inject_logonPasswords- Dump logon passwords (inject mode)inject_powershell_unmanaged- Execute unmanaged PowerShellinject_screenshot- Take a screenshotinject_printscreen- Print screeninject_screenwatch- Start screen watchinject_browserpivotStart- Start browser pivotinject_ssh- Inject SSH sessioninject_sshKey- Inject SSH session with keyinject_pth- Pass-the-hash (inject mode)inject_postExDll- Load post-exploitation DLLinject_loadDll- Load a DLL- And more...
Execute Operations
execute_kill_process- Kill a processexecute_clipboard- Get clipboard contentsexecute_setenv- Set environment variableexecute_timestomp- Modify file timestampsexecute_checkin- Force beacon check-inexecute_exit- Exit beaconexecute_reg_query- Query registry keyexecute_reg_queryv- Query registry valueexecute_beacon_info- Get beacon informationexecute_get_uid- Get user IDexecute_job_stop- Stop a jobexecute_kerberos_ticket_purge- Purge Kerberos ticketsexecute_kerberos_ticket_use- Use Kerberos ticketexecute_powershell_import- Import PowerShell scriptexecute_net_domain- Get domain informationexecute_browserpivot_stop- Stop browser pivotexecute_cancel_file_download- Cancel file downloadexecute_socks_stop_all- Stop all SOCKS proxiesexecute_socks_stop_port- Stop SOCKS proxy on specific port
Token Operations
execute_steal_token- Steal a token from a processexecute_make_token- Make a token using logon credentialsexecute_rev2self- Revert to self (drop impersonated token)execute_get_system- Get SYSTEM privilegesexecute_get_privs- Get privilegesexecute_tokenStore_use- Use a token from the token storeexecute_tokenStore_steal- Steal a token and add it to the token storeexecute_tokenStore_stealAndUse- Steal a token and immediately use itexecute_tokenStore_remove- Remove a token from the token storeexecute_tokenStore_removeAll- Remove all tokens from the token storeexecute_make_token_upn- Make a token using UPN (User Principal Name)
Pivoting Operations
execute_socks4_start- Start SOCKS4 proxyexecute_socks5_start- Start SOCKS5 proxyexecute_socks_stop- Stop SOCKS proxyexecute_link_smb- Link to SMB beaconexecute_link_tcp- Link to TCP beaconexecute_unlink- Unlink from beaconexecute_rportfwd_start- Start reverse port forwardexecute_rportfwd_stop- Stop reverse port forward
Elevation Operations
elevate_beacon- Elevate beacon privilegeselevate_command- Elevate command privileges
Remote Execution Operations
remoteExec_beacon- Execute remote beaconremoteExec_command- Execute remote command
Payload Generation
generate_stager_payload- Generate a stager payload for a listenergenerate_stageless_payload- Generate a stageless payload for a listenerdownload_payload- Download a generated payload file
BOF (Beacon Object File) Operations
execute_bof- Execute a BOF on a beaconexecute_bof_pack- Execute a BOF with packingexecute_bof_packed- Execute a packed BOF
Data Operations
list_screenshots- List all screenshots captured from beaconsget_screenshot- Get a specific screenshot by IDlist_keystrokes- List all keystroke captures from beaconsget_keystrokes- Get keystroke data by IDlist_downloads- List all file downloads from beaconsget_download- Get download information by ID
Configuration Operations
get_system_information- Get system informationget_profile- Get C2 profileupdate_profile- Update C2 profileget_killdate- Get kill dateset_killdate- Set kill dateget_teamserver_ip- Get teamserver IPset_teamserver_ip- Set teamserver IPreset_data- Reset data
Utility Operations
get_artifacts- Get artifactsget_beacon_active_downloads- Get active downloads for a beaconclear_beacon_command_queue- Clear beacon command queueget_beacon_help- Get beacon helpget_beacon_command_help- Get help for a specific beacon commandget_beacon_keystrokes- Get keystrokes for a beacon
Cobalt Strike REST API
This MCP server interacts with the Cobalt Strike REST API. For detailed API documentation, see:
Security Considerations
⚠️ Important Security Notes:
- This tool is for authorized security testing and red team operations only
- Credentials are stored in your OS credential manager
- SSL certificate verification can be disabled for testing (not recommended for production)
- All operations are logged by the Cobalt Strike teamserver
- Use with appropriate authorization and in compliance with applicable laws
License
GPL-3.0
References
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。