Like others have said, I'm not sure it is necessary to gain admission into a PhD/MA program. Depending on what the senior thesis (undergrad thesis) process is like at your undergrad, I would recommend you jump on the opportunity to do one. I ended up doing a senior thesis rather than the usual capstone course (which involves a 30 page research paper) that spanned my senior year and ended up being around 120 pages. I can't stress enough how important this experience was, and how much it helped me transition to my MA and write a thesis.
Since my undergrad thesis process was basically the same as an MA thesis (year-long work with an adviser on a topic of my choice, with extensive historiography and primary source research) I was very well prepared, and not as overwhelmed as some of my peers when it came to the MA thesis process. If your undergrad offers such a thesis process I would definitely recommend it. Also, if you are planning on writing your undergrad thesis on a similar topic to what you plan to study in grad school, you will undoubtedly benefit from having a good background in the historiography and research of your field/specialty.