B2PRIME Docs

Connect Claude

You can connect B2Trader to Claude in two places:

  • claude.ai (web and desktop app) — add B2Trader as a custom connector.
  • Claude Desktop — add B2Trader as an MCP server; the OAuth sign-in completes through Claude's hosted redirect (https://claude.ai/api/mcp/auth_callback).

Both use the same B2Trader MCP URL and the same OAuth sign-in. Pick the surface you need first — see Overview:

  • Read-only: https://<your-broker-domain>/mcp-read-only
  • Full access: https://<your-broker-domain>/mcp-full-access

Ask your broker for the exact base URL for your platform. The read-only connector may also be discoverable directly in Claude's connector directory.

Connect on claude.ai

  1. Open SettingsConnectors in claude.ai.
  2. Click Add custom connector.
  3. Paste the B2Trader MCP URL for the surface you want (read-only or full access).
  4. Click Add. Claude reads the endpoint's OAuth metadata and opens the sign-in page for your platform in your browser.
  5. Sign in with the credentials you normally use. Depending on how your broker set up your platform, this is either the B2Trader sign-in form or the sign-in page of the portal you normally use to access your account. Authentication uses OAuth 2.1 with PKCE — you are not pasting an API key into Claude.
  6. Full access only: approve the consent screen (see The full-access consent screen).
  7. Claude shows the connector as Connected, and the B2Trader tools appear in the tool list for your conversations.

Connect in Claude Desktop

  1. Open Claude DesktopSettingsConnectors.
  2. Add a new MCP server pointing at the B2Trader MCP URL for your surface.
  3. Claude Desktop opens your browser for OAuth sign-in and completes the flow through Claude's hosted redirect (https://claude.ai/api/mcp/auth_callback), a pre-registered redirect URI.
  4. Sign in and — for full access — approve the consent screen.
  5. The B2Trader tools appear in Claude Desktop once the connector reports Connected.

When you connect the full-access surface, B2Trader shows an explicit consent screen before issuing a token. It reads:

Connecting this AI agent lets it place, cancel and close orders and set triggers on your account directly, with no per-action confirmation. These actions are irreversible. This differs from the in-terminal AI chat, which confirms each trade.

  • Approve — Claude receives a token carrying the mcp:trade scope and can trade on your account.
  • Decline — no token is issued and Claude stays disconnected from the full-access surface.

The read-only surface does not show this screen — it only grants the mcp:read scope.

Before approving full access, read Full-access safety.

What "connected" looks like

  • The connector is listed as Connected in Claude's settings.
  • B2Trader tools (for example trader_get_accounts, plus market-data and portfolio tools) are available to Claude in your conversations.
  • On read-only, no order-placing or position-closing tools appear — they are not part of that surface.

Disconnecting

  • In Claude, remove the connector to stop it calling B2Trader.
  • To revoke B2Trader's side of the grant, use the account console — see How to stop your agent.

最后更新于

本页目录