Connect ConfigCat to ChatGPT: Update Flags & Rules via MCP
from the team behind Truto
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.
- No credit card required
- 500+ connectors
- Credentials vaulted, never read back
-
Start your free trial
14 days free, no credit card required.
-
Connect ConfigCat
Once, in Elaichi. ChatGPT never gets more access than you have.
-
Add Elaichi to ChatGPT
In ChatGPT, open Plugins, press +, and paste the URL into Server URL. Sign in and approve.
https://api.elaichi.ai/mcp
Building ConfigCat into your own product? This guide is for you.
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.
The developer guide
Learn how to connect ConfigCat to ChatGPT using an auto-generated MCP server to securely manage feature flags, targeting rules, and change requests.
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. 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 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 or explore our broader architectural overview on connecting ConfigCat to AI Agents.
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.
The Engineering Reality of the ConfigCat 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 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, 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.
- In your Truto dashboard, navigate to Integrated Accounts.
- Click New Integrated Account and select ConfigCat.
- Provide your ConfigCat Basic Auth credentials (Public API Key and Private API Key).
- 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
- Navigate to the integrated account page for your ConfigCat connection.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Select your desired configuration (e.g., restrict methods to
readandwrite, or filter by tags likeflagsandenvironments). - 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.
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
- Open ChatGPT and navigate to Settings -> Connectors -> Add custom connector.
- Paste your Truto MCP Server URL.
- Click Add.
ChatGPT will immediately ping the endpoint, execute the
initializehandshake, 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):
{
"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 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.
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."
- Read Current State: ChatGPT calls
get_single_config_cat_setting_value_by_idusing the setting ID and environment ID to read the current state. - Generate Patch Payload: ChatGPT constructs a JSON Patch payload
[{ "op": "replace", "path": "/value", "value": false }]. - Apply Patch: ChatGPT calls
config_cat_setting_values_bulk_partial_updateto push the change.
ChatGPT confirms the action, noting that the flag is now false but the regional targeting rules remain safely stored.
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 patchWorkflow 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."
- Fetch Stale Flags: ChatGPT calls
list_all_config_cat_product_staleflagsto retrieve the zombie flag report for the product. - Draft Change Request: ChatGPT formats the proposed changes for the identified flags.
- Submit Proposal: ChatGPT calls
create_a_config_cat_environment_change_requestwith 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 disablingPOST,PATCH,PUT, orDELETEmethods. - Tag Filtering: Scope access by domain. Use
tags: ["Settings"]to allow the LLM to read flag values, while explicitly denying access totags: ["Members", "Webhooks"]. - Require API Token Auth: By default, possessing the MCP URL grants access. Enable
require_api_token_auth: trueto 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_atdatetime 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.
FAQ
- What is the easiest way to connect ConfigCat to ChatGPT?
- 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.
- Does Truto automatically retry rate limited requests from ConfigCat?
- No. Truto passes HTTP 429 Too Many Requests errors directly to the caller, alongside standard rate limit headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). Your LLM framework must implement its own backoff and retry logic.
- How do I prevent ChatGPT from wiping out my ConfigCat targeting rules?
- You should instruct your AI agents to use the config_cat_setting_values_bulk_partial_update tool, which accepts JSON Patch operations, rather than the standard bulk_update tool which performs a complete replacement and resets omitted fields.
- Can I restrict the ConfigCat MCP server to read-only access?
- Yes. When creating the MCP server in Truto, you can specify method filters like 'read' to ensure the LLM can only execute GET requests and cannot modify any feature flags or settings.
- How does Truto handle authentication to ConfigCat?
- Truto acts as the integration layer. You connect your ConfigCat account using Basic Auth credentials in the Truto dashboard. Truto then generates a secure MCP URL that automatically handles authentication for all requests routed through it.