Skip to content
Merged
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
97 changes: 0 additions & 97 deletions MCP_README

This file was deleted.

5 changes: 5 additions & 0 deletions MCP_README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Reflex MCP Server

The Reflex MCP Server provides comprehensive access to Reflex framework documentation and component information through the Model Context Protocol (MCP). This server is deployed and ready to use with your MCP-compatible AI tools.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: The phrase 'This server is deployed and ready to use' may be confusing - clarify whether users need to deploy it themselves or if it's a hosted service


Check the documentation at https://reflex.dev/docs/ai-builder/integrations/mcp-overview
62 changes: 4 additions & 58 deletions reflex/constants/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

from platformdirs import PlatformDirs

from .utils import classproperty

IS_WINDOWS = platform.system() == "Windows"
IS_MACOS = platform.system() == "Darwin"
IS_LINUX = platform.system() == "Linux"
Expand Down Expand Up @@ -119,9 +117,6 @@ class ReflexHostingCLI(SimpleNamespace):
class Templates(SimpleNamespace):
"""Constants related to Templates."""

# The route on Reflex backend to query which templates are available and their URLs.
APP_TEMPLATES_ROUTE = "/app-templates"

# The default template
DEFAULT = "blank"

Expand All @@ -132,58 +127,12 @@ class Templates(SimpleNamespace):
CHOOSE_TEMPLATES = "choose-templates"

# The URL to find reflex templates.
REFLEX_TEMPLATES_URL = "https://reflex.dev/templates"

# Demo url for the default template.
DEFAULT_TEMPLATE_URL = "https://blank-template.reflex.run"
REFLEX_TEMPLATES_URL = (
"https://reflex.dev/docs/getting-started/open-source-templates/"
)

# The reflex.build frontend host
REFLEX_BUILD_FRONTEND = "https://reflex.build"

# The reflex.build backend host
REFLEX_BUILD_BACKEND = "https://flexgen-prod-flexgen.fly.dev"

@classproperty
@classmethod
def REFLEX_BUILD_URL(cls):
"""The URL to redirect to reflex.build.

Returns:
The URL to redirect to reflex.build.
"""
from reflex.environment import environment

return (
environment.REFLEX_BUILD_FRONTEND.get()
+ "/gen?reflex_init_token={reflex_init_token}"
)

@classproperty
@classmethod
def REFLEX_BUILD_POLL_URL(cls):
"""The URL to poll waiting for the user to select a generation.

Returns:
The URL to poll waiting for the user to select a generation.
"""
from reflex.environment import environment

return environment.REFLEX_BUILD_BACKEND.get() + "/api/init/{reflex_init_token}"

@classproperty
@classmethod
def REFLEX_BUILD_CODE_URL(cls):
"""The URL to fetch the generation's reflex code.

Returns:
The URL to fetch the generation's reflex code.
"""
from reflex.environment import environment

return (
environment.REFLEX_BUILD_BACKEND.get()
+ "/api/gen/{generation_hash}/refactored"
)
REFLEX_BUILD_FRONTEND = "https://build.reflex.dev"

class Dirs(SimpleNamespace):
"""Folders used by the template system of Reflex."""
Expand All @@ -204,9 +153,6 @@ class Javascript(SimpleNamespace):
# The node modules directory.
NODE_MODULES = "node_modules"

# The package lock file.
PACKAGE_LOCK = "package-lock.json"


class ReactRouter(Javascript):
"""Constants related to React Router."""
Expand Down
10 changes: 0 additions & 10 deletions reflex/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -563,16 +563,6 @@ class EnvironmentVariables:
# Whether to skip purging the web directory in dev mode.
REFLEX_PERSIST_WEB_DIR: EnvVar[bool] = env_var(False)

# The reflex.build frontend host.
REFLEX_BUILD_FRONTEND: EnvVar[str] = env_var(
constants.Templates.REFLEX_BUILD_FRONTEND
)

# The reflex.build backend host.
REFLEX_BUILD_BACKEND: EnvVar[str] = env_var(
constants.Templates.REFLEX_BUILD_BACKEND
)

# This env var stores the execution mode of the app
REFLEX_ENV_MODE: EnvVar[constants.Env] = env_var(constants.Env.DEV)

Expand Down