---
title: "Connect CasePeer to ChatGPT: Manage Legal Cases and Documents"
slug: connect-casepeer-to-chatgpt-manage-legal-cases-and-documents
date: 2026-11-28
author: Roopendra Talekar
categories: ["AI & Agents"]
excerpt: "Learn how to connect CasePeer to ChatGPT using a managed MCP server. Automate legal case management, document retrieval, and client intake with AI agents."
tldr: "Connect CasePeer to ChatGPT via Truto's managed MCP server to automate legal intake, document downloads, and case notes without writing custom integration code."
canonical: https://truto.one/blog/connect-casepeer-to-chatgpt-manage-legal-cases-and-documents/
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://truto.one/.well-known/search?q={query}"
  method: "GET"
  documentation: "https://developers.cloudflare.com/ai-search/how-to/search-for-agents/"
---

# Connect CasePeer to ChatGPT: Manage Legal Cases and Documents

**CasePeer in ChatGPT, in about a minute.** The best way to connect CasePeer to ChatGPT is Elaichi: connect CasePeer to Elaichi once, then add Elaichi to ChatGPT as a connector. Two steps, about a minute, with a 14-day free trial and no credit card required.

1. **Start your free trial.** Create your Elaichi account. 14 days free, no credit card required.
2. **Connect CasePeer.** Connect CasePeer once in Elaichi. ChatGPT never gets more access than you have.
3. **Add Elaichi to ChatGPT.** In ChatGPT, open Plugins, press +, and paste https://api.elaichi.ai/mcp into Server URL. Sign in and approve.

