Build

MCP Overview

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

Updated April 2026

What MCP Is

The Model Context Protocol 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 External API v2:

  • It authenticates users through Auth0, not through static API keys. Each user sees the data their Lev account permits.
  • It exposes 27 tools at launch covering deals, contacts, companies, lenders, placements, pipelines, term sheets, market data, and account context. Three additional lender-discovery tools are documented and in the works.
  • 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 (27 live + 3 coming soon across 9 domains)
  └── Async API client (retries, circuit breaker)
        │  Authorization: Bearer <jwt>
        │  X-Origin-App: mcp

Lev External API v2
  • 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 is per-user, not per-service

The Lev MCP server expects a live user session. Do not point headless services at it — use an API key against the REST API instead.

What's in the Box

  • Deals — search, read, create, update, delete, and move through pipelines.
  • Lender workflows — direct lender lookup today; directory search, AI lender matching, and ranked-result retrieval are coming soon.
  • CRM — contacts and companies with full CRUD.
  • Placements and term sheets — track outreach progression and read lender quotes.
  • Market data — current SOFR, Prime, Treasury rates; asset type classifications.
  • Account — profile, available accounts, team members, and live account switching.

For the full catalog with parameters and return shapes, see MCP Tools.

Next steps
More in this section