Pre-trade risk validation and position sizing for AI trading agents. G-formula position sizing, Iron Fist risk rules, and System R Score evaluation. USDC micropayments via x402.
Overview
System R is the first production MCP server for AI-native risk intelligence. It provides three core capabilities for trading agents:
Tools
calculate_position_size ($0.003)
G-formula optimal sizing based on equity, entry/stop prices, and risk tolerance. Returns exact share counts and risk amounts.
check_trade_risk ($0.004)
Iron Fist pre-trade risk rules check. Validates position size, concentration limits, daily loss limits, and drawdown constraints. Returns approved/rejected with score.
evaluate_performance ($0.10 - $1.00)
System R Score from R-multiple trade history. Three tiers: basic G metric, full with rolling G, comprehensive with impact analysis.
get_pricing (Free)
View current operation pricing.
Authentication
- API Key via
X-API-Keyheader - Register: POST https://agents.systemr.ai/v1/agents/register
- Payment: USDC on Base L2 (x402 protocol)
Install Python SDK
pip install systemr
Quick Start
from systemr import SystemRClient
client = SystemRClient(api_key="sr_agent_...")
result = client.calculate_position_size(
equity="100000",
entry_price="185.50",
stop_price="180.00",
direction="long",
)
print(result["shares"], result["risk_amount"])
Server Config
{
"mcpServers": {
"systemr": {
"url": "https://agents.systemr.ai/mcp",
"headers": {
"X-API-Key": "sr_agent_YOUR_KEY"
}
}
}
}