Samurais, ninjas and Edo period:
Anime
but some of them are not accurate representations of historical events at all.
Bakumatsu Kikansetsu Irohanihoheto
Intrigue in the Bakumatsu: Irohanihoheto

ONA, 2006,
26 eps
Me:-
Author:-
Angolmois: Genkou Kassenki
Angolmois: Record of Mongol Invasion

TV, 2018,
12 eps
Me:-
Author:-
This anime is about the first Mongol invasion in 1274, so it has nothing to do with the Edo period (1603-1868), I put it here because of the samurai stuff.
Otogizoushi
Otogi Zoshi: The Legend of Magatama

TV, 2004,
26 eps
Me:-
Author:-
Although not set in the Edo period, the story features samurais.