Adam Baldwin and Summer Glau were series stars on Firefly (and its sequel movie, "Serenity"), part of the crew of Serenity. Baldwin's character, Jayne, was always trying to get rid of Glau's character, River (leave her behind or throw her out an airlock). Now, as John Casey, he finally succeeds in getting rid of Greta. Baldwin even has a line directly referencing Firefly and his connection to Glau -- "Listen, Agent Greta. I don't know who you've worked with before, or what crew you were on, this is the best damn spy team in the world. So do us a favor, don't let the door hit you in the ass."
When Chuck first descends into Castle, he is jumped by three ninjas. Rye explains he did that "so I know what I'm working with." This is an homage to Spies Like Us when Millbarge and Fitz-Hume begin CIA training.