🔐
Before you upload anything: here's how we store your portfolio data — encrypted, with no plaintext in the database.
Try free Read more
Privora 泊睿

FOR AI AGENTS

How AI Agents Connect to Privora

Four channels that actually work today, from no sign-up required to calling the REST API directly from your own script. Everything here is shipped and verifiable — you can run every command yourself.

Who this guide is for

If you are an AI agent (or writing integration code for one), this page lists every channel Privora currently exposes, with the install steps and known gotchas for each. Not sure which one to use? See the comparison table below.

Which channel should you use

All four channels sit on the same underlying capability (GET /agent/skills and POST /agent/skills/execute) — they differ only in protocol shape and whether sign-up is required.

Comparison of the four agent integration channels by authentication requirement, install method, and best-fit scenario
Channel Sign-up required? How to install Best for
Official ClawHub skill package Privora account + Bearer Token clawhub install privora-cn-quant Already using a ClawHub-compatible client (Claude, OpenClaw, etc.)
MCP Server (stdio) Optional (anonymous mode without a token) npm install -g the website tarball Native MCP clients: Claude Code, Cursor, Windsurf, Cline, Codex CLI
Bearer Token + HTTP API Privora account + Bearer Token curl or any HTTP client, direct to the REST API Your own script or agent framework, maximum flexibility
Anonymous read-only Not required No install — call the public endpoints directly Trying the platform before deciding whether to register

Install guide, channel by channel

Different install steps, but all four ultimately hit the same GET /agent/skills + POST /agent/skills/execute dispatcher.

Official ClawHub skill package

  1. Register at /login, then create a Bearer Token under Profile → Token Management
  2. In a ClawHub-compatible client, run clawhub install privora-cn-quant (full capability set) or clawhub install privora-alert (real-time alerting only)
  3. Configure LG_AGENT_TOKEN and LG_AGENT_BASE_URL=https://privora.cn as the plugin prompts
  4. Ask in natural language, e.g. "Look up the latest data for asset 21"

Both packages share the same underlying scripts — which one you install only changes how many skills show up in the catalog, not how you call them.

MCP Server (stdio)

Wraps the same GET /agent/skills / POST /agent/skills/execute pair as native MCP tools, for stdio MCP clients such as Claude Code, Cursor, Windsurf, Cline, and Codex CLI.

npm install -g https://privora.cn/downloads/privora-mcp-server-0.1.0.tgz
curl -fsSLO https://privora.cn/downloads/privora-mcp-server-0.1.0.tgz
curl -fsSLO https://privora.cn/downloads/privora-mcp-server-0.1.0.tgz.sha256
sha256sum -c privora-mcp-server-0.1.0.tgz.sha256
npm install -g ./privora-mcp-server-0.1.0.tgz
{
  "mcpServers": {
    "lg-agent": {
      "command": "lg-agent-mcp-server",
      "env": {
        "LG_AGENT_BASE_URL": "https://privora.cn",
        "LG_AGENT_TOKEN": "lgatk_your_token_here"
      }
    }
  }
}
LG_AGENT_BASE_URL defaults to http://localhost:3000 — a website install MUST set it explicitly to https://privora.cn, or every call fails to connect. LG_AGENT_TOKEN is optional: without it the server still lists all 11 tools, but what actually succeeds depends on the anonymous allow-list.

Always 11 tools: 4 protocol-level meta-tools (list_skills / describe_skill / execute_skill / whoami) plus 7 first-class tools (dataasset_list, dataasset_get, dataasset_schema_get, dataasset_metadata_get, dataasset_data_get, dataasset_data_get_realtime, marketplace_item_list).

Bearer Token + HTTP API

The most direct channel: once you have a token, call the REST endpoints with any HTTP client — no plugin required.

export LG_AGENT_TOKEN="lgatk_your_token_here"
export LG_AGENT_BASE_URL="https://privora.cn"

curl -s "$LG_AGENT_BASE_URL/agent/skills" \
  -H "Authorization: Bearer $LG_AGENT_TOKEN"

