In the light of day, in full view of passing traffic, men urinate on the sidewalk. Women shoot heroin, and leave their needles and other trash behind. Others pass their days panhandling up and down the streets, then rest for the night on patches of grass.

The illicit activity and constant loitering at the crossroads of Massachusetts Avenue and Melnea Cass Boulevard in Boston, a growing problem in the three years since the city moved many of its social services from Long Island to this gritty area, has reached a breaking point, officials said.

Under pressure from frustrated residents, workers, and business owners in the area to address the problem, city officials are planning to build a new kind of shelter, providing the homeless, drug addicts, and others who congregate in the neighborhood a place to get off the streets.

“We have a problem, and so we’re trying something new,” Mayor Martin J. Walsh said in an interview.

Get Fast Forward in your inbox:

Forget yesterday's news. Get what you need today in this early-morning email.

Over the next month, city officials plan to transform the paved backyard of the Southampton Street Shelter, one of the new social service institutions born out of the closure of Long Island, into an “engagement space,” a kind of way station that would help steer the homeless into treatment while improving the area’s quality of life.

The city plans to spend as much as $1 million a year to furnish a barracks-like tent with air conditioning, televisions, and comfortable places to sit. Free coffee and snacks will be served throughout the day. Outside, there will be picnic tables and benches, planters with flowers, and, ultimately, a lawn.

Rules will be limited, allowing the inebriated to remain, and few will be barred. Outreach workers will mingle in hopes of persuading people to enter city programs that could help them find homes or overcome their addictions.

“This is about getting people off the streets, and creating a safe space,” Walsh said. “We want to make it a warm, welcoming place.”

The shelter, slated to open in late July, is the latest in a series of steps that city officials have taken to address the vagrancy and drug dealing in the area known as Methadone Mile that includes about a dozen drug-treatment programs, shelters, and other service providers. They have extended the hours of police bike patrols in the area, added outreach workers, and collaborated with Boston University to help keep the area clean.

City officials have been working with residents for months on the plan.

“It’s about time this happened,” said Janet Palumbo, manager of the New Market Pizza & Grill, which faces the intersection. “These people are all over the place, and it’s scary to walk the streets in the area.”

“They need a place to go, and we need a nice place to work,” she added.

But some neighbors doubt the plan will work, and they urge the city to do more.

Sahar Zaheer, 35, who lives nearby on East Springfield Street, has seen people assaulted in broad daylight. She regularly sees people unconscious on the sidewalks and finds herself thinking “I can’t believe this is America!”

“I don’t think the mayor’s plan will work,” she said. “These are human beings we’re talking about. You can’t just herd them like cattle.”

George Stergios, president of the Worcester Square Area Neighborhood Association, frequently sees people shooting up. He worries the city’s plan will backfire.

“My fear is that if you create a new facility, you’ll get more people coming to the neighborhood,” he said. “I would love to see these people taken care of, but I worry this will create a giant sucking sound, and more people will migrate here from other shelters.”

City Councilor Frank Baker, who represents the neighborhood, was more hopeful.

“There are people who use the whole neighborhood as a bathroom,” he said. “I hope, at least, it helps with that issue. Ultimately, I think this could be something good.”

Loitering has always been an issue in the area, but the problems in the neighborhood took a significant turn for the worse in 2015, when city officials spent $10 million to renovate a transportation building into the city’s newest homeless shelter on Southampton Street. Other services, including clinics to treat heroin addicts, opened nearby.

A year earlier, the city had condemned an old bridge leading to Long Island, closing a host of shelters and treatment facilities there.

Nine months after the Southampton Street Shelter opened, police found that violent crime in the area had risen 30 percent, drug violations had jumped 55 percent, and aggravated assaults were up 47 percent. Citywide, such crimes declined over the same period.

Walsh said he recognizes that the new shelter may not be a panacea. He acknowledged that there’s no way for the city to force people to leave the streets and spend their days in the new space.

But he said the day shelter could make a dent in a persistent problem. “This might not work,” he said. “But we’re hoping it works.”