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
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:
macOS/Linux Installation
Global Installation (Recommended)
Install the package globally to make the cobaltstrike-mcp command available system-wide:
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:
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
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
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:
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 keyAnd 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 DLLAnd 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
This server cannot be installed