Is there a way to start the mediascanner through Casparcg config or with AMCP command?
AFAIK no. A few client libraries (including mine) can do that. For standalone operation I use a batch file.
A batch file, or the casparcg-launcher application could help: Release v1.1.0 · nrkno/sofie-casparcg-launcher · GitHub