You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced_onboarding/how-reflex-works.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -197,7 +197,7 @@ On the frontend, we maintain an event queue of all pending events.
197
197
When an event is triggered, it is added to the queue. We have a `processing` flag to make sure only one event is processed at a time. This ensures that the state is always consistent and there aren't any race conditions with two event handlers modifying the state at the same time.
198
198
199
199
```md alert info
200
-
# There are exceptions to this, such as [background events](/docs/events/background_events) which allow you to run events in the background without blocking the UI.
200
+
# There are exceptions to this, such as [background events](/docs/events/background-events) which allow you to run events in the background without blocking the UI.
201
201
```
202
202
203
203
Once the event is ready to be processed, it is sent to the backend through a WebSocket connection.
@@ -225,7 +225,7 @@ In our example, the `set_profile` event handler is run on the user's state. This
225
225
226
226
### State Updates
227
227
228
-
Every time an event handler returns (or [yields](/docs/events/yield_events)), we save the state in the state manager and send the **state updates** to the frontend to update the UI.
228
+
Every time an event handler returns (or [yields](/docs/events/yield-events)), we save the state in the state manager and send the **state updates** to the frontend to update the UI.
229
229
230
230
To maintain performance as your state grows, internally Reflex keeps track of vars that were updated during the event handler (**dirty vars**). When the event handler is done processing, we find all the dirty vars and create a state update to send to the frontend.
`AGENTS.md` and `CLAUDE.md` are project-level instruction files that AI coding assistants read when they enter your repository. They give the assistant durable, repository-specific context so it follows Reflex conventions instead of generic defaults.
4
+
5
+
-`AGENTS.md` is read by agents that follow the [AGENTS.md convention](https://agents.md), including Cursor, OpenCode, OpenAI Codex, and Pi.
6
+
-`CLAUDE.md` is read by [Claude Code](https://code.claude.com/docs/en/memory). Claude Code does not read `AGENTS.md` directly — see [Sharing With Claude Code](#sharing-with-claude-code) below.
7
+
8
+
A Reflex project should have at least one of these files at the project root, next to `rxconfig.py`.
9
+
10
+
## Recommended Content
11
+
12
+
The [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository ships an `AGENTS.md` template that points assistants at the [Reflex Agent Skills](/docs/ai/integrations/skills/) for environment setup, documentation lookup, and process management. Use it as the starting point, then add anything specific to your codebase.
13
+
14
+
```md alert info
15
+
# `AGENTS.md` references skills by name, so it works once the [Reflex Agent Skills](/docs/ai/integrations/skills/) are installed in the assistant.
16
+
```
17
+
18
+
## Installation
19
+
20
+
Download the template into your project root, next to `rxconfig.py`:
Or copy it manually from a local clone of the [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository.
27
+
28
+
## Sharing With Claude Code
29
+
30
+
Claude Code reads `CLAUDE.md`, not `AGENTS.md`. To avoid duplicating content, create a `CLAUDE.md` that [imports](https://code.claude.com/docs/en/memory#import-additional-files)`AGENTS.md` using the `@` syntax:
31
+
32
+
```md
33
+
@AGENTS.md
34
+
35
+
## Claude Code
36
+
37
+
Add any Claude-specific instructions here.
38
+
```
39
+
40
+
Claude Code expands the `@AGENTS.md` import at session start, then appends anything you write below it. Both files stay in sync from a single source.
41
+
42
+
After installation, your project root looks like:
43
+
44
+
```text
45
+
my_app/
46
+
AGENTS.md
47
+
CLAUDE.md
48
+
rxconfig.py
49
+
my_app/
50
+
my_app.py
51
+
```
52
+
53
+
## Project-Specific Additions
54
+
55
+
The template covers Reflex-wide setup. Below it, add anything else the assistant should know about your project:
56
+
57
+
- Internal conventions and code style.
58
+
- Required lint, type-check, or test commands.
59
+
- Folder layout and where new code should go.
60
+
- Hosting or deployment notes.
61
+
62
+
Keep entries short and imperative — assistants follow concise, direct instructions more reliably than long paragraphs.
63
+
64
+
## Keeping Files Updated
65
+
66
+
Reflex evolves quickly. If you used `curl` to download the template, re-run the same command to refresh it:
If you cloned the [reflex-dev/agent-skills](https://github.com/reflex-dev/agent-skills) repository, pull the latest changes and copy the file back into your project:
Copy file name to clipboardExpand all lines: docs/ai_builder/integrations/mcp_installation.md
+72-16Lines changed: 72 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ To use the Reflex MCP integration, you'll need to configure your AI assistant or
12
12
13
13
## Prerequisites
14
14
15
-
- An MCP-compatible AI tool (Claude Desktop, Windsurf, Codex, etc.)
15
+
- An MCP-compatible AI tool (Claude Code, Claude Desktop, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, Windsurf, etc.)
16
16
- Internet connection to access the hosted MCP server
17
17
- Valid Reflex account for OAuth 2.1 authentication
18
18
@@ -27,49 +27,105 @@ The Reflex MCP server uses OAuth 2.1 protocol for secure authentication. You'll
27
27
Add the Reflex MCP server to Claude Code by running:
28
28
29
29
```bash
30
-
claude mcp add --transport http reflex https://mcp.reflex.dev/mcp
30
+
claude mcp add --transport http reflex https://build.reflex.dev/mcp
31
31
```
32
32
33
33
Then authenticate by running the `/mcp` command inside Claude Code and following the login steps in your browser. Authentication tokens are stored securely and refreshed automatically. See the [Claude Code MCP documentation](https://code.claude.com/docs/en/mcp) for more details.
34
34
35
35
### Claude Desktop
36
36
37
-
Add the Reflex MCP server to your Claude Desktop configuration by editing your configuration file:
37
+
Claude Desktop pulls remote MCP servers from your Claude account's connectors. Go to [claude.ai](https://claude.ai) → **Settings** → **Connectors** → **Add custom connector**, enter `https://build.reflex.dev/mcp` as the URL, and complete the OAuth login. The connector will then be available in Claude Desktop after you sign in. See the [custom connectors guide](https://support.claude.com/en/articles/11175166-get-started-with-custom-connectors-using-remote-mcp) for details and plan availability.
See the [Codex MCP documentation](https://developers.openai.com/codex/mcp) for more details.
48
+
49
+
### Cursor
50
+
51
+
[Click here to install the Reflex MCP server in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=reflex&config=eyJ1cmwiOiJodHRwczovL2J1aWxkLnJlZmxleC5kZXYvbWNwIn0=), or edit (or create) `~/.cursor/mcp.json` for a global config, or `.cursor/mcp.json` in your project root for a project-specific config:
Open Cursor settings under **MCP & Integrations** to verify the server is connected and complete OAuth login. See the [Cursor MCP documentation](https://cursor.com/docs/context/mcp) for more details.
51
64
52
-
Create a `.vscode/mcp.json` file in your project root:
65
+
### Gemini CLI
66
+
67
+
Add the Reflex MCP server to `~/.gemini/settings.json`:
53
68
54
69
```json
55
70
{
56
71
"mcpServers": {
57
72
"reflex": {
58
-
"serverType": "http",
59
-
"url": "https://mcp.reflex.dev/mcp"
73
+
"httpUrl": "https://build.reflex.dev/mcp"
60
74
}
61
75
}
62
76
}
63
77
```
64
78
65
-
### Codex
79
+
See the [Gemini CLI MCP documentation](https://google-gemini.github.io/gemini-cli/docs/tools/mcp-server.html) for more details.
80
+
81
+
### GitHub Copilot
82
+
83
+
Create a `.vscode/mcp.json` file in your project root (or open **MCP: Open User Configuration** from the VS Code command palette for a global config):
84
+
85
+
```json
86
+
{
87
+
"servers": {
88
+
"reflex": {
89
+
"type": "http",
90
+
"url": "https://build.reflex.dev/mcp"
91
+
}
92
+
}
93
+
}
94
+
```
66
95
67
-
Add this configuration to your `~/.codex/config.toml` file:
96
+
After saving, start the server from the inline action above the entry in `mcp.json`, then complete the OAuth login when prompted. See the [VS Code MCP documentation](https://code.visualstudio.com/docs/copilot/customization/mcp-servers) for more details.
Add the Reflex MCP server to your `opencode.json` (project) or `~/.config/opencode/opencode.json` (global):
101
+
102
+
```json
103
+
{
104
+
"$schema": "https://opencode.ai/config.json",
105
+
"mcp": {
106
+
"reflex": {
107
+
"type": "remote",
108
+
"url": "https://build.reflex.dev/mcp",
109
+
"enabled": true
110
+
}
111
+
}
112
+
}
113
+
```
114
+
115
+
See the [OpenCode MCP documentation](https://opencode.ai/docs/mcp-servers/) for more details.
116
+
117
+
### Windsurf
118
+
119
+
Edit (or create) `~/.codeium/windsurf/mcp_config.json` and add the Reflex server:
120
+
121
+
```json
122
+
{
123
+
"mcpServers": {
124
+
"reflex": {
125
+
"serverUrl": "https://build.reflex.dev/mcp"
126
+
}
127
+
}
128
+
}
73
129
```
74
130
75
-
Note: Codex requires MCP servers to communicate over stdio. The `mcp-remote` package bridges the connection to the HTTP-based Reflex MCP server.
131
+
After saving, open Cascade and click the refresh icon in the MCP toolbar to load the new server. See the [Windsurf MCP documentation](https://docs.windsurf.com/windsurf/cascade/mcp) for more details.
Copy file name to clipboardExpand all lines: docs/ai_builder/integrations/mcp_overview.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ import reflex as rx
10
10
11
11
The Reflex [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) integration provides AI assistants and coding tools with structured access to Reflex framework documentation and component information. This enables intelligent assistance while developing Reflex applications.
12
12
13
-
The Reflex MCP server is deployed at `https://mcp.reflex.dev/mcp` and provides access to component documentation and Reflex documentation through standardized MCP tools.
13
+
The Reflex MCP server is deployed at `https://build.reflex.dev/mcp` and provides access to component documentation and Reflex documentation through standardized MCP tools.
0 commit comments