A private MCP registry¶
Preview: needs Artifact Keeper main (coming in 1.12.0)
The mcp repository type is on main and not in a release yet. It is pull request
artifact-keeper#5257
(issue #5253), merged as
4542321b, with the web UI in
artifact-keeper-web#1077
(merged as 896a79db). Both ship in the next release, 1.12.0. The reference run used images
built from the pull request branches (backend c89f9cea, web 89313d4); the branch gained
fixes before it merged, some for the findings here, and the walkthrough has not been rerun
on main. Details may still change before 1.12.0.
An example, not a complete defense
This walkthrough shows one way to run a private MCP registry on Artifact Keeper. The configuration is an example, built and tested in a lab. It does not cover every edge case or attack, and it is not a hardened production setup. In particular, the registry decides which servers a client is told about and pins the bytes they run; it does not prove that a server's code is benign, and a client that ignores the registry is not stopped by it. Some gaps we found are listed in Findings. Review and adapt it for your own environment, and use it alongside your other controls (code review of servers, sandboxing, client allowlists, secrets handling, monitoring), not instead of them.
An MCP server is code an AI agent starts on a developer's machine, with the developer's
credentials. The MCP registry (a catalog of
servers, API v0.1) is how VS Code, GitHub Copilot and other clients find them. This
walkthrough puts Artifact Keeper's mcp repository type in that role for one organization:
- A private registry for internal servers. A platform team publishes
com.acme/ticketswithmcp-publisher(the official publishing CLI). Its npm package and container image live in Artifact Keeper too, so every coordinate a client is handed points back at the registry, pinned to a version and a digest. - A curated proxy of the public registry. Upstream servers are deny by default. A sync fills an approval queue, a glob auto-approves trusted namespaces, a deny list wins over every approval, lookalike names are flagged, single versions can be pinned, and a version whose upstream bytes change is held until someone approves it again.
- Supply-chain gates. External packages are refused, a quarantined package or a scan-policy finding hides the server that runs it, and a lint refuses hardcoded secrets and holds tool descriptions that read like prompt injection.
- Publishing from CI with the job's OIDC token (
mcp-publisher login github-oidc) and a grant limited to the job's own namespace. - One URL for clients: a Virtual repository that merges the two, where an internal name can never be taken over from upstream.
Everything runs in containers on one host. The code is in
private-mcp-registry/,
and make all followed by make gates reproduces the whole thing from an empty registry. No
GitHub, Anthropic or Microsoft account is needed. The two GUI checks (VS Code's gallery and
Copilot's registry policy) cannot be scripted; the gates report them as blocked and say what
to do by hand, and check the exact requests those clients send instead.
Who this is for¶
Platform and security teams whose developers already add MCP servers to Claude Code, VS Code, Copilot or Cursor, from READMEs, chat messages and the public registry. The questions are the ones you already ask of packages, plus a few that are new: which servers may run at all? Who published this one, and can its package change under the same version? Is the server that a developer installs the same code that was reviewed? What does the agent see in the tool descriptions? The requirements below come from those questions.
What you will be able to show¶
| Requirement | Where | |
|---|---|---|
| R1 | One private registry over TLS with a bare hostname; reading needs a token, publishing needs write | Step 1 |
| R2 | Internal servers are published with the official tooling, and their packages live in the same registry | Step 2 |
| R3 | VS Code, Copilot and Claude Code use it; a client installs exactly the pinned package | Step 2 |
| R4 | Public servers are deny by default, approved by name, by glob or by pinned version; deny wins | Step 3 |
| R5 | A server whose upstream document changes under the same version is held until re-approved | Step 3 |
| R6 | Packages from outside the registry are refused; image tags are pinned to digests | Step 4 |
| R7 | A quarantined or flagged package, or a flagged tool description, hides the server | Step 4 |
| R8 | Lookalike names are flagged before anyone approves them | Step 3, Step 4 |
| R9 | CI publishes with no stored secret, and only into its own namespace | Step 5 |
| R10 | Clients use one URL; an upstream server can never take over an internal name | Step 6 |
| R11 | Bundles are accepted only from trusted signers; tool lists are recorded and diffed | Step 7 |
| R12 | Every refusal is checked by a gate, and every decision is in the audit log | Step 8 |
The shape of it¶
flowchart LR
subgraph AK["Artifact Keeper: https://ak.internal"]
direction TB
V["mcp<br/>Virtual: one URL"]
H["mcp-internal<br/>Local, private<br/>own-repos, com.acme only"]
R["mcp-upstream<br/>Remote, deny by default<br/>approval queue"]
NPM["npm (Virtual)<br/>npm-internal + npm-remote"]
OCI["oci-internal<br/>oci-ghcr (Remote)"]
V --> H
V --> R
H -. pins .-> NPM
H -. pins .-> OCI
R -. pins .-> OCI
end
LAB["lab registry<br/>(stands in for<br/>registry.modelcontextprotocol.io)"] -->|sync| R
CI["CI: mcp-publisher<br/>login github-oidc"] -->|publish| H
VS["VS Code gallery,<br/>Copilot policy"] -->|/v0.1/servers| V
CC["Claude Code<br/>claude mcp add"] -->|npx from| NPM
Before you start¶
- A Linux host with rootless podman 5.x and
podman compose, curl, jq, openssl, python3 and GNU make. No sudo is needed anywhere. - About 6 GB of free RAM for the registry stack and 10 GB of disk for images.
- An Artifact Keeper backend from
mainat or after4542321band a web UI at or after896a79db, or 1.12.0 once released (see the code README). - Internet access: container images from docker.io and mcr.microsoft.com, npm packages from npmjs.org and one image from ghcr.io (both pulled through the registry).
- Loopback port
127.0.0.1:30448free (changeHTTPS_PORTinregistry/.envotherwise).
Run it yourself
Steps¶
- Stand up the registry: TLS, a bare hostname, the npm, OCI and MCP repositories, users and tokens.
- A private registry for internal servers: publish with
mcp-publisher, then install from VS Code, Copilot and Claude Code. - Curate the public registry: a Remote, the approval queue, globs, deny wins, pins, drift.
- Supply-chain gates: own-repos, digest pins, quarantine, the lint, lookalikes.
- Publish from CI: GitHub Actions OIDC and namespace grants.
- One URL for clients: a Virtual where hosted shadows remote.
- Bundles and capabilities: signed MCPB bundles, download tickets, tool diffs.
- Prove it fails safely: the nine gates.
Then Results and Next steps. The lab notes are the record every page is written from, including the Artifact Keeper bugs and doc gaps we hit.