Use Fcitx's Addon
Generally speaking, input method is also a kind of Addon in Fcitx, but we separate them in order to make things more clear.
Fcitx already have some built-in addon, you can browse it with Category:Built-in Addon, and make use of them.
Hint for developer
If you want to port some input method, you might want to check existing Addons, and think about what function you can generalize and provide them to other Addons.