Skip to content

Commit 9e0cf7b

Browse files
Jens Ernstbergerhashkode
authored andcommitted
update for proper packaging
1 parent 26f8318 commit 9e0cf7b

File tree

2 files changed

+39
-9
lines changed

2 files changed

+39
-9
lines changed

README.md

Lines changed: 36 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,41 @@ docker run -v $(pwd)/vnc_password.txt:/run/secrets/vnc_password your-image-name
5858
docker build .
5959
```
6060

61+
### Local Development and Testing
62+
63+
To develop and test the package locally:
64+
65+
1. Build a distributable wheel:
66+
67+
```bash
68+
# From the project root directory
69+
uv build
70+
```
71+
72+
2. Install it as a global tool using the built wheel:
73+
74+
```bash
75+
uv tool install dist/browser_use_mcp_server-*.whl
76+
```
77+
78+
3. Run the tool from any directory:
79+
80+
```bash
81+
# Set your OpenAI API key for the current session
82+
export OPENAI_API_KEY=your-api-key-here
83+
84+
# Or provide it inline for a one-time run
85+
OPENAI_API_KEY=your-api-key-here browser-use-mcp-server run server --port 8000 --stdio --proxy-port 9000
86+
```
87+
88+
4. After making changes, rebuild and reinstall:
89+
90+
```bash
91+
uv build
92+
uv tool uninstall browser-use-mcp-server
93+
uv tool install dist/browser_use_mcp_server-*.whl
94+
```
95+
6196
### Tools
6297

6398
- [x] SSE transport
@@ -115,13 +150,7 @@ server and mcp-proxy. The proxy handles the conversion between stdio and SSE
115150
protocols. No additional configuration is needed - just start your client and it
116151
will communicate with the server through stdin/stdout.
117152

118-
Install the cli
119-
120-
```bash
121-
uv pip install -e .
122-
```
123-
124-
And then e.g., in Windsurf, paste:
153+
For Windsurf integration, add this to your config:
125154

126155
```json
127156
{

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ disallow_incomplete_defs = true
7272
browser-use-mcp-server = "browser_use_mcp_server.cli:cli"
7373

7474
[tool.hatch.build]
75-
packages = ["src/browser_use_mcp_server"]
75+
packages = ["src", "server"]
76+
include = ["server"]
7677

7778
[tool.hatch.build.targets.wheel]
78-
packages = ["src/browser_use_mcp_server"]
79+
packages = ["src/browser_use_mcp_server", "server"]

0 commit comments

Comments
 (0)