Over the last year, Elon Musk has jumped further into the artificial intelligence boom and refocused his rocket company, SpaceX, on building orbital data centers and manufacturing A.I. computer chips.
On Tuesday, just four days after holding the largest initial public offering ever, SpaceX said it was completing a $60 billion deal to buy Cursor, a start-up that develops A.I. tools for writing computer code.
SpaceX had struck an agreement with Cursor in April that gave it the option to purchase its parent company, Anysphere, in an all-stock deal after the rocket maker’s I.P.O. The arrangement would “allow us to build the world’s most useful” A.I. models, SpaceX said at the time.
SpaceX, which was up more than 11 percent in midday trading on Tuesday, is now valued at nearly $2.8 trillion. Its market capitalization has passed tech giants like Amazon, making Mr. Musk the world’s first trillionaire.
The deal signaled how Mr. Musk is delving further into A.I. and expanding SpaceX from its main businesses of building rocket ships and offering satellite internet service. In 2023, he founded xAI, an A.I. start-up that makes the Grok chatbot, which competes with OpenAI’s ChatGPT and Anthropic’s Claude. In Tennessee, xAI also built two massive data centers, the computing sites for powering A.I.
In February, Mr. Musk merged SpaceX with xAI, and said he wanted to develop data centers for A.I. that would operate from orbit. Mr. Musk told investors that the combined venture was worth $1.25 trillion.
“The capabilities we will unlock by making space-based data centers a reality will fund and enable self-growing bases on the moon, an entire civilization on Mars and ultimately expansion to the universe,” Mr. Musk said in a memo to workers at the time.
Last month, SpaceX also outlined plans for the first stage of an A.I. chip manufacturing project in Texas that would cost at least $55 billion.
“We look forward to working closely with the SpaceX team to advance our frontier A.I. capabilities and continue to work closely with our customers and partners,” Michael Truell, Cursor’s chief executive, said in a statement.
A SpaceX spokesman did not respond to a request for comment.
Mr. Musk’s A.I. ventures have shown choppy progress. This year, xAI experienced several high-profile departures of technologists as it struggled to create A.I. models that could compete with those from OpenAI, Anthropic and Google. On social media, Mr. Musk has said xAI needed to be restructured.
His A.I. start-up had also committed resources to building its two data centers to power its own A.I. models, but did not use the facilities to their maximum capacity.
After xAI and SpaceX merged, the company announced major deals with Google and Anthropic to provide them with computing power. The deals will generate billions of dollars a month for SpaceX, which can help offset A.I. spending that has been a drain on its bottom line. The company reported a $4.9 billion loss last year, compared with a $791 million profit in 2024, because of increased expenditures on A.I.
Franco Granda, an analyst at PitchBook, which tracks start-ups, said in a report that SpaceX’s acquisition of Cursor represented the company’s new way of operating now that it was public.
“The I.P.O. gave SpaceX a valuation and a premium currency,” he wrote. “Signing a $60 billion all-stock deal four days after listing, with the stock up more than 50 percent from the offer price, shows the playbook.”
Mr. Musk’s companies have merged with one another, but he rarely buys outside companies. In 2016, Tesla, the electric carmaker he runs, bought SolarCity, an embattled solar company that he had helped establish. Last year, xAI acquired X, the social media platform he had bought in 2022.
SpaceX’s deal for Cursor is expected to close in the third quarter, the company said in a regulatory filing.
Cursor was founded in 2022 and quickly made waves as tech companies adopted its tools. It amassed billions in funding from top investment firms including Thrive Capital, Andreessen Horowitz and Accel.
In April, when the potential SpaceX deal was announced, Cursor said its lack of access to computing power for training its A.I. models had “bottlenecked” its growth. The deal gives it access to xAI’s infrastructure.
Adding Cursor to the fold could help Mr. Musk catch up on coding tools, an area in which his efforts have fallen behind those of Anthropic and OpenAI. In March, xAI hired two former Cursor leaders to help such work.
Mr. Musk has doubled down on his commitment to A.I. and his bet that the technology will rely on data centers in orbit for their proximity to the sun and access to solar power.
“It is humbling to consider that if we harness just 1 millionth of the sun’s power for A.I., that will be much more than a million times the intelligence of all of humanity,” he posted on social media.

