# RiskState — Crypto Risk Engine

Tells an agent how much risk is allowed right now: policy level, leverage cap and blocked actions for BTC and ETH.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 1
- Author: Riskstate
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Riskstate/mcp
- Updated: 2026-09-10
- HTML: https://affpapa.org/en/nevibecode/mcp/riskstate-crypto-risk-engine

## What it does

Four read-only tools ship with the server. `get_risk_policy` reports the policy level, the largest position size as a percentage, the leverage ceiling, and which actions are permitted or barred. `get_market_structure` flags whether price sits near a structural turning point. `get_playbook_status` says if a setup is live, and `check_trade` tests a proposed position against what the portfolio already holds.

The package is a thin wrapper. MCP calls become REST requests, and every score is computed on the provider's side. What it adds locally: Zod validation of inputs, a plain-language policy summary at the top of each response, and distinct error messages for auth, rate limit and timeout so an agent can react. Nothing is cached here; the API keeps its own 60-second cache.

The stdio build wants `RISKSTATE_API_KEY` in your environment. Write tools are absent by design, so an agent cannot rewrite the limits it is judged by. No key yet? Point your client at the hosted connector `https://api.riskstate.ai/mcp` and you get the public summary without installing anything.

## Requirements
- Remote server: `https://api.riskstate.ai/mcp`

## Install

### Claude Code (native platform)

**Platform CLI: remote server**
```bash
claude mcp add --transport http mcp https://api.riskstate.ai/mcp
```

### Codex

**Platform CLI: remote server**
```bash
codex mcp add riskstate-crypto-risk-engine --url https://api.riskstate.ai/mcp
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "riskstate-crypto-risk-engine": {
            "url": "https://api.riskstate.ai/mcp"
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "riskstate-crypto-risk-engine": {
            "type": "http",
            "url": "https://api.riskstate.ai/mcp"
        }
    }
}
```

### Gemini CLI

**Platform CLI: remote server**
```bash
gemini mcp add -t http riskstate-crypto-risk-engine https://api.riskstate.ai/mcp
```

## When to use it
- cap position size before entering a trade
- check whether a leverage level is blocked
- see if the market is near a structural inflection
- find out whether a setup is actionable or in cooldown
- test a hypothetical portfolio before opening a position

## Example prompts
- What's the current risk state for BTC?
- Run `check_trade` on a 0.5 BTC position given that I already hold 0.2 BTC
- Call `get_playbook_status` and tell me if there's an actionable ETH setup

## Similar
- [risk-management](https://affpapa.org/en/nevibecode/skills/agiprolabs-risk-management.md) — skill · 634 installs
- [trader-risk](https://affpapa.org/en/nevibecode/skills/trader-risk.md) — skill · 731 installs
- [risk-management-trading](https://affpapa.org/en/nevibecode/skills/risk-management-trading.md) — skill · 393 installs
- [operational-risk](https://affpapa.org/en/nevibecode/skills/operational-risk.md) — skill · 670 installs
- [risk-manager](https://affpapa.org/en/nevibecode/agents/risk-manager.md) — subagent · 550 installs
- [crypto-regime-analyzer](https://affpapa.org/en/nevibecode/skills/crypto-regime-analyzer.md) — skill · 2700 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
