Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
117 changes: 117 additions & 0 deletions website/docs/advanced/mcp-server.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
id: mcp-server
title: MCP Server
description: Use the ConfigCat Model Context Protocol (MCP) server to manage feature flags & configs via the Public Management API directly from AI tools.
---

import Tabs from '@theme/Tabs';
import TabItem from '@theme/TabItem';

## Overview

[Model Context Protocol (MCP)](https://modelcontextprotocol.io/docs/getting-started/intro) is an open protocol that standardizes how applications provide context to large language models (LLMs).
The ConfigCat MCP server lets you manage feature flags and configurations via the Public Management API seamlessly from AI tools.

## Features

- Manage organizations, members and permissions
- Create and update products, configs, and environments
- Manage feature flags and settings
- Manage tags and user segments
- Connect with integrations and webhooks
- Track activity with audit logs and zombiee flag (stale flag) reports
- Find code references linked to your features

## Prerequisites

- [Node.js](https://nodejs.org) version 16 or higher installed
- [Public Management API basic auth credentials](https://app.configcat.com/my-account/public-api-credentials) for ConfigCat MCP server created

## Setup

Supply your Public Management API basic auth credentials (find them at https://app.configcat.com/my-account/public-api-credentials).

The MCP server's configuration includes the following environment variables:

| Variable | Required | Default | Description |
| -------- | -------- | ------- | ----------- |
| `CONFIGCAT_API_USER` | ☑ | – | Management API basic auth username. |
| `CONFIGCAT_API_PASS` | ☑ | – | Management API basic auth password. |
| `CONFIGCAT_BASE_URL` | | `https://api.configcat.com` | Override API host (rarely needed). |

### Client Configuration

<Tabs>
<TabItem value="cursor" label="Cursor" default>

1. Open Preferences → Cursor Settings → MCP & Integrations
2. Click **Add Custom MCP**
3. Add (or merge) the snippet below into your JSON settings:

```json
{
"mcpServers": {
"ConfigCat": {
"command": "npx",
"args": ["-y", "@configcat/mcp-server"],
"env": {
"CONFIGCAT_API_USER": "YOUR_API_USER",
"CONFIGCAT_API_PASS": "YOUR_API_PASSWORD"
}
}
}
}
```
4. Save – the server will start on demand.

</TabItem>
<TabItem value="claude" label="Claude Desktop">

1. Open **Settings** → **Developer**
2. Click **Edit Config**
3. In `claude_desktop_config.json` add:

```json
{
"mcpServers": {
"ConfigCat": {
"command": "npx",
"args": ["-y", "@configcat/mcp-server"],
"env": {
"CONFIGCAT_API_USER": "YOUR_API_USER",
"CONFIGCAT_API_PASS": "YOUR_API_PASSWORD"
}
}
}
}
```
4. Save & restart Claude Desktop.

</TabItem>
</Tabs>

:::info
Replace `YOUR_API_USER` and `YOUR_API_PASSWORD` environment variables with your [Public Management API basic auth credentials](https://app.configcat.com/my-account/public-api-credentials).
:::

## Interaction

After you install the ConfigCat MCP server in your AI client, you can prompt your agent to create or manage your feature flags and configurations.
Typically you need to click Run tool (or the equivalent option in your AI client) to execute the result.

For example, you could try asking

> Create a boolean feature flag called "my_awesome_feature" in the "Backend" config

or

> Turn the "my_awesome_feature" flag ON in all environments

or

> Update the "my_awesome_feature” flag in dev environment so it’s only enabled for users in Canada

## See Also

- [ConfigCat MCP server GitHub repository](https://github.com/configcat/mcp-server)
- [Management API Reference](/api/reference/configcat-public-management-api/)
1 change: 1 addition & 0 deletions website/sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ const sidebars: SidebarsConfig = {
},
],
},
'advanced/mcp-server',
],
},
{
Expand Down
1 change: 1 addition & 0 deletions website/src/pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ const features = [
url: 'advanced/migration-from-launchdarkly',
title: 'Migration from LaunchDarkly',
},
{ url: 'advanced/mcp-server', title: 'MCP Server' },
{ url: 'zombie-flags', title: 'Zombie Flags' },
// { url: 'advanced/config-v2-migration-guide', title: 'Config V2 Migration Guide' },
],
Expand Down