The default value (127.0.0.1 and 4567) should work if nothing in the minecraft server settings is changed.
You can use %{username} and %{comment} and they will get replaced automatically by the username and comment (if it is a comment). You can also use %{TTS} at the start of the command, this will not execute the command in minecraft but read it out loud.