> ## Documentation Index
> Fetch the complete documentation index at: https://docs.legend.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# Assistant connectors and MCP

> Legend connector availability, Muse API setup, and the ChatGPT and Claude MCP preview.

Legend integrations expose account reads and supported execution through the [Trading API](/api-reference/trading/overview). MCP (Model Context Protocol) is an additional interface for assistant hosts. Both use the same account permissions and mainnet execution infrastructure.

<Note>
  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.
</Note>

## Availability

| Integration       | Connection                                           | Status                                                                                   |
| ----------------- | ---------------------------------------------------- | ---------------------------------------------------------------------------------------- |
| Muse              | Trading API connector with an account-scoped API key | Tested integration; public distribution is separate                                      |
| Claude            | Remote MCP with OAuth                                | Employee-only preview; hosted read/proposal flow verified                                |
| ChatGPT           | Remote MCP with OAuth                                | Employee-only preview; hosted read/proposal flow verified; directory publication pending |
| Other MCP clients | Client-specific authentication                       | Not currently supported by the OAuth preview                                             |

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](https://app.legend.trade) 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](/api-reference/trading/overview) 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](/api-reference/trading/account) describes identity and balance fields.

## MCP preview setup

Use the exact server URL provided for your preview environment. The two resources are:

| Path on the preview origin    | Capabilities                                      |
| ----------------------------- | ------------------------------------------------- |
| `/api/connectors/mcp`         | Account reads and order preparation               |
| `/api/connectors/trading/mcp` | Reads, order preparation, and permitted execution |

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](/api-reference/connectors/tools) for capabilities and [permissions](/api-reference/connectors/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](/api-reference/trading/account).
* **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](mailto:support@legend.trade) with a request ID and a description of the failure. Never include a key, access token, refresh token, or wallet secret.
