Connect LeadPerfection to Claude: Track Sales Jobs and Prospects
Learn how to connect LeadPerfection to Claude using a Truto MCP Server. Automate sales routing, track installer jobs, and sync CRM prospects autonomously.
If you need to connect LeadPerfection to Claude to automate sales routing, track installer jobs, or update prospect pipelines, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's tool calls and LeadPerfection's highly specialized REST APIs. You can either build and maintain this integration infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, managed MCP server URL. If your team uses OpenAI, check out our guide on connecting LeadPerfection to ChatGPT or explore our broader architectural overview on connecting LeadPerfection to AI Agents.
Giving a Large Language Model (LLM) read and write access to a home improvement CRM like LeadPerfection is an engineering challenge. You have to handle token authentication lifecycles, map complex flat-file style response schemas to MCP tool definitions, and deal with LeadPerfection's specific rate limits. Every time an endpoint is deprecated or an installer workflow changes, you have to update your server code, redeploy, and test the integration.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for LeadPerfection, connect it natively to Claude Desktop, and execute complex CRM workflows using natural language.
The Engineering Reality of the LeadPerfection API
A custom MCP server is a self-hosted integration layer that translates an LLM's JSON-RPC tool calls into REST API requests. While the open MCP standard provides a predictable way for models to discover tools, the reality of implementing it against LeadPerfection's API requires significant domain knowledge.
If you decide to build a custom MCP server for LeadPerfection, you own the entire API lifecycle. Here are the specific challenges you will face:
Deprecated Endpoint Sprawl
LeadPerfection's API has evolved over years, leaving a trail of deprecated endpoints mixed with active ones. For example, to search for a customer, you might find GetCustomers, GetCustomers_2_s, and GetCustomers_3_s. Similarly, retrieving leads might point to the deprecated GetLeadDatas or the current GetLeads. An LLM trying to write integration code from raw docs will almost certainly hallucinate usage of older, broken endpoints. Truto curates the active endpoints into well-documented MCP tools, ensuring Claude only calls modern, supported routes.
Heavy Data Payloads vs. Hyper-Specific Search Parameters
Retrieving full job histories involves pulling hundreds of elements at once (appointments, milestones, payments, notes) via endpoints like GetLeads. Conversely, finding a specific job requires combinations of parameters (e.g., job ID + date, or contract ID + issued lead ID). Building a custom MCP server means hand-writing JSON Schemas that perfectly describe these optional dependencies, otherwise Claude will fail to pass the correct arguments.
Unusual Payload Formats
While most modern APIs expect standard JSON, certain LeadPerfection operations - like importing call histories or bulk notes - require submitting XML payloads embedded within the REST request (process_call_history_xml). Asking Claude to format raw XML correctly on the fly is a recipe for silent errors. Truto's proxy architecture handles the translation of these complex payload requirements into standardized MCP tool definitions.
Strict Rate Limiting Behavior
Like any enterprise CRM, LeadPerfection enforces rate limits. It is critical to note that if LeadPerfection returns an HTTP 429 Too Many Requests error, Truto does not magically absorb, throttle, or retry the request. Truto passes the 429 error directly back to the caller (your MCP client) while normalizing the upstream rate limit information into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller - or your agent orchestration framework - is responsible for implementing the retry and exponential backoff logic.
How to Generate a LeadPerfection MCP Server
Truto dynamically generates MCP tools based on the active resources and documentation records for your LeadPerfection connection. This means tools are derived from integration resources directly, acting as a curation mechanism so only well-documented endpoints are exposed to the LLM.
You can generate an MCP server for LeadPerfection in two ways: via the Truto UI or programmatically via the API.
Method 1: Generating the Server via the Truto UI
For internal tooling and manual testing, the UI is the fastest path:
- Log into your Truto dashboard and navigate to the Integrated Accounts page.
- Select your connected LeadPerfection account.
- Click on the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration (e.g., provide a name, select allowed HTTP methods like
readorwrite, or filter by specific tool tags). - Copy the generated MCP server URL (it will look like
https://api.truto.one/mcp/a1b2c3d4...).
Method 2: Generating the Server via the Truto API
If you are building an AI agent platform and need to provision MCP servers dynamically for your users, you should use the REST API.
Send a POST request to /integrated-account/:id/mcp with your desired configuration:
curl -X POST https://api.truto.one/integrated-account/<leadperfection_account_id>/mcp \
-H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "LeadPerfection Sales Routing AI",
"config": {
"methods": ["read", "write"],
"tags": ["sales", "appointments"]
},
"expires_at": "2026-12-31T23:59:59Z"
}'The API validates that the LeadPerfection integration has documented tools available, generates a secure cryptographic token, stores it in distributed KV storage, and returns a ready-to-use URL:
{
"id": "mcp_8a9b0c1d",
"name": "LeadPerfection Sales Routing AI",
"config": { "methods": ["read", "write"], "tags": ["sales", "appointments"] },
"expires_at": "2026-12-31T23:59:59.000Z",
"url": "https://api.truto.one/mcp/f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2"
}Connecting the LeadPerfection MCP Server to Claude
Once you have the MCP server URL, connecting it to your AI client requires zero additional coding. The URL itself encodes the account routing and authentication.
Method 1: Via the Claude UI (Desktop or Web)
If you are using Claude's interface for manual workflows or prompt engineering:
- Open Claude and navigate to Settings -> Integrations -> Add MCP Server.
- Enter a recognizable name (e.g., "LeadPerfection Prod").
- Paste the Truto MCP server URL you copied earlier.
- Click Add.
Claude will immediately perform the initialization handshake, calling tools/list to discover all available LeadPerfection operations. No additional API keys or configuration files are required.
Method 2: Via Manual Configuration File (claude_desktop_config.json)
If you are deploying a custom Claude Desktop setup or running an agent framework locally, you can configure the connection manually using the Server-Sent Events (SSE) transport.
Edit your claude_desktop_config.json (typically located in ~/Library/Application Support/Claude/ on macOS or %APPDATA%\Claude\ on Windows):
{
"mcpServers": {
"leadperfection": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/f7g8h9i0j1k2l3m4n5o6p7q8r9s0t1u2"
]
}
}
}Restart Claude. The server will boot up and ingest the LeadPerfection tools.
Hero Tools for LeadPerfection
Truto exposes dozens of endpoints for LeadPerfection, but AI agents are most effective when utilizing high-leverage business operations. Here are the core "hero tools" your Claude instance will use most often.
Get Full Prospect and Job Data
Tool Name: list_all_lead_perfection_customers_get_leads
This is the master query tool. It retrieves the complete prospect profile, including lead history, appointment history, job history, milestones, and notes. It expects parameters like cst_id, lds_id, or ils_id.
"Claude, pull the complete prospect and job history for Prospect ID 98214. Summarize their past appointments and tell me if they have any upcoming milestones pending."
Set Sales Appointments
Tool Name: create_a_lead_perfection_leads_set_appointment_sales_rep
This tool books a new appointment on an existing data lead, optionally assigning a sales representative and product type. The lead must be in a 'set-able' status and cannot have an existing future appointment.
"Claude, book a new sales appointment for Lead ID 44512 for tomorrow at 2:00 PM. Assign Sales Rep ID 88 and set the product interest to 'Roofing'."
Check Sales Representative Schedules
Tool Name: list_all_lead_perfection_sales_api_get_sales_schedules
Retrieve the sales schedule broken down by day and then by rep. This shows each rep's available time slots and whether an appointment is already booked, which is critical context before Claude attempts to set a new appointment.
"Claude, check the sales schedule for tomorrow in the 'Northwest' market branch. Find a sales rep who has the 10:00 AM slot open and list their details."
Update Job Detail and Commissions
Tool Name: create_a_lead_perfection_sales_api_update_sales_job_detail
Used by post-sale administrative agents to update the paperwork status, commission type, total commission amount, and custom user fields on a specific job record.
"Claude, update the job details for Job ID 109923. Set the paperwork status to 'Approved' and update the total commission amount to $1,250.00."
Add CRM Notes
Tool Name: create_a_lead_perfection_sales_api_add_note
Appends a note to a Prospect, Issued Lead, or Job record. This ensures that any actions Claude takes or summaries it generates are permanently logged back into the CRM for human review.
"Claude, add a note to Prospect ID 98214 stating that we attempted to contact them regarding their upcoming window installation, but they requested a callback next Tuesday."
View Open Installer Jobs
Tool Name: list_all_lead_perfection_installer_get_installs_opens
Retrieves a list of open installation jobs assigned to the current user context. Useful for agents acting as a dispatch or installation manager assistant.
"Claude, list all open installs currently assigned in the system. Group them by appointment date and highlight any jobs that are missing attached documentation."
For a complete list of available resources and endpoints, view the LeadPerfection integration page.
Workflows in Action
To understand how these tools chain together via the Model Context Protocol, here are two concrete workflows an AI agent can execute autonomously.
Scenario 1: Autonomous Sales Dispatch Routing
The Persona: A regional sales manager needs to fill a cancellation slot for tomorrow.
"Claude, a customer just cancelled their 2:00 PM appointment for tomorrow. Check our inbound leads queue from the last 48 hours to find a hot lead. Then check the sales schedule for tomorrow, find a rep with a 2:00 PM opening, and book the appointment for them."
Execution Steps:
- Query Inbound Leads: Claude calls
list_all_lead_perfection_leads_get_inbound_lead_infoswith tomorrow's date minus 2 days to retrieve recent inbound leads. - Check Schedules: Claude calls
list_all_lead_perfection_sales_api_get_sales_schedulesfor tomorrow's date to map out all rep availability. - Match and Book: Claude identifies a rep with an open 2:00 PM slot (e.g., Rep 12) and a suitable lead, then calls
create_a_lead_perfection_leads_set_appointment_sales_repto lock in the appointment. - Add Note: Finally, Claude calls
create_a_lead_perfection_sales_api_add_noteto document that the appointment was booked to fill a cancellation slot.
sequenceDiagram
participant Claude as Claude Desktop
participant MCP as Truto MCP Server
participant LeadPerfection as LeadPerfection API
Claude->>MCP: Call tools/call (get_inbound_lead_infos)
MCP->>LeadPerfection: GET /api/Leads/GetInboundLeadInfo
LeadPerfection-->>MCP: Returns array of new leads
MCP-->>Claude: JSON result
Claude->>MCP: Call tools/call (get_sales_schedules)
MCP->>LeadPerfection: GET /api/SalesApi/GetSalesSchedule
LeadPerfection-->>MCP: Returns slot availability
MCP-->>Claude: JSON result
Claude->>MCP: Call tools/call (set_appointment_sales_rep)
MCP->>LeadPerfection: POST /api/Leads/SetAppointmentSalesRep
LeadPerfection-->>MCP: 200 OK
MCP-->>Claude: Empty result (Success)Scenario 2: Post-Sale File Review
The Persona: A production coordinator verifying that a sold job has all required documents and notes before moving it to installation.
"Claude, find the job associated with Contract ID 'C-9921'. Check if the paperwork status is approved. If it is, list the attached job documents and add a note that the file is cleared for installer review."
Execution Steps:
- Locate Job: Claude calls
list_all_lead_perfection_sales_api_get_prospect_job_id_2_susing thecontractidto retrieve the internal LeadPerfectionJobID. - Verify Details: Claude calls
get_single_lead_perfection_sales_api_get_sales_job_detail_by_idusing the retrieved JobID to check the current paperwork status. - Check Documents: Claude calls
list_all_lead_perfection_installer_get_job_imagesto verify the required documents exist on the DOCS tab. - Update Status: If everything matches, Claude calls
create_a_lead_perfection_sales_api_add_noteto mark the file as reviewed and cleared for the installation team.
Security and Access Control
Connecting an LLM to a CRM that controls a company's revenue pipeline requires strict access boundaries. Truto's MCP servers provide granular security controls enforced at the proxy layer:
- Method Filtering: When creating the server, you can restrict access to specific HTTP methods using
config.methods. Passing["read"]ensures the agent can only executeGETorLISToperations, physically preventing the LLM from creating or deleting LeadPerfection records. - Tag Filtering: You can restrict the MCP server to specific domains using
config.tags. By tagging integration resources in Truto (e.g., tagging installer endpoints asinstaller_ops), you can ensure a sales-focused AI agent only sees tools tagged forsales. - API Token Authentication: By enabling
config.require_api_token_auth, possessing the MCP URL is no longer enough. The client must also pass a valid Truto API token in theAuthorizationheader, adding a required secondary layer of identity verification. - Time-to-Live (TTL): Setting
expires_atduring server creation assigns a strict expiration timestamp. Once expired, the distributed KV storage automatically purges the token, instantly revoking the AI agent's access to LeadPerfection without leaving stale credentials behind.
Moving Past Manual Integrations
Building a custom integration layer between AI frameworks and legacy CRMs like LeadPerfection is an exercise in managing technical debt. From parsing deprecated endpoints to normalizing pagination cursors and handling rate limits, the boilerplate code distracts from building actual agent capabilities.
By leveraging Truto to generate a managed MCP server, you instantly translate LeadPerfection's complex API surface into clean, LLM-ready tools. You retain total control over security and filtering, while offloading the integration maintenance completely.
FAQ
- How does Truto handle LeadPerfection rate limits?
- Truto does not retry or absorb rate limit errors. If LeadPerfection returns a 429 Too Many Requests, Truto passes the error back to Claude and normalizes the upstream rate limit data into standard IETF headers. Your agent orchestration framework is responsible for handling retries and backoff.
- Can I prevent Claude from deleting records in LeadPerfection?
- Yes. When generating the MCP server in Truto, you can use Method Filtering to restrict the server to 'read' operations only. This ensures the LLM can only query data and is physically blocked from executing write or delete commands.
- Do I need to authenticate my users again to use the MCP server?
- No. The Truto MCP server URL encodes a cryptographic token linked directly to the integrated account. You only need to authenticate the user to LeadPerfection once; the MCP server leverages that existing connection securely.