Picture a cafe' in Egypt or Morocco, or a darkened tavern somewhere in Spain. The atmosphere is warm, leisurely, and convivial. Groups of people are clustered at tables, talking and laughing. They are drinking ouzo, wine, sherry, or beer -- depending on the location. And inevitably, they are sampling a sumptuous selection of hot and cold finger-size morsels of food.

In the Middle East, these snacks are called mezze; in Spain, they are known as tapas. The ingredients and shapes may differ, but both incorporate a social ritual found in almost every country of the world: The leisurely art of drinking spirits, sharing conversation and savoring tidbits of food.

"The tapas tradition," wrote Penelope Cassas in the opening chapter of her highly acclaimed book, "The Foods and Wines of Spain" (Knopf, 1982), "that delightful Spanish custom of gathering before lunch and again before dinner for a glass of wine or beer and a sampling of appetizers -- is so very popular in Spain, as much for the Spaniard's overriding need for company and conversations, as for the delicious food, which may range from the most sophisticated to the most simple fare.

"Every Spaniard has his favorite tasca, as such bars are called, where he goes regularly and where he can be sure to meet his friends and business acquaintances," she wrote. "Doctors, lawyers, politicians, actors -- all have their favorite tascas to talk shop. That a businessman may make or break a deal over tapas is a way of life in Spain."

In warm climates, where the pace of living is slow and easy, mezze and tapas are enjoyed as a daily ritual. In this country, it seems fitting, particularly considering the recent weather, to celebrate the holiday season by inviting friends or relatives to partake of a leisurely snack of spirits and these miniature delicacies.

Mezze and tapas both include a diverse assortment of foods. They generally are served as hors d'oeuvres and in this role the offerings usually are light and delicate. But they also frequently are served as a multi-coursed meal-in-themselves. In this case, the selection is appropriately more expansive and the choices are more substantial and filling. Traditionally, these foods are eaten in a cafe' or tavern, but most lend themselves nicely to home preparation and serving.

"Mezze are public foods -- the sort that are sold in the street by vendors and peddlers, and they are the major part of restaurant menus," said Claudia Roden, a London-based authority on Middle Eastern cooking and author of "Everything Tastes Better Outdoors" (Knopf, 1984) and "A Book of Middle Eastern Food" (Knopf, 1972).

"Restaurants all over the Middle East developed traditionally from street food and still serve mainly grilled meats of the simple street brazier or kebab stall, with different types of mezze to start with. Although people do have mezze at home, they don't bother with the type of variety that restaurants offer unless they are entertaining," said Roden.

Roden maintains that mezze, like tapas in Spain, are a very important feature of Middle Eastern cooking. "They are particularly appealing because they are eaten in an unhurried and leisurely spirit and because they represent a wide variety of dishes. People can pick and choose a little at a time. They also are usually fresh and light," she said.

According to Roden, some of the most popular mezze in the Middle East include:

* Olives and pickles.

* Assorted nuts.

* Dips such as tahini (sesame paste), hummus (a pureed chick pea-tahini dip) and baba ghanoush, an eggplant dip made with tahini.

Soft white cheese served fresh cut into cubes, or hard Greek cheeses like halumi and kasseri, which may be fried or grilled.

Small savory pies served whole, or bigger ones cut into squares and filled with spinach, meat or cheese.

* Meatballs, fish fritters, and fried liver slices. Brains boiled or sauteed and served cold.

* Many different kinds of vegetables and leaves that are stuffed and eaten cold, or filled with meat and rice and served hot.

* Vegetables that are cooked in olive oil and served cold, or simply eaten raw in a salad.

* All types of salads, including bean salads such as tabbouleh, and salads made with fava beans, green beans, lentils, beets, artichokes, cabbage, tomatoes, peppers, spinach, mushrooms, almonds and oranges.

Yogurt frequently is served with the mezze, along with flat bread for dipping into the pure'ed mixtures. Rodin recommends selecting the types of mezze to be served by contrasting complementary flavors, textures and colors.

Like mezze, tapas not only incorporates an extensive variety of different dishes, but involves a ritual that is part of an age-old tradition. Penelope Cassas is writing a book (to be published in the fall of 1985 by Knopf) devoted exclusively to tapas. In the past year, she has visited Spain three times to search for new varieties of this food she was first introduced to as a student in Spain.

