Skip to content

Connect Planhat to Claude: Sync Sales, Licenses, and Invoices

Build a secure, automated Planhat MCP server to give Claude real-time access to customer health, MRR, licenses, and invoices. Connect via Truto in minutes.

Uday Gajavalli Uday Gajavalli · · 10 min read
Connect Planhat to Claude: Sync Sales, Licenses, and Invoices

If your team uses ChatGPT, check out our guide on connecting Planhat to ChatGPT or explore our broader architectural overview on connecting Planhat to AI Agents.

Giving a Large Language Model (LLM) read and write access to a Customer Success platform like Planhat fundamentally changes how Revenue Operations and Account Management teams work. Instead of navigating through multiple dashboards to cross-reference MRR, license utilization, and open support tickets, you can prompt an AI agent to do it instantly.

To make this happen, you need a Model Context Protocol (MCP) server. The MCP server acts as the translation layer, converting Claude's natural language tool calls into Planhat's specific REST API requests. You can spend weeks building, hosting, and maintaining this infrastructure yourself, or you can use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL in seconds.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Planhat, connect it natively to Claude, and execute complex revenue workflows using natural language.

The Engineering Reality of the Planhat 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, the reality of implementing it against a massive B2B platform like Planhat is a heavy engineering lift.

If you decide to build a custom MCP server for Planhat, you own the entire API lifecycle. (See our hands-on guide to building MCP servers for a deeper dive into this complexity.) Here are the specific challenges you will face when mapping Planhat to LLM tool calls:

Multi-Identifier Resolution Planhat allows you to reference entities (like Companies or End Users) using a mix of identifiers: the internal _id, a CRM-synced externalId, or a sourceId. When an LLM is parsing user input, it rarely knows which ID type it is looking at. If your custom server expects an _id but the LLM passes an externalId pulled from a previous step, the API will reject the request. A robust MCP server requires strict schema definitions to guide the LLM on exactly which identifier to use and where to place it in the payload.

Deeply Nested Custom Metrics Planhat relies heavily on custom fields. Critical business data - like proprietary health scores, custom financial metrics, or complex licensing structures - are often buried in nested JSON objects. LLMs struggle to correctly format nested dynamic keys from scratch. Your custom MCP server must dynamically fetch Planhat's custom field definitions and inject them into the JSON Schema presented to the LLM, otherwise the model will hallucinate property names during write operations.

Strict Validation on Financial Primitives When dealing with Planhat objects like Licenses, Invoices, and Churn records, the API enforces strict validation on currency codes, decimal formats, and ISO date strings. If an AI agent tries to update an invoice amount but formats the currency incorrectly, the request fails. You have to build custom validation and error-handling logic into your server to guide the model when it makes formatting mistakes.

Instead of building all of this from scratch, you can use Truto. Truto dynamically derives highly specific JSON schemas from Planhat's API documentation, injecting precise descriptions that guide the LLM. For more on this approach, read our 2026 architecture guide to auto-generated MCP tools. It normalizes pagination and error formatting automatically, exposing Planhat's endpoints as ready-to-use MCP tools.

A Note on Rate Limits

When connecting AI agents to production systems, rate limiting is a critical architectural concern. LLMs can easily trigger API quotas when looping through large paginated datasets.

Truto does not retry, throttle, or apply backoff on rate limit errors. When the Planhat API returns an HTTP 429 Too Many Requests, Truto passes that error directly back to the caller. However, Truto normalizes Planhat's upstream rate limit information into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller (your AI agent, orchestrator, or Claude client) is strictly responsible for inspecting these headers and implementing its own retry logic with appropriate exponential backoff.

How to Generate a Planhat MCP Server with Truto

Truto creates MCP servers dynamically based on your connected Planhat account. The server is fully self-contained - the generated URL includes a cryptographic token that handles authentication, environment routing, and tool filtering.

You can create this server in two ways: via the Truto UI, or programmatically via the API.

Method 1: Via the Truto UI

  1. Log into your Truto dashboard and navigate to the Integrated Accounts page.
  2. Select your connected Planhat account.
  3. Click on the MCP Servers tab.
  4. Click Create MCP Server.
  5. Select your desired configuration. You can name the server, restrict it to specific HTTP methods (e.g., only read operations), filter by tags, and set an optional expiration date.
  6. Click Save and copy the generated MCP server URL (e.g., https://api.truto.one/mcp/a1b2c3d4...).

Method 2: Via the Truto API

For teams embedding MCP generation into their own products, you can generate the server programmatically. The API validates the configuration, stores the token securely, and returns the endpoint.

Make an authenticated POST request to /integrated-account/:id/mcp:

curl -X POST https://api.truto.one/admin/integrated-accounts/YOUR_ACCOUNT_ID/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Planhat CS Agent Server",
    "config": {
      "methods": ["read", "write"]
    }
  }'

