Gray was a Scotland age-grade international and worked for Scottish Rugby in various coaching roles between 1994 and 2006.
He said working with the senior team is "something special indeed".
Head coach Vern Cotter added: "We're looking forward to adding his experience and passion to the group."
Scotland begin the tournament at home to England on 6 February then visit Wales and Italy before hosting France and finishing in Ireland.
Elaborating on his new role, Gray commented: "The defensive breakdown is an area highlighted by the coaches as an area for improvement, for which I've been given a very specific brief to work alongside defence coach Matt Taylor for the seven-week period of the Six Nations.
"It's a great honour and I'm looking forward to joining up with the squad in camp in St Andrews this Sunday."

Ms Rees was selected from an all-woman shortlist drawn up after the former Welsh Secretary said he would stand down at the 2015 general election.
Members of Neath Labour Party made their decision on Saturday.
The other two candidates were Karen Wilkie, deputy general secretary of the Co-operative Party, and Mabel McKeown, a former aide to Harriet Harman.

The ScotPound proposals have been put forward in a report published by the New Economics Foundation (NEF).
It argues that a purely digital SÂ£ currency, similar to Bitcoin, could boost the economy and position Scotland as a world leader in economics.
The plans follow intense debate over currency in the Scottish independence referendum.
The NEF think tank paper says Holyrood already has the powers to introduce a new currency and payment system, which could work alongside sterling.
The proposals include the digital ScotPound and a free-at-point-of-use public payment system, ScotPay, operated through an arm's length public enterprise - BancaAlba.
NEF said it wanted to drive forward the debate on money, sparked by the independence referendum, and highlight the economic and social potential of financial innovation.
It even suggests a SÂ£250 dividend for every Scottish citizen, increasing the overall purchasing power within the economy.
Lead researcher Duncan McCann added: "Scotland is in a unique position to take full advantage of current trends in digital financial innovation.
"A new currency and payment system like ScotPound would operate alongside pounds sterling, supporting small and medium businesses and putting money in the pockets of those currently excluded by the financial sector."
Mr McCann said a lot of people were moving away from cash payments and the ScotPound worked on the model of the phone becoming the new wallet.
Prof Nigel Dodd, of the London School of Economics, said: "This report is an extremely timely and welcome intervention in current debates about the way our monetary system is governed and organised, and specifically about the merits and efficacy of conventional Quantitative Easing.
"Given that the currency question played a major role in the Scottish referendum debate last year, I have no doubt that the proposals for a ScotPound will inform future discussions in Scotland. NEF's proposals are extremely clear and convincing."

Protests in southern Nepal against a newly adopted constitution have seen hundreds of supply trucks from India stuck at the border.
Many Nepalese, however, have accused India of blocking supplies to show its disapproval of the document.
Fuel is now being rationed in Nepal.
Deepak Baral, an NOC spokesperson, told BBC Nepali that the state-owned fuel supplier was "exploring the possibility" of flying in fuel from a "neighbouring country".
As well as India, Nepal is also bordered by the Tibet Autonomous Region of China to the north.
Public anger towards India has been growing in Nepal.
KP Oli, a senior lawmaker tipped to be the next prime minister, has accused India of breaking international law by imposing a blockade.
He denied protesters were blocking roads.
New Delhi has denied the accusations and urged Nepal to defuse tensions  over the constitution in its southern plains.
Clashes between police and protesters have seen more than 40 people killed in recent weeks.
Some minority ethnic groups are unhappy with the new constitution, which creates a federal system they fear will see them under represented in parliament.
Richie Gray has joined Scotland's Six Nations backroom staff as a consultant after three years as South Africa's specialist breakdown coach.
[NEXT_CONCEPT]
Bridgend councillor Christina Rees has been picked to succeed MP Peter Hain as the Labour candidate for Neath.
[NEXT_CONCEPT]
Scotland could create its own digital currency to operate alongside sterling, economists have suggested.
[NEXT_CONCEPT]
The Nepal Oil Corporation (NOC) is considering flying in fuel to the landlocked nation as it continues to face a crippling shortage of petroleum products.