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.
-
Get a credential
Section titled “Get a credential”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 belowecho "$TRON_CHARTS_API_KEY" "$TRON_CHARTS_API_SECRET" -
Register the server with your client
Section titled “Register the server with your client”Every MCP client takes the same three things: a command to run, its arguments, and the environment.
npx -yfetches 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-serverThe
--matters: everything before it is Claude Code’s own options, and everything after is the command it runs untouched.{"mcpServers": {"troncharts": {"command": "npx","args": ["-y", "@tronchartsxyz/mcp-server"],"env": {"TRON_CHARTS_API_KEY": "your-api-key","TRON_CHARTS_API_SECRET": "your-api-secret","TRON_CHARTS_BASE_URL": "https://api.troncharts.xyz"}}}}{"mcpServers": {"troncharts": {"command": "npx","args": ["-y", "@tronchartsxyz/mcp-server"],"env": {"TRON_CHARTS_API_KEY": "your-api-key","TRON_CHARTS_API_SECRET": "your-api-secret","TRON_CHARTS_BASE_URL": "https://api.troncharts.xyz"}}}} -
Confirm it connected
Section titled “Confirm it connected”Restart the client, then ask it to read something harmless.
get_agent_contextreports 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 mewhich 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.
-
Put it to work
Section titled “Put it to work”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_payoutand the rest.
Hosting it over HTTP
Section titled “Hosting it over HTTP”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