Skip to main content
Legend integrations expose account reads and supported execution through the Trading API. MCP (Model Context Protocol) is an additional interface for assistant hosts. Both use the same account permissions and mainnet execution infrastructure.
The MCP integration is an employee-only preview controlled by Legend’s ai-connectors-enabled feature flag. Signing in or holding a Trading API key does not by itself grant connector access. Production account reads, OAuth refresh, and order-proposal handoff have been verified in actual ChatGPT and Claude conversations. Live order execution and public directory publication are not established by those checks. These instructions describe the preview contract, not an approved directory listing or a generally available installation.

Availability

Host policies determine which capabilities can be offered. The Trading API’s execution support does not mean every assistant can expose execution tools. The ChatGPT preview must be evaluated against its current app policies before distribution.

Muse and API-based clients

  1. Sign in to Legend and open Settings → Trading.
  2. Create a key with the permissions you need. Turn off Allow trading for read-only access.
  3. Configure the connector’s credential field with that key, using the API reference and its OpenAPI contract.
  4. Start with an account read and verify the returned Legend account identity before using any execution capability.
Keep keys out of chat messages and public logs. A key selects its authorized account; the caller cannot substitute an arbitrary wallet. The account response describes identity and balance fields.

MCP preview setup

Use the exact server URL provided for your preview environment. The two resources are: In a host that supports custom remote MCP connectors, enter the supplied URL and follow the OAuth sign-in flow. Review the account and permissions on Legend’s consent screen before approving. The preview validates client metadata documents hosted on chatgpt.com or claude.ai; it does not accept arbitrary dynamic client registration or generic command-line clients. Authorized employees can use https://app.legend.trade as the production origin. A server URL alone does not bypass plan requirements, organizational controls, or host restrictions.

First checks

Ask the assistant to show account identity and available-to-trade funds, then request positions and open orders. It should use status=open for open orders and follow pagination, rather than infer that no orders exist from a recent history page. See tools and order review for capabilities and permissions for revocation and execution access.

Troubleshooting

  • Sign-in fails: use the supplied preview URL and a supported host. Localhost and unregistered preview domains may be rejected by the sign-in provider.
  • Tools are missing: check the chosen endpoint, approved scopes, and host restrictions. Reconnect to request a different permission set.
  • Balance looks different: compare unified available-to-trade fields, not only a raw perpetual equity or withdrawable value. See account balances.
  • Execution outcome is unknown: reconcile the operation before retrying; do not submit the same intent with a new idempotency key.
  • Connection no longer works: check whether its associated API key was revoked, the grant expired, or account access changed.
Contact Legend support with a request ID and a description of the failure. Never include a key, access token, refresh token, or wallet secret.