Skip to content
NyriaDocs
Set up your source

Connect an AI agent to Nyria (MCP)

Connect Claude, ChatGPT, Cursor or any MCP-compatible AI agent to a Nyria strategy so it can preview and send trade alerts.

Your AI agent talks to Nyria through the Model Context Protocol (MCP). It can preview an alert, send it, list your bots and check recent orders, all from a conversation. Alerts take the same path as a TradingView webhook: parsed, matched to your strategy's rules, sized by each bot, and placed in the broker account.

Alerts can place real orders. If the strategy has live bots, including accounts that copy it, a sent alert places real orders, same as the webhook. Test with a paper bot first.

You need

  • A Nyria account with a strategy and at least one bot on it.
  • A connected broker. Paper is fine for testing.
  • An MCP-compatible client: Claude, ChatGPT, Cursor, or any tool that speaks the Model Context Protocol.

Get your token

Open the strategy, go to the Integration tab and select Show URL. The webhook URL ends in a 64-character token:

https://trades.nyria.io/webhooks/YOUR_TOKEN

Copy that last part. It is the only credential the MCP endpoint needs, and it only works for this one strategy.

Treat the token like a password. Anyone who has it can send alerts to the strategy. Rotate token on the Integration tab cuts off the old one, and the old webhook URL stops working with it.

The endpoint is https://api.nyria.io/mcp. Send the token in the Authorization: Bearer YOUR_TOKEN header wherever the client allows it. Clients that only take a URL can use https://api.nyria.io/mcp/YOUR_TOKEN instead. That URL is a secret, so keep it out of chats, screenshots and shared configs.

Rotate the token

  1. Open the strategy and go to the Integration tab.
  2. Select Rotate token and confirm.
  3. Copy the new webhook URL and paste its last part into each client.

The old webhook URL and the old MCP connection stop working at once, so update TradingView and any other source that used them.

Set up your client

Claude

In Claude Desktop or on claude.ai, open Settings, then Connectors, and add a custom connector:

  • Name: Nyria
  • URL: https://api.nyria.io/mcp/YOUR_TOKEN

Claude Desktop also reads claude_desktop_config.json. Add this and restart the app:

{
  "mcpServers": {
    "nyria": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://api.nyria.io/mcp",
        "--header",
        "Authorization:${NYRIA_AUTH}"
      ],
      "env": {
        "NYRIA_AUTH": "Bearer YOUR_TOKEN"
      }
    }
  }
}

Cursor

Open Settings, then MCP, and add a server, or edit ~/.cursor/mcp.json:

{
  "mcpServers": {
    "nyria": {
      "url": "https://api.nyria.io/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_TOKEN"
      }
    }
  }
}

ChatGPT

Custom MCP connectors need Developer mode, which ChatGPT shows under Settings, then Connectors, then Advanced. Turn it on, then create a connector:

  • Name: Nyria
  • MCP server URL: https://api.nyria.io/mcp/YOUR_TOKEN
  • Authentication: No authentication

The token in the URL is the credential, so keep the URL private. Start a chat, enable the Nyria connector from the tools menu, and ask it to list your bots.

Tools

ToolWhat it does
nyria_preview_alertParses an alert and shows how Nyria reads it. Places nothing.
nyria_send_alertSends an alert to the strategy. Every active bot on it acts on the alert, and live bots place real orders.
nyria_list_botsLists your own bots on the strategy with broker, paper or live, status and position size. Accounts that copy the strategy are not shown.
nyria_recent_ordersShows your own recent orders on the strategy: instrument, action, status, quantity, price and time. Takes a limit from 1 to 100, 20 by default.
nyria_strategy_infoShows the strategy the token belongs to: name, status, equity type and your active bot count.

How a request flows

  1. You ask the agent to "buy AAPL" or "close my SPY call".
  2. The agent calls nyria_preview_alert to check how the message parses.
  3. The agent calls nyria_send_alert.
  4. Nyria matches the alert to the strategy's rules and hands it to every bot on it.
  5. Each bot sizes the order from its own settings and sends it to its broker.
  6. The agent calls nyria_recent_orders to see the result.

Limits

  • One token, one strategy. To send to a different strategy, connect it with its own token.
  • Size comes from the bot. An alert says what to trade and which way. The bot's position size setting decides how much.
  • No stop orders. Alerts open and close positions. Brackets and stop losses are not part of an alert.
  • Repeats send once. The same message sent again within two minutes is not sent again, and the agent gets the first result back marked duplicate: true. Change the wording to scale in.
  • 6 alerts a minute. A seventh is refused until the minute passes. Previews and read-only tools don't use up the limit.
  • 30 requests a minute per token. Past that the endpoint answers 429 with a Retry-After header.
  • One message per request, up to 2,000 characters. Batched requests are refused.
  • Alerts follow the strategy's rules. Allowed instruments, trading window and direction settings still apply, so an alert can be accepted by the endpoint and refused by the strategy.

Troubleshooting

  • 401 Unauthorized. The token is missing, mistyped, or was rotated. Copy it again from the Integration tab.
  • 429 Too Many Requests. More than 30 requests in a minute. Wait a minute and retry.
  • Alert sent, no order. Open the strategy's Logs tab. The alert may have been refused for a wrong ticker, a direction that is turned off, or no position to close.
  • "Parse request failed." The parser did not answer. Try again in a moment.
  • The client shows no Nyria tools. Check the URL ends in your token with nothing after it, then restart the client.

Troubleshooting covers more cases.

Next steps

Your edge, on autopilot.

Trading carries risk. Read the risk disclosure.

© 2026 Nyria LLC. All rights reserved.