[Start free on Elaichi, 14 days, no credit card required](https://app.elaichi.ai/signup?utm_source=truto.one&utm_medium=referral&utm_campaign=launchpad&utm_content=post_markdown&utm_term=casepeer) · [CasePeer on Elaichi](https://elaichi.ai/connectors/casepeer/?utm_source=truto.one&utm_medium=referral&utm_campaign=launchpad&utm_content=post_markdown&utm_term=casepeer)

*Building CasePeer into your own product? The guide below is for you.*

---

If you need to connect CasePeer to ChatGPT to automate legal intake workflows, track case progression, or orchestrate document downloads, you need a [Model Context Protocol (MCP) server](https://truto.one/how-to-build-mcp-servers-for-ai-agents-2026-hands-on-architecture-guide/). This server acts as the translation layer between ChatGPT's tool calls and CasePeer's complex legal practice management APIs. You can either spend weeks building, hosting, and maintaining a custom MCP server to map JSON-RPC requests to CasePeer's specific payloads, or use a managed integration platform like Truto to [dynamically generate a secure, authenticated MCP server URL](https://truto.one/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/).

If your team uses Claude, check out our guide on [connecting CasePeer to Claude](https://truto.one/connect-casepeer-to-claude-automate-legal-tasks-and-records/) or explore our broader architectural overview on [connecting CasePeer to AI Agents](https://truto.one/connect-casepeer-to-ai-agents-orchestrate-case-files-and-finances/).

Giving a Large Language Model (LLM) read and write access to a legal practice management system is a significant engineering challenge. You must handle strictly typed relational payloads, navigate asynchronous document delivery endpoints, and manage dual-API architectures for transactional versus analytical data. 

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

> Stop writing [boilerplate API integration code](https://truto.one/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/). Let Truto generate secure, managed MCP servers for your AI agents in seconds.
>
> [Talk to us](https://truto.one/book-a-demo/)

## The Engineering Reality of the CasePeer 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 CasePeer's highly specific API is exceptionally painful for engineering teams.

If you decide to build a custom MCP server for CasePeer, you own the entire API lifecycle. Here are the specific integration challenges that break standard REST CRUD assumptions when working with CasePeer:

### The Dual-API Architecture (Transactional vs Data Sync)
CasePeer exposes two fundamentally different APIs. Standard transactional operations live under `/api/v1/` and are designed for single-record CRUD. However, if an LLM needs to query bulk relational data - like generating a report of all health liens or damages - it must use the Data Sync API (`/data-sync-api/v1/`). A custom MCP server must programmatically expose both sets of endpoints and explicitly train the LLM on which one to use via detailed JSON Schema descriptions. If you map this poorly, ChatGPT will attempt to run heavy analytical queries against rate-limited transactional endpoints.

### Asynchronous Document Downloads via 204 Location Headers
When an LLM attempts to download a Case Document, the API does not simply return a binary payload or a static S3 link. The `/api/v1/case-documents/{id}/data` endpoint triggers an asynchronous process. The document file is only available once its `download_status` reaches `Completed` (documents that are `Pending/Processing` or `Failed` return `410 Gone`). Once ready, the API responds with a `204 No Content` and places a highly temporary (20-minute) URL in the `Location` header. Your MCP server must catch this header, intercept the redirect, and surface the temporary link cleanly back to the LLM context. 

### Polymorphic Contact Shapes
Legal cases involve highly varied contact types (clients, defendants, expert witnesses, adjusters). CasePeer handles this via polymorphic contact shapes. The `/api/v1/contacts/{id}` response serializes differently depending on the contact's subtype. Address, phone, email, and website attributes are often nested arrays requiring specific tag parsing. If you attempt to feed a generic contact schema to an LLM, the model will hallucinate field paths when attempting to update a contact record.

## Generating the CasePeer MCP Server

Truto handles the schema translation, pagination normalization, and authentication lifecycle automatically. You can generate a CasePeer MCP server scoped to a specific law firm's account using either the Truto UI or the API.

### Method 1: Via the Truto UI

If you are setting up an internal tool or testing workflows manually, the UI is the fastest path:

1. Log into your Truto dashboard and navigate to **Integrated Accounts**.
2. Select your connected CasePeer account.
3. Click the **MCP Servers** tab.
4. Click **Create MCP Server**.
5. Select your desired configuration (e.g., restrict to `read` methods or specific tags like `cases` and `documents`).
6. Copy the generated MCP server URL (it will look like `https://api.truto.one/mcp/a1b2c3d4...`).

### Method 2: Via the Truto API

For production deployments where you are dynamically provisioning AI agents for your end-users, you should generate the MCP server programmatically.

Make a `POST` request to `/integrated-account/:id/mcp`. You can use method and tag filters to restrict exactly what the generated server can touch.

```bash
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": "CasePeer Intake Agent",
    "config": {
      "methods": ["read", "write"],
      "tags": ["cases", "clients", "case_documents", "case_notes"]
    }
  }'
```

The API responds with a secure URL payload. This URL contains a cryptographic token that securely routes requests to the specific CasePeer account.

```json
{
  "id": "mcp_8a9b0c1d2e",
  "name": "CasePeer Intake Agent",
  "config": {
    "methods": ["read", "write"],
    "tags": ["cases", "clients", "case_documents", "case_notes"]
  },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}
```

## Connecting the MCP Server to ChatGPT

Once you have your Truto MCP URL, you can plug it into ChatGPT using either the native desktop UI or a manual configuration file for programmatic use.

### Method A: Via the ChatGPT UI (Desktop/Web)

If you have a ChatGPT Pro, Plus, Business, Enterprise, or Education account, you can add custom connectors directly in the interface:

1. Open ChatGPT and go to **Settings** -> **Apps** -> **Advanced settings**.
2. Enable **Developer mode** (custom MCP support requires this flag).
3. Under **MCP servers / Custom connectors**, click **Add new server**.
4. **Name:** CasePeer (Truto)
5. **Server URL:** Paste the URL generated in the previous step.
6. Save the configuration. ChatGPT will immediately perform a handshake and pull in the available CasePeer tools.

### Method B: Via Manual Config File (SSE)

If you are running local agents, custom wrapper UIs, or testing the protocol via the CLI, you can connect to the Truto endpoint using Server-Sent Events (SSE).

Create or update your `mcp_config.json` file to use the official SSE transport package. This forces the MCP client to route JSON-RPC messages over HTTP POST to Truto.

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

## Hero Tools for CasePeer

Truto automatically derives tool definitions from the CasePeer API documentation. Here are the highest-leverage tools your AI agent should use for legal operations. 

### create_a_case_peer_case

This tool handles the complex transaction of creating a new case and its primary client simultaneously. CasePeer requires a Date of Incident (`doi`) and a client payload object. 

*Contextual Usage Notes:* Use this during initial legal intake. You must provide `attributes.caseclient` to create a new client, including `firstname` and `lastname`.

> "A new client, Sarah Jenkins, called in regarding an auto accident that happened on October 12, 2024. Create a new case file for her and set the incident type to MVA."

### get_single_case_peer_case_document_datum_by_id

This tool executes the asynchronous document download request. It hits `/api/v1/case-documents/{id}/data`.

*Contextual Usage Notes:* Instruct your agent that it must first verify the `download_status` is `Completed`. The tool will return a 204 response with a temporary S3 file URL in the Location header. The agent can then use a standard HTTP GET or a secondary document parsing tool to read the file.

> "Fetch the raw file data for the police report document ID 884723. Extract the location URL from the headers and summarize the officer's narrative."

### create_a_case_peer_case_note

Notes are the lifeblood of a CasePeer file. This tool appends chronological updates to a case.

*Contextual Usage Notes:* Notes require a type and relationships to the specific case ID. This should be utilized heavily by agents acting as paralegals or intake coordinators to log phone calls and summarizations.

> "Log a case note on case 19482 stating that we received the medical records from Memorial Hospital and I have placed them in the review queue."

### create_a_case_peer_cost

This tool creates a cost request on a case file. 

*Contextual Usage Notes:* Creating a cost in CasePeer is not a silent operation - it triggers internal notifications to firm accountants and automatically creates an associated case note. Agents should ensure cost amounts are verified before executing this tool to avoid spamming the accounting team.

> "Log a cost request for $150.00 on case 33921 for the medical records retrieval fee from Dr. Smith's office."

### list_all_case_peer_sync_health_liens

This tool utilizes the specialized Data Sync API (`/data-sync-api/v1/health-liens`) to pull bulk relational data for reporting.

*Contextual Usage Notes:* Use this tool when the user asks for cross-case reporting or financial aggregations rather than looking up a single case file. It supports limits up to 1000 records.

> "Pull a list of all active health liens across the firm so I can cross-reference outstanding settlement demands."

### list_all_case_peer_case_tasks

Retrieves the task list for the firm. 

*Contextual Usage Notes:* Highly useful for agentic task orchestration. Agents can pull tasks, filter for overdue items, and alert the assigned caseworkers.

> "Check the task list for case 10583. Are there any outstanding tasks related to filing the complaint?"

*Note: These are just the hero operations. For the complete inventory of available tools, query schemas, and body schemas, view the [CasePeer integration page](https://truto.one/integrations/detail/casepeer).* 

## Workflows in Action

Below are real-world examples of how ChatGPT can orchestrate multi-step legal workflows using the CasePeer MCP server.

### 1. Automated New Client Intake

When a law firm receives a new lead via phone or email, an intake coordinator typically has to manually create the contact, open the case, and assign an initial review task. An AI agent can handle this entire chain.

> "We just signed a new client, Michael Vance. He was involved in a slip and fall on November 3rd, 2024. Open a case, log a note that the retainer agreement is signed, and assign a task to the intake team to request medical records."

**Execution Steps:**
1. The agent calls `create_a_case_peer_case` with `attributes.caseclient.firstname` = "Michael", `lastname` = "Vance", and `attributes.doi` = "2024-11-03".
2. CasePeer returns the new Case ID (e.g., `45001`).
3. The agent calls `create_a_case_peer_case_note` using Case ID `45001` with the text "Retainer agreement is signed."
4. The agent calls `create_a_case_peer_case_task` to generate a "Request Medical Records" task linked to the new case.

```mermaid
sequenceDiagram
    participant User as User
    participant GPT as ChatGPT
    participant Truto as Truto MCP
    participant API as CasePeer API
    
    User->>GPT: "Open case for Michael Vance..."
    GPT->>Truto: Call create_a_case_peer_case
    Truto->>API: POST /api/v1/cases
    API-->>Truto: Case ID 45001
    Truto-->>GPT: Return Case ID
    GPT->>Truto: Call create_a_case_peer_case_note
    Truto->>API: POST /api/v1/case-notes
    API-->>Truto: Note created
    Truto-->>GPT: Return success
    GPT->>Truto: Call create_a_case_peer_case_task
    Truto->>API: POST /api/v1/case-tasks
    API-->>Truto: Task created
    Truto-->>GPT: Return success
    GPT-->>User: "Case 45001 opened, note logged, task assigned."
```

### 2. Document Processing and Accounting Sync

Paralegals often spend hours pulling down requested records and logging the associated costs for those records on the client's ledger.

> "Check case 38221 for any recently uploaded police reports. If you find one, download it, summarize it, and log a $25 cost request for the police department fee."

**Execution Steps:**
1. The agent calls `list_all_case_peer_case_documents` filtered by Case ID `38221` and identifies the document ID for the police report.
2. The agent calls `get_single_case_peer_case_document_datum_by_id`. The MCP server returns the temporary `Location` header URL.
3. The agent accesses the temporary URL, reads the PDF text, and summarizes the narrative.
4. The agent calls `create_a_case_peer_cost` on Case ID `38221` for $25.00.

```mermaid
flowchart TD
    A["list_all_case_peer_case_documents<br>(Filter by Case ID)"] --> B["Identify Document ID"]
    B --> C["get_single_case_peer_case_document_datum_by_id"]
    C -->|Returns 204 Location Header| D["Download and parse temporary URL"]
    D --> E["create_a_case_peer_cost<br>(Log $25 expense)"]
```

## Security and Access Control

Providing LLMs with autonomous access to sensitive legal practice management data requires strict governance. Truto's MCP tokens provide robust [security controls at the infrastructure level](https://truto.one/mcp-server-security-zero-data-retention-2026-implementation-guide/):

*   **Method Filtering (`config.methods`):** Restrict an MCP server to strictly read-only access by passing `methods: ["read"]` during creation. This ensures the LLM can query case data but physically cannot execute `create`, `update`, or `delete` operations.
*   **Tag Filtering (`config.tags`):** Scope the server to specific domains. For example, if you only want an agent handling document retrieval, set `tags: ["case_documents", "case_document_folders"]` to completely hide financial and medical data endpoints.
*   **Mandatory API Auth (`require_api_token_auth`):** Enable this flag to require the caller to pass a valid Truto API token in the `Authorization` header, ensuring possession of the MCP URL alone is not enough to access the API.
*   **Ephemeral Servers (`expires_at`):** Set a TTL (Time-To-Live) on the MCP server to automatically destroy the endpoint and revoke access after a temporary workflow or testing session concludes.

## Handling Rate Limits and Error Passthrough

It is critical to understand that Truto **does not** automatically retry, throttle, or apply exponential backoff to rate limit errors. When the upstream CasePeer API returns an HTTP 429 (Too Many Requests), Truto passes that error directly back to the calling client (the LLM or your agent framework). 

Truto normalizes the upstream rate limit information into standard IETF headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`). Your agent framework (e.g., LangGraph, AutoGen, or your custom implementation) is entirely responsible for reading these headers and managing retry and backoff logic. Do not build AI agents assuming the MCP server will absorb these errors for you.

## Take AI Workflows to Production

Connecting ChatGPT to CasePeer via a custom, hand-coded MCP server requires managing polymorphic schemas, reverse-engineering Data Sync APIs, and building infrastructure to handle asynchronous file retrieval headers. 

By leveraging Truto, you bypass this entirely. You get a production-ready, auto-updating JSON-RPC endpoint that guarantees secure, schema-perfect tool generation mapped directly to the reality of the CasePeer API.

> Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds.
>
> [Talk to us](https://truto.one/book-a-demo/)