Tapas, as we know them, originated about a century ago in southern Spain, according to Cassas. "Today, of course, tapas are all over," she said, "but there are certain areas -- like Seville, and the big cities of Madrid and Barcelona -- where it's a bigger thing. They are perfect with sherry, which is the traditional drink, because it is a fortified wine and it's quite strong. Still, wine and sangria also go nicely as well.

"At first, I thought I might try to define exactly what a tapas was and I thought you could safely say that it was a dish served without a fork and eaten with the fingers, but then we were served tapas with small forks," said Cassas. "Then, I decided that you could describe tapas as food served without a knife, but then we were served some with small knives. It seemed like almost every definition was proven inaccurate later. Many dishes that are served as first courses are considered tapas, but then again, anything that is served in small portions, that may be eaten quickly, and goes well with a drink could be considered a tapa."

Traditional forms of Spanish tapas include chorizo, as well as other types of sausage, a potato omelet, grilled shrimp, stuffed and fried squid, grilled red peppers, baby eels, mussels, meatballs, turnovers and tartlets. Like mezze, the variety is unlimited. During her quest for new tapas, Casas found a bar that serves more than 100 different varieties.

There are several young chefs in Spain, however, who have taken the versatile tapas theme and created some new, innovative variations. One is Toya Roque, who is the chef and owner of the one-star Restaurante Azulette in Barcelona.

When Roque redesigned the interior of the Victorian villa next to her restaurant into a bar (the restaurant itself is located in the glassed-in garden next to the house), she decided to prepare a variety of tapas to accompany drinks. Roque's tapas, like her other food, depart from the traditional.

Recently in New York she described some of her unusual creations and explained how they were conceived.

"For me, it was very funny, because one day, a food writer asked me to pair four or five different kinds of alcohol with different types of foods. At first, I thought it was very silly, but then I started thinking about it and by the end of the day, I had decided it all," said Roque. "But the funniest part of it is that the dishes I designed that day are the very same tapas that I serve in my restaurant.

"With cognac, I serve pitted prunes stuffed with a mousseline of chicken and little pieces of carrots. We then cook the prunes in a little bit of cognac, stock and a cinnamon stick. Then the prunes are served with a little bit of the reduced cooking liquid. You just eat them with a small fork.

"With vodka, I take thin slices of smoked salmon, stuff them with fresh marinated salmon -- like a tartar -- roll it up, and top it with a dot of herbal mustard. There are about six or seven rolls in one serving and we call them 'salmon tartars.'

"With sherry, I like to serve little canape's that are made with cabrales cheese, a type of blue cheese. The cheese is mashed with butter and a little sherry, then spread on toast.

"With rum, I make little tartlets that are filled with boned sardines mashed with butter and piped into the shell. It is then topped with half of an olive."

In addition, Roque serves some of the more traditonal tapas, including croquettes of fish and chicken, and little puffs of cream puff pastry stuffed with cod.

For those interested in sampling this traditional food in Washington, El Bodegon restaurant has tapas. For those preparing tapas in the home, Cassas suggests planning the selection of dishes as you would any meal: Choose dishes with different cooking methods -- a deep-fried dish, one saute'ed, one braised, and a baked dish. The following recipes should give you some ideas for entertaining guests in the traditional Spanish and Middle Eastern style: HUMMUS (Makes about 4 cups) 2-3 cloves garlic, peeled 2 1-pound cans chick peas, drained, rinsed lightly, and drained 1/2 cup tahini (sesame seed paste) 1 cup olive oil Juice of 2 lemons 1 teaspoon salt, or to taste 1 tablespoon olive oil Sprinkling of paprika Syrian bread and bermuda onion slices, for serving

In a food processor fitted with a steel blade, puree the garlic. Add the chickpeas and process, turning the machine on and off, until smooth. Add the tahini and olive oil and continue processing until the mixture is well-mixed. Add the lemon juice and salt to taste. Transfer to a serving dish and drizzle the top with a tablespoon of olive oil and paprika. Serve with pieces of syrian bread and slices of bermuda onions. POOR MAN'S CAVIAR (6 servings) 3 eggplants, about 1 pound apiece 1 teaspoon salt 2-3 cloves garlic 1/2 medium onion 1 tablespoon minced fresh basil, or 1 teaspoon dried basil 1 teaspoon oregano 1/2 cup olive oil Juice of 1 lemon 2 tablespoon minced parsley 1/2 teaspoon black pepper Dark rye bread and tomato slices, for serving

