I was on a Wiki-link clicking frenzy today, and I ended up finding out about this little "country." The Wikipedia page is fairly small and it sounds fascinating--did it have an army? Was it really just a "smugglers' state" as the Wiki page argues?
Cospaia was roughly only 3.3 sq km and had a population of several hundred people. It was not much bigger than modern-day Monaco and arose out of a border treaty that confused two identically-named rivers, leaving out that small area (which you gathered from the Wikipedia entry).
Returning to the negotiation table over 3 sq km was not considered worth the hassle at the time and combined with its usefulness as a 'buffer state' between Tuscany and the Papal States this led to Cospaia being left well-enough alone.
It had no army and despite its title as a republic operated as something more akin to a commune, almost anarchic. This open-ended freedom is what led the area to eventually become a haven for smugglers and other undesirables wishing to escape the laws of its neighbours.
(Most of this is from the Italian-language book Cospaia: Storia inedita della singolare repubblica)