Developers
Integration Reference
Lawenots exposes a Model Context Protocol (MCP) server for Claude connector integration and a set of public REST endpoints. The Labs Flywheel framework — R/R gate, covenant validator, and swing parameter builder — is accessible to Claude via MCP tools when private-beta access is provisioned.
When to open your workspace
Docs are public. Sign in after Labs Flywheel or practice access is provisioned to create MCP OAuth credentials and keys.
Open workspace →MCP Connector for Claude
Add LAWENOTS as a connector in Claude.ai to query Labs Flywheel state, validate swing setups through the R/R gate and covenant system, and structure HITL trade parameters — all in a conversation, without navigating a UI. Requires provisioned Labs Flywheel access (request beta).
OAuth discovery endpoint
https://www.lawenots.com/api/mcp/.well-known/oauth-authorization-serverClaude's connector marketplace auto-discovers the authorization and token endpoints from this URL. Add this to the connector configuration when registering LAWENOTS as a Claude connector.
OAuth flow
- Claude redirects user to
https://www.lawenots.com/api/mcp/oauth/authorize - User authenticates with their LAWENOTS account
- LAWENOTS redirects back to Claude with an authorization code (5-minute TTL)
- Claude exchanges the code at
https://www.lawenots.com/api/mcp/oauth/token - LAWENOTS issues a signed Bearer token (HMAC-SHA256, 1-hour TTL)
- Claude sends
Authorization: Bearer <token>on every MCP call
Available tools
get_flywheel_stateflywheel:readReturns total wealth, monthly yield, exchange-linked margin utilization, active container count, and compounding streak.
get_credit_capacityflywheel:readReturns exchange-linked margin line, amount drawn, available capacity, utilization %, and the 75% covenant limit (your exchange accounts — Lawenots does not lend).
get_open_containersflywheel:readReturns active swing and income containers with price levels, days remaining, and P&L.
check_rr_gateflywheel:readValidates a proposed trade entry/stop/target against the LAWENOTS R/R gate formula. Equity ≥ 2:1, crypto ≥ 3:1.
validate_swing_covenantsflywheel:readRuns the full covenant checklist for a swing container: macro filter, duration, risk %, strategy-specific conditions, and crypto overlays.
create_swing_parametersflywheel:writeStructures validated swing setup parameters into a broker-formatted HITL output. Status is always 'pending_review' — nothing is submitted automatically.
get_morning_briefflywheel:readReturns a plain-English morning summary: portfolio value, exchange margin utilization, active containers, and swing alerts.
create_swing_parameters always produces status: "pending_review". It never submits orders to a broker. The investor reviews, adjusts, or discards the output before any action is taken. LAWENOTS is a tool — not investment advice.REST Endpoints
Full OpenAPI 3.1 spec at /openapi.yaml.
/api/public/pricing/api/public/platform-capabilities/api/contact/api/stripe/create-subscription-checkout/api/mcp/api/mcp/oauth/authorize/api/mcp/oauth/token/api/mcp/.well-known/oauth-authorization-serverRate Limits
| Endpoint | Limit | Window | Scope |
|---|---|---|---|
/api/mcp | 30 requests | 60 seconds | Per IP |
/api/public/* | 120 requests | 60 seconds | Per IP |
/api/contact | 20 requests | 60 seconds | Per IP |
Rate limit headers: Retry-After, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
Open verification
Independently verify Close + Attest evidence
Lawenots publishes verification tooling for Close + Attest so operators, firms, and auditors can independently validate evidence packages without a Lawenots account.
- @lawenots/attestation-verify
Offline Ed25519 signature checks, Merkle root rebuilds, and export-receipt hash verification for proof bundles.
View on GitHub → - @lawenots/schemas
JSON Schema for pipeline attestation, export receipts, period-close checklist items, and evidence manifests.
View on GitHub → - @lawenots/openapi
Versioned OpenAPI 3.1 and MCP tool/connector schemas for the public API and Claude connector surface.
View on GitHub →
These are verification and contract artifacts — not the full product. Reconciliation matching, allocation drift logic, and Labs Flywheel covenant implementations remain proprietary.
Ecosystem & SDKs
Live OpenAPI is served at /openapi.yaml and versioned under Lawenots/openapi. Typed SDKs (@lawenots/sdk for TypeScript, lawenots-sdk for Python) are generated from that spec for firm integrators.
Prefer Claude Desktop? Use the MCP OAuth flow above — HITL swing parameters never auto-submit to a broker.
Lifecycle webhooks (roadmap)
Firm-scale automation will subscribe to signed webhook events. Not yet live — request early access for ingestion, reconciliation, and export notifications.
| Event | Description |
|---|---|
| ingestion.completed | Bank or on-chain sync finished for an org |
| reconciliation.completed | Account reconciliation marked complete |
| period.closed | Period lock succeeded with readiness score |
| export.generated | Tax or statement export with receipt id |
| attestation.anchored | Settlement anchor posted to GL (Close + Attest) |
API Keys
Books API keys (live): Signed-in operators with org.manage permission can create and revoke keys at /books/settings/api-keys. Keys authenticate the Books public API; only a SHA-256 hash is stored server-side.
Firm portfolio API (REST v1): POST /api/v1/firm/api-keys provisions firm-scoped keys for portfolio sync and tax exports. A dedicated firm settings UI is on the roadmap — use the REST endpoint or contact us for onboarding.
MCP Bearer tokens: Labs Flywheel and allocation connectors use OAuth 2.0 → short-lived HMAC tokens (see MCP section above).
Need a specific integration scope? Request access →
R/R Gate Formula
Equity minimum: 2.0 : 1
Crypto minimum: 3.0 : 1
ratio = (potentialGain − creditCostTotal)
/ (definedRisk + creditCostTotal)
Where:
potentialGain = ((target − entry) / entry) × deployed
definedRisk = ((entry − stop) / entry) × deployed
creditCostTotal = (creditRate / 100) × deployed × (days / 365)
The credit cost is deducted from the numerator and added to the denominator, making the gate progressively harder for longer hold durations and higher borrow rates. Source: lib/mcp/rr-gate.ts