Trim the stems and bottoms from the egglants and cut through the thickness in half, leaving the skin on. Arrange the eggplant halves, cut surface up, on a cookie sheet and sprinkle the tops with the salt. Let sit 25 minutes at room temperature. Bake the eggplants in a 425-degree oven 30-35 minutes, or until tender when pierced with a knife. Remove and let cool.

Scoop out flesh from the eggplant and set aside. In a food processor fitted with a steel blade, finely mince the garlic and onion. Add the basil and oregano, and process, turning the machine on and off. Add the eggplant and blend until smooth. Add the olive oil in thin stream while the machine is running. Then add the lemon juice and process until well-mixed. Transfer to a bowl and fold in the parsley and pepper. Add more salt, if necessary. Serve on dark rye bread with slices of fresh, ripe tomatoes. CLAUDIA RODEN'S ONIONS WITH VINEGAR (6 servings) 2 large mild onions, spanish or bermuda 1 teaspoon salt 3 tablespoons wine vinegar 1 tablespoon dried crushed mint

Peel the onions and cut in half. Cut the halves into slices about 1/4-inch thick, and place in a bowl. Sprinkle with a little salt, add the vinegar and mint. Toss the onions and let stand at least 1 hour at room temperature. Serve as an appetizer or to accompany a main dish.

From "A Book of Middle Eastern Food," by Claudia Roden PENELOPE CASSAS' SHRIMP IN A PIPARRADA SAUCE (6 servings) FOR THE SHRIMP COOKING LIQUID: 6 cups water 1 cup clam juice or fish broth 1 bay leaf 1 slice lemon 2 sprigs parsley 5 peppercorns 1 slice onion 1/4 teaspoon thyme 1 teaspoon salt TO FINISH: 1 1/2 pounds medium or large shrimp in their shells 1 medium cucumber, peeled and seeded

1 medium green pepper, ends trimmed and seeded

1 small onion, peeled 2 ripe tomatoes, stems removed 6 tablespoons olive oil 3 tablespoons red wine vinegar Salt and papper to taste

In a large non-aluminum pot, assemble the ingredients of the cooking liquid. Bring to a boil and simmer 15 minutes. Add the shrimp and cook briefly, about 2-3 minutes, depending on the size of the shrimp. Drain, cool, and shell.

By hand or in a food processor, finely mince the cucumber, green pepper, and onion. Transfer to a bowl. Chop the tomatoes finely by hand and add to the mixture. Stir in the olive oil, vinegar, salt and pepper. Refrigerate until ready to use, but do not leave overnight. Serve in a small bowl with the shrimp arranged either around the rim or on a plate.

From "The Foods and Wines of Spain," by Penelope Cassas CLAUDIA RODEN'S PIES FILLED WITH MEAT AND PINE NUTS (Makes about 35) FOR THE DOUGH: 2/3 cup melted unsalted butter 2/3 cup vegetable oil 2/3 cup warm water 1 teaspoon salt Approximately 4 1/2 cups all-purpose flour FOR THE FILLING: 1 large white onion 2 tablespoons corn or safflower oil 3 tablespoons pine nuts 1 1/4 pounds ground lean lamb or beef 1 teaspoon allspice 1/2 teaspoon powdered cinnamon Salt and pepper to taste

To make the dough, in a large bowl, combine the butter, oil, water and salt. Sift in the four, stirring well with a fork and then, lightly working with your hands to form a soft dough. Roll into a ball, adding more flour if necessary. Wrap in plastic and refrigerate 30 minutes.

To make the filling, chop the onion finely. In a skillet, heat oil until hot and fry the onons until soft and transparent. Add the pine nuts and fry until slightly colored. Add the ground meat and fry, stirring constantly, until the meat has changed color. Add the allspice, cinnamon, moisten with water, and cook a little longer. Add salt and pepper to taste. Drain in a strainer to remove excess fat. Let cool.

On a lightly floured surface, roll out the dough to a long rectangle that is about 1/4-inch thick. Cut the dough into 3-inch rounds. Gather the dough scraps together and press. Roll out again and cut into rounds. Place a heaping teaspoon of filling in the center of each round and fold over the dough in half to cover. Pinch the edges to seal in the filling, finishing the edge with the tines of a fork, or pinch and fold over the edge to form small scalloped pleats. Arrange on ungreased baking sheets. Bake for 35 minutes in a 350-degree oven, or until pale golden. Remove, cool and serve. Makes about 35.

From "Everything Tastes Better Outdoors," by Claudia Roden