Skip to content

Commit 8da958e

Browse files
committed
simplify command line for SAF MCP server
1 parent 87423c2 commit 8da958e

4 files changed

Lines changed: 807 additions & 2 deletions

File tree

tools/plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ opencode also supports connecting to a remotely running MCP server. This is usef
307307
First, start the server in HTTP mode:
308308

309309
```bash
310-
uv run python -m saf_server.server --port 8000 --host 0.0.0.0
310+
uv run saf-server --port 8000 --host 0.0.0.0
311311
```
312312

313313
Then configure opencode to connect via `remote` type:

tools/saf-mcp-server/pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ dependencies = [
99
"starlette>=0.30.0",
1010
]
1111

12+
[project.scripts]
13+
saf-server = "saf_server.server:cli"
14+
1215
[build-system]
1316
requires = ["hatchling"]
1417
build-backend = "hatchling.build"

tools/saf-mcp-server/saf_server/server.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,5 +477,8 @@ async def main():
477477
await run_stdio()
478478

479479

480-
if __name__ == "__main__":
480+
def cli():
481481
asyncio.run(main())
482+
483+
if __name__ == "__main__":
484+
cli()

0 commit comments

Comments
 (0)