Connect an AI agent over MCP
Create an MCP credential, add the registry to Claude Code with a copy-paste configuration, and try the tools.
Who needs this, and when
Who: anyone who wants an AI agent to ground its answers in Erden layers instead of its memory. You need an account. When: once per agent; credentials expire, so again when one runs out. Status: optional during evaluation. The Erden team turns remote MCP on. If your account page has no MCP access link, it is off.
Erden's MCP endpoint lets AI agents read exact, proof-checked releases, so their answers rest on knowledge your organization has versioned and checked.
MCP, the Model Context Protocol, is the standard way AI agents call tools. Erden offers an MCP endpoint. You give an agent a credential; the agent can look layers up, inspect releases and read their documentation and download release files. You can also allow bounded queries, publishing, or management using your current permissions.
Create a credential
Open MCP access
Sign in, and on your account page click MCP access. The page shows the registry's Endpoint URL, a form to create a credential, and your existing credentials.
Fill in the form
| Field | What to choose |
|---|---|
| Label | A name you will recognise later, such as Research assistant or Claude Code on my laptop. |
| Expires after | 1 hour, 8 hours, 24 hours (the default), or 7 days. Shorter is safer. |
| Registry access | Public registry data only, Also private layers I can read, Read my private layers and publish ontology packages using my current permissions, or Read, publish and manage using all my platform permissions, including destructive operations. |
| Release queries | Off, or Allow bounded release queries. Shown only when release queries are on for the registry. |
| Confirm your password | Your account password, to prove it is really you. |
Then press Create MCP credential.
Private access reaches the model
With Also private layers I can read, anything private you can read can end up in the agent's context, and from there in its other tools. Choose it only for agents you trust with that data.
Copy the token now
The next page shows the token once. Copy it somewhere safe right away; the registry keeps only a fingerprint of it. The page also shows a ready-made client configuration.
What you should see
A token that starts with erden_mcp_v1_, the endpoint https://…/api/v1/mcp, and the expiry time.
Add it to Claude Code
Put the token in an environment variable so it never lands in a file you might share:
export ERDEN_MCP_TOKEN=erden_mcp_v1_paste-your-token-hereThen choose one way to add the server.
Create .mcp.json in your project folder. Claude Code fills in ERDEN_MCP_TOKEN from your environment when it
starts, so the file itself holds no secret and can be committed. The first time Claude Code starts in that folder,
it asks whether to use the MCP servers the file lists; approve erden. Until then it shows as pending approval:
{
"mcpServers": {
"erden": {
"type": "http",
"url": "https://registry.erden.sh/api/v1/mcp",
"headers": {
"Authorization": "Bearer ${ERDEN_MCP_TOKEN}"
}
}
}
}Use the exact endpoint URL shown on the MCP access page; https://registry.erden.sh/api/v1/mcp is the hosted endpoint. Other MCP
clients take the same three things: the transport http (Streamable HTTP), the URL, and the Authorization
header.
Try it
Check the connection
Start Claude Code in the project folder and type /mcp. The server list should show erden as connected, with
the registry tools. Each tool checks the scopes on your credential when called. Query tools require release queries to be enabled.
Ask something
Try prompts like these:
- "Use the erden tools to resolve the layer
@demo/erden-demoand list its releases." - "Inspect release
0.2.0-beta.1of@demo/erden-demo. Did it pass validation?" - "Read the README of
@demo/erden-demoversion0.2.0-beta.1and summarise it." - "Search the public registry for layers about provenance."
- "Run a query on
@demo/erden-demo0.2.0-beta.1that lists every class and its superclass."
Claude asks before each tool call the first time; approve it.
Check the activity
Back on MCP access, open the credential's activity page. Every tool call is listed with its time, outcome, and duration. See Manage credentials.
Ingest an existing ontology project
Create a credential with Read my private layers and publish ontology packages using my current permissions.
Ask the agent to call get_ingestion_guide and list_workspace first. The agent needs filesystem and network tools
on its own host to prepare the project and upload its archive; the remote MCP server cannot read your laptop's files.
The workflow is:
- Preserve the ontology source and licensing, prepare its Erden manifest and lockfile, and run
erden checklocally. - Run
erden pack <version> <project-dir> --output <archive-file> --jsonand compute the archive's SHA-256 and size. - Call
start_publication, PUT the archive to its signed URL with its returned headers, then callfinalize_publication. - Poll
get_publication, then inspectget_publication_report. Validation runs on the registry and a successful attempt publishes automatically.
Use create: "private" or "public" for a new project and "false" for an existing project. Creating a project requires
publishing permission in the alias's organization. Public packages become visible to everyone. Preserve the exact
idempotency key and intent when retrying after a lost response. Keep signed upload URLs out of logs, and never send
your MCP bearer to object storage.
An agent cannot gain permissions through MCP: membership and project authority are checked again during publication. Revoking its credential prevents further MCP calls; it does not undo a publication or cancel work already queued. Signed PUT URLs expire within 15 minutes and do not themselves finalize or publish a package.
Manage the platform through an agent
Choose Read, publish and manage using all my platform permissions, including destructive operations when the agent needs to manage projects, organizations, members, custom roles, invitations, domain claims or your MCP credentials. This also allows private reads and publication. Release queries remain a separate choice.
Have the agent call get_platform_capabilities first. It reports the credential scopes, enabled features, available
management operations and actions requiring a browser or host access. The tool list includes feature-dependent
operations only when the registry supports them; a credential's scopes and your live permissions still govern every call.
Before changing visibility, renaming or deactivating an organization, or retiring a project, ask for a preview. Review its impact and approve the intended action. The write must include the exact preview fingerprint, revision and, where requested, typed name. A stale preview fails; fetch a new preview and review it again. Reuse a request ID only to retry the identical operation. Revocation does not undo writes already committed or cancel queued work.
For private dependencies, list_release_files pages the file index. get_release_file_chunk and
get_release_archive_chunk return bounded base64 chunks. Follow nextOffset until null, then verify the assembled
SHA-256 and size before using the result. These calls use current read permissions and need no separate CLI credential.
What a session looks like
This is a real session, recorded with the official MCP TypeScript client. The agent resolved the layer:
{
"alias": "@demo/erden-demo",
"canonicalIri": "https://example.invalid/erden/demo",
"readScope": "anonymous",
"releaseCount": 2,
"releases": [
{
"version": "0.2.0-beta.1",
"archiveSha256": "4b5001821bd72f8de65ba9277e57f5b413db932229161b27863bcfa8e17ab983",
"dependencyCount": 0
},
{
"version": "0.1.0",
"archiveSha256": "2537ebdfe4e2b4653bc99d12397027328c633aac627879edb07e38d16bb74176",
"dependencyCount": 0
}
]
}Then it ran the class-and-superclass query on 0.2.0-beta.1 and got the same two rows as the
Query page, bound to the same archive digest. Every answer starts with a
reminder to the model that text written by publishers is data, not instructions.
If it looks different
/mcp shows erden as failed or needing authentication
Check that ERDEN_MCP_TOKEN is set in the terminal where you started Claude Code, that the header reads
Bearer followed by the token, and that the credential has not expired or been revoked.
There is no Release queries choice on the form
Release queries are off during evaluation, so run_release_query is not available to any agent.
The agent can't see a private layer
The credential must have Also private layers I can read, and you must be able to read the layer yourself right now. Access follows your current membership: if you lose access, so does the agent.