Skip to content

Connect the MCP server to your dev tool

The MCP server turns the provider API into tools your assistant can call, so it places an order or reads a firm’s readiness by invoking place_order rather than reconstructing an HTTP request. Your API key stays in the server’s environment — it is never pasted into a chat.

  1. The server authenticates with an API key and secret, the same pair the token recipe uses. It mints and refreshes its own bearer, so you do not hand it a token.

    Terminal window
    # you will paste these into the config below
    echo "$TRON_CHARTS_API_KEY" "$TRON_CHARTS_API_SECRET"
  2. Every MCP client takes the same three things: a command to run, its arguments, and the environment. npx -y fetches the published package, so there is nothing to install first.

    Terminal window
    claude mcp add \
    --env TRON_CHARTS_API_KEY=your-api-key \
    --env TRON_CHARTS_API_SECRET=your-api-secret \
    --env TRON_CHARTS_BASE_URL=https://api.troncharts.xyz \
    --transport stdio troncharts \
    -- npx -y @tronchartsxyz/mcp-server

    The -- matters: everything before it is Claude Code’s own options, and everything after is the command it runs untouched.

  3. Restart the client, then ask it to read something harmless. get_agent_context reports which account and tier the server resolved, which is the fastest way to tell a working credential from a typo.

    Use the troncharts MCP server: call get_agent_context and tell me
    which account and tier it resolved.

    A connected server answers with your account id and tier.

    If no tools are offered at all, suspect the credential first. The server mints a token before it registers anything, so a bad key/secret makes it exit with [tron-charts-mcp] fatal: invalid_credentials — the client sees a process that died, not an error from a running server. A wrong command path looks identical from the client’s side, so check the server’s stderr to tell the two apart.

    If some tools are missing rather than all of them, that is the tier doing its job, not a fault.

  4. From here the assistant calls tools directly. Reads are the safe place to start:

    Get the orderbook for BTC.HL, then show me my open positions.

    Writes go through the same tiering as the REST surface — place_order, cancel_order, flatten_position, attach_brackets, create_firm, approve_payout and the rest.

Default transport is stdio, which is what every client config above expects. To run the server as a shared process instead, set TRON_CHARTS_MCP_TRANSPORT=http along with TRON_CHARTS_MCP_PORT, TRON_CHARTS_MCP_HOST and TRON_CHARTS_MCP_TOKEN. Clients then connect over Streamable HTTP rather than spawning their own copy.

Next: MCP server reference · Build with an AI agent · Mint a token