Skip to content

Connect DevRev to ChatGPT: Manage Tickets, Accounts, and SLAs

Learn how to connect DevRev to ChatGPT using a managed MCP server. Automate ticket triage, monitor SLAs, and orchestrate engineering work via natural language.

Uday Gajavalli Uday Gajavalli · · 9 min read
Connect DevRev to ChatGPT: Manage Tickets, Accounts, and SLAs

You want to connect DevRev to ChatGPT so your AI agents can triage support tickets, monitor SLA trackers, and orchestrate engineering work items directly from natural language prompts. If your team uses Claude instead, check out our guide on connecting DevRev to Claude, or explore our broader architectural overview on connecting DevRev to AI Agents.

DevRev unifies customer support and software development into a single platform. Giving a Large Language Model (LLM) read and write access to this environment is incredibly powerful, but it presents a serious engineering challenge. You either spend weeks building, hosting, and maintaining a custom Model Context Protocol (MCP) server, or you use a managed infrastructure layer that handles the boilerplate for you.

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

The Engineering Reality of Custom DevRev Connectors

A custom MCP server is a self-hosted integration layer that translates an LLM's tool calls into REST API requests. While the open MCP standard provides a predictable way for models to discover tools, implementing it against vendor APIs is painful.

If you decide to build a custom MCP server for DevRev, you own the entire API lifecycle. You are not just building basic CRUD operations - you are dealing with DevRev's deeply relational architecture. Here are the specific integration challenges you face.

Polymorphic Work Items

In DevRev, both customer-facing support inquiries and internal engineering tasks are stored as work objects. A work object can be a ticket or an issue. When an LLM wants to list pending bug reports, it must explicitly pass the type: issue discriminator to the API. Furthermore, work items heavily rely on nested references, such as applies_to_part (the microservice or feature the work relates to) and owned_by. If your MCP server does not expose these references clearly in the JSON schema, the LLM will fail to create or route work items correctly.

Disconnected SLA Trackers

SLA states are not just simple string fields on a ticket. DevRev treats them as standalone sla_tracker objects linked via an applies_to_id. If an AI agent needs to find tickets that are about to breach their SLA, it cannot just query the tickets endpoint. It must query the SLA trackers, evaluate the remaining_time and metric_target_summaries, and then resolve the associated work IDs. Building the logic to expose this relational data to an LLM without overwhelming its context window requires careful schema design.

Timeline Entries vs Standard Updates

You do not simply "update a ticket" to add a comment in DevRev. You must create a timeline_entry with a specific type of timeline_comment against the target object. The LLM needs to understand the difference between mutating a work item's core metadata (like updating the priority or stage) and appending to its timeline.

Rate Limits and 429 Errors

DevRev enforces rate limits to protect platform stability. Truto does not intercept, absorb, or automatically retry rate-limited requests. When the upstream API returns an HTTP 429 error, Truto passes that error directly back to the caller, normalizing the upstream rate limit information into standardized IETF headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller - in this case, your AI agent framework - is entirely responsible for reading these headers and implementing exponential backoff. If your custom server fails to handle this cleanly, the LLM assumes the tool call succeeded and will hallucinate a response.

How to Generate the DevRev MCP Server

Instead of building this infrastructure from scratch, you can use Truto to generate a fully managed, securely hosted MCP server derived directly from the DevRev API documentation.

Truto dynamically translates DevRev's endpoints into MCP-compatible JSON-RPC 2.0 tools. There are two ways to generate this server.

Method 1: Via the Truto UI

  1. Log into your Truto dashboard and navigate to your DevRev Integrated Account page.
  2. Click the MCP Servers tab.
  3. Click Create MCP Server.
  4. Define your configuration. You can optionally restrict the server to specific HTTP methods (e.g., read only) or specific tool tags.
  5. Click Save and copy the generated secure MCP Server URL (e.g., https://api.truto.one/mcp/a1b2c3d4...).

Method 2: Via the REST API

You can dynamically provision MCP servers programmatically for your end-users by calling the Truto API. This creates a secure, hashed token stored in managed edge storage.

curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "DevRev Triage Agent MCP",
    "config": {
      "methods": ["read", "write"]
    },
    "expires_at": "2026-12-31T23:59:59Z"
  }'

