McDonnell Douglas Corp. became the Pentagon's top research contractor in fiscal 1987, winning awards totaling $1.7 billion, the Defense Department said Wednesday. Among educational and non-profit entities, the Massachusetts Institute of Technology continued to hold down the top ranking, winning research contracts during the year worth $407.6 million. The Johns Hopkins University was close behind with awards totaling $354.9 million. Overall, the Pentagon increased its spending on research by more than 10 percent during fiscal 1987, with awards reaching a grand total of $21.8 billion. That compared with $19.8 billion in fiscal 1986. Much of last year's increase appeared related to work on President Reagan's Star Wars anti-missile system. The amount of money invested in research on ``missile and space systems'' climbed from $6.9 billion in fiscal 1986 to $7.9 billion in fiscal 1987. Moreover, the Martin Marietta Corp. _ a key Star Wars contractor _ vaulted from fifth place in the fiscal 1986 rankings to second place last year with contract awards rising from $695.3 million to $1.6 billion. The latest figures are contained in a report prepared annually by the Pentagon to rank the top 500 companies or non-profit groups performing ``research, development, test and evaluation'' work. The rankings are based on a review of all contracts totaling $25,000 or more awarded during the fiscal year that ended last Sept. 30. McDonnell Douglas, whose overall ranking as the nation's largest defense contractor was announced just a month ago, displaced the Lockheed Missiles & Space Co. in assuming the top spot for research. McDonnell Douglas' research contracts climbed from $928 million in fiscal 1986 to $1.7 billion in fiscal 1987. Because of Martin Marietta's abrupt rise, Lockheed fell to 3rd place in the research rankings, winning contracts in fiscal 1987 worth $1.54 billion compared with $1.48 billion the year before. The remainder of the Top 10 included the Boeing Co. in 4th place with awards totaling $1.2 billion, followed by the Grumman Aerospace Corp., $901.5 million; General Electric Co., $784.4 million; Raytheon Co., $593.8 million; TRW Inc., $556.6 million; Rockwell International Corp., $494 million; and IBM, $470.9 million. The $407.6 million in research contracts won by MIT was enough to give it the 11th place ranking overall. In fiscal 1986, MIT had won contracts worth $363.9 million and was ranked 14th overall. Among other educational and non-profit entities, Johns Hopkins was 2nd in fiscal 1987 with $354.9 million and a 15th ranking overall, followed by The Mitre Corp., $347.5 million, 16th overall; The Aerospace Corp., $338.9 million, 18th overall; and Charles Stark Draper Lab Inc., $164.7 million, 26th overall. All told, the top 500 concerns accounted for 97 percent of the total research contracts awarded, or $21.2 billion. The top 500 included 380 businesses, 100 educational and non-profit organizations, three U.S. government agencies and 17 foreign contractors. The research awards to foreign concerns totaled $114.3 million, up only slightly from the $106.9 million reported in fiscal 1986. The leading foreign contractor remained the same, the Canadian Commercial Corp., with awards totaling $25.9 million.