He called it artificial intelligence.
The cause of death was believed to be a heart attack, said his daughter, Susan.
McCarthy, a Stanford University emeritus professor of computer science, also created Lisp, the standard programming language used not only in robotics and other scientific applications but in a multitude of Internet-based services, from credit-card fraud detection to airline scheduling. McCarthy used Lisp to invent one of the earliest computer chess programs.
"He was always focused on the future. Always inventing, inventing, inventing," said Ed Feigenbaum, a Stanford emeritus professor of computer science recruited by McCarthy in the 1960s.
Another major McCarthy innovation was an early system of computer time-sharing or networking, which allowed many people to share data by linking to a central computer.
"The Internet would not have happened nearly as soon as it did except for the fact that John initiated the development of time-sharing systems," said Lester Earnest, a retired Stanford senior research scientist who designed the first computer spell-checker. "We keep inventing new names for time-sharing. It came to be called servers.… Now we call it cloud computing. That is still just time-sharing. John started it."
McCarthy was a young assistant professor at Dartmouth College when he organized the world's first artificial intelligence conference. The objective was to explore ways to make a machine that could reason like a human, capable of abstract thought, problem-solving and self-improvement.
The scientists drawn to the conference would, he wrote, "proceed on the basis of the conjecture that every aspect of learning or any other feature of intelligence can in principle be so precisely described that a machine can be made to simulate it."
McCarthy had no idea at the time how difficult the challenge was. Designing a computer with the intelligence and common sense of a human remains an elusive goal and, according to many leading theorists, an impossible one. Despite the technological leaps forward of the last few decades, computers still cannot perform some mental tasks easily accomplished by a 5-year-old, such as recognizing that a string can pull an object but not push it.
Asked, as he frequently was, when the breakthrough might come, he said "five to 500 years," but he never said never.
McCarthy showed genius at a young age. Born in Boston to Irish and Lithuanian immigrants on Sept. 4, 1927, he was a sickly child and started school a year late but still managed to skip several grades. After his family moved to Los Angeles for his health, he taught himself college calculus and graduated from Belmont High School two years early. He entered Caltech in 1944.
According to the 2002 book "Arguing A.I.: The Battle for 21st Century Science" by Sam Williams, McCarthy was expelled from Caltech for failing to attend physical education classes. He served in the Army before returning to Caltech and earning his undergraduate degree in mathematics in 1948.
At Caltech he heard Princeton University mathematician John von Neumann give a speech about machines that can create copies of themselves. The notion fascinated McCarthy, who wound up receiving his doctorate in mathematics from Princeton in 1951.
He taught briefly at Princeton and Stanford before accepting a job at Dartmouth. The chief accomplishment of his artificial intelligence conference there in the summer of 1956 was to focus the energies of a few key researchers, including Marvin Minsky, who became one of the leading theorists of artificial intelligence.
McCarthy won a fellowship to MIT for the 1956-57 academic year. Minsky, who was then at Harvard, soon joined him at MIT. In 1959 they co-founded the MIT Artificial Intelligence Laboratory.
In 1962 McCarthy moved to Stanford, where he founded its artificial intelligence lab in 1965 and received the A.M. Turing Award, computer science's highest honor, in 1971. He retired from Stanford in 1994 but continued to write and lecture, most recently on the feasibility of human interstellar travel.
In addition to daughter Susan of San Francisco, he is survived by his third wife, Carolyn Talcott, of Stanford; a daughter, Sarah McCarthy, of Nevada City, Calif.; a son, Timothy Talcott McCarthy, of Stanford; a brother, Patrick, of Los Angeles; and two grandchildren.
With an unruly shock of white hair, brushy brows and a goatee, McCarthy was a distinctive presence on the Stanford campus. He also was notoriously brusque.
"He didn't like to deal with stuff that wasn't interesting," Earnest, his former colleague, said.
In 1966 McCarthy and his students programmed a computer to play chess with a computer in Russia in a series of highly publicized games. McCarthy's team lost two matches and drew two.
During the match, reporters descended on McCarthy in his office and began asking questions.
"He answered some of them," Earnest recalled. "Most of them were pretty silly questions. John started pacing back and forth. I could tell what was going to happen. He went out the door."