The response returns the server details and the connection URL.

{
  "id": "mcp_8f72b...",
  "name": "DevRev Triage Agent MCP",
  "config": { "methods": ["read", "write"] },
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f6..."
}

Connecting the MCP Server to ChatGPT

Once you have the Truto MCP URL, connecting it to your AI client requires zero additional coding. The URL contains a cryptographic token that authenticates the connection directly to the DevRev tenant.

Method 1: Via the ChatGPT UI

If you are using ChatGPT Plus, Team, or Enterprise, you can add the server directly as a custom connector.

  1. In ChatGPT, navigate to Settings -> Apps -> Advanced settings.
  2. Enable Developer mode.
  3. Under MCP servers, click Add new server.
  4. Enter a name (e.g., "DevRev Operations").
  5. Paste the Truto MCP URL into the Server URL field.
  6. Click Add.

ChatGPT will immediately ping the endpoint, perform the JSON-RPC handshake, and discover the available DevRev tools.

Method 2: Via Manual Configuration File

If you are using Claude Desktop, Cursor, or building a custom LangChain/LangGraph agent, you can configure the server using standard Server-Sent Events (SSE).

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

Security and Access Control

Exposing your core DevRev infrastructure to an autonomous AI agent carries risk. Truto's MCP architecture provides native guardrails so you can enforce the principle of least privilege.

  • Method Filtering: Restrict an MCP server to read-only operations by passing "methods": ["read"]. The LLM will be physically unable to execute POST, PUT, or DELETE commands against DevRev.
  • Tag Filtering: Limit the available tools to specific domains by passing "tags": ["support", "accounts"].
  • Require API Token Auth: By setting require_api_token_auth: true, possession of the MCP URL is no longer enough. The client must also pass a valid Truto API token in the Authorization header, adding dual-layer authentication.
  • Ephemeral Servers (expires_at): Pass an ISO datetime to automatically terminate the MCP server when a temporary automated task completes. Scheduled background workers will purge the access tokens completely.

Hero Tools for DevRev Operations

Truto dynamically generates specific, normalized tools based on DevRev's API schema. Here are the highest-leverage tools your AI agent will use to automate workflows.

1. list_all_dev_rev_works

Retrieves a paginated list of work items (tickets and issues). Essential for building triage agents or generating daily standup summaries.

Contextual Usage: Instruct the LLM to pass specific query parameters like type to separate support tickets from developer issues, and explicitly instruct it to pass pagination cursors back unchanged when traversing large lists.

"Find all work items in DevRev of type 'issue' that are currently in the 'triage' stage. Give me a bulleted summary of their titles and priorities."

2. get_single_dev_rev_work_by_id

Fetches the complete metadata for a specific work item, including its body, priority, stage, and linked references.

Contextual Usage: Use this tool to give the LLM deep context on a specific issue before asking it to draft a response or evaluate its severity.

"Pull the details for DevRev work item ISS-402. Read the body description and tell me which part of our infrastructure this bug relates to."

3. create_a_dev_rev_work

Creates a new work item. Requires the AI to define the type (issue or ticket), applies_to_part, owned_by, and title.

Contextual Usage: Perfect for automating bug creation directly from a Slack message or external alert.

"Create a new P1 issue in DevRev titled 'API Gateway Latency Spike'. Set the body to indicate a 400ms latency increase over the last hour. Assign it to the core infrastructure part."

4. update_a_dev_rev_work_by_id

Mutates the core properties of an existing work item, such as changing its stage from 'triage' to 'in_progress', or escalating its priority.

Contextual Usage: Used when the LLM is acting as an automated routing or escalation engine.

"Update DevRev ticket TKT-899. Change its priority to P0 and update the target close date to tomorrow."

5. list_all_dev_rev_sla_trackers

Retrieves SLA trackers across the organization, detailing metric targets, breach times, and remaining time.

Contextual Usage: Crucial for proactive support operations. The agent can scan for tickets that are close to violating their SLA policy.

"Check all DevRev SLA trackers. Find any tickets that are going to breach their SLA in the next two hours and list their associated work IDs."

6. create_a_dev_rev_timeline_entry