The response will contain the ready-to-use URL:

{
  "id": "abc-123",
  "name": "Planhat CS Agent Server",
  "config": { "methods": ["read", "write"] },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}

How to Connect the MCP Server to Claude

Once you have the Truto MCP URL, you need to register it with your Claude environment. This approach provides full SaaS API access to Claude without security headaches. You can do this through the Claude UI or by modifying the desktop configuration file.

Method A: Via the Claude UI

(Note: UI paths differ slightly between Claude Web, Claude Desktop, and ChatGPT. The general pattern is the same).

  1. Open Claude and navigate to Settings.
  2. Look for the Integrations, Connectors, or MCP Servers menu.
  3. Click Add Server or Add Custom Connector.
  4. Give the connection a name (e.g., "Planhat via Truto").
  5. Paste the Truto MCP URL.
  6. Save the configuration. Claude will immediately handshake with Truto, fetch the tool schemas, and make them available to the model.

Method B: Via Manual Config File (Claude Desktop)

If you are running Claude Desktop locally and prefer file-based configuration, you can add the server using the official MCP Server-Sent Events (SSE) proxy.

Open your claude_desktop_config.json file (typically located at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS) and add the following:

{
  "mcpServers": {
    "planhat_truto": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/a1b2c3d4e5f67890"
      ]
    }
  }
}

Restart Claude Desktop. The model will now have secure access to the Planhat tools defined by your Truto configuration.

Planhat Hero Tools for Claude

Truto automatically translates Planhat's vast API surface into distinct, descriptive MCP tools. Each tool includes JSON Schema definitions that explicitly guide the LLM on required parameters, string formats, and pagination cursors.

Here are 6 high-leverage hero tools your AI agents can use to orchestrate RevOps and CS workflows.

1. list_all_planhat_companies

This is the core discovery tool. It retrieves an array of company profiles from Planhat, including their internal _id, name, status, phase, externalId, and custom health metrics. Claude uses this tool to search for accounts and resolve their internal IDs before executing downstream tasks.

"Search Planhat for the company named 'ACME Corp' and retrieve their internal Planhat ID, current phase, and active status."

2. update_a_planhat_company_by_id

Once Claude resolves a company's internal ID, it can use this tool to modify the account record. It accepts the id as a path parameter and allows updates to fields like phase, status, or critical financial metrics like mrrTotal and nrrTotal.

"Update the Planhat record for ACME Corp (ID: 64b2x9...). Change their status to 'At Risk' and note in the custom fields that their champion recently departed."

3. list_all_planhat_licenses

Licenses map to the actual products a company has purchased. This tool returns an array of licenses detailing the product name, value (MRR), renewalDate, and renewalStatus. Claude relies on this endpoint to audit upcoming renewals and flag accounts that require immediate CS intervention.

"Pull all active licenses for ACME Corp. Identify any licenses with a renewalDate occurring in the next 45 days and summarize their total MRR value."

4. list_all_planhat_invoices

Financial context is critical for account management. This tool fetches invoice records, returning arrays of invoiceNo, amountDue, amountPaid, status, and dueDate. It is specifically useful for determining if payment delays are correlating with usage drops or churn risk.

"Check the invoice history for ACME Corp over the last 6 months. Do they have any invoices with a status of 'Overdue'? If so, sum the total amountDue."

5. create_a_planhat_opportunity

When an AI agent identifies expansion potential or a required win-back motion, it can programmatically generate pipeline. This tool requires a companyId and accepts parameters for salesStage, mrr, nrr, and dealDate, allowing Claude to inject qualified opportunities directly into RevOps reporting.

"Based on ACME Corp's recent product adoption, create an expansion opportunity in Planhat for a 'Pro Tier Upgrade'. Set the expected MRR to $1,500 and place it in the 'Discovery' stage."

6. get_single_planhat_churn_by_id

Churn data is vital for post-mortems and forecasting. If Claude detects a churned account, this tool retrieves the specific churn event details, including the churnDate, associated products, financial value, and the logged reasons for the cancellation.

