# nephyr-risk

AI-powered prediction market risk management. Calculate optimal position sizes with Kelly criterion, evaluate expected value, estimate platform fees, monitor real-time risk status, validate trades be…

## Quick Start

```bash
# Connect this server (installs CLI if needed)
npx -y @smithery/cli@latest mcp add clm-studios/nephyr-risk

# Browse available tools
npx -y @smithery/cli@latest tool list clm-studios/nephyr-risk

# Get full schema for a tool
npx -y @smithery/cli@latest tool get clm-studios/nephyr-risk calculate_kelly_size

# Call a tool
npx -y @smithery/cli@latest tool call clm-studios/nephyr-risk calculate_kelly_size '{}'
```

## Direct MCP Connection

Endpoint: `https://nephyr-risk--clm-studios.run.tools`

## Tools (7)

- `calculate_kelly_size` — Calculate the optimal position size for a prediction market trade using the Kelly criterion (quarter-Kelly by default).…
- `calculate_ev` — Calculate the expected value of a YES contract after platform fees. Returns EV, edge (model prob − market price), fee p…
- `calculate_fee` — Calculate the fee per leg for a given platform and contract price. Polymarket: flat 2% of price. Kalshi: 7% × P × (1−P).
- `check_risk_status` — Check current risk management status. Returns ACTIVE (safe to trade), PAUSED (daily loss limit hit — resume tomorrow), …
- `validate_trade` — Pre-trade risk check. Projects the worst case (total loss of proposed_size) and checks whether it would breach daily lo…
- `get_exposure` — Summarise portfolio exposure relative to bankroll. Returns total exposure %, largest position %, number of positions, a…
- `simulate_drawdown` — Simulate a hypothetical sequence of losses against a starting bankroll. Shows when daily loss and drawdown limits would…

```bash
# Get full input/output schema for a tool
npx -y @smithery/cli@latest tool get clm-studios/nephyr-risk <tool-name>
```
