BOOK DEALER COMES EAST, THE BETTER TO FIND BOOKS

HAMDEN, Conn., Sept 5— Somewhere in the middle of nowhere (runs the dream of a certain fanatical type of bookbuyer) in a crumbling Southern mansion, say, or a dull city's sleaziest back alley, or in a cornfield, stands a miraculous bookstore, filled to the rafters with old first editions.

There are shelves and aisles and precarious piles of rare, scarce, curious, readable old books. Other browsers are nowhere to be seen. The bookbuyer alone has apparently stumbled on the gold. Just where the store's proprietor found all these wonderful books is a question flecked with mystery, since there don't appear to be that many book collectors or libraries or scholars in this area, but in any case the proprietor seems content to let his shop remain obscure, unvisited and unprofitable.

In the 1970's and early 80's a bookstore in Des Moines nearly fit the fantasy. It was run by two Iowans, Philip McBlain, a Harvard-trained lawyer who decided he liked books more than he liked practicing law, and his wife, Sharon. The McBlains specialized in scarce and scholarly books on Africa, the Middle East, Asia, Latin America and black American history and literature. Their customers were an international assortment of university libraries, academics and private collectors. Periodically they would announce their wares to the world by catalogue. The world replied by letter or cable. Almost nobody visited the store.

The Why of the Where

The fact that this intellectually specialized enterprise was based in Des Moines inspired a certain astonishment at the economics of the thing, since Iowa just could not contain all that many specialists in Ottoman diplomatic history or 19th-century black American poetry, plus a certain amount of speculation that maybe it made no difference after all where such a business was headquartered.

But it did make a difference. Two years ago, although the McBlains would have been happy to remain in Iowa, they came ''out East,'' as Mr. McBlain put it, to look into the possibility of moving to Washington or Rhode Island or Fairfield County, Conn. Eventually they settled here in Hamden, a few miles north of New Haven. And their crowded little bookstore on the second floor of a small shopping center on Whitney Avenue is at last providing the McBlains with a reliable income.

Mr. McBlain, a plain-spoken 43-year-old who likes to find and buy the books that his wife then catalogues, sat in his shop the other day trying to explain the difference between his line of work in Iowa and in Connecticut.

Proximity to Books

A few more customers visit the shop, especially Europeans and other foreigners who think Hamden is just a few minutes from New York City. But they have hardly amounted to a surge. ''That's not the main thing,'' Mr. McBlain said.

He has visited more of his customers in university libraries up and down the Northeast. But he said he wasn't much of a salesman. His wife's painstaking catalogues, each dedicated to one of the store's specialties, like the Middle East or Sub-Saharan Africa, each containing descriptions of a thousand or more books, papers, pamplets and whatnot, each a work of bibliographic reference in itself, are still the store's main line to customers.

More important, Mr. McBlain said, have been his increased contacts with other book dealers and specialists. He has been learning more.

''But the main thing,'' he said, ''is the sources. I used to drive for days and days out West looking for books to buy. It wore me down. Or I'd come out East, which is where you find most of the books to buy, but then the trips cost too much.''

''We kept selling more and more books and making less and less money,'' said Mrs. McBlain.

''Now I go on a trip and come back in a day,'' her husband said. ''Really, from the coast of Maine down to Washington there are books to buy.'' There are used book dealers and library sales and attics.

Books, Books Everywhere

Farther south, he said, the pickings grow thinner. ''It's the same problem as out West, of not being able to put together enough stores to visit in a day. Florida has some good books, but one problem with Florida is the climate and the bugs. Tough on books.''

The shop in Hamden is now packed with books. The McBlains' basement at home is filled with books. The dining room table is piled with books. The garage is stuffed carless with books. ''I'd say we have between 10,000 and 15,000 books,'' Mr. McBlain said.

The McBlains, whose 17-year-old daughter, Christine, reads Russian, which has been bibliographically helpful, have been selling 19th-century abolitionist newspapers and other black Americana to the New York Public Library and to Temple University in Philadelphia, books on Southeast Asia to Yale and Cornell and books on Russia to Bowdoin College in Maine. ''We'd have difficulty surviving without the libraries,'' Mr. McBlain said.

They keep discovering things, too, as dedicated book-people will. An early black American poet, previously unrecorded. Old histories of Iran, Nicaragua, South Africa and other continuing battlegrounds. The scarce 1932 Baghdad edition of Freya Stark's ''Baghdad Sketches.'' Books by linguists and archeologists. Dry old engineering studies of dams and railroads. Century-old tourist guides. Propaganda. Books of photographs. Entire worlds.

''I used to like to sell just the books that I thought people should read,'' Mr. McBlain said with a flicker of a dry smile. ''It was the same when I was practicing law, which was a problem. I've become a little more tolerant.''