Skip to main content

Claude Code

You need a personal access token — create one in Profile → API Tokens (guide).

One command:

claude mcp add --transport http writemars https://api.writemars.com/mcp/ \
--header "X-API-Key: writemars_pat_..."

Verifyclaude mcp list should show:

writemars: https://api.writemars.com/mcp/ (HTTP) - ✔ Connected

Then try, inside any Claude Code session:

List my WriteMars workspaces.

Scopes: by default the server is added with local scope — this project only. Add --scope user to make it available in every project, or --scope project to write a shareable .mcp.json into the repo for your team. Headers in .mcp.json support ${VAR} expansion, so the token stays out of version control:

{
"mcpServers": {
"writemars": { "type": "http", "url": "https://api.writemars.com/mcp/", "headers": { "X-API-Key": "${WRITEMARS_PAT}" } }
}
}

Remove / rotate: claude mcp remove writemars, then re-add with a new token.

Connection failing? See troubleshooting. Otherwise, head to the prompt cookbook.