We present an open-source plasma fluid code for 2D, cylindrical and 3D simulations of streamer discharges. The code is based on the Afivo framework, which features adaptive mesh refinement on quadtree/octree grids, geometric multigrid methods for Poisson’s equation, and OpenMP parallelism. We describe the numerical implementation of a fluid model of the drift-diffusion-reaction type, combined with the local field approximation. Then we demonstrate its functionality with 3D simulations of long positive streamers in nitrogen in undervolted gaps. Three examples are presented. The first one shows how a stochastic background density affects streamer propagation and branching. The second one focuses on the interaction of a streamer with preionized regions, and the third one investigates the interaction between two streamers. The simulations use up to 108 grid cells and run in less than a day; without mesh refinement they would require more than grid cells.