---
title: "Connect ConfigCat to ChatGPT: Update Flags & Rules via MCP"
slug: connect-configcat-to-chatgpt-update-flags-and-targeting-rules
date: 2026-10-04
author: Nidhi KN
categories: ["AI & Agents"]
excerpt: "Learn how to connect ConfigCat to ChatGPT using an auto-generated MCP server to securely manage feature flags, targeting rules, and change requests."
tldr: "Generate a managed MCP server for ConfigCat via Truto to let ChatGPT read and update feature flags, orchestrate change requests, and manage targeting rules without writing boilerplate integration code."
canonical: https://truto.one/blog/connect-configcat-to-chatgpt-update-flags-and-targeting-rules/
---

# Connect ConfigCat to ChatGPT: Update Flags & Rules via MCP

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

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

---

If you need to connect ConfigCat to ChatGPT to automate feature flag rollouts, manage targeting rules, or orchestrate change request approvals, 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 calls and ConfigCat's hierarchical REST APIs. You can either build and maintain this infrastructure yourself, or use a [managed integration platform](https://truto.one/blog/how-to-generate-mcp-servers-for-your-saas-users-2026-architecture-guide/) like Truto to dynamically generate a secure, authenticated MCP server URL.

If your team uses Claude, check out our guide on [connecting ConfigCat to Claude](https://truto.one/blog/connect-configcat-to-claude-approve-changes-and-review-audit-logs/) or explore our broader architectural overview on [connecting ConfigCat to AI Agents](https://truto.one/blog/connect-configcat-to-ai-agents-configure-products-and-environments/).

Giving a Large Language Model (LLM) read and write access to a critical infrastructure component like a feature flag management system is a massive engineering challenge. You have to handle complex nested data models, execute precise JSON Patch operations to avoid resetting targeting rules, and navigate strict governance workflows like Change Requests. Every time you need to expose a new ConfigCat product or environment, 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 ConfigCat, connect it natively to ChatGPT, and execute complex feature flag 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 ConfigCat API

A [custom MCP server](https://truto.one/blog/how-to-generate-mcp-servers-for-your-saas-users-2026-architecture-guide/) is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, implementing it against ConfigCat's specific API surface is exceptionally painful. 

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

### The Hierarchical Complexity of Flags
In ConfigCat, a feature flag does not exist in isolation. The API is strictly hierarchical: Organizations contain Products, Products contain Configs, Configs contain Settings (the flags themselves), and Settings have specific Values within specific Environments. If an LLM needs to disable a flag, it must know the exact `setting_id` and `environment_id`. A naive MCP implementation will result in the LLM hallucinating UUIDs or attempting to update a setting in the wrong environment, potentially taking down production.

### Complete Replacement vs Partial Patching
The ConfigCat API provides two primary ways to update a flag's value: a bulk update and a bulk partial update. The bulk update (`config_cat_setting_values_bulk_update`) is a complete replacement. If you use this endpoint to change a boolean value but omit the existing `rolloutRules` or `rolloutPercentageItems` from the JSON payload, ConfigCat will reset them to empty - wiping out your carefully crafted user targeting. Building a safe MCP server requires forcing the LLM to use the partial update endpoint (`config_cat_setting_values_bulk_partial_update`) via JSON Patch operations, ensuring untouched attributes remain unchanged.

### Change Requests and Governance
Enterprise ConfigCat environments require approvals. You cannot simply `PATCH` a flag value; you must create a Change Request, append proposed changes, get an approval, and apply it. Orchestrating this multi-step state machine via independent LLM tool calls requires precise schema mapping and context passing, otherwise the LLM will lose track of the `change_request_id` mid-workflow.

### Rate Limiting and Backoff
When building agents against ConfigCat, you must architect your LLM framework to handle rate limiting. Truto does not retry, throttle, or apply backoff on rate limit errors. When ConfigCat returns an HTTP 429 Too Many Requests error, Truto passes that error directly back to the caller. Truto normalizes the upstream rate limit information into standardized headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`) per the IETF specification. Your agentic framework - whether it is LangChain, LangGraph, or custom code - is entirely responsible for reading these headers and executing the appropriate backoff and retry logic.

## Step-by-Step Guide: Connecting ConfigCat to ChatGPT via Truto

To bypass these [architectural hurdles](https://truto.one/blog/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/), you can use Truto to generate a managed MCP server for your ConfigCat instance. This process takes minutes and requires zero backend code.

### Step 1: Connect ConfigCat to Truto
First, you need to establish an authenticated connection to ConfigCat.

1. In your Truto dashboard, navigate to **Integrated Accounts**. 
2. Click **New Integrated Account** and select ConfigCat.
3. Provide your ConfigCat Basic Auth credentials (Public API Key and Private API Key). 
4. Once connected, note your `integrated_account_id`.

Truto securely vaults these credentials and uses them to authenticate all incoming MCP requests against the ConfigCat API.

### Step 2: Generate the ConfigCat MCP Server URL
Next, you will generate a secure MCP endpoint scoped strictly to this integrated account. You can do this via the Truto UI or the API.

**Option A: Via the Truto UI**
1. Navigate to the integrated account page for your ConfigCat connection.
2. Click the **MCP Servers** tab.
3. Click **Create MCP Server**.
4. Select your desired configuration (e.g., restrict methods to `read` and `write`, or filter by tags like `flags` and `environments`).
5. Click Save and copy the generated MCP server URL.

**Option B: Via the API**
You can programmatically generate this server using the Truto API. This is ideal if you are provisioning AI workspaces for multiple teams.

```bash
curl -X POST https://api.truto.one/integrated-account/<integrated_account_id>/mcp \
  -H "Authorization: Bearer <your_truto_api_token>" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "ConfigCat Prod Manager",
    "config": {
      "methods": ["read", "write", "custom"],
      "tags": ["Settings", "Values", "ChangeRequests"]
    }
  }'
```

The API will return a JSON object containing a `url` field (e.g., `https://api.truto.one/mcp/<token>`). This URL contains a cryptographic token that securely maps to your ConfigCat credentials. 

### Step 3: Connect the MCP Server to ChatGPT
Now that you have the URL, you must register it with your ChatGPT environment. You can do this directly in the ChatGPT interface or via a local configuration file if you are running a custom client.

**Option A: Via the ChatGPT UI**
1. Open ChatGPT and navigate to **Settings -> Connectors -> Add custom connector**.
2. Paste your Truto MCP Server URL.
3. Click **Add**.
ChatGPT will immediately ping the endpoint, execute the `initialize` handshake, and list the available ConfigCat tools.

**Option B: Via Manual Config File (SSE Transport)**
If you are using the Claude Desktop app or a custom LangChain setup that requires a local configuration file, you can connect using the Server-Sent Events (SSE) transport provided by the MCP specification. 

Add the following to your configuration file (e.g., `claude_desktop_config.json`):

```json
{
  "mcpServers": {
    "configcat-prod": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "--url",
        "https://api.truto.one/mcp/<token>"
      ]
    }
  }
}
```
This command instructs the client to proxy standard stdio MCP communication into HTTP SSE streams against the Truto URL.

## ConfigCat Hero Tools for AI Agents

Truto [automatically generates tools](https://truto.one/blog/auto-generated-mcp-tools-for-ai-agents-a-2026-architecture-guide/) for the entire ConfigCat API surface. However, when orchestrating feature flag management, these 6 operations are the highest-leverage tools your agent will use.

### 1. Get Setting Value by Environment
**Tool Name:** `get_single_config_cat_setting_value_by_id`

Before modifying any flag, the LLM must read its current state. This tool retrieves the value, targeting rules, and percentage rules for a specific setting in a specific environment.

> "What is the current value and rollout rules for the 'beta_dashboard' flag in the Production environment?"

### 2. Partially Update a Setting Value
**Tool Name:** `config_cat_setting_values_bulk_partial_update`

This is the safest way to modify a flag. It accepts an array of JSON Patch operations. The LLM can use this to flip a flag to `true` without accidentally resetting the complex targeting rules associated with it. Untouched attributes stay unchanged.

> "Update the 'beta_dashboard' flag in the Staging environment to true, leaving all existing targeting rules intact."

### 3. List Stale and Zombie Flags
**Tool Name:** `list_all_config_cat_product_staleflags`

Technical debt accumulates quickly in feature flag systems. This tool allows the LLM to query ConfigCat's analytics to find flags that are no longer being evaluated or have been 100% rolled out for an extended period.

> "Get the stale flag report for our primary product and list all flags that haven't been evaluated in the last 30 days."

### 4. Create a Change Request
**Tool Name:** `create_a_config_cat_environment_change_request`

In enterprise setups, direct updates are blocked. This tool allows the AI to draft a formal proposal to modify flag values, which can then be reviewed by human administrators or automated governance pipelines.

> "Draft a change request titled 'Rollout new pricing tier' for the Production environment, setting the 'new_pricing_engine' flag to true."

### 5. Approve a Change Request
**Tool Name:** `config_cat_change_requests_approve`

Used in conjunction with a Slack integration or an automated testing pipeline, this tool allows an agent to programmatically add an approval to a pending Change Request once verification steps are complete.

> "Add an approval to change request ID 84920, noting that all integration tests passed successfully."

### 6. Apply an Approved Change Request
**Tool Name:** `create_a_config_cat_change_request_apply`

The final step in the governance workflow. Once a Change Request has sufficient approvals, this tool publishes the proposed changes to the live environment immediately.

> "Apply change request ID 84920 to publish the new pricing engine rules to Production."

For a complete list of all supported ConfigCat operations, including SDK key management, user provisioning, and segment manipulation, view the [ConfigCat integration page](https://truto.one/integrations/detail/configcat).

## Workflows in Action

Providing individual tools is step one; combining them into autonomous workflows is where AI agents generate real value. Here are two practical examples of how ChatGPT uses these tools to automate ConfigCat operations.

### Workflow 1: The Emergency Kill Switch
**Persona:** Site Reliability Engineer (SRE)

During a critical incident, an SRE needs to immediately disable a failing feature across a specific environment without navigating the ConfigCat UI.

> "We are seeing high latency on the new checkout flow. Immediately disable the 'new_checkout_v2' flag in the US-East production environment, but leave the targeting rules intact so we can re-enable it later."

1. **Read Current State:** ChatGPT calls `get_single_config_cat_setting_value_by_id` using the setting ID and environment ID to read the current state.
2. **Generate Patch Payload:** ChatGPT constructs a JSON Patch payload `[{ "op": "replace", "path": "/value", "value": false }]`.
3. **Apply Patch:** ChatGPT calls `config_cat_setting_values_bulk_partial_update` to push the change.

ChatGPT confirms the action, noting that the flag is now false but the regional targeting rules remain safely stored.

```mermaid
sequenceDiagram
    participant SRE as SRE (ChatGPT)
    participant Truto as Truto MCP Server
    participant ConfigCat as ConfigCat API
    SRE->>Truto: get_single_config_cat_setting_value_by_id
    Truto->>ConfigCat: GET /v1/environments/{envId}/settings/{settingId}/value
    ConfigCat-->>Truto: Return current state & rules
    Truto-->>SRE: Rules data
    SRE->>Truto: config_cat_setting_values_bulk_partial_update
    Truto->>ConfigCat: PATCH /v1/environments/{envId}/settings/{settingId}/value
    ConfigCat-->>Truto: 204 No Content
    Truto-->>SRE: Confirmation of patch
```

### Workflow 2: Automated Stale Flag Cleanup
**Persona:** Engineering Manager

To prevent technical debt, a manager asks ChatGPT to identify obsolete flags and propose their removal via the standard governance process.

> "Find all stale flags in our core product, and create a change request in the Staging environment to turn them all off so we can monitor for side effects before deleting them."

1. **Fetch Stale Flags:** ChatGPT calls `list_all_config_cat_product_staleflags` to retrieve the zombie flag report for the product.
2. **Draft Change Request:** ChatGPT formats the proposed changes for the identified flags.
3. **Submit Proposal:** ChatGPT calls `create_a_config_cat_environment_change_request` with the drafted payload.

ChatGPT provides the manager with the newly created Change Request ID and a link, awaiting human approval before the changes are applied.

## Security and Access Control

Exposing your feature flag infrastructure to an LLM requires strict security guardrails. Truto's managed MCP servers provide granular controls to limit what the AI can do.

* **Method Filtering:** Restrict the server to safe operations. Setting `methods: ["read"]` ensures the LLM can only query flags and environments, entirely disabling `POST`, `PATCH`, `PUT`, or `DELETE` methods.
* **Tag Filtering:** Scope access by domain. Use `tags: ["Settings"]` to allow the LLM to read flag values, while explicitly denying access to `tags: ["Members", "Webhooks"]`.
* **Require API Token Auth:** By default, possessing 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, adding a strict identity layer on top of the URL token.
* **Expiring Access:** Set an `expires_at` datetime when generating the server. Once the timestamp is reached, the server is automatically destroyed - perfect for granting temporary access during an active incident response.

## Build Faster with Truto

Connecting ConfigCat to ChatGPT doesn't have to require weeks of custom infrastructure development. Building and maintaining your own MCP server means managing OAuth tokens, parsing massive OpenAPI specs, writing complex JSON Patch logic, and dealing with hierarchical schema drift.

With Truto, you can generate a secure, authenticated MCP server URL for ConfigCat in seconds. Your agents get immediate, structured access to feature flags, environments, and change requests, allowing your engineering team to focus on building AI workflows rather than wrangling REST APIs.

> Stop maintaining boilerplate integrations. Let Truto handle the API infrastructure so you can focus on shipping agentic workflows.
>
> [Talk to us](https://truto.one/book-a-demo/)
