guide
guide8 min read

How Do You Build an MCP Gateway or Registry to Govern MCP Servers Across a Data Org?

Five steps to approve, scope and audit every MCP server before it reaches a warehouse credential

To govern MCP servers across a data org, build two things: a registry that records which servers are approved, and a gateway that every client must pass through to reach them. The registry is the allow-list and the gateway is the enforcement point. The MCP specification, revision 2025-06-18, defines OAuth-based authorization for HTTP transports, and it gives a gateway the standard hook it needs to check identity on every call. Everything else, such as scopes, review and audit, sits on top of that.

Key Takeaways

  • •A registry answers "which MCP servers may we run?" and a gateway answers "who may call which tool right now?". You need both, because approval without enforcement is a spreadsheet.
  • •Treat each MCP server as a dependency with credentials: pin its version, record its owner, and review the tools it exposes before it is listed.
  • •Put authentication at the gateway using the MCP authorization spec and OAuth protected resource metadata (RFC 9728) instead of per-server API keys in developer config files.
  • •Log every tool call with caller, server, tool, arguments hash and result status, and keep write-capable tools behind an approval step.
  • •Start read-only. Promote a server to write access one domain at a time, with a named owner and a way to roll back.

Why an Org-Level Layer Is Needed

MCP made it cheap to connect an assistant to a warehouse, a catalog or a ticketing system. That convenience cuts both ways. Any engineer can add a server to a client config in one line, and that server may hold a warehouse credential, read PII columns, or run SQL. Nothing in the protocol stops someone installing an unreviewed package from a public index. Interest in this problem is visible: Uber Engineering described its approach in a post titled "Designing MCP Gateway, Uber's MCP Management Platform", and a Hacker News thread, "Mcpseal: Grade an MCP server for safety before you install it", shows people are trying to score servers before trust is granted.

For data teams the stakes are higher than for most. A coding assistant that misreads a file produces a bad diff you can review. A data assistant that misreads a permission can export a customer table. The questions we hear are concrete: who has access to PII columns in analytics, which servers can write to production, and what did the assistant actually run last Tuesday. Without an org-level layer, the honest answer to each is "we would have to check every laptop".

This is a different problem from approval gates on agent actions. Action gates decide whether a particular write should proceed. Server governance decides which tools exist in the first place. You need the second to make the first meaningful, because an approval prompt on a server nobody reviewed only gives false comfort.

Step 1: Inventory What Is Already Running

Before designing anything, find out what exists. Ask each team for the MCP servers in their client configs, and scan shared repositories for config files that reference servers. Record the transport (local stdio process or remote HTTP), the credentials each one uses, and which clients load it. Expect surprises: local servers started with a personal token are the usual finding, and they are invisible to any central log.

Sort the inventory by blast radius rather than by popularity. A server that only reads documentation is low risk. A server that holds a warehouse role, a cloud API key or a catalog admin token is high risk, whatever it is called. This ranking decides the order you migrate servers behind the gateway, and it keeps the first month focused on the handful of servers that matter.

Keep the inventory as data, not a document. A simple table with owner, transport, credential type, tools exposed and last review date becomes the seed of your registry. If the inventory lives in a wiki page it will be out of date within a week.

Step 2: Build the Registry as an Allow-List With Owners

A registry for an org is not the same as a public index. The upstream project publishes a community MCP registry with a metadata format for describing servers, and that format is a sensible starting schema for your internal one. Your version adds the fields a public index cannot know: the owning team, the approved version, the data domains it may touch, and the review that cleared it.

Each entry should pin an exact version or image digest, not a floating tag. Review the tool list the server advertises, including descriptions, because tool descriptions are text a model reads and can carry instructions. Record which tools are read-only and which can change state. If a new version adds a tool, the registry entry should fail closed until someone reviews the difference.

Give every entry a named owner and an expiry. An entry with no owner cannot be reviewed when something changes, and an entry with no expiry never gets looked at again. A 90-day re-review is a reasonable default for write-capable servers, and a longer interval is fine for read-only ones.

Step 3: Put a Gateway in Front and Move Authentication There

