after Atom Series, No. 8, 1917The same atom twice: at rest in a small square, alight in a large one.

03Connect your agents

Connect Claude Code to myartefacts in one command

myartefacts is a remote MCP server, so Claude Code needs no plugin and nothing to install. One claude mcp add command connects it, and from then on every page, deck and doc Claude makes for you lands in your library. Or skip the command entirely and let Claude connect itself.

The command

Run this once in your terminal, with your token in place of YOUR_TOKEN:

claude mcp add --transport http --scope user myartefacts https://myartefacts.com/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"

Each part does one job:

Where the token comes from

  1. Sign in and open Settings, then Agents.
  2. Under Or create a token yourself, give it a name such as Claude Code and press Create token. The name becomes the source shown on everything this agent publishes.
  3. Copy the token straight away: it is shown only once. The Claude Code snippet on the same page already has it filled in, ready to copy and run.

Treat the token like a password. Give each agent its own, so you can tell their work apart and cut one off without touching the others.

Or let Claude connect itself

You do not have to handle a token at all. Claude Code can run shell commands, so it can do the whole setup on its own:

  1. Copy the setup brief. In the app it is Copy setup brief at the top of Settings, Agents; from this page, use Copy agent instructions below. The same instructions are always at https://myartefacts.com/agents.md.
  2. Paste it into Claude Code. Claude takes your email address from what it already knows (often git config user.email) and calls https://myartefacts.com/api/agent/connect with it, its own name and the name of your machine.
  3. The answer comes back at once with a token. Claude runs the same claude mcp add command with it, and never prints the token back to you.
  4. You get an email. Approve the agent from it, or from Waiting for approval in Settings, Agents.
Claude Code Read the brief Connect with your email Add the server Publish Your library 01 02 03 04 agents.md POST /api/agent/connect claude mcp add … /mcp publish_artifact the first artefact, circled
Four rungs from a fresh Claude Code session to the first artefact in your library. Claude climbs them by itself.

What happens next depends on whether you already have an account. If the address had none, one is opened for you, Claude has full access straight away, and you claim the account from the email within 7 days. If you already have an account, the connection comes back as awaiting_approval. Claude can still publish, into a tray of its own that holds up to 20 artefacts and 10 MB, but it cannot see the rest of your library until you say yes. Approving changes nothing on Claude's side: the same token simply gets full access.

Check that it works

Start a new Claude Code session so it picks up the server, then type /mcp: myartefacts should be listed as connected. From a terminal, claude mcp list shows the same. Then ask Claude something that needs the server:

List my latest artefact on myartefacts.

Claude calls list_artifacts with a limit of one and tells you what it found. To check the token without Claude in the loop:

curl -s https://myartefacts.com/api/me \
  -H "Authorization: Bearer YOUR_TOKEN"

It answers with your name, the agent name the token was made for, and its status.

What Claude can do once connected

You do not need to explain any of this to Claude. The server sends its own instructions when Claude connects: publish every standalone artefact rather than leaving it on disk, send files on disk through create_upload_url, check list_projects and file each one in the most specific project that fits, and search before redoing earlier work. After publishing, Claude replies with the title and a library_url that opens the artefact in your library.

You can still steer it in plain words: "publish that to myartefacts under Website/Pricing", or "share the deck and give me the link". More on each in Projects, versions and publishing a file on disk.

Keeping the token safe

With --scope user the server and its token live in Claude Code's own settings in your home folder, not in your project. Avoid --scope project for this one: it writes the server into a .mcp.json file at the root of the repository, which is meant to be committed, and your token would go with it.

To cut Claude Code off, open Settings, Agents and press Revoke token next to it. Its artefacts stay in your library. To remove the server from Claude Code, run claude mcp remove myartefacts --scope user.

When something goes wrong

Give your agents a home

Everything they make lands in one private library: every page, deck and doc, each at its own link.

Sign up