> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.beatapi.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.beatapi.io/_mcp/server.

# Xiaohongshu MCP keeps losing login or throwing 300011: cookie-free alternative

> Why local Playwright xiaohongshu-mcp servers expire, redirect overseas servers to rednote, or trigger 300011 account-anomaly blocks — and how to connect BeatAPI's cookie-free remote MCP in 30 seconds.

Local `xiaohongshu-mcp` servers keep breaking because they drive a logged-in Playwright browser session using your own Xiaohongshu account. When the QR session expires, or when the server runs on an overseas VPS where Xiaohongshu redirects to `rednote` and flags an unusual login IP, the session drops or returns error `300011` (account anomaly).

BeatAPI provides a cookie-free remote HTTP MCP server at `https://beatapi.io/mcp` authenticated with `BEATAPI_API_KEY` only. You do not scan a Xiaohongshu QR code, run headless Chrome locally, or risk your personal account.

## Local browser MCP vs. BeatAPI remote MCP

| Dimension                        | Local `xiaohongshu-mcp` (Playwright)                                 | BeatAPI Remote MCP (`https://beatapi.io/mcp`)                                                                              |
| -------------------------------- | -------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| **Login and cookies**            | Requires scanning a QR code with your own account; expires regularly | No Xiaohongshu login or cookie; uses `BEATAPI_API_KEY` only                                                                |
| **Overseas VPS / cloud servers** | Triggers `300011` account anomaly or `rednote` region blocks         | Works from any region or cloud host                                                                                        |
| **Local resource usage**         | Runs Chromium/Playwright locally (hundreds of MB RAM)                | Hosted Streamable HTTP with zero local browser processes                                                                   |
| **Scope**                        | Xiaohongshu only                                                     | 44 Xiaohongshu actions (notes, comments, PGY creators), 18 other social platforms, SEO Data, Web Search, and 70+ AI models |
| **Cost**                         | Free tool, but high maintenance and account risk                     | `$0.03` per note/comment call, `$0.06` per PGY call (checked 2026-11-23); Inspect is `$0`, failed calls cost `$0`          |

## Configure BeatAPI MCP in Claude Code, Cursor, and Codex

Set your key in `BEATAPI_API_KEY` (create one at [beatapi.io/dashboard/apikeys](https://beatapi.io/dashboard/apikeys)), then add BeatAPI to your client:

**`Claude Code (~/.claude.json)`**

```json title="Claude Code (~/.claude.json)"
{
  "mcpServers": {
    "beatapi": {
      "type": "http",
      "url": "https://beatapi.io/mcp",
      "headers": {
        "Authorization": "Bearer ${BEATAPI_API_KEY}"
      }
    }
  }
}
```

**`Cursor (~/.cursor/mcp.json)`**

```json title="Cursor (~/.cursor/mcp.json)"
{
  "mcpServers": {
    "beatapi": {
      "url": "https://beatapi.io/mcp",
      "headers": {
        "Authorization": "Bearer ${env:BEATAPI_API_KEY}"
      }
    }
  }
}
```

**`Codex (~/.codex/config.toml)`**

```toml title="Codex (~/.codex/config.toml)"
[mcp_servers.beatapi]
url = "https://beatapi.io/mcp"
bearer_token_env_var = "BEATAPI_API_KEY"
```

## Test BeatAPI MCP with one prompt

BeatAPI MCP runs a **Search → Inspect → Run** flow so your agent verifies the exact inputs and live USD price before executing a paid call:

> Search Xiaohongshu notes about "露营咖啡机" sorted by comments, pick the top 3 relevant notes, fetch page 1 of comments for each, and summarize the top buyer complaints with verbatim quotes.

## Supported and unsupported Xiaohongshu MCP operations

* **Supported:** Reading public Xiaohongshu notes, search results, comments, reply threads, keyword trends, and Pugongying (PGY) creator profiles and quotes.
* **Not supported:** Posting notes, liking, commenting, or sending DMs on your behalf. BeatAPI is read-only public data access, so your personal Xiaohongshu account stays untouched.

## Related

* [BeatAPI Integrations](/integrations)
* [Fix Xiaohongshu HTTP 461](/faq/xiaohongshu-461-status-code)
* [Xiaohongshu xsec_token, x-s & 300011](/faq/xiaohongshu-xsec-token-and-x-s)
* [Search Xiaohongshu PGY creators](/guides/xiaohongshu-creator-shortlist)