# MCP Overview

> Understand the Lev MCP server — its purpose, architecture, supported tools, and where it fits relative to the Lev API.

Source: https://www.lev.com/docs/build/mcp/overview

Last updated: June 2026

---
## What MCP Is

The [Model Context Protocol](https://modelcontextprotocol.io) is an open standard for connecting AI clients to external tools and data. An MCP server advertises a set of **tools** (callable functions) and **resources** (read-only data) to any compliant client. The client handles authentication, tool discovery, and human review; the server handles the business logic.

## What the Lev MCP Server Does

The Lev MCP server is a thin, opinionated translation layer on top of the [Lev API](/build/api-overview):

- **It authenticates users through Auth0**, not through static API keys. Each user sees the data their Lev account permits.
- **It registers 60 tools** across deals (including checklists), documents, vaults, contacts, companies, notes, lenders, placements, pipelines, term sheets, market data, billing, account context, and MCP Apps helpers.
- **It returns JSON strings** tuned for LLM consumption — list tools wrap results with `total`, `showing`, and `has_more`; detail tools return a single resource.
- **It translates errors into human-readable strings** so models can surface the cause to the user without parsing HTTP envelopes.

It is **not** a replacement for the REST API. Every tool ultimately calls `/api/external/v2/*` on lev-backend.

## Architecture

```
MCP Client (Claude, Cursor, …)
        │  Streamable HTTP (POST /mcp)
        ▼
Lev MCP Server (FastMCP, Python)
  ├── Auth0 JWT verification (RS256, JWKS)
  ├── Tool registry (60 tools across 13 groups)
  └── Async API client (retries, circuit breaker)
        │  Authorization: Bearer <jwt>
        │  X-Origin-App: mcp
        ▼
Lev API
```

- **Transport.** Streamable HTTP. No stdio, no SSE — one persistent connection per session.
- **Runtime.** Python, FastMCP, gunicorn + uvicorn workers in production.
- **Reliability.** A circuit breaker trips after 5 consecutive 5xx responses with a 30-second cooldown. 429s do not trip the breaker — rate limits are expected, not outages.
- **Observability.** Every tool call forwards an `X-Request-Id` to lev-backend. A `GET /health` endpoint reports version, upstream API reachability, and circuit-breaker state.

## When to Use MCP

**MCP vs. REST vs. CLI**

- **Use MCP:** Interactive AI clients (Claude, Cursor) that need tool use, retrieval, and human-in-the-loop review on behalf of a signed-in Lev user.
- **Use the REST API:** Backend sync jobs, product integrations, or anything server-to-server. Stable contracts, API keys, no interactive sign-in.
- **Use the CLI:** Terminal workflows, ad-hoc scripts, CI/CD pipelines, or giving an LLM coding agent shell access to Lev.

  The Lev MCP server expects a live user session. Do not point headless services at it — use an [API key](/build/api-keys) against the REST API instead.

## What's in the Box

- **Deals** — search, read, create, update, delete, move through pipelines, and search indexed source-backed facts.
- **Documents and vaults** — browse a deal's Deal Rooms and Resources, and list, open, and download uploaded files.
- **Checklists** — read Deal Room checklist sections, tasks, assignees, expected document types, and task-linked files.
- **Lender matching** — run Lev's AI lender match for a deal, read the ranked lenders with their match scores and loan programs, and reveal a matched lender contact's details. Direct lender lookup by id is also available.
- **CRM** — contacts and companies with full CRUD.
- **Notes** — read, create, update, and delete free-text notes on deals and contacts.
- **Placements and term sheets** — open and advance lender outreach, record and revise quotes, and read the resulting state.
- **Market data** — current SOFR, Prime, Treasury rates; asset type classifications.
- **Billing** — subscription state and credit balance for the active account.
- **Account** — profile, available accounts, team members, and live account switching.

For the full catalog with parameters and return shapes, see [MCP Tools](/build/mcp/tools).

## Read Next