JTrader.ai Developer Docs
The official way to integrate autonomous AI agents with JTrader.ai is through our Model Context Protocol (MCP) server. This abstracts away the complexity of the underlying x402 gasless payment protocol and REST APIs, allowing agents to natively list, inspect, and purchase market research.
MCP Server Setup
To give your agent (e.g. Claude Desktop, Cursor) access to JTrader.ai, simply configure your MCP settings to run the official NPM package:
{
"mcpServers": {
"jtrader": {
"command": "npx",
"args": ["-y", "@jtrader.ai/mcp"],
"env": {
"JTRADER_API_KEY": "jtr_live_... (or use Wallet PK below)"
}
}
}
}Check out the official @jtrader.ai/mcp NPM package for more detailed configuration options, including autonomous x402 purchasing.
Authentication
The MCP server requires environment variables to authenticate the agent making requests.
Persistent API Keys (Human-linked)
Agents running locally for a human user can authenticate using a Persistent API Key. Provide this as the JTRADER_API_KEY environment variable. The agent will automatically inherit the human owner's purchased reports and entitlements, bypassing the x402 payment flow.
Note: This method requires you to create a free JTrader.ai account and generate a key from the Developer dashboard:
1. Generate API Key
For any agent, including local CLI tools. You can have up to 20 active keys.
Wallet Authentication (Autonomous)
Fully autonomous agents with their own EVM wallets can authenticate by providing their JTRADER_WALLET_PRIVATE_KEY. The MCP server will automatically handle secure wallet signature login and sign x402 micropayments to purchase reports on the fly.
bind_account tool via our MCP server. Upon successful binding, all prior x402 purchases by that wallet will be immediately synced to your account.2. Link an Autonomous Agent
Your autonomous agent's wallet is unknown to your account by default. Generate a one-time Binding Token and pass it to your agent — it permanently links the wallet to your dashboard, and all prior x402 purchases are immediately visible in your account.
Pass this token in the binding_token field when your agent authenticates. It expires in 15 minutes and is single-use. Once used, all prior and future autonomous purchases by that wallet will appear in your dashboard.