---
title: "Connect Fulcrum to ChatGPT: Query Data and Run SQL Analysis"
slug: connect-fulcrum-to-chatgpt-query-data-and-run-sql-analysis
date: 2026-10-07
author: Yuvraj Muley
categories: ["AI & Agents"]
excerpt: "Learn how to connect Fulcrum to ChatGPT using a managed MCP server. Query field data via SQL, automate records, and build AI agents without custom code."
tldr: "Connect Fulcrum to ChatGPT using Truto's dynamically generated MCP servers. This guide covers how to expose Fulcrum's SQL query engine, custom forms, and geospatial records to AI agents using the Model Context Protocol."
canonical: https://truto.one/blog/connect-fulcrum-to-chatgpt-query-data-and-run-sql-analysis/
---

# Connect Fulcrum to ChatGPT: Query Data and Run SQL Analysis

**Fulcrum in ChatGPT, in about a minute.** The best way to connect Fulcrum to ChatGPT is Elaichi: connect Fulcrum 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 Fulcrum.** Connect Fulcrum 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=fulcrum) · [Fulcrum on Elaichi](https://elaichi.ai/connectors/fulcrum/?utm_source=truto.one&utm_medium=referral&utm_campaign=launchpad&utm_content=post_markdown&utm_term=fulcrum)

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

---

If you need to connect Fulcrum to ChatGPT to analyze geospatial data, run real-time SQL queries against field records, or automate inspection workflows, you need a [Model Context Protocol (MCP) server](https://truto.one/blog/what-is-mcp-and-mcp-servers-and-how-do-they-work/). This server acts as the translation layer between ChatGPT's tool calling engine and Fulcrum's highly specific API schemas. You can either spend weeks building and hosting this infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL in seconds.

If your team uses Claude, check out our guide on [connecting Fulcrum to Claude](https://truto.one/blog/connect-fulcrum-to-claude-manage-app-forms-and-user-access/) or explore our broader architectural overview on [connecting Fulcrum to AI Agents](https://truto.one/blog/connect-fulcrum-to-ai-agents-sync-field-media-and-pdf-reports/).

Giving a Large Language Model (LLM) read and write access to a flexible field data collection platform like Fulcrum is a massive engineering challenge. You have to handle dynamic form schemas, complex GeoJSON structures, and strict execution timeouts on SQL queries. Every time your field ops team adds a new form element, your custom server code must be updated and redeployed.

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Fulcrum, connect it natively to ChatGPT, and execute complex field data 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 Fulcrum 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 Fulcrum's unique [API architecture](https://truto.one/blog/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/) is exceptionally painful.

If you decide to [build a custom MCP server](https://truto.one/blog/the-hands-on-guide-to-building-mcp-servers-for-ai-agents-2026/) for Fulcrum, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with Fulcrum:

### The SQL Query Timeout Constraint
Fulcrum offers a powerful `/api/v2/query` endpoint that allows you to run Postgres-style SQL queries against your organization's forms and records. However, these queries are strictly capped at 10 seconds of processing time. If an LLM writes an unoptimized query with complex joins across millions of location points, the query will fail. Your MCP server must properly map these upstream 408 Request Timeout or 400 Bad Request errors into standard JSON-RPC error responses so the LLM knows to rewrite and optimize its query, rather than silently failing or hanging the agent framework.

### Obfuscated Field Keys and Custom Schemas
Unlike standard SaaS platforms with static endpoints, Fulcrum's data model is entirely defined by the user's custom apps (forms). When you fetch a record, the `form_values` payload does not use human-readable keys like `"inspection_status"`. Instead, it uses generated hashes like `"a1b2"`. 

Building static MCP schemas for Fulcrum means writing a schema parser that fetches the form definitions, maps the human-readable labels to the internal hashes, and injects that mapping into the LLM's context. Without this translation layer, the LLM cannot parse incoming record data or format outgoing write payloads correctly.

### Geospatial Payload Complexity
When creating or updating records, Fulcrum requires strict formatting for location data. You can either pass flat `latitude` and `longitude` fields, or a nested `geometry` object formatted as valid GeoJSON. If an LLM hallucinates the coordinate structure or flips the X/Y coordinate order (a common LLM error), the API will reject the payload. 

## Connect Fulcrum to ChatGPT: Quickstart Guide

Truto eliminates the need to build a custom MCP server. Truto dynamically derives tool definitions directly from the integration's documentation and endpoints. When you create an MCP server in Truto, you get a self-contained, authenticated URL that exposes Fulcrum's operations as JSON-RPC 2.0 tools.

Here is how to set it up.

### Step 1: Create the MCP Server

You can create the MCP server URL either through the Truto dashboard or programmatically via the API.

**Method A: Via the Truto UI**
1. Log into Truto and connect a Fulcrum account via the **Integrated Accounts** page.
2. Navigate to the specific integrated account.
3. Click the **MCP Servers** tab.
4. Click **Create MCP Server**.
5. Select the configuration you want (e.g., read-only tools, specific resource tags).
6. Copy the generated MCP server URL (it will look like `https://api.truto.one/mcp/<token>`).

**Method B: Via the Truto API**
If you are provisioning access for end-users dynamically, you can generate the MCP endpoint via a simple POST request. You must supply your Truto API token.

```bash
curl -X POST https://api.truto.one/integrated-account/<YOUR_INTEGRATED_ACCOUNT_ID>/mcp \
  -H "Authorization: Bearer $TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Fulcrum SQL and Data Ops",
    "config": {
      "methods": ["read", "write", "custom"],
      "tags": ["records", "queries", "forms"]
    }
  }'
```

The response will return the `url` required by ChatGPT.

### Step 2: Connect the MCP Server to ChatGPT

Once you have the URL, you must register it with your client.

**Method A: Via the ChatGPT UI**
1. In ChatGPT, navigate to **Settings -> Apps -> Advanced settings**.
2. Enable **Developer mode**.
3. Under **MCP servers / Custom connectors**, click **Add new**.
4. Name the connection (e.g., "Fulcrum Ops").
5. Paste the Truto MCP URL into the Server URL field and save. ChatGPT will instantly perform a handshake and list the available Fulcrum tools.

**Method B: Via Manual Config (server-sse)**
If you are using a custom agent framework or an MCP inspector tool, you configure the connection using the standard SSE transport method. Because Truto's MCP servers are self-contained via the cryptographic token in the URL, you do not need to pass additional headers unless you explicitly enabled `require_api_token_auth`.

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

### A Note on Rate Limits and Execution

It is critical to understand how Truto handles upstream limits. **Truto does not retry, throttle, or apply backoff on rate limit errors.** When Fulcrum returns an HTTP 429 Too Many Requests, Truto passes that error directly to the caller. 

Truto normalizes the upstream rate limit information into standardized HTTP headers per the IETF specification:
* `ratelimit-limit`
* `ratelimit-remaining`
* `ratelimit-reset`

The caller (your agent framework or ChatGPT) is entirely responsible for reading these headers, pausing execution, and applying retry or exponential backoff logic.

## Hero Tools for Field Data Operations

Truto exposes the full surface area of the Fulcrum API as tools. The MCP router handles flattening the input namespace, meaning the LLM passes a single JSON object, and Truto intelligently routes the properties to either the query string or the request body based on the derived schemas.

Here are the highest-leverage tools available for your AI agents when working with Fulcrum.

### 1. create_a_fulcrum_query
Executes a read-only SQL query against your Fulcrum organization's data via HTTP POST. This is the most powerful tool for an LLM, allowing it to treat Fulcrum as an analytical database. Queries cannot exceed 10 seconds of processing time.

*Usage note: If the query fails due to a timeout, the LLM must catch the error and rewrite the query to be more specific, utilizing `LIMIT` or narrowing the `WHERE` clause.*

> "Write and execute a SQL query to find the top 10 most recently updated records in the 'Building Inspections' form where the status is 'Flagged'."

### 2. list_all_fulcrum_forms
Lists the available forms (app schemas) in your organization. This tool is vital for schema discovery. Because Fulcrum records use hashed keys for their values (e.g., `a1b2`), the LLM must first call this tool to map human-readable labels to their internal keys.

*Usage note: Pass `schema=false` to return only form metadata if the full schema payload is too large for the LLM context window.*

> "Fetch the form schema for the 'Site Survey' app so I can understand the field IDs used in its records."

### 3. list_all_fulcrum_records
Fetches paginated records collected in your organization. You can filter by form, project, bounding box, and server date ranges. 

*Usage note: Always provide a `form_id` to prevent the LLM from pulling massive, cross-app datasets that blow out the context window.*

> "List the last 50 records submitted for form ID 'abc-123' that fall within the past 7 days."

### 4. create_a_fulcrum_record
Creates a new Fulcrum record for a specific form. The payload requires the `form_id` and the nested `form_values` object.

*Usage note: The LLM must supply latitude/longitude or valid GeoJSON to set the location. Truto handles passing the raw payload directly to the proxy API, bypassing the need for you to manage complex nested body construction.*

> "Create a new record in the 'Incident Reports' form. Set the location to coordinates 37.7749, -122.4194 and fill out the 'Description' and 'Severity' fields."

### 5. fulcrum_records_partial_update
Partially updates an existing record by ID. Only the fields included in the request body are modified, leaving all other fields and metadata intact.

*Usage note: This is much safer for LLMs to use than full bulk updates, as it prevents data destruction if the model accidentally omits existing nested fields.*

> "Update record ID 'xyz-987' to change its status to 'Resolved', leaving all other field values unchanged."

### 6. create_a_fulcrum_batch
Creates a Fulcrum batch to bulk update or delete up to 10,000 records in a single request. 

*Usage note: Instruct the LLM to set `batch.start` to `false` if you require a human-in-the-loop approval before executing the batch. Once started, a batch cannot be terminated.*

> "Create a pending batch operation to delete all test records created before January 1st in the staging project."

*For the complete tool inventory and granular JSON schemas, view the [Fulcrum integration page](https://truto.one/integrations/detail/fulcrum).* 

## Workflows in Action

Exposing individual tools is only half the battle. The real value of an MCP server is enabling the LLM to string tools together autonomously to complete multi-step workflows. 

### Workflow 1: Automated Field Data Auditing

Data analysts often need to find anomalies in field data collected by mobile teams. Instead of manually exporting CSVs, the analyst can prompt ChatGPT to investigate.

> "Look up the schema for the 'Safety Audit' form, find out which field represents 'Risk Score', and then write a SQL query to find all records from this month where the Risk Score is greater than 80."

**Execution Steps:**
1.  ChatGPT calls `list_all_fulcrum_forms` with a search filter to find the "Safety Audit" form.
2.  It parses the returned JSON schema to discover that the human-readable label "Risk Score" maps to the internal field ID `f8a2`.
3.  It calls `create_a_fulcrum_query` with a payload like: `SELECT _record_id, _created_at, f8a2 AS risk_score FROM "Safety Audit" WHERE _created_at >= '2023-10-01' AND f8a2 > 80 LIMIT 100`.
4.  Truto executes the query via the proxy API and returns the result set.
5.  ChatGPT presents the formatted anomalies to the user.

```mermaid
sequenceDiagram
    participant User
    participant ChatGPT
    participant TrutoMCP as Truto MCP Server
    participant FulcrumAPI as Fulcrum API

    User->>ChatGPT: "Audit high-risk safety records..."
    ChatGPT->>TrutoMCP: Call list_all_fulcrum_forms
    TrutoMCP->>FulcrumAPI: GET /api/v2/forms
    FulcrumAPI-->>TrutoMCP: 200 OK (Form schemas)
    TrutoMCP-->>ChatGPT: Tool Result (Mapped ID: f8a2)
    ChatGPT->>TrutoMCP: Call create_a_fulcrum_query
    TrutoMCP->>FulcrumAPI: POST /api/v2/query (SQL payload)
    FulcrumAPI-->>TrutoMCP: 200 OK (SQL results)
    TrutoMCP-->>ChatGPT: Tool Result (Rows)
    ChatGPT->>User: "Found 12 high-risk records."
```

### Workflow 2: Triaging and Updating Inspection Status

Field operations managers need to rapidly update the status of records based on external context.

> "Find the most recent record assigned to the 'Downtown Phase 2' project. If its status is still 'Pending Review', update it to 'Approved'."

**Execution Steps:**
1.  ChatGPT calls `list_all_fulcrum_projects` to find the ID for "Downtown Phase 2".
2.  It calls `list_all_fulcrum_records` passing the discovered `project_id`, sorted by date descending.
3.  It inspects the record JSON to check the `status` field.
4.  Finding a 'Pending Review' status, it extracts the record ID.
5.  It calls `fulcrum_records_partial_update`, passing the record ID and a body payload containing only the new status.
6.  ChatGPT reports the successful update to the manager.

## Security and Access Control

Giving AI models access to a live field database requires strict governance. Truto provides several mechanisms to lock down the generated MCP servers:

*   **Method Filtering:** When generating the server URL, use `config.methods` to enforce read-only access (e.g., `["read"]`). This ensures the server only exposes `list` and `get` operations, physically preventing the LLM from mutating data.
*   **Tag Filtering:** Use `config.tags` to limit the server's scope to specific functional areas (e.g., `["records", "queries"]`), hiding administrative tools like webhook management or user provisioning.
*   **Extra Authentication:** By default, possession of the MCP URL grants access. Enable `require_api_token_auth: true` to force the client to pass a valid Truto API token in the `Authorization` header alongside the URL.
*   **Expiration:** Set an `expires_at` ISO datetime when creating the server. Truto will automatically destroy the token and flush the internal KV stores when the time expires, perfect for temporary agent access.

## Stop Building Boilerplate

Connecting Fulcrum to ChatGPT shouldn't require maintaining a custom Node.js server, wrestling with dynamic JSON Schemas, or writing custom error handlers for SQL timeouts. 

Truto's [documentation-driven MCP architecture](https://truto.one/blog/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/) handles the protocol lifecycle, flattening arguments, schema generation, and proxy execution entirely behind the scenes. You simply connect the account, generate the URL, and let the LLM do the heavy lifting.

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