Clustering US Senators with k-means
blog.dataquest.io
blog.dataquest.io
There was a tool out prior to the last election that tried to do this, but it compared your preference on divisive issues (like abortion or immigration) to parties - not actual vote records and individual congress critters.
The thing I was most proud of wasn't the matching part, but the part to determine candidate positions. If you just ask them, most will not answer. Using past votes is a tough approach, since you need to decide what each bill "means", and bills have lots of stuff attached. More importantly, that only tells you about incumbents, not challengers. In fact almost any signal works better for incumbents. Our most fruitful source of information was FEC donor data, because every serious candidate had information there. Also "follow the money". :-)
I worked on this at YC Hacks last year -- http://www.hipvote.us/ . The idea was to get a push notification when a bill came up for vote, read a summary, and then vote on it yourself. After deciding, you got to see how your congresspeople voted, and you could check your similarity to them over time. We also ran into the "meaning" problem with bills, and the incumbent problem.
Presumably I'm only going to compare my preference to their vote on bills that I care about and understand. For example, Michigan blocked Tesla from selling cars here. They cut education spending, etc... Some people care about different things, I just want to know how the candidates stack up. True this only works for incumbents, but listening to campaigns is somewhat useless anyway. You could also compare your preferences to all of them and see which party actually represents you, I'm sure some people would be surprised.
The best way to score each bill for meaning is to pay experts to do so. That is how every serious nonprofit does their scorecard. They employ former Hill staffers to track every bill closely.
The sunlight foundation (http://sunlightfoundation.com/api/) also has some great APIs to get this data.
You should also look at govtrack (https://www.govtrack.us/) and countable (https://www.countable.us/) -- one or both might do what you're looking for.
Edit: Never mind on countable -- looks like they changed their focus.
It's sort of a Web2.0 take on 'write your Congressional representative' on bills currently up for vote. It will also tell you a lot about how your reps (and others) vote.
http://jackman.stanford.edu/ideal/currentSenate/d3/long.html http://jackman.stanford.edu/ideal/currentHouse/d3/long.html
His blog (which among other things has links to the roll call data in RData form):