BENEAT
MCP Server/Documentation

Beneat MCP Server

Risk enforcement, coaching, and behavioral analytics for AI trading agents on Solana.

Risk Enforcement

Daily loss limits, trade caps, cooldowns, and lockouts — on-chain + wallet-level.

Agent Coaching

Position sizing, confidence calibration, market recommendations. Auto-reduces size when tilting.

Behavioral Analytics

Hallucination rate, overconfidence index, tilt detection, revenge trading, and machine-readable directives.

Agent Verification

Trust scores (0–100) and risk grades (A–F) from on-chain data. Verify any agent.

See these tools in actionObservatory

//Your First Calibration

Calibrate your vault to activate on-chain risk enforcement.

1

Check vault status

typescript
const status = await callTool("beneat_get_status", {
  wallet_address: "YOUR_WALLET",
});
// → { vault_exists: false, can_trade: true, ... }

No vault yet — the agent is in advisory mode.

2

Calibrate risk rules

typescript
const cal = await callTool("beneat_calibrate", {
  wallet_address: "YOUR_WALLET",
  deposit_amount: 5,
  strategy_type: "day_trading",
  risk_tolerance: "medium",
});
// → { calibration: { tier: 1 }, parameters: { daily_loss_limit_sol: 0.15 }, unsigned_transactions: [...] }

Returns Tier 1 parameters: 0.15 SOL daily loss limit, 20 trades/day, 120s cooldown, 12h lockout.

3

Sign and submit transactions

typescript
for (const tx of cal.unsigned_transactions) {
  // tx.transaction is a base64 VersionedTransaction
  // tx.description: "Initialize vault", "Set rules", etc.
  const decoded = VersionedTransaction.deserialize(
    Buffer.from(tx.transaction, "base64")
  );
  decoded.sign([walletKeypair]);
  await connection.sendTransaction(decoded);
}

The MCP server never touches private keys.

4

Verify the vault is active

typescript
const status = await callTool("beneat_get_status", {
  wallet_address: "YOUR_WALLET",
});
// → { vault_exists: true, can_trade: true, daily_loss_limit_sol: 0.15 }

//Your First Trade

3 tool calls per trade cycle:

1

Pre-flight check

typescript
const check = await callTool("beneat_check_trade", {
  wallet_address: "YOUR_WALLET",
  market: "SOL-PERP",
  size: 0.1,
  direction: "long",
});

if (!check.approved) {
  console.log("Trade denied:", check.reasons);
  return;
}
2

Execute the trade

Use your existing trading logic — Jupiter swap, Drift perp, Raydium, whatever. Beneat is protocol-agnostic.

3

Record the result

typescript
const result = await callTool("beneat_record_trade", {
  wallet_address: "YOUR_WALLET",
  pnl: -0.02,       // SOL — negative = loss
  market: "SOL-PERP",
  confidence: 0.75,  // optional (0-1)
});

if (result.lockout_triggered) {
  console.log("LOCKOUT:", result.lockout_reason);
  // Stop all trading — wallet is frozen if AgentWallet is configured
}

//Integration Tiers

Start minimal, upgrade as needed.

3 calls. Risk enforcement only.

3-call integration
beneat_check_trade → approved? → execute trade → beneat_record_trade → lockout?

//Strategy & Risk Tolerance

Strategy Types

StrategyMax Trades/DayCooldownBest For
scalping5030sHigh-frequency micro-trades
day_trading20120sIntraday positions
swing_trading5600sMulti-hour/multi-day positions
conservative31800sCapital preservation focus

Risk Tolerances

LevelDaily Loss %Lockout DurationBest For
low1%24 hoursNew agents, capital preservation
medium3%12 hoursBalanced risk/reward
high5%6 hoursExperienced agents with edge
degen10%2 hoursHigh-conviction strategies

Loss % is relative to deposit. Example: medium + 5 SOL = 0.15 SOL/day limit.


//Calibration Tiers

INFO
Tiers auto-upgrade as trades accumulate. No manual selection.
TierTrade CountMethodWhat It Does
Tier 10–4 tradesCapital-basedDerives rules from deposit amount, strategy type, and risk tolerance
Tier 25–19 tradesBehavioralAdjusts based on win rate, loss streak frequency, and revenge trading ratio
Tier 320+ tradesQuantitativeVaR at 95%, Sharpe ratio, Kelly fraction, profit factor, max drawdown

//Session State Machine

Agent state is classified in priority order (top wins):

StateTriggerSize MultiplierDescription
post_lockout_recoveryRecently unlocked from lockout0.33xMost conservative — rebuild confidence first
tilt3+ consecutive losses in session0.25xAggressive reduction — agent reasoning degraded
post_lossLast trade was a loss within 5 min0.5xReduce exposure after recent loss
hot_streak3+ consecutive wins in session0.8xSlight reduction — prevents overconfidence
normalDefault1.0xStandard operating conditions
TIP
Most protective state wins. Post-lockout + tilting = post_lockout_recovery (0.33x), not tilt (0.25x).

//The Coaching Loop

Full coaching session lifecycle:

1

Get session strategy

Beneat evaluates agent state (recovery, tilt, normal) and returns mode, trade limits, and focus markets.

2

Pre-trade check

Returns approval + coaching context: mode, suggested size, markets to avoid.

3

Confidence calibration

Agent reports confidence (0–1). Beneat compares to historical accuracy and adjusts position size accordingly.

4

Record result

Log P&L and confidence. Feeds back into calibration.

5

Playbook evolves

Losing markets get restricted. Position sizing adjusts based on real performance. Behavioral rules accumulate.

6

Lockout & recovery

On limit breach: automatic lockout + wallet freeze. On expiry: recovery mode (0.33x size) until trust rebuilds.

TIP
Goal: fewer lockouts over time. The coaching system teaches agents to stay within limits, not hit them.

//Troubleshooting