File tree 2 files changed +8
-3
lines changed
examples/clients/simple-auth-client
2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ uv run mcp-simple-auth --transport streamable-http --port 3001
31
31
uv run mcp-simple-auth-client
32
32
33
33
# 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
35
35
36
36
# Use SSE transport
37
37
MCP_TRANSPORT_TYPE=sse uv run mcp-simple-auth-client
@@ -70,5 +70,5 @@ mcp> quit
70
70
71
71
## Configuration
72
72
73
- - ` MCP_SERVER_URL ` - Server URL (default: http://localhost:3001 )
73
+ - ` MCP_SERVER_PORT ` - Server URL (default: 8000 )
74
74
- ` MCP_TRANSPORT_TYPE ` - Transport type: ` streamable_http ` (default) or ` sse `
Original file line number Diff line number Diff line change @@ -338,8 +338,13 @@ async def main():
338
338
"""Main entry point."""
339
339
# Default server URL - can be overridden with environment variable
340
340
# 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 )
342
342
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
+ )
343
348
344
349
print ("🚀 Simple MCP Auth Client" )
345
350
print (f"Connecting to: { server_url } " )
You can’t perform that action at this time.
0 commit comments