Founded in 2001, it was originally conceived as a vehicle for resolving border issues, fighting terrorism, and — more implicitly — to counter American influence in Central Asia following its invasion of Afghanistan.
In recent years, its economic component has grown more prominent, embodied in Xi's signature, trillion-dollar foreign policy and infrastructure drive known as the Belt and Road Initiative.
Beijing's infrastructure projects in Central Asia make some in the bloc uncomfortable — particularly India, which alone among members has refused to endorse the program.
Russia, too, is wary of China's expanding influence, and though it has somewhat reluctantly embraced the Belt and Road, it is also seeking to expand its own economic and political leverage in the region through a customs union it dominates known as the Eurasian Economic Union.
China has sought to downplay concerns that the Shanghai grouping is a way for Beijing to project its strategic influence abroad. The Global Times, a Communist Party newspaper, said in a commentary that unlike Western organisations like NATO and the G-7, which seek to "consolidate the global economic order that is favourable to the Western world," the Shanghai Cooperation Organisation is inclusive.
It "is not a tool for geopolitical games, seeking hegemony or engaging in international confrontation", the paper said.
Still, as trade tensions simmer between China and the US, in recent months Beijing has been drawing closer to Moscow and New Delhi. On Friday, Xi presented Russian President Vladimir Putin China's first Friendship Medal at an elaborate ceremony in Beijing.
On Saturday, Xi met Modi for the second time in two months, signing deals on the export of non-basmati rice and sharing information on the waters of the Brahmaputra River, which runs between China and India, according to tweets by spokesperson of the Indian Ministry of External Affairs Raveesh Kumar.
Security was tight and discussions largely took place behind closed doors, with plainclothes officers ushering pedestrians away from diplomatic motorcades.
Xi's meticulously-choreographed appearance was a striking contrast to the tumultuous Group of Seven summit of leading industrialised nations that concluded in Quebec and saw the US and its allies divided by escalating trade tensions.
President Donald Trump lashed out at Canadian Prime Minister Justin Trudeau in an extraordinary set of tweets from Air Force One, calling him "dishonest & weak" and retracting the US endorsement of the G-7 summit's communique over trade tariffs.
Trump earlier caused a stir by suggesting the G-7 offer a seat at the table to Russia, which was ousted from the group in 2014 as punishment for Putin's annexation of Crimea and support for pro-Russian separatists in Ukraine.
He skipped sessions on climate change, clean energy and ocean protection and departed early for Singapore for Tuesday's summit with North Korean leader Kim Jong Un.