Skip to content

Commit dabdd7b

Browse files
devin-ai-integration[bot]adhami3310LineIndent
authored
Add comprehensive MCP integration documentation (#1549)
* Add comprehensive MCP integration documentation - Create docs/ai_builder/integrations/mcp.md with complete MCP integration guide - Include sections: introduction, installation, authentication, IDE integrations, best practices, troubleshooting - Add support for Claude Desktop, Windsurf/Cascade, Codex, and other MCP clients - Update sidebar navigation to include MCP alongside GitHub and database integrations - Document Reflex MCP server endpoints and configuration examples Fixes ENG-6748 Co-Authored-By: [email protected] <[email protected]> * Fix MCP documentation with correct server URL and authentication - Update server URL to https://mcp.reflex.dev/mcp - Correct authentication to OAuth 2.1 protocol - Remove references to SSE endpoints and local repos - Update all IDE configuration examples with correct endpoint - Fix spacing issue in MCP protocol description Addresses feedback from @adhami3310 on PR #1549 Co-Authored-By: [email protected] <[email protected]> * Fix remaining incorrect URLs in troubleshooting section - Update server status URLs to https://mcp.reflex.dev/mcp - Remove references to unsupported SSE connections - Update troubleshooting solutions to reflect OAuth 2.1 authentication Completes corrections from @adhami3310 feedback on PR #1549 Co-Authored-By: [email protected] <[email protected]> * Simplify MCP documentation per GitHub feedback - Remove all spacing elements (rx.box height elements) - Remove hardcoded examples and detailed explanations - Remove entire Best Practices and Troubleshooting sections - Remove Other MCP Clients table section - Simplify Available Tools section to just mention capabilities - Add link to official MCP documentation - Keep only essential installation and IDE configuration info Addresses all GitHub comments from @adhami3310 on PR #1549 Co-Authored-By: [email protected] <[email protected]> * Add enterprise section for on-premises deployment - Add Enterprise Use section mentioning on-prem deployment availability - Include link to book demo at https://reflex.dev/pricing/ - Addresses GitHub comment from @adhami3310 on PR #1549 Co-Authored-By: [email protected] <[email protected]> * Add MCP as top-level section in AI Builder navigation - Add MCP sidebar category alongside Learn in AI Builder - Update sidebar content handling to support multiple sections - Use 'plug' icon for MCP section - Addresses GitHub comment from @adhami3310 on PR #1549 The MCP section now appears at the same hierarchical level as Learn in the AI Builder navigation, making it easily discoverable. Co-Authored-By: [email protected] <[email protected]> * Restructure MCP sidebar: remove from Learn section, add Overview/Installation subsections - Remove MCP from Learn section's Integrations to prevent duplication - Create dedicated get_sidebar_items_mcp() function with Overview and Installation subsections - Update sidebar.py to use mcp_items instead of ai_builder_overview_items[3] - Add clear Overview section header in MCP documentation - Addresses GitHub PR feedback to ensure MCP only appears in its own section Co-Authored-By: [email protected] <[email protected]> * Split MCP documentation into separate overview and installation articles - Create mcp_overview.md with MCP introduction, available tools, and enterprise info - Create mcp_installation.md with prerequisites, authentication, and IDE integration guides - Update sidebar to show one 'MCP Integration' section containing both articles - Remove original mcp.md file to avoid duplication - Addresses GitHub comment requesting articles under one section instead of subsections Co-Authored-By: [email protected] <[email protected]> * Fix broken MCP reference in sidebar causing CI failures - Update ai_builder_pages.integrations.mcp.path to mcp_overview.path - Update hardcoded path from /mcp to /mcp-overview - Resolves AttributeError preventing reflex export from completing Co-Authored-By: [email protected] <[email protected]> * Update page titles from 'MCP Overview/Installation' to 'Overview/Installation' per GitHub feedback Co-Authored-By: [email protected] <[email protected]> * add index for MCP content --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: [email protected] <[email protected]> Co-authored-by: Ahmad Hakim <[email protected]>
1 parent 1fe87e5 commit dabdd7b

File tree

4 files changed

+134
-9
lines changed

4 files changed

+134
-9
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Installation
2+
3+
```python exec
4+
import reflex as rx
5+
```
6+
7+
To use the Reflex MCP integration, you'll need to configure your AI assistant or coding tool to connect to the Reflex MCP server. No additional Python packages are required on your local machine - the server is hosted and ready to use.
8+
9+
## Prerequisites
10+
11+
- An MCP-compatible AI tool (Claude Desktop, Windsurf, Codex, etc.)
12+
- Internet connection to access the hosted MCP server
13+
- Valid Reflex account for OAuth 2.1 authentication
14+
15+
## Authentication
16+
17+
The Reflex MCP server uses OAuth 2.1 protocol for secure authentication. You'll need a valid Reflex account, and authentication is handled automatically through your MCP client configuration when you provide your Reflex credentials.
18+
19+
## IDE and Coding Assistant Integration
20+
21+
### Claude Desktop
22+
23+
Add the Reflex MCP server to your Claude Desktop configuration by editing your configuration file:
24+
25+
```json
26+
{
27+
"mcpServers": {
28+
"reflex": {
29+
"command": "npx",
30+
"args": ["-y", "@modelcontextprotocol/server-proxy"],
31+
"env": {
32+
"MCP_PROXY_URL": "https://mcp.reflex.dev/mcp"
33+
}
34+
}
35+
}
36+
}
37+
```
38+
39+
### Windsurf/Cascade
40+
41+
Create a `.vscode/mcp.json` file in your project root:
42+
43+
```json
44+
{
45+
"mcpServers": {
46+
"reflex": {
47+
"serverType": "http",
48+
"url": "https://mcp.reflex.dev/mcp"
49+
}
50+
}
51+
}
52+
```
53+
54+
### Codex
55+
56+
Add this configuration to your `~/.codex/config.toml` file:
57+
58+
```toml
59+
[mcp_servers.reflex]
60+
command = "npx"
61+
args = ["-y", "@modelcontextprotocol/server-proxy"]
62+
env = { "MCP_PROXY_URL" = "https://mcp.reflex.dev/mcp" }
63+
```
64+
65+
Note: Codex requires MCP servers to communicate over stdio. The `@modelcontextprotocol/server-proxy` adapter bridges the connection to the HTTP-based Reflex MCP server.
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Overview
2+
3+
```python exec
4+
import reflex as rx
5+
```
6+
7+
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.
8+
9+
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.
10+
11+
## Available Tools
12+
13+
The Reflex MCP server provides tools for accessing component documentation and Reflex documentation through standardized MCP capabilities.
14+
15+
## Enterprise Use
16+
17+
For enterprise customers requiring on-premises deployment of the Reflex MCP server, please [book a demo](https://reflex.dev/pricing/) to discuss your requirements.

pcweb/components/docpage/sidebar/sidebar.py

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from pcweb.constants import ENTERPRISE_DOCS_URL
99
from pcweb.styles.colors import c_color
1010

11-
from .sidebar_items.ai import ai_builder_overview_items
11+
from .sidebar_items.ai import ai_builder_overview_items, mcp_items
1212
from .sidebar_items.component_lib import component_lib, graphing_libs
1313
from .sidebar_items.enterprise import (
1414
enterprise_items,
@@ -383,6 +383,7 @@ def sidebar_comp(
383383
recipes_index: list[int],
384384
enterprise_usage_index: list[int],
385385
enterprise_component_index: list[int],
386+
mcp_index: list[int],
386387
#
387388
cli_ref_index: list[int],
388389
ai_builder_overview_index: list[int],
@@ -420,6 +421,12 @@ def sidebar_comp(
420421
"bot",
421422
0,
422423
),
424+
sidebar_category(
425+
"MCP",
426+
"/docs/ai-builder/integrations/mcp-overview",
427+
"plug",
428+
1,
429+
),
423430
class_name="flex flex-col items-start gap-1 w-full list-none",
424431
),
425432
# If the path doesn't start with /docs/cloud, check for general docs
@@ -489,15 +496,34 @@ def sidebar_comp(
489496
),
490497
rx.cond( # pyright: ignore [reportCallIssue]
491498
rx.State.router.page.path.startswith("/docs/ai-builder/"),
492-
rx.el.ul(
493-
create_sidebar_section(
494-
"Overview",
495-
ai_builder_pages.overview.what_is_reflex_build.path,
496-
ai_builder_overview_items,
497-
ai_builder_overview_index,
498-
url,
499+
rx.match( # pyright: ignore [reportCallIssue]
500+
SidebarState.sidebar_index,
501+
(
502+
0,
503+
rx.el.ul(
504+
create_sidebar_section(
505+
"Overview",
506+
ai_builder_pages.overview.what_is_reflex_build.path,
507+
ai_builder_overview_items,
508+
ai_builder_overview_index,
509+
url,
510+
),
511+
class_name="flex flex-col items-start gap-6 p-[0px_1rem_0px_0.5rem] w-full list-none list-style-none",
512+
),
513+
),
514+
(
515+
1,
516+
rx.el.ul(
517+
create_sidebar_section(
518+
"MCP Integration",
519+
ai_builder_pages.integrations.mcp_overview.path,
520+
mcp_items,
521+
mcp_index,
522+
url,
523+
),
524+
class_name="flex flex-col items-start gap-6 p-[0px_1rem_0px_0.5rem] w-full list-none list-style-none",
525+
),
499526
),
500-
class_name="flex flex-col items-start gap-6 p-[0px_1rem_0px_0.5rem] w-full list-none list-style-none",
501527
),
502528
rx.cond( # pyright: ignore [reportCallIssue]
503529
rx.State.router.page.path.startswith("/docs/"),
@@ -643,6 +669,7 @@ def sidebar(url=None, width: str = "100%") -> rx.Component:
643669

644670
cli_ref_index = calculate_index(cli_ref, url)
645671
ai_builder_overview_index = calculate_index(ai_builder_overview_items, url)
672+
mcp_index = calculate_index(mcp_items, url)
646673

647674
return rx.box(
648675
sidebar_comp(
@@ -659,6 +686,7 @@ def sidebar(url=None, width: str = "100%") -> rx.Component:
659686
enterprise_component_index=enterprise_component_index,
660687
ai_builder_overview_index=ai_builder_overview_index,
661688
cli_ref_index=cli_ref_index,
689+
mcp_index=mcp_index,
662690
#
663691
width=width,
664692
),

pcweb/components/docpage/sidebar/sidebar_items/ai.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,19 @@ def get_sidebar_items_ai_builder_overview():
4545
]
4646

4747

48+
def get_sidebar_items_mcp():
49+
from pcweb.pages.docs import ai_builder
50+
51+
return [
52+
create_item(
53+
"MCP Integration",
54+
children=[
55+
ai_builder.integrations.mcp_overview,
56+
ai_builder.integrations.mcp_installation,
57+
],
58+
),
59+
]
60+
61+
4862
ai_builder_overview_items = get_sidebar_items_ai_builder_overview()
63+
mcp_items = get_sidebar_items_mcp()

0 commit comments

Comments
 (0)