The gateway is a proxy that speaks MCP to clients on one side and to approved servers on the other. Clients are configured with one endpoint. The gateway looks up the requested server in the registry, refuses anything not listed, and forwards approved calls. Because it is the only route, it is also the only place you need to enforce identity, rate limits and logging.

Authentication should follow the standard rather than a custom scheme. The MCP authorization spec builds on OAuth, and RFC 9728 lets a protected resource publish metadata that tells a client which authorization server to use. Use your existing identity provider, issue short-lived tokens per user, and map groups to registry scopes. The result is that revoking a person's access takes one change in one place, and no developer keeps a long-lived warehouse key in a dotfile.

The gateway should hold downstream credentials, not the client. When a user calls a warehouse tool, the gateway exchanges their identity for a scoped, short-lived credential on their behalf. That keeps secrets off laptops and makes "who ran this query" answerable from a single log.

Step 4: Scope Tools, Not Just Servers

Allowing a server is too coarse. A SQL server might expose a read tool and a write tool, and most people need only the first. Have the gateway filter the tool list per caller so that tools a user may not call are never offered to the model. This also reduces the surface a prompt-injected instruction can reach, since a tool that is not listed cannot be invoked.

Add data-aware rules for the data domain. Block queries against columns tagged as PII unless the caller holds the right role, cap result sizes, and require a justification string on bulk exports. Our Governance Agent generates RBAC policy and PII tagging from catalog metadata, and the Catalog Agent supplies the tags, so the gateway rules can be derived rather than hand-written.

Keep a default of read-only. Writes should require a separate registry flag, a named approver and a rollback path. Promote one domain at a time, so a mistake is contained to one set of tables.

Step 5: Log, Grade and Review Continuously

Every call through the gateway should produce a structured record: caller, client, server, tool, a hash of the arguments, row counts, duration and outcome. Store the records somewhere tamper-evident and write-once for the retention window your compliance team needs. These logs answer incident questions fast, such as why row counts dropped 40% overnight or which assistant touched a table before a pipeline broke.

Grade servers before listing and keep grading afterwards. A pre-install check can look for obvious problems: requested permissions that exceed the stated purpose, tool descriptions that contain instructions aimed at the model, unpinned dependencies, and network calls to unexpected hosts. Public tools for scoring servers are appearing, as the Hacker News thread above shows, and you can run similar checks in your own CI when a registry entry changes.

Review usage as well as risk. A server nobody has called in 90 days is a deprecation candidate, and our Usage Intelligence Agent can flag that from the logs. Removing dead entries shrinks the surface faster than any new control.

Where the Gateway Ends and Agent Governance Begins

A gateway governs access to tools. It does not decide whether a particular action is wise. Once a server is approved and scoped, the question becomes what an agent may do with it unattended. That is where an autonomy dial per domain helps: observe only, propose changes for approval, or act and report. Data Workers ships fifteen MCP-native agents, and each can sit behind your gateway like any other server, with the same registry entry, scopes and audit trail.

The OSS edition, dw-claw, is Apache 2.0, runs locally and is read-only by default, which makes it a reasonable first entry in a new registry. Pro adds writes, approval workflows and audit trails. Whichever edition you run, the registry and gateway described here stay yours, and data does not need to leave your infrastructure.

Frequently Asked Questions

Do we need both a gateway and a registry?

Yes. A registry without a gateway records intent but cannot stop a developer adding an unlisted server to a local config. A gateway without a registry has nothing authoritative to check against, so it ends up as a pass-through. Build the registry first as a simple table, then place the gateway in front and make it read from that table.

Can we use the public MCP registry for this?

Use it as a source of metadata, not as your approval list. The community registry repository describes published servers, but being listed publicly does not mean a server is safe for your warehouse. Mirror the entries you want into an internal registry, pin versions, and add your own review and ownership fields.

How do we handle local stdio servers?

Local servers bypass a network gateway by design. Either wrap them so they run as a remote service behind the gateway, or restrict developer machines to a managed client config that points only at the gateway. For servers that must stay local, require signed, pinned builds and ship their logs centrally.