Sync with Claude Code
Connect Claude Code to Relay once, then publish your help center, blog and changelog from the repository, images included, by typing /relay-sync.
Keep your help center, blog posts and changelog entries in the repository as Markdown files. Ask Claude Code to write a page, run /relay-sync, and it's live on your Relay site. Images you made locally go up with it, and the page links to them online.
Edits go both ways. Change a page in Relay's editor, add an article, move it to another collection or delete it, and the next sync makes the same change in the files. The files are the source of truth: when a page changed in both places, the file wins.
1. Connect Claude Code to Relay
Run this once in a terminal:
claude mcp add --transport http relay https://relay.paralect.com/mcp
Then, in Claude Code, type /mcp, pick relay and choose Authenticate. Relay opens in your browser. Sign in, check the account, and click Allow.
Claude Code can now see the Relay projects you're a member of and publish to their sites. Nobody else's projects are reachable.
2. Link a folder to a site
Run /relay-sync in the repository. The first time, Claude looks for your content folders, such as docs/help, content/blog or content/changelog, and links each one to a Relay site. It uses a site you already have when one matches, or creates one.
The links are saved in .paralect.json at the root of the repository:
{
"relay": {
"helpCenters": { "docs/help": "<site id>" },
"blogs": { "content/blog": "<site id>" },
"changelogs": { "content/changelog": "<site id>" }
}
}
Commit the file, and everyone who clones the repository publishes to the same sites.
How folders map to sites
Blogs and changelogs are flat folders: one file per post, named after the post's address, launch.mdx for /blog/launch. An index.mdx in the folder holds the site's settings, such as columns: 2 for two posts per row.
Help centers are trees:
docs/help/
index.mdx the help center's own page
_100_getting-started/
index.mdx the Getting started collection
_100_install.mdx an article in it
_200_first-steps.mdx
_200_billing/
index.mdx
_100_invoices.mdx
A folder is a collection, and its index.mdx is the collection's page. Every other file is an article. The _100_ prefixes set the order.
3. Write and publish
Ask Claude for a help article, a post or a release note, then run /relay-sync. For every linked folder, it:
- publishes new and changed pages, and reports their addresses
- uploads each local image or video a page uses (the cover and anything in the text) and puts the online link in the file in place of the local path
- writes pages edited or created in Relay into their files, and renames, moves or deletes files for pages renamed, moved or deleted there
- takes down pages whose file you deleted. Articles wait in Recently deleted in Relay in case you want them back.
A page with draft: true in its frontmatter goes to Relay as a draft and stays off the site until you remove the flag and sync again.
With Paralect Agent installed, the command is /relay-sync. Without it, Relay's server brings the same command as /mcp__relay__relay-sync, or just ask Claude to sync your content with Relay.
Nothing is committed for you. Review the changed files and commit them yourself.
Sync from Paralect Agent
Paralect Agent does the same sync from its interface. Open the help center, blog or changelog in its Content tab and click the Relay mark next to its name: the panel shows the site it's published to and when it last synced, and Sync now runs a sync. While the space is open, it also syncs on its own. It works on the same files and keeps the same records, so you can switch between it and /relay-sync at any time.