Controlling Mocp with keyboard shortcuts in i3wm?

Hello, I was wondering if there is any way to edit the i3 config file so that it can controll mocp (Such as changing tracks, pause/play) when it is running in the background.

Shouldn't be a problem. I don't have a working i3 env at the moment, but how about, for example:

bindsym Mod3+p exec "mocp -p"

in the i3's config file?

I used to have the following in my i3 config:

# mocp bindcode 172 exec "/usr/bin/mocp -G" bindcode 174 exec "/usr/bin/mocp -s" bindcode 171 exec "/usr/bin/mocp -f" bindcode 173 exec "/usr/bin/mocp -r"

This binds my media keys to mocp.

Here's what I use in openbox:
https://gist.github.com/kosivantsov/c4dd40ba9748b40d80f72d166bd79788