You need a GP service on the server and the SDE connection needs to be on the server, as well.  The script that the tool in the GP Service uses will need to be told where to find the SDE conn file i.e. \\\\servername\\folder\\folder\\your_sde_connection_file.sde\\SDEfeatureclass

Assuming you are a user with permission to be on the server.  I would not use the SOC account.