esmeralda / services
AGENTS.md25 starsChanged 8 days agoApache-2.0View on GitHub
Local rules for MCP tool servers. The root AGENTS.md still applies. Background: docs/src/2-workloads-and-catalog/02-mcp-tool-servers.md. envoy/ is the digest-pinned Envoy adapter image (see its README.md), not an MCP server.
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 31,542 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository6 other files it gives its agents.
- AGENTS.mdAGENTS.md
- apps/agents/AGENTS.mdAGENTS.md
- infrastructure/AGENTS.mdAGENTS.md
- packages/esmeralda/AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- docs/src/llms.txtllms.txt
The file
We split this AGENTS.md into the rules it gives an agent
1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 31
Verify: make test, make test-terraform, then after deploy make test-gateway ENV=<env> and a real make query AGENT=cx-mortgage-orchestrator …
≈ “Common” is an estimate: at least 1 in 5 of the 40,246 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
apps/services/AGENTS.md
Local rules for MCP tool servers. The root AGENTS.md still applies. Background:
docs/src/2-workloads-and-catalog/02-mcp-tool-servers.md. envoy/ is the digest-pinned Envoy
adapter image (see its README.md), not an MCP server.
Server conventions
- One directory per server (
corporate-email,income-verification,legacy-dms), each a uv workspace member listed in the rootpyproject.toml. - FastMCP app mounted at
/mcp(streamable HTTP, stateless, JSON responses) inside a Starlette app with a/healthroute; served by uvicorn on port 8080 in the container. Followincome-verification/main.py. - Telemetry through the local
otel_setup.py(init_telemetry,trace_tool). tools.jsonlists the tools (name,description,inputSchema). It is published as the server's Agent Registry tool spec, so keep it in sync with the@mcp.tool()functions.- Unit tests next to the code (
test_main.py/test_server.py), wired intomake test. - Data is synthetic only (e.g. the fictional Sterling applicants). Never add real personal data.
Dockerfile:python:3.12-slim, uv copied from the pinnedghcr.io/astral-sh/uvimage,requirements.lockinstalled with--require-hashes, non-root user. Keep that uv version in sync with.github/workflows/*.yml.
Deployment contract (infrastructure/modules/5-workloads/services/<name>/)
- Cloud Run with
ingress = "INGRESS_TRAFFIC_INTERNAL_LOAD_BALANCER": reachable only through the entry point and the gateway. - Custom audiences: the service accepts ID tokens for
http(s)://<name>.esmeralda.internaland.../mcp(plus legacy*.internal.gatewaynames) in addition to itsrun.appURI. A new server must list its own hostnames incustom_audiences. roles/run.invokeronly forinvoker_service_accounts(the gateway SA is the normal path).- Image resolved to a digest in
image.tf(local.image_by_digest). - Registry entry:
google_agent_registry_service.governance_mcpin the governance project with interfacehttps://<name>.esmeralda.internal/mcp(JSONRPC) andmcp_server_spec.content = file(var.tools_spec_path)(apps/services/<name>/tools.json). Itsregistry_service_idoutput must be added to theiap-egressunit, or agents can't reach it through the Agent Gateway. register_mcp.pyonly writes a local, gitignoredapps/services/mcp_registry.json; it calls no Google API.
Adding a server
apps/services/<name>/(app,tools.json, tests,pyproject.toml,Dockerfile,.dockerignore); add it to the workspace members, thenmake lockand commituv.lock.- Make targets:
build-service-<name>(andbuild-services), tests inmake test, ports inmake run-mcp-localand the agents'local_env. - Module + live units (dev and prd) under
layer-5-workloads/services/<name>, an entry in the gateway'sagent_endpoints(probe = "mcp"), and theiap-egressregistry list. - Verify:
make test,make test-terraform, then after deploymake test-gateway ENV=<env>and a realmake query AGENT=cx-mortgage-orchestrator TARGET=remote ENV=<env>.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

