Connect Perk to Claude: Manage Trips, Bookings & Cost Centers
Learn how to connect Perk to Claude using a managed MCP server. Automate travel bookings, SCIM provisioning, and cost center management without maintaining API infrastructure.
If you need to connect Perk (TravelPerk) to Claude to automate travel ops, provision SCIM users, reconcile invoices, or manage corporate cost centers, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between Claude's LLM tool calls and Perk's REST API endpoints. 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 ChatGPT, check out our guide on /connect-perk-to-chatgpt-automate-travel-billing-expenses/ or explore our broader architectural overview on /connect-perk-to-ai-agents-orchestrate-travel-ops-scim-sync/.
Giving a Large Language Model (LLM) read and write access to a specialized corporate travel management system like Perk is a significant engineering challenge. You have to handle authentication lifecycles, map massive nested JSON schemas to MCP tool definitions, and deal with Perk's specific domain constraints around invoicing and identity management. Every time the upstream API introduces a breaking change, 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 Perk, connect it natively to Claude Desktop, and execute complex corporate travel workflows using natural language.
The Engineering Reality of the Perk 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 over JSON-RPC, the reality of implementing it against specialized B2B APIs is painful. Perk is built to manage everything from flight logistics to complex corporate cost allocation and IT provisioning. Its API reflects that complexity.
If you decide to build a custom Perk MCP server, here are the specific integration challenges you will face:
Strict SCIM PatchOp Logic
Perk handles user provisioning via the SCIM (System for Cross-domain Identity Management) protocol. Updating a user requires calling the perk_scim_users_bulk_update tool, which does not accept a flat JSON object. Instead, it requires a strict PatchOp body containing an array of Operations (add, remove, replace) with exact string paths (e.g., name.givenName). LLMs are notoriously bad at guessing strict structural formats like SCIM unless the MCP tool schema provides exhaustive JSON Schema definitions and strict parameter descriptions. Without a managed translation layer, Claude will frequently hallucinate invalid payloads, resulting in HTTP 400 errors.
Binary PDF vs JSON Handling
Most AI tools expect structured JSON. However, fetching actual invoice documents in Perk (via get_single_perk_invoice_pdf_by_id) returns raw binary PDF content. When building an MCP server, you cannot blindly stream application/pdf bytes into a JSON-RPC response intended for a text-based LLM. You must build specific handling in your MCP layer to either store the file locally and return a path, parse the PDF to text, or return a standardized Base64 artifact.
Conditional Validation on Cost Centers
Perk enforces complex domain logic depending on how an organization is configured. For example, when bulk updating cost centers (perk_cost_centers_bulk_updates_bulk_update), the payload requirements change dynamically. If "cost object types" are enabled for the org, you must supply a valid type. If they are disabled, attempting to pass a type will cause a rejection, and you are forced to only use the archive boolean. The MCP server must accurately describe these conditional paths so the LLM understands the business rules before attempting a write operation.
Rate Limits and 429 Handling When dealing with rate limits, it is critical to understand the boundaries of the integration layer. Truto acts as a transparent proxy and does not absorb, retry, or apply backoff logic to API rate limits. When the Perk API returns an HTTP 429 (Too Many Requests), Truto passes that error directly back to the calling client (Claude).
What Truto does do is normalize the upstream rate limit information into standardized headers per the IETF specification. Regardless of how Perk formats its specific quota headers, Truto returns them as:
ratelimit-limit: The maximum number of requests allowed.ratelimit-remaining: The number of requests left in the current window.ratelimit-reset: The time when the limit will reset.
The caller (your AI framework or agent loop) is entirely responsible for reading these headers and executing the appropriate retry and exponential backoff logic.
How to Create the Perk MCP Server
Truto abstracts away the complexity of building JSON-RPC endpoints, parsing API documentation into JSON Schemas, and managing token infrastructure. You can generate a production-ready MCP server for Perk using either the Truto UI or the API.
Method 1: Via the Truto UI
For teams who prefer a visual setup, you can generate an MCP URL directly from the dashboard.
- Log into your Truto environment and navigate to the Integrated Accounts page.
- Select your connected Perk account.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration (e.g., name the server, filter by
readorwritemethods, or select specific resource tags likefinanceordirectory). - Copy the generated MCP server URL. It will look like this:
https://api.truto.one/mcp/a1b2c3d4e5f6...
Method 2: Via the Truto REST API
For platform engineers building multi-tenant AI products, you can generate MCP servers programmatically for your end-users. This endpoint validates the integration, generates a secure cryptographic token, stores it in edge KV storage for low-latency lookups, and returns the ready-to-use URL.
Request:
POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp
Authorization: Bearer <YOUR_TRUTO_API_KEY>
Content-Type: application/json
{
"name": "Perk Finance Agent MCP",
"config": {
"methods": ["read", "write"]
},
"expires_at": "2026-12-31T23:59:59Z"
}Response:
{
"id": "mcp_srv_9x8y7z6",
"name": "Perk Finance Agent MCP",
"config": {
"methods": ["read", "write"]
},
"expires_at": "2026-12-31T23:59:59Z",
"url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}This URL is fully self-contained. It encodes the integrated account routing and authentication in the hashed token, meaning the client needs zero additional configuration to start calling tools.
Connecting the MCP Server to Claude
Once you have your Truto MCP URL, connecting it to Claude takes seconds. You can do this visually in the web UI or via a configuration file for Claude Desktop.
Method A: Via the Claude UI
If you are using Claude's web interface (Free, Pro, Team, or Enterprise), you can add custom remote connectors directly in the settings.
- In Claude, navigate to Settings -> Integrations (or Connectors depending on your tier).
- Click Add MCP Server or Add custom connector.
- Paste the Truto MCP Server URL.
- Click Add.
Claude will immediately perform the initialization handshake, discover the tools derived from Perk's documentation, and make them available in your chat context.
Method B: Via Manual Config File (Claude Desktop)
If you are developing locally with Claude Desktop, you connect to the Truto MCP server using the Server-Sent Events (SSE) transport layer via the official Model Context Protocol CLI.
Open your Claude Desktop configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the Truto MCP server URL under the mcpServers object:
{
"mcpServers": {
"travelperk_prod": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/a1b2c3d4e5f67890"
]
}
}
}Restart Claude Desktop. The agent is now securely connected to the Perk API.
Hero Tools for Perk
Truto automatically generates MCP tools based on Perk's underlying API resources and schemas. Here are 6 of the highest-leverage tools available for AI agents automating travel ops.
list_all_perk_trips
This tool retrieves all trips in the TravelPerk account, ordered by modified time. It returns core logistical data including start/end times, locations, statuses, and booker IDs.
Contextual usage: Use this as the entry point for trip auditing, reporting workflows, or finding specific trip IDs to query custom fields.
"Claude, pull the latest trips from Perk and summarize any trips starting this week that are not yet marked as completed."
get_single_perk_invoice_by_id
Retrieves a complete JSON representation of a single TravelPerk invoice, referenced by its serial number (e.g., INV-01-987654). The response includes tax summaries, totals, line items, and status.
Contextual usage: Critical for financial reconciliation agents. When a finance user needs to break down the cost of a specific trip, this tool provides the exact ledger data.
"Get the full invoice details for serial number INV-02-112233 in Perk. Break down the taxes summary and list the individual line items."
create_a_perk_cost_center
Provisions a new cost center in the Perk organization. You can define the name, approvers, delegates, and company scope.
Contextual usage: Ideal for automated onboarding. When a new department is created in your HRIS, an agent can automatically spin up the corresponding cost center in Perk.
"Create a new cost center in Perk named 'EMEA Field Marketing'. Make sure it is active and not archived."
perk_scim_users_bulk_update
Executes an identity update using a SCIM PatchOp body. It allows the agent to modify specific attributes of an existing SCIM user (like changing their active status, name, or travel policies) without overwriting the entire record.
Contextual usage: Essential for IT and security automation. If an employee leaves the company or changes departments, this tool updates their identity and access.
"Update the SCIM user with ID 'usr_789' in Perk. Execute a replace operation to change their active status to false, and remove their current travel policy."
list_all_perk_bookings
Retrieves a list of individual bookings (flights, trains, hotels, car hires) associated with Perk trips, ordered by recency.
Contextual usage: Use this when you need granular itinerary details rather than broad trip metadata. Helpful for cross-referencing hotel bookings with specific corporate card expenses.
"List all recent bookings in Perk. Filter down to only show hotel bookings and tell me the check-in and check-out dates for each."
create_a_perk_webhook
Creates a webhook endpoint subscription for specific event triggers (like invoice.issued or trip.created). It returns the subscription payload including the secret used for signature verification.
Contextual usage: Used by DevOps agents to dynamically wire up real-time event pipelines between Perk and internal systems.
"Create a webhook in Perk targeting 'https://api.mycompany.com/travel-hooks'. Subscribe it to the 'trip.updated' and 'invoice.issued' events, and give me the webhook secret."
To view the complete list of available tools, required properties, and JSON schemas, visit the Perk integration page.
Workflows in Action
Connecting an LLM to Perk via MCP unlocks autonomous orchestration across your travel, finance, and identity stacks. Here are real-world examples of how different personas utilize this integration.
Workflow 1: Financial Reconciliation & Cost Allocation
Persona: Finance Operations / Accounts Payable
The Problem: Finance teams spend hours manually matching invoice line items to specific departments or cost centers at the end of the month.
The Prompt:
"Audit all Perk invoices issued this month. For any invoice over $1,000, find the associated trip, check which cost center the booker belongs to, and generate a summary report of the spend."
Execution Steps:
- Claude calls
list_all_perk_invoicesfiltering for the current billing period. - For invoices where the total exceeds $1,000, Claude extracts the
profile_idor references theserial_number. - Claude calls
get_single_perk_invoice_by_idto get the granular line items. - Claude calls
list_all_perk_tripsto cross-reference thebooker_idassociated with those expenses. - Claude calls
get_single_perk_scim_user_by_idto determine the booker's department, allocating the cost effectively.
sequenceDiagram
participant User as Finance Team
participant Claude as Claude Agent
participant MCP as Truto MCP
participant Perk as Perk API
User->>Claude: Audit high-value invoices
Claude->>MCP: Call list_all_perk_invoices
MCP->>Perk: GET /invoices
Perk-->>MCP: Returns Invoice Array
MCP-->>Claude: JSON Array
Claude->>MCP: Call get_single_perk_invoice_by_id
MCP->>Perk: GET /invoices/{id}
Perk-->>MCP: Returns Invoice Details
MCP-->>Claude: JSON Object
Claude->>User: Generates Spend Allocation ReportWorkflow 2: Automated Employee Offboarding
Persona: IT Administration / Security
The Problem: When an employee leaves, IT must revoke access across dozens of platforms. Forgetting to disable a travel account can lead to unauthorized corporate spend.
The Prompt:
"We are offboarding Alex Chen today. Find his SCIM user record in Perk, disable his active status, and pull a list of any upcoming trips he had booked so we can cancel them."
Execution Steps:
- Claude calls
list_all_perk_scim_userspassing a filter parameter (e.g.,filter=userName eq "alex.chen@company.com") to find the specific user ID. - Claude extracts the
idfrom the result. - Claude calls
perk_scim_users_bulk_updateusing a PatchOp payload to setactive: false. - Claude calls
list_all_perk_trips, analyzing the array for trips wherebooker_idmatches Alex's ID and the status is active. - Claude returns the summary of the disabled account and the list of trips requiring manual cancellation.
Security and Access Control
Exposing an enterprise travel platform to an autonomous AI agent requires strict security boundaries. Truto's MCP architecture provides native guardrails at the token level, ensuring agents only access what they explicitly need.
- Method Filtering: Use
config.methodsduring server creation to enforce read-only access. Passing["read"]ensures Claude can executelist_all_perk_tripsandget_single_perk_invoice_by_id, but will strictly blockcreate_a_perk_cost_centeror anywriteoperations. - Tag Filtering: Group tools by functional area using
config.tags. For example, settingtags: ["finance"]restricts the agent entirely to invoicing and cost center endpoints, completely hiding SCIM user endpoints from the AI's context window. - Require API Token Auth: By enabling
require_api_token_auth: true, possession of the MCP URL is no longer sufficient. The client must also pass a valid Truto API token in the Authorization header, adding a critical second layer of enterprise authentication. - Automated Expiration: For temporary agent tasks or contractor access, supply an
expires_atISO datetime. The underlying edge storage and durable schedulers will automatically purge the token and database records at the exact timestamp, guaranteeing access is revoked.
Accelerate AI Agent Integrations
Building an integration layer that reliably connects LLMs to sprawling platforms like Perk requires solving hard engineering problems: normalizing authentication, translating complex API specs into JSON-RPC schemas, handling strict SCIM validation, and building secure token infrastructure.
Truto eliminates this overhead. By dynamically generating documentation-driven MCP tools backed by high-performance edge infrastructure, Truto allows your engineering team to focus on building agentic reasoning loops instead of debugging API boilerplate.
Stop writing custom API connectors. Use managed MCP servers to give your agents the secure, deterministic data access they need to execute real work.
FAQ
- How do I connect Perk to Claude?
- You can connect Perk to Claude by generating a Model Context Protocol (MCP) server URL via Truto. Provide this URL to Claude Desktop's configuration file or the Claude web UI to instantly grant the AI agent access to Perk's API tools.
- Can Claude update Perk SCIM users?
- Yes, by exposing tools like perk_scim_users_bulk_update through the MCP server, Claude can generate the required SCIM PatchOp JSON payloads to add, remove, or replace user attributes dynamically.
- How does the Truto MCP server handle Perk rate limits?
- Truto acts as a direct proxy and does not absorb or retry rate limits. When Perk returns an HTTP 429 error, Truto passes it back to Claude with standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset), allowing the client to handle backoff.
- Can I restrict which Perk tools Claude can access?
- Yes. When creating the MCP server via Truto, you can configure method filtering (e.g., read-only access) and tag filtering to restrict the agent's scope to specific domains like cost centers or invoices.