---
title: "Connect Altruist Open API to ChatGPT: Analyze Portfolio Activity"
slug: connect-altruist-open-api-to-chatgpt-analyze-portfolio-activity
date: 2026-11-25
author: Riya Sethi
categories: ["AI & Agents"]
excerpt: Learn how to connect Altruist Open API to ChatGPT using a managed MCP server. A complete engineering guide to automating RIA portfolio workflows.
tldr: "Architect a secure MCP server to connect Altruist Open API to ChatGPT. Automate portfolio analysis, cost basis tracking, and transaction monitoring using natural language."
canonical: https://truto.one/blog/connect-altruist-open-api-to-chatgpt-analyze-portfolio-activity/
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 Altruist Open API to ChatGPT: Analyze Portfolio Activity


If you need to connect Altruist Open API to ChatGPT to automate wealth management workflows, analyze cost basis data, or track portfolio positions, you need a Model Context Protocol (MCP) server. This server acts as the translation layer between ChatGPT's JSON-RPC tool calls and Altruist's REST 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](https://truto.one/mcp-server-security-zero-data-retention-2026-implementation-guide/).

If your team uses Claude, check out our guide on [connecting Altruist Open API to Claude](https://truto.one/connect-altruist-open-api-to-claude-track-wealth-account-history/) or explore our broader architectural overview on [connecting Altruist Open API to AI Agents](https://truto.one/connect-altruist-open-api-to-ai-agents-sync-feeds-position-data/).

Giving a Large Language Model (LLM) read and write access to a custodial wealth platform like Altruist is a high-stakes engineering challenge. You have to handle complex relational data payloads, map dynamic financial data to MCP tool definitions, and deal with strict pagination and rate limits. Every time an API version is deprecated, your custom server code must be updated, redeployed, and tested. 

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Altruist Open API, connect it [natively to ChatGPT](https://truto.one/connect-openai-to-chatgpt-manage-projects-users-and-vector-stores/), and execute complex portfolio workflows using natural language.

> 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/)

## The Engineering Reality of the Altruist Open API

A custom MCP server is a self-hosted integration layer. While the [open MCP standard](https://truto.one/mcp-buyers-checklist-and-quick-start-guide-for-b2b-saas-2026/) provides a predictable way for models to discover tools, implementing it against Altruist's specific API surface is exceptionally painful for engineering teams. 

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

### The V1 to V2 Deprecation Cycle
Altruist is actively evolving its API surface. Many core endpoints - like `households.list`, `accounts.list`, `positions.list`, and `cost_basis.list` - are currently experiencing a migration from their `v1` implementations to `v2`. If you hardcode an MCP server against the `v1` endpoints today, your server will silently start failing when Altruist finally shuts off the legacy routes. Truto handles this natively by auto-generating tools from actively maintained integration documentation. If an endpoint is deprecated, the underlying proxy routes automatically to the supported version, shielding your AI agents from underlying schema drift.

### Dual Data Paradigms - REST vs File Feeds
Altruist Open API does not just return standard JSON arrays. For deep historical reporting or bulk data, it utilizes flat file transfers via its data feed endpoints (e.g., enabling custodial data feeds via `partner_code` and `file_transfer` flags). Your LLM needs tools that can toggle these feeds on and off, independent of fetching real-time positions via standard REST `GET` requests. Hand-coding an MCP server to interpret both immediate JSON responses and asynchronous flat-file feed statuses requires maintaining complex state logic that LLMs struggle to orchestrate without strict, schema-validated tools.

### Strict Pagination and Transparent Rate Limiting
Altruist pages its list endpoints using a strict `page` and `page_size` parameter model, defaulting to 100 records and capping at a hard limit of 1000. If your LLM attempts to pull an entire firm's transaction history in a single shot, the API will reject it.

More importantly, you must understand how rate limits are handled in this architecture. Truto does not retry, throttle, or apply backoff on rate limit errors. When the Altruist Open API returns an HTTP 429 (Too Many Requests), Truto passes that error directly to the caller. Truto normalizes the upstream rate limit information into standardized headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) per the IETF specification. The LLM orchestration layer or the calling agent is completely responsible for implementing retry logic and backoff. Do not build an agent assuming the MCP middleware will absorb these errors - you must instruct the LLM to inspect the normalized headers and pause execution if a 429 is encountered.

## Step 1: Create the Altruist Open API MCP Server

Before ChatGPT can interact with Altruist, you need to generate an MCP server scoped to a specific Altruist authenticated account. Truto allows you to do this either via the Dashboard UI or programmatically via the API.

### Method A: Via the Truto UI
This is the fastest method for internal tooling or quick agent testing.

1. Log into your Truto dashboard and navigate to the **Integrated Accounts** page.
2. Select the connected Altruist account you want to use.
3. Click the **MCP Servers** tab.
4. Click **Create MCP Server**.
5. Select your desired configuration (e.g., restrict to `read` methods only, or filter by specific tags like `accounts` or `positions`).
6. Click Save and **copy the generated MCP server URL**. It will look like `https://api.truto.one/mcp/a1b2c3d4e5f6...`.

### Method B: Via the API
If you are dynamically provisioning AI agents for your own end-users, you will generate this server programmatically. Make a `POST` request to `/integrated-account/:id/mcp`.

```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": "Altruist Portfolio Agent",
    "config": {
      "methods": ["read"],
      "tags": ["households", "accounts", "positions"]
    }
  }'
```

The API response returns the secure URL. This single URL carries the cryptographic token required for routing and authentication. 

## Step 2: Connect the MCP Server to ChatGPT

Once you have your Truto MCP URL, you need to register it with your LLM client. 

### Method A: Via the ChatGPT UI
If you are using ChatGPT directly (requires a Pro, Plus, Business, Enterprise, or Education seat with Developer mode enabled):

1. In ChatGPT, navigate to **Settings -> Apps -> Advanced settings**.
2. Enable **Developer mode**.
3. Under **MCP servers / Custom connectors**, click **Add new server**.
4. **Name:** Enter a recognizable name (e.g., "Altruist Open API").
5. **Server URL:** Paste the Truto MCP URL you generated in Step 1.
6. Click **Save**. ChatGPT will immediately handshake with the Truto MCP Router, call `tools/list`, and load the Altruist schemas.

### Method B: Via Manual Config File (SSE)
If you are running a custom MCP host (like the Claude Desktop app, Cursor, or a custom LangChain orchestrator), you can connect via Server-Sent Events (SSE) using the standard `@modelcontextprotocol/server-sse` package.

Add this to your MCP `config.json` file:

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

## Hero Tools for Altruist Open API

Truto dynamically generates MCP tools based on the underlying API documentation and the `config.resources` definitions. It injects context instructions - like telling the LLM to pass cursor values back unchanged - directly into the schemas. 

Here are the highest-leverage tools available for Altruist Open API.

### list_all_altruist_open_api_households
Retrieves a paginated list of household IDs for the currently authenticated advisor. You can filter the results by passing a `name_pattern` to perform a case-insensitive search. This is almost always the starting point for any wealth management workflow, as accounts belong to households.

> "Find the household ID for the client whose name contains 'Smithson' and list their details."

### list_all_altruist_open_api_accounts
Gets a paginated list of accounts belonging to a specific household. You must pass the `household_id` retrieved from the households tool. The records are found at `data.accounts`.

> "Get all the active accounts associated with household ID 987654321."

### list_all_altruist_open_api_positions
Fetches the most recent investment positions for a specific account. This requires the `account_id` and is essential for generating portfolio allocation summaries or checking specific equity holds.

> "List the current portfolio positions for account ID 123456. Group them by ticker symbol and show the total quantity held."

### list_all_altruist_open_api_transactions
Retrieves transaction data for a given account. By default, it queries the last month of data, but you can pass `date_from` and `date_to` parameters (formatted as YYYY-MM-DD) to pull specific historical ranges.

> "Pull all transaction data for account ID 123456 from January 1, 2024 to March 31, 2024. Flag any withdrawal transactions over $5,000."

### list_all_altruist_open_api_cost_basis
Returns the most recent cost basis data for a specific account. This tool is critical for tax loss harvesting workflows or calculating unrealized capital gains for client reporting.

> "Get the current cost basis for account ID 123456 and calculate the total unrealized gains across all equity positions."

### create_a_altruist_open_api_data_feed
Enables the partner's daily custodial data feed (flat files) for the signed-in advisor's firm. This requires passing the `partner_code` provided by Altruist and a `file_transfer` boolean to toggle the feed on.

> "Enable the daily custodial flat file data feed for partner code 'PRT-998' so our back-office system can start syncing historical data."

For the complete tool inventory and granular schema details, refer to the [Altruist Open API integration page](https://truto.one/integrations/detail/altruist).

## Workflows in Action

When you give ChatGPT direct, authenticated access to the Altruist Open API via MCP, you move beyond simple Q&A. The LLM becomes an active participant in portfolio operations. 

Here are two concrete workflows showing exactly how ChatGPT chains these tools together.

### Workflow 1: Pre-Meeting Portfolio Summary
**Persona:** Financial Advisor preparing for a quarterly client review.

> "I have a meeting with the 'Hendricks' family this afternoon. Find their household, pull all their associated accounts, and give me a summary of their current positions and any transactions over $10,000 in the last 30 days."

**Step-by-step execution:**
1. ChatGPT calls `list_all_altruist_open_api_households` with `name_pattern: "Hendricks"` to get the `household_id`.
2. It calls `list_all_altruist_open_api_accounts` using that `household_id` to get a list of `account_id`s (e.g., an Individual account and an IRA).
3. It loops through the accounts, calling `list_all_altruist_open_api_positions` for each to aggregate the current holdings.
4. It calls `list_all_altruist_open_api_transactions` for each account, filtering the returned JSON data in memory to isolate transactions exceeding $10,000.
5. **Result:** The advisor receives a neatly formatted markdown summary of the client's total AUM, asset allocation breakdown, and a flagged list of significant recent cash movements.

### Workflow 2: Tax Loss Harvesting Discovery
**Persona:** Wealth Operations Manager looking for end-of-year tax optimization opportunities.

> "Look up account ID 554433. Check the current cost basis for all positions and identify any equities currently sitting at a loss of more than 15%. Cross-reference with recent transactions to ensure no identical assets were purchased in the last 30 days to avoid wash sales."

```mermaid
sequenceDiagram
    participant User as User Prompt
    participant ChatGPT as ChatGPT
    participant MCP as Truto MCP Server
    participant Altruist as Altruist API

    User->>ChatGPT: "Analyze account 554433 for tax loss harvesting..."
    ChatGPT->>MCP: list_all_altruist_open_api_cost_basis<br>{"account_id":"554433"}
    MCP->>Altruist: GET /v2/cost_basis?account_id=554433
    Altruist-->>MCP: Returns cost basis lots
    MCP-->>ChatGPT: JSON cost basis data
    ChatGPT->>MCP: list_all_altruist_open_api_transactions<br>{"account_id":"554433"}
    MCP->>Altruist: GET /v2/transactions?account_id=554433
    Altruist-->>MCP: Returns recent transactions
    MCP-->>ChatGPT: JSON transaction data
    ChatGPT-->>User: Returns flagged assets eligible for harvesting
```

**Step-by-step execution:**
1. ChatGPT calls `list_all_altruist_open_api_cost_basis` for the specified account.
2. It evaluates the JSON response, calculating the percentage difference between the cost basis and current market value for each tax lot to flag those down >15%.
3. It calls `list_all_altruist_open_api_transactions` with `date_from` set to 30 days prior to check for recent buys.
4. **Result:** The LLM cross-references the tickers. If an asset is down 15% but was purchased 12 days ago, the LLM flags it as a wash sale risk. The user gets a safe, actionable list of harvesting targets.

## Security and Access Control

Exposing financial data to an AI model requires strict governance. Truto's [MCP architecture isolates servers](https://truto.one/mcp-server-security-zero-data-retention-2026-implementation-guide/) per authenticated tenant and provides granular controls over what the model can see and do.

*   **Method Filtering:** Enforce read-only access. By setting `config.methods: ["read"]` during server creation, you completely remove tools like `create_a_altruist_open_api_data_feed` from the schema. ChatGPT literally cannot hallucinate a write operation because the tools do not exist in its context.
*   **Tag Filtering:** Group tools by business domain. If a specific agent only needs to analyze historical transactions, you can set `config.tags: ["transactions"]`, preventing the LLM from accidentally querying sensitive cost basis data.
*   **Require API Token Auth:** For high-security internal environments, possession of the MCP URL isn't enough. By setting `require_api_token_auth: true`, the calling client must also pass a valid Truto API token in the `Authorization` header on every JSON-RPC request.
*   **Ephemeral Servers (`expires_at`):** Grant temporary access. When generating the server via the API, pass an ISO datetime to `expires_at`. The underlying Cloudflare KV store and database records will automatically purge at that exact second, instantly severing the LLM's access to the Altruist Open API.

## Summary

Connecting the Altruist Open API to ChatGPT transforms static financial data into an interactive, agentic workflow. By offloading the complexity of schema normalization, strict pagination, and dynamic tool generation to Truto's MCP server, engineering teams can focus on building intelligent prompts rather than writing boilerplate API wrappers.

Remember to program your agent to respect standard IETF rate limit headers, as financial APIs will aggressively throttle heavy LLM data extraction. 

> 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/)
