Skip to content

Commit 7eb8c0c

Browse files
committed
make mcp server runnable with default uv command
1 parent 6328479 commit 7eb8c0c

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.DS_store
1+
git .DS_store
22
.idea/
33
docs/src/generated/
44

@@ -150,3 +150,5 @@ tests/assistantbench/assistantbench-predictions-test.jsonl
150150

151151
# weblinx
152152
bg_wl_data/
153+
154+
uv.lock

browsergym/core/src/browsergym/utils/mcp_server.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ def get_cli_args():
4545
help="Task ID to run",
4646
)
4747
parser.add_argument(
48-
"-v",
49-
"--visible",
48+
"-l",
49+
"--headless",
5050
action="store_true",
51-
help="Run in not headless mode",
51+
help="Run in headless mode",
5252
)
5353
parser.add_argument(
5454
"-r",
@@ -84,7 +84,7 @@ def get_cli_args():
8484
args = get_cli_args()
8585
task_id = args.task_id
8686
config = BgymConfig(
87-
headless=not args.visible,
87+
headless=args.headless,
8888
timeout_ms=args.timeout_ms,
8989
record_video_dir=args.record_video_dir,
9090
demo_mode=args.demo_mode,
@@ -114,7 +114,7 @@ async def app_lifespan(server: FastMCP) -> AsyncIterator[AppContext]:
114114
await asyncio.to_thread(_gym.close)
115115

116116

117-
mcp = FastMCP("BrowserGym", dependencies=["browsergym", "browsergym-core"], lifespan=app_lifespan)
117+
mcp = FastMCP("BrowserGym", dependencies=["browsergym", "browsergym-core", "typer"], lifespan=app_lifespan)
118118

119119

120120
def fn_wrapper(func: Callable):

pyproject.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
[project]
2+
name = "browsergym-meta"
3+
description = "BrowserGym: a gym environment for web task automation in the Chromium browser"
4+
dynamic = ["version"]
5+
[tool.setuptools]
6+
packages = [] # meta distribution, packages are included as dependencies
17
[tool.black]
28
line-length = 100
39
include = '\.pyi?$'

0 commit comments

Comments
 (0)