Riskstate

by likidodefi

292 downloads
Not rated
GitHub

About

Deterministic risk governance for crypto trading agents. Answers "How much can I risk?" with policy level, max position size, leverage limits, and blocked actions — computed from 9+ real-time data sources (on-chain, derivatives, macro, sentiment). Supports BTC and ETH. One tool:

Details

Author
likidodefi
Downloads
292
Categories
Other, Finance, AI

- Five policy levels from BLOCK (survival) to GREEN (expansion)
- Max position size as percentage of portfolio (0–100)
- Leverage limit – maximum allowed multiplier
- Allowed and blocked actions for the agent
- Confidence score reflecting signal agreement and data quality
- Classification: cycle phase, market regime, macro regime, direction
- Auditability with composite score, policy hash, and TTL

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Riskstate
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Invoke the get_risk_policy tool with the required asset parameter (either "BTC" or "ETH"), and optionally supply wallet_address, protocol ("spark" or "aave"), and include_details to receive a full risk policy and classification response.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "riskstate": {
            "riskstate": {
                "command": "docker",
                "args": [
                    "run",
                    "-i",
                    "--rm",
                    "-e",
                    "RISKSTATE_API_KEY",
                    "ghcr.io/likidodefi/riskstate-mcp"
                ],
                "env": {
                    "RISKSTATE_API_KEY": "<your_api_key>"
                }
            }
        }
    }
}

McpServers

{
    "riskstate": {
        "command": "docker",
        "args": [
            "run",
            "-i",
            "--rm",
            "-e",
            "RISKSTATE_API_KEY",
            "ghcr.io/likidodefi/riskstate-mcp"
        ],
        "env": {
            "RISKSTATE_API_KEY": "<your_api_key>"
        }
    }
}

RiskState MCP Server

Risk governance API for autonomous crypto trading agents.

What it does

Your agent asks: "How much can I risk?" RiskState answers with a deterministic policy computed from 9+ real-time data sources: - Policy level — 5 levels from BLOCK (survival) to GREEN (expansion) - Max position size — % of portfolio cap (0-100) - Leverage limit — Maximum allowed multiplier - Allowed/blocked actions — What the agent can and cannot do - Confidence score — Signal agreement × data quality

Tool: get_risk_policy

| Parameter | Type | Required | Description | |-----------|------|----------|-------------| | asset | "BTC" or "ETH" | Yes | Asset to analyze | | wallet_address | string | No | DeFi wallet for on-chain position data | | protocol | "spark" or "aave" | No | Lending protocol (default: spark) | | include_details | boolean | No | Full breakdown (subscores, macro, risk flags) |

Example Response

```json { "exposure_policy": { "policy_level": "CAUTIOUS", "max_size_pct": 35, "leverage_max": 1.5, "allowed_actions": ["DCA", "WAIT", "SPOT_LONG_CONFIRMED"], "blocked_actions": ["LEVERAGE_GT_2X", "NEW_POSITIONS_UNCONFIRMED"] }, "classification": { "cycle_phase": "MID", "market_regime": "RANGE", "macro_regime": "NEUTRAL", "direction": "SIDEWAYS" }, "auditability": { "composite_score": 52, "confidence_score": 0.72, "policy_hash": "a3f8c2...", "ttl_seconds": 60 } }
No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.