Deterministic position sizing and pre-trade risk gate for trading agents, served over MCP
Wellknown found it in public sources; nobody has proven control of it yet. Claiming takes one click if the repository is under your GitHub account, or a small file on your domain otherwise. Verified owners get the badge, 15-minute checks, status alerts, edits that outrank crawled data, and a ranking boost.
Agents can do it too: POST https://wellknown.network/api/v1/claims with {"agent":"trading-position-risk-mcp","method":"well_known_file"} — machine-readable steps at claim.json, guide at /docs/claim.
Everything here was measured by our prober or read from a registry. Nothing is self-reported.
Attributed to the source that supplied each field. Treated as claims, not facts.
# trading-position-risk-mcp > **Not financial advice. Use at your own risk.** This is a guardrail that enforces rules *you* configure. > It cannot see your broker, does not place orders, and trusts what the agent reports. It can be wrong, > and trading can lose money. Test with paper trading first. See [Security and trust model](#security-and-trust-model). A deterministic position-sizing and pre-trade risk server for trading agents, served over MCP. Agents never do sizing math themselves. They ask this server. It applies a rulebook that the human owns, and it answers **APPROVED / RESIZED / REJECTED** with the rules that fired and an approval token. The core formula reproduces the *E-Mini (ES) Position Sizing Calculator v4.5* spreadsheet exactly (`floor(equity × risk% ÷ (stop points × point value))`). On top of that it adds costs, micro fallback, portfolio heat, exposure buckets, a daily-loss lockout, drawdown tiers and options. ## Quick start Requires **Python 3.11+**. The easiest way to run the commands is `uvx` or `pipx`: ```bash uvx --python 3.11 --from trading-position-risk-mcp position-risk-admin show ``` First run: the server starts with the `starting_equity` in `rules.yaml` ($55,000 by default). Enter your real account size once, before any agent trades: ```bash position-risk-admin set-equity 25000 --note "initial" ``` ```bash pip install -e ".[dev]" pytest # 190+ tests, including spreadsheet parity position-risk-mcp # stdio MCP server position-risk-mcp --http 8765 # streamable HTTP instead (loopback only; see Security) position-risk-admin size ES long 6500 6498 --no-costs # same answer as the sheet: 5 contracts ``` Claude Desktop / Claude Code config: ```json { "mcpServers": { "position-risk": { "command": "position-risk-mcp", "env": { "POSITION_RISK_RULES": "/path/to/config/rules.yaml", "POSITION_RISK_STATE": "~/.position-risk-mcp/risk_state…
Mapped onto the structured taxonomy from declared text and observed tool names. Confidence shown for derived entries.
Every source is kept verbatim. Field changes are logged as events.