/secondbrain-suite:os-mcpfrom secondbrain-suite
Deploys a self-hosted Relay MCP server on Railway for Claude to read/write Obsidian vaults. User pastes a Railway token and OAuths — no repo clone or vault GUIDs needed.
Ships in secondbrain-suite. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill deploys the Relay MCP v2 server to the user's own Railway account. The MCP source is bundled at ${CLAUDE_PLUGIN_ROOT}/skills/os-mcp/reference/relay-mcp-server/ — copy from there, do not fetch from anywhere else. The deployed server lets Claude clients (Claude Code or claude.ai) read/write the user's Obsidian vault by talking to the Relay.md sync protocol.
One thing: a Railway account token — created at https://railway.com/account/tokens.
That's it. After deploy, the user signs in with their Relay.md credentials via OAuth; the MCP then auto-discovers their relay vault and the folders inside it via PocketBase. No vault GUIDs, no folder maps.
| Var | Source | Value |
|---|---|---|
RELAY_API_URL | preset | https://api.system3.md |
PB_AUTH_URL | preset | https://auth.system3.md |
PB_COLLECTION | preset | users |
DATA_DIR | preset | /data |
PORT | preset | 3000 |
JWT_SECRET | auto-generated | openssl rand -hex 32 |
STATIC_MCP_BEARER | auto-generated | openssl rand -hex 24 |
ALLOWED_EMAILS | preset | blank (any authenticated Relay.md user) |
RELAY_AUTH_TOKEN | preset | blank (OAuth-only; no static fallback) |
RELAY_ID | not set | auto-discovered at runtime per user |
PUBLIC_URL | derived | from railway domain after first deploy |
Save the generated STATIC_MCP_BEARER in the chat for the user — they'd use it for any CLI/script access bypassing OAuth.
If the user has multiple Relay vaults, the MCP auto-picks the first one. They can call the vault_relays tool after connecting to see which is active and pin a different one by setting RELAY_ID in railway variables.
Execute in order. Confirm each step before moving on.
railway --version
If missing:
brew install railwaynpm i -g @railway/cliRe-run to confirm.
Tell the user:
Open
https://railway.com/account/tokens, click Create Token, name itos-mcp-deploy, copy the value, and paste it here.
When pasted:
export RAILWAY_API_TOKEN="<paste>"
railway whoami
railway whoami should print the user's Railway email. If it errors, the token is wrong — ask them to regenerate.
cd "${CLAUDE_PLUGIN_ROOT}/skills/os-mcp/reference/relay-mcp-server"
# Create a new Railway project (interactive — let user pick name)
railway init
# Persistent volume for clients.json + sessions.enc
railway volume add --mount-path /data
# Upload source, build via Dockerfile, deploy
railway up
Wait for the deploy. Tail logs if useful: railway logs.
Generate the secrets:
JWT_SECRET=$(openssl rand -hex 32)
STATIC_MCP_BEARER=$(openssl rand -hex 24)
Set everything in one shot (note: RELAY_ID is intentionally NOT set — it auto-discovers):
railway variables \
--set "RELAY_API_URL=https://api.system3.md" \
--set "PB_AUTH_URL=https://auth.system3.md" \
--set "PB_COLLECTION=users" \
--set "DATA_DIR=/data" \
--set "PORT=3000" \
--set "JWT_SECRET=$JWT_SECRET" \
--set "STATIC_MCP_BEARER=$STATIC_MCP_BEARER"
Service auto-redeploys after --set. Wait for it to come back up.
railway domain # assigns + prints public domain
Copy the URL, then:
railway variables --set "PUBLIC_URL=https://<the-domain>"
railway up # final redeploy so OAuth issuer/audience match
curl https://<the-domain>/health
Expect 200 OK with JSON {"status":"ok","version":"2.0.0",...}.
Print these for the user:
Claude Code:
claude mcp add --transport http vault https://<the-domain>/mcp
Claude.ai (web): Settings → Connectors → Add custom connector → paste https://<the-domain>/mcp. Sign in with their Relay.md credentials when the OAuth window opens.
Also tell them: their STATIC_MCP_BEARER is <value> — keep it for any CLI/script access that needs to bypass OAuth.
In a fresh Claude conversation, ask Claude to call vault_relays (or have the user say "list my Relay vaults"). Expect at least one vault, with * next to the active one.
Then call vault_folders — expect a non-empty list of folder names. If empty, the user may not have folder access in that relay.
If the user has multiple relays and the wrong one is active, pin the right one:
railway variables --set "RELAY_ID=<the-vault-guid-from-vault_relays>"
(One redeploy and the next OAuth session will use that relay.)
railway whoami fails after pasting Railway token. Token expired or wrong scope. Regenerate at https://railway.com/account/tokens.
Build fails with TypeScript errors. Don't modify the bundled package.json / tsconfig.json. Re-copy fresh from ${CLAUDE_PLUGIN_ROOT}/skills/os-mcp/reference/relay-mcp-server/.
/health returns 5xx. railway logs will name the missing env var (assertRequiredConfig lists what's missing on boot).
vault_relays returns "No relays accessible to this user". The signed-in Relay.md account doesn't own or belong to any relay. Have them create one in the Relay.md Obsidian plugin first.
vault_folders returns empty but vault_relays shows the vault. Folders are stored in the shared_folders PocketBase collection — the user may not have any folders in that relay yet, or the active relay isn't the one they meant. Check vault_relays output for the active marker.
OAuth sign-in loops. PUBLIC_URL doesn't match the actual Railway domain. Re-run Step 5.
Want to gate access to specific emails. railway variables --set "[email protected],[email protected]" then redeploy.
Want to start over. railway down to tear down, then re-run from Step 3.
reference/relay-mcp-server/AUTH.md (opens in a new tab)reference/relay-mcp-server/Dockerfile (opens in a new tab)reference/relay-mcp-server/package-lock.json (opens in a new tab)reference/relay-mcp-server/package.json (opens in a new tab)reference/relay-mcp-server/railway.json (opens in a new tab)reference/relay-mcp-server/src/auth/clients.ts (opens in a new tab)reference/relay-mcp-server/src/auth/codes.ts (opens in a new tab)reference/relay-mcp-server/src/auth/jsonfile.ts (opens in a new tab)reference/relay-mcp-server/src/auth/pending.ts (opens in a new tab)reference/relay-mcp-server/src/auth/pocketbase.ts (opens in a new tab)reference/relay-mcp-server/src/auth/provider.ts (opens in a new tab)reference/relay-mcp-server/src/auth/refresh-loop.ts (opens in a new tab)reference/relay-mcp-server/src/auth/sessions.ts (opens in a new tab)reference/relay-mcp-server/src/auth/tokens.ts (opens in a new tab)reference/relay-mcp-server/src/config.ts (opens in a new tab)reference/relay-mcp-server/src/index.ts (opens in a new tab)reference/relay-mcp-server/src/relay-client.ts (opens in a new tab)reference/relay-mcp-server/tsconfig.json (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
Generated from the plugin's indexed repository (monkkim/secondbrain-suite) — no native marketplace selected
npx claudepluginhub p/monkkim-secondbrain-suite4 skills in this plugin
/secondbrain-setup1인 사업가·크리에이터를 위한 세컨드브레인(Personal OS) 온보딩 셋업 스킬. 사용자가 코워크에서 폴더를 지정하고 "셋업", "셋업해줘", "세컨드브레인 만들어줘", "볼트 구성해줘", "온보딩 시작", "start", "초기화"라고 하거나, 빈 폴더를 가리키며 개인 지식관리/세컨드브레인/Personal OS/비즈니스 컨텍스트를 구축하고 싶다고 하면 반드시 이 스킬을 사용한다. "나와 내 사업", "고객과 브랜드", "나는 어떻게 운영하나" 3부 12문항의 심층 인터뷰를 자유 서술형 대화로 진행하고, 답변을 그대로 Context(9개 문서) / Projects / Daily / raw / Wiki 5개 폴더 구조와 라우팅 CLAUDE.md로 만들어 넣는다./vault-daily-tracking세컨드브레인(Obsidian 스타일 마크다운 볼트)을 실시간으로 유지보수하는 "볼트 오퍼레이터"를 그 사람의 볼트·Slack ID·Google Calendar·Gmail·Notion·Google Drive에 맞춰 자동으로 세팅하고 스케줄까지 걸어주는 한글 빌더 스킬. 사용자 본인이 아니라 다른 사람(팀원, 고객, 다른 세컨드브레인 소유자)에게 이 자동화를 나눠줄 때 사용한다. 대상자의 볼트에서 CLAUDE.md/Context를 읽어 이름·브랜드·프로젝트를 자동 추론하고, 연결된 커넥터를 라이브로 프로브해 활성/비활성을 판단한 뒤, 캐던스·DM수신자·예산 같은 나머지 정보만 물어보고, 개인화된 오퍼레이터 프롬프트를 그 사람의 볼트에 저장하고 schedule 스킬로 자동 실행을 건다. "실시간 수집 스킬 설치해줘", "볼트 오퍼레이터 세팅해줘", "이 스킬 다른 사람 볼트에 맞게 설정해줘", "vault-daily-tracking 셋업", "데일리 트래킹 세팅해줘" 같은 요청에서 반드시 이 스킬을 사용한다./weekly-lint7 plugins in 3 repositories ship this exact skill · first indexed Jun 26, 2026
Other plugins' skills for the same job