---
title: Leverage agent setup
description: Single source of truth for wiring an AI agent to Leverage.
version: 2026-05-06
---

This page is served at **`/skill.md`**. Fetch it at the start of any
new session before doing domain work.

## Pick the connection

In order of preference:

1. **Custom Connector (claude.ai / Claude Desktop)** — once listed in the
   Connectors Directory, add via Settings → Connectors. OAuth, no local
   setup. *(Status: in progress.)*
2. **Remote MCP Server (recommended today)** — point your client at
   `https://api.leverageimmo.com/api/v1/mcp/messages`. Streamable HTTP,
   JSON-RPC. Auth: `x-api-key: <your key>` on every request.
3. **Local plugin (fallback for Claude Code / Cowork dev setups)** —
   `npm i -g @leverageai/cli && leverage plugin install`, then set
   `LEVERAGE_API_KEY` in the shell that launches the client.

If your runtime can speak JSON-RPC over HTTP, use (2). Do not install (3)
in agent sandboxes — it cannot reach the user's host plugin directory.

## Bootstrap once per session

Before doing real work, read these MCP resources from the server:

- `leverage://skill` — domain skill (auth, endpoints, async flows).
- `leverage://openapi` — OpenAPI 3.1 snapshot for request/response shapes.

These are authoritative. Do not reconstruct shapes from memory.

## Auth

- Get/rotate keys at **app.leverage.immo → Profile → Integrations**.
- Send as `x-api-key` on every HTTP call. Service keys also need
  `x-tenant-id`.
- Never paste keys into chat windows. Use env vars, secret managers, or
  the connector OAuth flow once available.

## Async jobs

Many tools are asynchronous and return a `job_id`. Poll until done:

- `documents_get` for OCR jobs.
- `expose_get` (or `jobs_get`) for expose extraction job status (`GET /api/v1/jobs/{id}`).
- `jobs_get` for due diligence and other generic jobs.

Workflow tools `run_due_diligence` and `analyze_listing_text` handle the
polling for you. Honor `notifications/progress` events.

## Domain conventions

- Property `id` equals calculation `id`.
- Address fields on properties are flat (no nested `address`).
- Rates are decimal fractions (`0.04` = 4% / year).
- Money is integer EUR cents unless the OpenAPI says otherwise.
- Dates are ISO 8601.

## Reporting bugs

Use the `issues_create` tool whenever you hit an unclear error, an API
or CLI bug, or behavior that contradicts this page. Include reproduction
steps and base64 screenshots if helpful.

## Reference on this host

- This page: `/skill.md`
- OpenAPI: `/_openapi.json`
- Interactive docs: `/docs`
- MCP endpoint: `/api/v1/mcp/messages` (POST, Streamable HTTP)
- Health (no auth): `/api/health`
