Skip to content

Commit adc240c

Browse files
committed
change to port
1 parent 83cc25f commit adc240c

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

examples/clients/simple-auth-client/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ uv run mcp-simple-auth --transport streamable-http --port 3001
3131
uv run mcp-simple-auth-client
3232

3333
# Or with custom server URL
34-
MCP_SERVER_URL=http://localhost:3001 uv run mcp-simple-auth-client
34+
MCP_SERVER_PORT=3001 uv run mcp-simple-auth-client
3535

3636
# Use SSE transport
3737
MCP_TRANSPORT_TYPE=sse uv run mcp-simple-auth-client
@@ -70,5 +70,5 @@ mcp> quit
7070

7171
## Configuration
7272

73-
- `MCP_SERVER_URL` - Server URL (default: http://localhost:3001)
73+
- `MCP_SERVER_PORT` - Server URL (default: 8000)
7474
- `MCP_TRANSPORT_TYPE` - Transport type: `streamable_http` (default) or `sse`

examples/clients/simple-auth-client/mcp_simple_auth_client/main.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,8 +338,13 @@ async def main():
338338
"""Main entry point."""
339339
# Default server URL - can be overridden with environment variable
340340
# Most MCP streamable HTTP servers use /mcp as the endpoint
341-
server_url = os.getenv("MCP_SERVER_URL", "http://localhost:8000/mcp")
341+
server_url = os.getenv("MCP_SERVER_PORT", 8000)
342342
transport_type = os.getenv("MCP_TRANSPORT_TYPE", "streamable_http")
343+
server_url = (
344+
f"http://localhost:{server_url}/mcp"
345+
if transport_type == "streamable_http"
346+
else f"http://localhost:{server_url}/sse"
347+
)
343348

344349
print("🚀 Simple MCP Auth Client")
345350
print(f"Connecting to: {server_url}")

0 commit comments

Comments
 (0)