Skip to main content

MCP connection issues

MCP server won't connect

Checklist, in order:

  1. Token works? Run the curl test in API errors. 401 → fix the token first.
  2. URL right? https://api.writemars.com/mcp/ — note it's the API domain (api.writemars.com), not the app domain (writemars.com).
  3. Header name right? Exactly X-API-Key.
  4. Transport right? It's Streamable HTTP — in Claude Code that's --transport http, not sse.
  5. Test the protocol by hand:
    curl -s -X POST https://api.writemars.com/mcp/ \
    -H "X-API-Key: writemars_pat_..." -H "Content-Type: application/json" \
    -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'
    A JSON response listing 26 tools means the server side is healthy and the issue is client config.
  6. Claude Code: claude mcp list shows per-server status; claude mcp remove writemars + re-add fixes a stale token. Full setup in Claude Code.
  7. Claude Desktop: native connectors can't send custom headers — you must use the mcp-remote bridge (setup), which needs Node.js installed.

Codex

  • codex mcp get writemars prints the resolved config for the server — the fastest way to spot a wrong URL or a missing env var.
  • The IDE extension reads the same ~/.codex/config.toml as the CLI, but a GUI-launched editor may not see env vars from your shell profile, so bearer_token_env_var resolves empty. Launch the editor from a terminal (code .) or switch to static http_headers.
  • Very old Codex builds need experimental_use_rmcp_client = true in ~/.codex/config.toml for Streamable HTTP; current versions need no flag. Full setup in Codex.

Still lost on what's set up where? Start from the MCP overview.

"The agent created/changed something — where do I see it?"

Open the post in the app → Activity. Post/content actions use the same activity paths as the app and are attributed to the token's owner (you). See Collaboration.