An MCP server behind sign-in, in Google's Agent Registry | PharmaTools.AI
← Publications · Notes
Note · Deployment · MCP · 3 Nov 2026

An MCP server behind sign-in, in Google’s Agent Registry

PubCrawl is my MCP server for PubMed, drug labels and clinical trials. Most people run it on a laptop with npx, but a pharma IT team won’t install a community plugin that way. They want it inside their own cloud project, behind their own sign-in, where their agents can find it. So I deployed it to Google Cloud Run and registered it in Google Cloud’s Agent Registry, end to end on a real project. Three things didn’t go the way the documentation suggested.

What I set up

PubCrawl already had an HTTP mode. I added a container image that runs as a non-root user, shuts down cleanly and is built and smoke-tested in CI on every push. I deployed it to Cloud Run in London with authentication required, and with --functional-type=mcp-server, which is meant to add it to Agent Registry automatically.

The lock-down worked first time. Every request without a Google identity got a 403, on every path, before it reached the server. With an identity token, the health check answered as normal.

What didn’t go as expected

The automatic registry entry was empty Cloud Run did create an Agent Registry entry, but it held only a link to the Cloud Run service: no endpoint URL and no tools. An agent browsing the registry could see PubCrawl existed but not how to call it or what it does. The registry reads tools only from servers it can reach publicly, and a server behind sign-in isn’t. The more locked-down the server, the less the registry can learn about it on its own.
The tool spec needed input schemas The fix is to register the endpoint manually with a tool spec. The docs list each tool’s name, description and annotations, so that’s what I sent. The registry rejected all 14 tools: inputSchema is required. In fairness, the docs also say the spec must follow the MCP tool schema, and that schema does require it, but the field list doesn’t mention it.
The full schemas didn’t fit The registry caps a tool spec at 10 KB. With complete input schemas, PubCrawl’s came to 12.5 KB, so required schemas and the size cap were in direct conflict.

How I fitted it in

Most of the weight was in the parameter descriptions: 2,839 characters of help text written for language models. Dropping those, along with each schema’s $schema line, kept everything an agent needs to call a tool correctly and brought the spec to 8.1 KB:

Tool specSizeAccepted
Name, description and annotations only4.7 KBNo: schemas required
With complete input schemas12.5 KBNo: over 10 KB
Schemas kept: types, required fields, enums, defaults, ranges8.1 KBYes

The full descriptions aren’t lost. Once an agent connects, it gets the complete schemas from the server itself; the registry copy is only for discovery. I didn’t write the spec by hand: PubCrawl generates it from its own tool definitions, and a test fails if the committed file drifts from the code or grows past 10 KB, so adding a tool later can’t quietly break the registration.

After that, the registry listed PubCrawl with its endpoint and all 14 tools. As a final check, Claude Code connected through Google’s sign-in and ran a PubMed search on ensifentrine in COPD, which came back with live results, the same as from the public deployment.

What I took from it

I ran the deployment with Claude as a working partner. The decisions and conclusions are mine. Everything here, including the commands as run, is in PubCrawl’s Cloud Run and Agent Registry walkthrough.