Skip to main content
Leonar exposes a native Model Context Protocol (MCP) server that lets AI assistants call Leonar tools and read contextual resources directly.

Quick start

1. Choose your setup

  • Claude Desktop / Claude.ai / Claude remote connector (recommended): use the hosted MCP endpoint directly. No Leonar API key is required; Claude redirects you to Leonar and you authorize one workspace via OAuth.
  • Claude Code / Codex / Cursor / generic MCP clients that do not support OAuth remote connectors: use either Direct HTTP with a Bearer API key, or the local @leonar/mcp NPX bridge.

2. Configure your MCP client

For Claude Desktop, prefer the remote connector tab below. The NPX package is only for local/API-key clients that need a stdio command.

3. Start using tools

Once connected, your AI assistant has access to the same safe workflow tools used by Leonar’s integrated AI agent, plus 4 contextual resources. Ask it things like:
  • “Show me the context for the Senior PM project”
  • “Find companies hiring Account Executives and identify their sales leaders”

Business-development prospecting

Authentication

Leonar supports two authentication modes for MCP:
  • OAuth for Claude remote connectors. This is the recommended path for Claude Desktop and Claude.ai. Claude discovers Leonar’s OAuth metadata automatically from the MCP endpoint, redirects you to Leonar, and receives an access token scoped to one workspace.
  • Bearer API keys for local/API-key clients such as Claude Code, Codex, Cursor, and generic MCP clients that do not use the OAuth connector flow.
For API-key clients, the MCP server uses the same leo_ API keys as the REST API. Pass your key as a Bearer token in the Authorization header.
Each tool requires specific scopes. If the API key lacks a required scope, the tool returns an error. See the scopes reference for the full list.
Use the minimum scopes your assistant needs. For read-only exploration, start with contacts:read, projects:read, and companies:read.
High-impact mutations should be handled carefully by MCP clients. For business-development prospecting, always show the result of preview_prospecting_enrollment and ask for confirmation before calling commit_prospecting_enrollment.

Transport

The MCP server uses Streamable HTTP transport over a single endpoint (POST /api/mcp). It is stateless — no session management is required. All MCP clients that support the url transport type can connect directly. For custom HTTP clients or manual tests, include both accepted response types:
The NPX bridge sets these headers automatically.

Available resources

The server also exposes these read-only resources:

Available tools

The MCP server exposes the main CRM API resources as explicit tools. Assistant memory tools and provider-specific search tools are not exposed over external MCP. | Contacts | search_contacts, get_contact, create_contact, update_contact, delete_contact | contacts:read, contacts:write, contacts:delete | | Companies | search_companies, get_company, create_company, update_company, delete_company | companies:read, companies:write, companies:delete | | Projects | search_projects, get_project, create_project, update_project, delete_project, add_contact_to_project | projects:read, projects:write, pipeline:write | | Sequences | search_sequences, get_sequence, get_sequence_steps, update_sequence_steps, list_sequence_enrollments, enroll_contacts_in_sequence, unenroll_contacts_from_sequence | sequences:read, sequences:write | | Deals | search_deals, get_deal, create_deal, update_deal, delete_deal | deals:read, deals:write, deals:delete | | Notes | search_notes, create_note, update_note, delete_note | notes:read, notes:write | Delete tools archive records when the API resource supports soft deletion. Notes are deleted from their note table.

Tool parameters reference

Common read parameters

Contacts

Companies

Projects

Sequences

Deals

Notes

Example use cases

CRM lookup

“Find contacts at Acme and summarize their current roles.”The assistant calls search_contacts and reads the returned contact records.

Pipeline preparation

“Create a project for our new backend role and attach Acme as the client company.”The assistant can use search_companies then create_project.

Deal update

“Update this deal amount and expected close date.”Uses update_deal with the same API key scopes as the REST API.

Meeting note

“Add this call summary to the company record.”Uses create_note with entity_type: "company".

Rate limits

The MCP server shares the same base rate limit as the REST API: 2000 requests per hour.
  • For API-key clients, the quota is tracked per API key.
  • For Claude remote connectors, the quota is tracked per OAuth authorization (client + workspace + user). Refreshing an access token does not reset the quota.
Each tool call counts as one request.

MCP vs REST API

Use the MCP server when connecting an AI assistant. Use the REST API when building custom integrations or scripts that need full CRUD access to all resources.