Appends a new entry (such as a comment) to the timeline of an object (like a work item). Requires type: 'timeline_comment'.

Contextual Usage: This is how an AI agent communicates internally with the team or drafts replies on a ticket.

"Add an internal timeline comment to DevRev ticket TKT-105 stating that the engineering team has identified the root cause and a hotfix is deploying in 20 minutes."

7. list_all_dev_rev_accounts

Retrieves customer account data, including tiers, associated domains, and external references.

Contextual Usage: Allows the AI agent to weigh support tickets based on the commercial value or tier of the customer account.

"Look up the DevRev account for 'Acme Corp'. Check their tier. If they are an Enterprise account, let me know so we can escalate their pending tickets."

To view the complete inventory of available tools, query schemas, and response structures, visit the DevRev integration page.

Workflows in Action

By chaining these tools together, ChatGPT can execute multi-step DevRev operations that previously required dedicated engineering time.

Scenario 1: Automated Triage and Account-Based Escalation

Support teams often struggle to prioritize the queue when high-value customers submit generic tickets. You can ask the AI agent to evaluate incoming requests based on the customer's account tier and SLA status.

"Analyze DevRev ticket TKT-942. Look up the associated account tier. If it is an enterprise account and the SLA remaining time is under 4 hours, escalate the ticket priority to P0 and add a timeline comment warning the on-call engineer."

Execution flow:

  1. The agent calls get_single_dev_rev_work_by_id to retrieve TKT-942 and extract the reported_by account ID.
  2. It calls list_all_dev_rev_accounts (filtering by ID) to check the customer's tier.
  3. It calls list_all_dev_rev_sla_trackers passing the applies_to_id to evaluate the SLA's remaining_time.
  4. Recognizing the enterprise status and critical SLA, it calls update_a_dev_rev_work_by_id to patch the priority to P0.
  5. Finally, it calls create_a_dev_rev_timeline_entry with type: timeline_comment to alert the engineering team.

Result: The LLM successfully orchestrates a complex priority routing rule across three distinct DevRev entity types without a single line of custom automation script.

Scenario 2: Rollup Bug Generation

When major incidents occur, support queues get flooded with duplicate tickets. An AI agent can analyze the queue and generate a unified engineering issue.

"Find all DevRev support tickets created today containing the word 'timeout'. Summarize their contents, create a single P1 DevRev issue summarizing the problem, and assign it to the networking part."

Execution flow:

  1. The agent calls list_all_dev_rev_works with type=ticket to fetch recent support requests.
  2. It analyzes the payloads locally in its context window to identify the timeout theme.
  3. It calls create_a_dev_rev_work with type=issue, linking the relevant applies_to_part, and injecting the synthesized summary into the issue body.

Result: Support noise is reduced, and the engineering team gets a single, highly contextualized work item to investigate.

Stop Building Custom MCP Servers

Connecting DevRev to ChatGPT opens up massive potential for automating support triage, SLA enforcement, and developer operations. But forcing your engineers to write and maintain custom pagination logic, handle strictly typed polymorphic schemas, and manage OAuth token refreshes is a waste of resources.

Using Truto, you can generate secure, dynamically documented MCP servers from DevRev's actual capabilities in seconds. Your AI agents get immediate read and write access, and your engineering team avoids another maintenance burden.

FAQ

How do I connect DevRev to ChatGPT?
You can connect DevRev to ChatGPT by generating a Model Context Protocol (MCP) server URL using Truto. Paste this URL into ChatGPT's Developer settings under 'Custom Connectors' to grant the AI agent access to DevRev's tools.
Does Truto automatically handle API rate limits for DevRev?
No. When the DevRev API returns an HTTP 429 error, Truto passes the error back to the caller along with standardized IETF rate limit headers. The LLM framework must implement the retry and backoff logic.
Can I restrict what the AI agent can do in DevRev?
Yes. Truto's MCP servers support method and tag filtering. You can restrict the server to only allow 'read' operations, or require dual-layer authentication by forcing the client to pass an API token.
Why use an MCP server instead of standard API integrations?
An MCP server translates standard REST APIs into JSON-RPC 2.0 tools specifically optimized for LLM function calling. It provides the model with descriptions, query schemas, and body schemas automatically.

More from our Blog