Connect Claude Code
Add the Fermium MCP server to Claude Code and sign in once in the browser.
Claude Code speaks MCP over HTTP and handles OAuth for you. You add the server, authenticate once, and the tokens are stored and refreshed by Claude Code.
1. Add the server
Run this in a terminal:
claude mcp add --transport http fermium https://fermium.app/mcp
By default this registers the server for the current project. Add --scope user if you want it available in every project on this machine:
claude mcp add --scope user --transport http fermium https://fermium.app/mcp
2. Authenticate
Start Claude Code and run /mcp. Pick fermium from the list, then choose Authenticate. A browser tab opens on fermium.app:
- Sign in with Google if you are not already signed in. New accounts accept the Terms of Service and Privacy Policy on the sign-in page.
- Approve the client once. The consent page names the client (Claude Code) and the account you are signing in as.
- The tab redirects back and Claude Code reports the server as connected.
That is the whole flow. The access token lives for 7 days and Claude Code refreshes it silently; the refresh token is valid for 365 days from the grant. No token is ever pasted into a chat.
3. Check it works
Ask for something small:
> Publish a short markdown note that says "hello from Claude Code" and give me the link.
The agent calls publish_markdown and replies with a URL on fermiumusercontent.app, an expiry date 30 days out, and the visibility (restricted). Open the link and sign in with the same account. Then:
> Change the note to say "hello again" at the same link.
The agent calls update_markdown with the same doc_id. The URL is unchanged; the response says version: 2.
What Claude Code sees
When the connection is made, Claude Code reads the server's instructions and tool descriptions. They tell it when to reach for Fermium (anything a human should look at), that publishing creates a restricted URL owned by you, that retention defaults to 30 days, and how visibility, listing and tags work. The agent can also call usage_guide to read the full guide. You do not need to teach it anything.
Removing or reconnecting
claude mcp remove fermiumremoves the server from Claude Code.- To revoke the grant on the Fermium side, open Settings, then API keys and tokens in the app and revoke the token that the OAuth flow created. Claude Code will ask you to authenticate again next time.
- If you use several machines, authenticate on each. Each one gets its own grant, and each shows up separately in the token list.
Troubleshooting
The browser tab never opens. Copy the URL Claude Code prints and open it yourself. The flow completes the same way.
"authentication required" after it worked before. The access token expired and the refresh failed, usually because the grant was revoked in the app. Run /mcp, pick fermium, and authenticate again.
The agent refuses to publish something. Check the error text it relays. Publishing is rate limited to 120 calls per hour per account, storage is capped by plan, and a workspace policy can rule out some visibilities. The error names the limit and, where relevant, the upgrade URL.