Maybe you need to enable the clipper? The easiest if bit hacky way is to open the desktop app, enable the clipper and then copy the profile directory over to where the cli app expects it.
$ joplin help server
server <command>
Start, stop or check the API server. To specify on which port it should run, set the api.port
config variable. Commands are (start|stop|status). This is an experimental feature - use at your
own risks! It is recommended that the server runs off its own separate profile so that no two
CLI instances access that profile at the same time. Use --profile to specify the profile path.