"Retrieve the churn record ID 55f9x2... Extract the stated churn reasons and the total currency value lost, then format it into a brief executive summary."

For the complete inventory of available tools - including tasks, end users, NPS surveys, and custom assets - visit the Planhat integration page.

Workflows in Action

Providing an LLM with granular access to Planhat unlocks multi-step, agentic workflows that traditionally require humans to click through dozens of tabs. Here is how specific personas use these tools.

Scenario 1: The Account Executive's Renewal Audit

A Customer Success Manager or Account Executive is prepping for a QBR and needs a complete snapshot of the client's financial standing and upcoming renewals.

"I have a call with TechFlow Inc tomorrow. Check Planhat to see if they have any overdue invoices. Then, pull all their active licenses and summarize which products are up for renewal in the next 90 days."

Execution Steps:

  1. Claude calls list_all_planhat_companies with a query filter for the name "TechFlow Inc" to retrieve the _id.
  2. Using that companyId, Claude calls list_all_planhat_invoices to retrieve payment statuses, identifying any records marked as overdue.
  3. Claude calls list_all_planhat_licenses, filtering by the same companyId.
  4. The model parses the renewalDate and product fields, cross-references them against the current date, and generates a formatted text summary for the CSM.

Scenario 2: RevOps Churn Triage and Win-Back Automation

A RevOps manager wants to automatically track churned accounts and ensure the sales team follows up when appropriate.

"Pull the list of Planhat churn records from this month. For any account that churned specifically due to 'Budget Constraints', create a new win-back opportunity in Planhat assigned for next quarter, and update the company status to 'Past Client'."

Execution Steps:

  1. Claude calls list_all_planhat_churn to retrieve recent churn events.
  2. The model iterates through the results, inspecting the reasons array for each record.
  3. For matches, Claude calls update_a_planhat_company_by_id using the associated companyId, altering the status to 'Past Client'.
  4. Claude then calls create_a_planhat_opportunity using that same companyId, setting the stage to 'Nurture' and assigning a future deal date for the win-back motion.

Security and Access Control

Giving an AI agent read/write access to your system of record requires strict security boundaries. Truto provides several mechanisms to lock down your Planhat MCP server. This follows the best practices for architecting multi-tenant MCP servers for enterprise B2B SaaS:

  • Method Filtering: Limit the server strictly to specific operations. By passing methods: ["read"] during server creation, you ensure the LLM can only query data (via get and list operations) and absolutely cannot create, update, or delete records in Planhat.
  • Tag Filtering: Restrict access to specific functional domains. If you only want an agent to access financial data, you can apply tag filters so only invoice, license, and churn tools are exposed, completely hiding support tickets or tasks.
  • Require API Token Auth: By default, possessing the MCP URL grants access. By enabling require_api_token_auth: true, the calling client must also send a valid Truto API token in the Authorization header. This adds a secondary layer of authentication for enterprise deployments.
  • Expiration Timestamps: For temporary access, set an expires_at datetime. Once that exact moment passes, Truto's backend invalidates the token and the server immediately stops accepting requests, preventing long-lived stale credentials.

Scaling Agentic CS Operations

Connecting Planhat to Claude is about shifting from static dashboards to dynamic, conversational interfaces. When your AI agents can safely interact with live financial metrics, renewal dates, and account health data, you stop asking CSMs to act as data routers and allow them to focus entirely on customer relationships.

The bottleneck to this future has always been the integration layer. Hand-coding OAuth logic, mapping nested custom metrics, and dealing with pagination schemas consumes engineering resources that should be spent on core product features. By using Truto to generate a managed MCP server, you abstract away the API mechanics, instantly providing your LLM with secure, documented, and fully normalized tools.

FAQ

Does Truto automatically handle Planhat rate limits?
No. Truto passes HTTP 429 Too Many Requests errors directly to the caller. It normalizes the rate limit data into standard IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset), leaving the retry and backoff logic to the client.
Can I restrict Claude to only read data from Planhat?
Yes. When generating the MCP server URL via Truto, you can configure method filtering to only allow 'read' operations (like get and list), completely blocking writes and deletes.
How do I securely share an MCP server with external contractors?
You can generate a short-lived MCP server URL by setting an expires_at parameter. Once the timestamp passes, the token is automatically invalidated and access is revoked.
Does Claude need to handle Planhat's specific pagination?
No. Truto normalizes Planhat's pagination into a standardized limit and next_cursor format within the MCP tool schemas, explicitly instructing the LLM on how to iterate through pages.

More from our Blog