curl -s -X POST "$LG_AGENT_BASE_URL/agent/skills/execute" \
  -H "Authorization: Bearer $LG_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary '{"skillId":"dataasset.list","params":{}}'
Do not manually add an X-Agent-Mode header — the Node proxy layer injects it automatically based on your Bearer token, and adding it yourself can get the request rejected.

Anonymous read-only

No registration, no token: call the public read-only endpoints directly. A fixed set of 10 read-only skills (asset listing, schema, marketplace items, etc.) is always allowed, rate-limited per IP across three buckets. Good for finding out what the platform can do before deciding whether to register.

curl -s "https://privora.cn/agent/skills"

Traps first-time callers hit

Every one of these is a verified, real failure — not a hypothetical.

1

Subscribing rotates the asset id

Subscribing to a marketplace item gives your own team a new, cloned asset id — not the publisher's id shown on the marketplace page. Re-resolve the id from the subscribe response every time; never carry one over from a screenshot or chat log.

2

filter_op defaults to substring match

Omitting filter_op on dataasset.data.get defaults to a substring match (LIKE '%v%'), not exact. Pass filter_op=eq explicitly for an exact match.

3

{id} in the URL must be numeric

The {id} in URL paths must be the numeric asset ID; passing an asset name returns a 500 with an unhelpful message.

4

Subscribing needs a separate preset

The default "Read market & asset data" preset already includes metadata reads. Subscribing to marketplace items (to get a clonedAssetId) needs the separate "Read data & manage marketplace subscriptions" preset, ticked explicitly at token creation.

5

paper.* is not something you request

Paper-trading execution scopes are reserved for internal platform use and are auto-issued when you bind a strategy. They never appear as checkboxes on the token-create page — there is nothing to look for.

6

Helper scripts default to the old domain

agent-skill's shell helpers default LG_AGENT_BASE_URL to the legacy lg-data.cc domain. It still redirects to privora.cn, but set the variable explicitly to avoid the extra hop.

7

Use /agent/skills for discovery

GET /api/public/agent/capabilities is a trimmed public view that omits the entire paper-trading surface. Use GET /agent/skills for the real, scope-aware catalog.

8

Do not set X-Agent-Mode yourself

The Node proxy layer injects X-Agent-Mode automatically from your Bearer token. Setting it manually can get the request rejected.

9

Windows Git Bash mangles non-ASCII curl bodies

curl -d 'non-ascii text' silently corrupts non-ASCII bytes on Windows Git Bash. Use --data-binary @file instead.

Frequently asked questions

Can I use this without registering?
Yes. In anonymous mode you can call 10 read-only skills directly — asset listing, schema, marketplace item lookups — rate-limited per IP. Real-time quotes, running pipelines, and writing to a portfolio require a Bearer Token from a registered account.
What is the difference between the ClawHub skill package and the MCP Server?
Both ultimately call the same GET /agent/skills / POST /agent/skills/execute dispatcher. The difference is protocol shape: the ClawHub skill package targets ClawHub-compatible clients, and the MCP Server targets native stdio MCP clients (Claude Code, Cursor, Windsurf, Cline, Codex CLI). Which one to install depends on your client, not on capability.
Which scope preset should I pick when creating a token?
The default "Read market & asset data" preset already includes metadata reads. If you also need to subscribe to marketplace items, pick the separate "Read data & manage marketplace subscriptions" preset. paper.* scopes never appear on the create page — the platform auto-issues them when you bind a strategy.
Why do I get a 404, or worse, someone else's data?
Usually a stale asset id. Subscribing to a marketplace item gives your own team a new, cloned id — not the publisher's id shown in the marketplace UI. Re-resolve the id from the subscribe response before every call.
Can I install the MCP Server from the npm registry?
Not yet — @privora/mcp-server has not been published to the npm registry. Install from the website tarball instead: npm install -g <tarball URL>.
Why can't my client connect at all?
Almost always a missing LG_AGENT_BASE_URL. It defaults to http://localhost:3000; a website-installed MCP Server or standalone script must set it explicitly to https://privora.cn.

Try it now

Not ready to register? Call GET /agent/skills anonymously first and see what comes back. When you are ready, create a token to unlock everything.