Skip to content

Commit c3af0f8

Browse files
wkrause13Will Krause
andauthored
fix: update README.md to reflect command flag changes for transport mode (#102)
Updated the README to replace instances of the `--http` flag with `--transport http` --------- Co-authored-by: Will Krause <william.krause@solo.io>
1 parent 6f4b948 commit c3af0f8

3 files changed

Lines changed: 20 additions & 4 deletions

File tree

pkg/cli/internal/frameworks/python/templates/README.md.tmpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ tests/ # Generated tests
4141
uv run python src/main.py
4242
4343
# HTTP mode with WebSocket MCP endpoint
44-
uv run python src/main.py --http
44+
uv run python src/main.py --transport http
4545
4646
# HTTP mode with custom host/port
47-
uv run python src/main.py --http --host 0.0.0.0 --port 8080
47+
uv run python src/main.py --transport http --host 0.0.0.0 --port 8080
4848
```
4949

5050
3. **Using uv Scripts**:
@@ -102,13 +102,13 @@ The server supports running in HTTP mode for development and integration purpose
102102

103103
```bash
104104
# Command line flag
105-
python src/main.py --http
105+
python src/main.py --transport http
106106
107107
# Environment variable
108108
MCP_TRANSPORT_MODE=http python src/main.py
109109
110110
# Custom host and port
111-
python src/main.py --http --host localhost --port 8080
111+
python src/main.py --transport http --host localhost --port 8080
112112
```
113113

114114
## Creating Tools

pkg/cli/internal/frameworks/python/templates/pyproject.toml.tmpl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ packages = ["src"]
2929

3030
[project.scripts]
3131
"{{.ProjectName}}-server" = "src.main:main"
32+
dev = "src.main:dev"
33+
dev-http = "src.main:dev"
34+
start = "src.main:start"
3235

3336
[tool.uv]
3437
dev-dependencies = [

pkg/cli/internal/frameworks/python/templates/src/main.py.tmpl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,18 @@ def main() -> None:
8787
print(f"Server error: {e}", file=sys.stderr)
8888
sys.exit(1)
8989

90+
91+
def dev() -> None:
92+
"""Entry point for the 'dev' script."""
93+
sys.argv = ["dev", "--transport", "http"]
94+
main()
95+
96+
97+
def start() -> None:
98+
"""Entry point for the 'start' script."""
99+
sys.argv = ["start", "--transport", "stdio"]
100+
main()
101+
102+
90103
if __name__ == "__main__":
91104
main()

0 commit comments

Comments
 (0)