From e88aaf4afdb10ceff67059edc55070d0bd4aa1a1 Mon Sep 17 00:00:00 2001 From: Ron Cohen Date: Wed, 2 Dec 2026 18:28:03 +0000 Subject: [PATCH] docs(cli): correct the MCP section and show Claude Code setup first --- .changeset/cli-mcp-readme.md | 5 +++++ packages/cli/README.md | 33 ++++++++++++++------------------- 2 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 .changeset/cli-mcp-readme.md diff --git a/.changeset/cli-mcp-readme.md b/.changeset/cli-mcp-readme.md new file mode 100644 index 00000000..9ec7428d --- /dev/null +++ b/.changeset/cli-mcp-readme.md @@ -0,0 +1,5 @@ +--- +"@reflag/cli": patch +--- + +Correct the MCP section of the README: the CLI writes the Reflag MCP URL directly (no mcp-remote), `--editor` accepts `cursor` or `vscode`, and Claude Code setup is shown first. diff --git a/packages/cli/README.md b/packages/cli/README.md index 27772d8e..24b1ad12 100644 --- a/packages/cli/README.md +++ b/packages/cli/README.md @@ -227,35 +227,30 @@ This command adds rules to your project that provide AI tools with context about ## Model Context Protocol -The Model Context Protocol (MCP) is an open protocol that provides a standardized way to connect AI models to different data sources and tools. In the context of Reflag, MCP enables your code editor to understand your flags, their states, and their relationships within your codebase. This creates a seamless bridge between your flag management workflow and AI-powered development tools. The MCP server is hosted by Reflag, making it easy to get started. +Reflag hosts an MCP server at `https://app.reflag.com/api/mcp`. Connect your coding agent to it to create and manage flags from your editor or terminal. You sign in with your Reflag account, so you don't need an API key. -_\*\*Note: The Reflag `mcp` CLI command was previously used for a \_local_ server. However, in recent versions of the Reflag CLI, the `mcp` command has been repurposed to help you connect to the new remote MCP server.\*\*\_ +To add it to Claude Code, run: -### Setting up MCP +```bash +claude mcp add --transport http Reflag https://app.reflag.com/api/mcp +``` + +Then start `claude` and run `/mcp` to sign in. For other clients, see the [MCP docs](https://docs.reflag.com/api/mcp). -The `mcp` command helps you configure your editor or AI client to connect with Reflag's remote MCP server. This allows your AI tools to understand your flags and provide more contextual assistance. +### Setting up MCP with the CLI + +The `mcp` command adds the Reflag MCP server to your editor's MCP configuration file. ```bash -npx reflag mcp [--editor ] [--scope ] +npx reflag mcp [--editor ] [--scope ] ``` Options: -- `--editor`: The editor/client to configure: - - `cursor`: [Cursor IDE](https://www.cursor.com/) - - `vscode`: [Visual Studio Code](https://code.visualstudio.com/) - - `claude`: [Claude Desktop](https://claude.ai/download) - - `windsurf`: [Windsurf](https://windsurf.com/editor) -- `--scope`: Whether to configure settings globally or locally for the project. - -The command will guide you through: - -1. Selecting which editor/client to configure. -2. Choosing which Reflag app to connect to. -3. Deciding between global or project-local configuration. -4. Setting up the appropriate configuration file for your chosen editor . +- `--editor`: The editor to configure: `cursor` ([Cursor](https://www.cursor.com/)) or `vscode` ([Visual Studio Code](https://code.visualstudio.com/)). Leave it out to choose interactively. +- `--scope`: `local` adds the server to your project (`.cursor/mcp.json` or `.vscode/mcp.json`). `global` adds it to your user configuration. -_**Note: The setup uses [mcp-remote](https://github.com/geelen/mcp-remote) as a compatibility layer allowing the remote hosted Reflag MCP server to work with all editors/clients that support MCP STDIO servers. If your editor/client supports HTTP Streaming with OAuth you can connect to the Reflag MCP server directly.**_ +The command asks which Reflag app to connect to, then writes the configuration. Restart your editor to load the server. ## Using in CI/CD Pipelines