โจ๏ธ Claude Code
Claude Code connects to Swift Axis with one command that adds the site as an MCP server over HTTP. This page will guide you through copying the command from the Studio, running it, checking the connection and removing the server again.
Copying the commandโ
- Open "API & MCP" in the Studio and find "Connect an MCP client".
- Find "Claude Code" and press "Copy".
- Replace
<your-token>with your API token. See Access tokens to create one.
With a placeholder token, the command looks like this:
claude mcp add --transport http swift-axis-news https://your-site.example/mcp --header "Authorization: Bearer sxa_xxxxxxxx"
Adding the serverโ
Run the command in a terminal. It adds a server named "swift-axis-news" that talks to your site's endpoint over HTTP and sends the token with every request.
Claude Code can keep a server for you alone or share it with a project through a file in the project folder. Keep the Swift Axis server to yourself: a token written into a shared project file can be read by anyone with the project. This ensures your token stays private to your own machine.
Checking the connectionโ
- List your servers: run
claude mcp list. "swift-axis-news" should be listed. - Check inside Claude Code: type
/mcpin a session to see the server's status and tools. - Ask something read-only, such as "List the topics on Swift Axis". It should call
list_topics.
If a call fails with 401, the token is missing, mistyped, expired or revoked. If the error names a scope, the token needs that scope. See Safety and permissions.
Removing the serverโ
Run claude mcp remove swift-axis-news to remove it from Claude Code. Removing the server does not revoke the token, so revoke it in "API & MCP" as well if it is no longer needed. See Access tokens.
Claude Code works well for bulk jobs, such as checking every story for missing alt text. See Example workflows.
Best Practicesโ
- Use a separate token for Claude Code: name it "Claude Code" so the audit log shows which client made each change.
- Keep the dry run on until you have read what a tool would do.