Connect Kaspr to ChatGPT: Enrich LinkedIn Data & Monitor Credits
Learn how to connect Kaspr to chatgpt using Truto. Step-by-step guide to tool calling, API quirks, and autonomous workflows.
If you need to connect Kaspr to ChatGPT to automate LinkedIn data enrichment, monitor API rate limits, or orchestrate bulk prospecting workflows, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's JSON-RPC tool calls and Kaspr's REST APIs. You can either build and maintain this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.
If your team uses Claude, check out our guide on connecting Kaspr to Claude or explore our broader architectural overview on connecting Kaspr to AI Agents.
Giving a Large Language Model (LLM) read and write access to a lead enrichment platform like Kaspr is a specific engineering challenge. Kaspr operates on a strict credit economy and multi-tiered rate limits. Every time a developer adds a new enrichment step or attempts to pull bulk data, they risk burning through expensive API credits or triggering HTTP 429 errors. Your MCP server must expose these endpoints cleanly without obfuscating the underlying API limits.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Kaspr, connect it natively to ChatGPT, and execute complex prospecting workflows using natural language.
The Engineering Reality of the Kaspr API
A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, implementing it against Kaspr's specific API architecture requires careful handling of limits and credits.
If you decide to build a custom MCP server for Kaspr, you own the entire API lifecycle. Here are the specific integration challenges you will face:
The Multi-Faceted Credit Economy
Kaspr does not charge a flat per-request fee; it operates a granular credit economy. A single prospect might consume different types of credits depending on the data requested: workEmailCredits, directEmailCredits, phoneCredits, and exportCredits. If you give an LLM unchecked access to an enrichment endpoint, a simple prompt like "Find contact info for these 100 leads" could instantly burn through your monthly quota of premium phone credits. Your MCP integration must explicitly expose credit-checking endpoints so the AI agent can audit available balances before executing large batch operations.
Multi-Tiered Rate Limits and 429 Handling
Kaspr enforces strict request velocity limits at the minute, hour, and day levels (minutelyLimit, hourlyLimit, dailyLimit). When building an MCP server, a common mistake is attempting to build automatic retries and exponential backoff into the proxy layer.
Truto takes a different, explicitly architectural approach: Truto does not retry, throttle, or apply backoff on rate limit errors. When the Kaspr API returns an HTTP 429, Truto passes that error directly back to the caller (the AI agent). Truto normalizes the upstream rate limit information into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF specification. This means the LLM itself - or the orchestration framework calling it - is responsible for reading the 429, inspecting the reset headers, and executing the retry or backoff strategy. This prevents silent timeouts and gives the AI agent deterministic control over execution.
Nested Enrichment Payloads
The core value of Kaspr is the enriched profile data. When an LLM calls the enrichment tool, the response payload is heavily nested, returning arrays for professionalEmails, personalEmails, and phones, alongside metadata like processingTime. Mapping flat LLM arguments into Kaspr's required query/body schemas requires an intelligent routing layer. Truto handles this by splitting the LLM's flat input namespace into the appropriate query parameters and JSON body properties based on Kaspr's OpenAPI documentation, ensuring the LLM doesn't have to guess where to place arguments.
Kaspr to ChatGPT Quickstart Guide
If you want the fastest path from a fresh Truto account to ChatGPT calling the Kaspr API, follow these steps.
What you need:
- A Truto account with API access.
- A Kaspr account and API key.
- A ChatGPT Pro, Plus, Business, Enterprise, or Education seat with Developer mode available.
Step 1: Connect Kaspr as an Integrated Account
In the Truto dashboard, navigate to Integrated Accounts -> New Integrated Account, select Kaspr, and input your API key. Truto securely vaults this credential. Make a note of your integrated_account_id.
Step 2: Generate the Kaspr MCP Server
You can generate the MCP server URL scoped to this specific Kaspr account using either the Truto UI or the API.
Method A: Via the Truto UI
- Navigate to the integrated account page for your Kaspr connection.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration (e.g., allow
readandwritemethods, set tag filters). - Copy the generated MCP server URL (it will look like
https://api.truto.one/mcp/<token>).
Method B: Via the Truto API
Make a single POST call to scope an MCP endpoint to your Kaspr account. You can filter by methods to constrain what the LLM is allowed to execute.
curl -X POST https://api.truto.one/integrated-account/$INTEGRATED_ACCOUNT_ID/mcp \
-H "Authorization: Bearer $TRUTO_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Kaspr Enrichment for ChatGPT",
"config": {
"methods": ["read", "write"],
"tags": ["enrichment", "credits"]
}
}'The API responds with a database record containing the url field. This single URL carries all routing and authentication - treat it like a secure credential.
Step 3: Connect the MCP Server to ChatGPT
Now you must register this server with your ChatGPT instance. You can do this via the ChatGPT interface or via a manual configuration file depending on your local setup.
Method A: Via the ChatGPT UI
- Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
- Enable the Developer mode toggle.
- Under MCP servers / Custom connectors, click to add a new server.
- Set the Name to "Kaspr (Truto)".
- Paste the Truto MCP URL into the Server URL field.
- Click Save. ChatGPT will immediately connect, perform the MCP handshake, and discover the available Kaspr tools.
Method B: Via Manual Config File (SSE Transport)
If you are running a local orchestrator or a desktop app that requires a configuration file (like Cursor or custom LangChain setups), you can wrap the Truto URL in a standard Server-Sent Events (SSE) client transport. Add the following to your mcp.json or claude_desktop_config.json equivalent:
{
"mcpServers": {
"kaspr-truto": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/YOUR_SECURE_TOKEN_HERE"
]
}
}
}Available Kaspr Tools for AI Agents
When ChatGPT connects to the Truto MCP server, Truto dynamically generates tool definitions based on the Kaspr API schema. The LLM sees these as native functions it can invoke.
Here are the high-leverage hero tools exposed for Kaspr workflows:
1. kaspr_linkedin_profiles_enrich
This is the core operational tool. It takes a prospect's LinkedIn identifier and instructs Kaspr to retrieve their work email, direct personal email, and phone number. Be aware that requesting specific data types consumes corresponding credits, and a successful call consumes one export credit.
Required arguments: id and name.
"I have a list of LinkedIn profiles for directors of engineering. Call kaspr_linkedin_profiles_enrich for Jane Doe (id: jane-doe-123) and return her professional email and company title."
2. list_all_kaspr_credits
Because Kaspr charges differently for direct emails versus work emails, an autonomous agent needs to know its available resources before running a large batch. This tool returns the remaining balances for workEmailCredits, directEmailCredits, phoneCredits, and exportCredits. A value of -1 indicates unlimited credits.
"Before we enrich this list of 50 leads, call list_all_kaspr_credits. If we have fewer than 50 workEmailCredits remaining, alert me and halt the operation."
3. list_all_kaspr_rate_limits
To prevent the AI agent from triggering 429 Too Many Requests errors, it should periodically check its API allowance. This tool returns the dailyLimit, hourlyLimit, and minutelyLimit configured for the Kaspr workspace.
"We need to process a backlog of 500 LinkedIn URLs. Call list_all_kaspr_rate_limits to check our minutelyLimit so you can batch the enrichment requests safely."
4. list_all_kaspr_me
This is a utility tool used for authentication verification and environment checks. It returns the user object, which identifies the owner of the API key (typically an email address). This is highly useful for multi-tenant AI agents that need to verify which Kaspr account they are currently operating under.
"Call list_all_kaspr_me and confirm which account email is currently bound to this session before we spend any credits."
For the complete inventory of available Kaspr tools and their exact JSON schemas, visit the Kaspr integration page.
Workflows in Action
By giving ChatGPT access to both enrichment and telemetry tools, you enable autonomous, self-regulating prospecting workflows.
Workflow 1: Self-Regulating Batch Enrichment
In this scenario, the user asks ChatGPT to enrich a small batch of leads, but the AI agent is instructed to audit its operational limits first to prevent API errors and overages.
"I need you to enrich these three LinkedIn profile IDs: john-smith-88, sarah-connor-99, and alex-murphy-00. Before enriching, verify we have at least 3 work email credits and that we aren't near our minutely rate limit. If all is clear, enrich them and output a table of their names, titles, and work emails."
How the agent executes this:
- Check Credits: The agent calls
list_all_kaspr_credits. It reads theworkEmailCreditsinteger to ensure it is greater than or equal to 3 (or-1for unlimited). - Check Rate Limits: The agent calls
list_all_kaspr_rate_limitsto verify theminutelyLimithas sufficient capacity. - Enrich Lead 1: The agent calls
kaspr_linkedin_profiles_enrichpassing{"id": "john-smith-88", "name": "John Smith"}. - Enrich Lead 2: The agent calls
kaspr_linkedin_profiles_enrichpassing{"id": "sarah-connor-99", "name": "Sarah Connor"}. - Enrich Lead 3: The agent calls
kaspr_linkedin_profiles_enrichpassing{"id": "alex-murphy-00", "name": "Alex Murphy"}.
Result: The LLM returns a formatted Markdown table with the enriched data, having safely navigated Kaspr's credit and rate limit constraints.
sequenceDiagram
participant User
participant ChatGPT
participant TrutoMCP as Truto MCP Server
participant Kaspr as Kaspr API
User->>ChatGPT: "Enrich these 3 leads safely"
ChatGPT->>TrutoMCP: Call tool: list_all_kaspr_credits
TrutoMCP->>Kaspr: GET /credits
Kaspr-->>TrutoMCP: { workEmailCredits: 450 }
TrutoMCP-->>ChatGPT: Return credit balance
ChatGPT->>TrutoMCP: Call tool: list_all_kaspr_rate_limits
TrutoMCP->>Kaspr: GET /rate-limits
Kaspr-->>TrutoMCP: { minutelyLimit: 60 }
TrutoMCP-->>ChatGPT: Return rate limits
ChatGPT->>TrutoMCP: Call tool: kaspr_linkedin_profiles_enrich (x3)
TrutoMCP->>Kaspr: POST /enrich
Kaspr-->>TrutoMCP: Return enriched profiles
TrutoMCP-->>ChatGPT: Return JSON payload
ChatGPT-->>User: Render Markdown tableWorkflow 2: Workspace Audit and Usage Reporting
Account managers frequently need to know if they need to purchase more Kaspr credits before launching a new outbound campaign. You can ask ChatGPT to run a full diagnostic.
"Audit our Kaspr account. Tell me who owns the current API key, list our current daily and hourly rate limits, and provide a summary of our remaining phone and direct email credits."
How the agent executes this:
- Identify User: The agent calls
list_all_kaspr_meand extracts theuseremail address. - Fetch Limits: The agent calls
list_all_kaspr_rate_limitsand extractsdailyLimitandhourlyLimit. - Fetch Balances: The agent calls
list_all_kaspr_creditsand extractsphoneCreditsanddirectEmailCredits.
Result: ChatGPT synthesizes the three API responses into a clean, human-readable executive summary, warning the user if any specific credit pool is running dangerously low.
Security and Access Control
When generating MCP servers via Truto, you are not blindly handing over root access to your Kaspr account. Truto provides strict access control mechanisms managed at the database level:
- Method Filtering: Use
config.methodsto restrict the LLM to specific operations. For example, settingmethods: ["read"]allows the agent to check credits (list_all_kaspr_credits) but prevents it from executing enrichment calls that consume credits. - Tag Filtering: Use
config.tagsto group tools logically. If Kaspr resources are tagged with"enrichment"or"admin", you can limit an MCP server exclusively to administrative telemetry. - Extra Authentication: By default, the Truto MCP URL handles authentication. For enterprise environments, setting
require_api_token_auth: trueforces the client to also pass a valid Truto API bearer token in the headers, adding a second layer of security. - Time-to-Live (TTL): Set an
expires_atISO datetime when creating the MCP server. Truto's background alarm workers will automatically purge the server and its KV edge records at the exact timestamp, making it perfect for temporary agent sessions.
Final Thoughts on Agentic Enrichment
Connecting Kaspr to ChatGPT via MCP transforms an LLM from a static text generator into an autonomous prospecting engine. By exposing Kaspr's credit and rate limit endpoints alongside its enrichment capabilities, you allow the AI to govern its own execution - checking balances, monitoring velocity, and extracting contact data safely.
Rather than spending weeks building custom JSON-RPC routers, managing OAuth token refreshes, or writing schema mapping boilerplate, Truto allows you to generate a secure, production-ready MCP server with a single API call.