TREASURE ISLAND — Is Google (GOOG) building a seafaring server farm? An oceangoing educational facility? Or how about a floating showroom for the wearable gadget known as Glass?

Speculation is rampant about the top-secret, four-story structure that’s been erected atop a huge barge, now sitting next to a pier at Treasure Island in the middle of San Francisco Bay. Neither Google nor the mysterious company listed as the barge’s owner have said a peep in public since the tech news site CNET linked the hush-hush project to the Internet search giant last week.

But a regional environmental official told this newspaper Monday that attorneys approached his agency several months ago to inquire about permits they’ll need if they want to park the floating structure on a long-term basis. Executive director Larry Goldzband of the Bay Conservation and Development Commission said the attorneys represented either Google or an affiliated company, and they referred in general terms to “using the vessel as a tool to teach about technology.”

The Google representatives mentioned Fort Mason as a possible site to moor the barge for an extended time, said Goldzband, who told them to come back when they were ready to provide more specifics.

Meanwhile, a second massive, mystery barge has been moored in a Maine harbor since earlier this month, according to the Portland Press Herald. The barge in Maine has a similar four-story structure and is registered to the same company that owns the barge at Treasure Island.

U.S. Coast Guard records, in fact, show at least four big barges are owned by that company, By and Large, LLC, which has at least circumstantial links with Google.

Initial news reports have centered on the possibility that Google is building floating data centers, which might use seawater for cooling — since stacks of servers create a lot of heat — and produce its own power from ocean wave movement. Google obtained a patent for just such an idea back in 2009.

The tech giant is known for pursuing wild ideas, from self-driving cars to radio-equipped balloons for delivering Internet service to undeveloped regions. And experts have speculated Google could deploy floating computer centers to remote areas, or perhaps use them as backup facilities in case of an earthquake on land.

But San Francisco television station KPIX reported that unnamed sources said Google wants to use the barge as an outlandish, floating “marketing center” or retail store, where the company could show off cutting-edge gadgets like the wearable Google Glass.

Goldzband’s account raises a third possibility — that Google is building some kind of oceangoing technology classroom — although either a high-tech data center or marketing venue could incorporate science-related “teaching” into its activities. Google didn’t respond to requests for comment.

The structure appears to have been assembled from modular units that resemble shipping containers, stacked in a cube except for one unit that sits at an angle to the others. The building is topped by 12 slender masts or antennae.

As first reported by CNET last week, the four-story facility was constructed quietly over the last year — first inside a large hangar on Treasure Island, surrounded by security fences, and later moved to the 250-foot barge moored to a pier at the former Navy base.

Treasure Island records show the hanger is leased to By and Large. But CNET’s sleuthing determined the primary contact for the lease is an agent for the CBRE commercial real estate firm, assigned full-time to working with Google.

By and Large representatives couldn’t be reached for comment. But CNET reported another tantalizing detail: A yacht that reportedly belongs to Google CEO Larry Page was spotted last week at the same Treasure Island pier.

Mercury News research director Leigh Poitinger contributed to this report. Contact Brandon Bailey at 408-920-5022; follow him at Twitter.com/BrandonBailey.