diff --git a/README.md b/README.md index 33a142f..567a3c8 100644 --- a/README.md +++ b/README.md @@ -78,6 +78,19 @@ mcp install server.py -n "Chrome DevTools MCP" --with-editable . -f .env **For Claude Code CLI users:** +#### Quick Install (Easiest - no cloning required) + +```bash +claude mcp add chrome-devtools-mcp -- uvx --from git+https://github.com/benjaminr/chrome-devtools-mcp chrome-devtools-mcp +``` + +This single command will: +- Install the server directly from GitHub +- Handle all dependencies automatically +- Configure it for use with Claude Code + +#### Manual Install (if you want to modify the code) + 1. **Clone this repository** ```bash git clone https://github.com/benjaminr/chrome-devtools-mcp.git @@ -192,6 +205,10 @@ After installation (either method), verify the server is available: For other MCP clients, run the server directly: ```bash +# Using uvx (recommended - handles dependencies automatically) +uvx --from . chrome-devtools-mcp + +# Or using Python directly python server.py ``` @@ -687,6 +704,19 @@ cd chrome-devtools-mcp pip install -e ".[dev]" ``` +### Running the Server During Development + +```bash +# Using uvx (recommended - automatically handles dependencies) +uvx --from . chrome-devtools-mcp + +# Using uv run +uv run python server.py + +# Or directly with Python (if dependencies installed) +python server.py +``` + ### Code Quality Tools ```bash diff --git a/pyproject.toml b/pyproject.toml index d635eb8..efdc8ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -32,6 +32,9 @@ dependencies = [ "aiohttp>=3.9.0", ] +[project.scripts] +chrome-devtools-mcp = "server:main" + [project.optional-dependencies] test = [ "pytest>=8.0.0", @@ -49,6 +52,13 @@ Homepage = "https://github.com/benjaminr/chrome-devtools-mcp" Repository = "https://github.com/benjaminr/chrome-devtools-mcp.git" Issues = "https://github.com/benjaminr/chrome-devtools-mcp/issues" +[tool.setuptools.packages.find] +where = ["."] +include = ["src*"] + +[tool.setuptools] +py-modules = ["server"] + [tool.hatch.build.targets.wheel] packages = ["src"] diff --git a/server.py b/server.py index efe389b..3548bc5 100644 --- a/server.py +++ b/server.py @@ -36,5 +36,12 @@ # Export the MCP server object for MCP CLI detection and tooling __all__ = ["mcp", "main"] + +def main(): + """Entry point for the chrome-devtools-mcp script.""" + from src.main import main as run_server + run_server() + + if __name__ == "__main__": - main.main() + main()