$ xclip -sel c -o | clipipe send
$ clipipe receive {code} | xclip -sel c
Implemented it using Python for both the CLI and server (FastAPI). Please checkout https://clipipe.io for more info and https://github.com/amirkarimi/clipipe to see the source code.