---
id: w1/m11/t002
title: GraphQL + MCP parity for custom domains
worker: worker1
status: done
estimate: 30m
depends_on: [w1/m11/t001]
---

## Objective

The same domain verbs over the other two adapters: GraphQL fields shaped like Render's dashboard (nest under `Service` if that's what a capture shows — check `docs/render-artifacts/` first; otherwise document the divergence), and MCP tools named in Render's REST vocabulary (`list_custom_domains`, `add_custom_domain`, `delete_custom_domain`) keyed on `serviceId`.

## Context

- Per-feature fragments: `lego/backend/internal/apps/{graphql,mcp}.go`; single service implementation from t001.
- Precedent for dashboard-shape verification: w4/m6's Playwright capture of `serviceEnvVarKeys`.

## Steps

1. Check existing captures / capture the dashboard shape if cheap; otherwise follow the env-vars precedent (REST = public shape, GraphQL = dashboard shape, bex-named mutations documented as such).
2. Implement fragments; update docs/ADR006-bex-api.md MCP table + GraphQL section.

## Files

- `lego/backend/internal/apps/graphql.go`, `lego/backend/internal/apps/mcp.go`
- `docs/ADR006-bex-api.md`

## Acceptance criteria

- [ ] All three surfaces return identical domain data for the same App; MCP tools delegate to the same service methods.

## Out of scope

- Dashboard UI (w5/004).
