File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
clients/simple-auth-client Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -71,4 +71,4 @@ mcp> quit
71
71
## Configuration
72
72
73
73
- ` MCP_SERVER_PORT ` - Server URL (default: 8000)
74
- - ` MCP_TRANSPORT_TYPE ` - Transport type: ` streamable_http ` (default) or ` sse `
74
+ - ` MCP_TRANSPORT_TYPE ` - Transport type: ` streamable-http ` (default) or ` sse `
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ def get_state(self):
150
150
class SimpleAuthClient :
151
151
"""Simple MCP client with auth support."""
152
152
153
- def __init__ (self , server_url : str , transport_type : str = "streamable_http " ):
153
+ def __init__ (self , server_url : str , transport_type : str = "streamable-http " ):
154
154
self .server_url = server_url
155
155
self .transport_type = transport_type
156
156
self .session : ClientSession | None = None
@@ -334,10 +334,10 @@ async def main():
334
334
# Default server URL - can be overridden with environment variable
335
335
# Most MCP streamable HTTP servers use /mcp as the endpoint
336
336
server_url = os .getenv ("MCP_SERVER_PORT" , 8000 )
337
- transport_type = os .getenv ("MCP_TRANSPORT_TYPE" , "streamable_http " )
337
+ transport_type = os .getenv ("MCP_TRANSPORT_TYPE" , "streamable-http " )
338
338
server_url = (
339
339
f"http://localhost:{ server_url } /mcp"
340
- if transport_type == "streamable_http "
340
+ if transport_type == "streamable-http "
341
341
else f"http://localhost:{ server_url } /sse"
342
342
)
343
343
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ uv run mcp-simple-auth-rs --port=8001 --auth-server=http://localhost:9000 --tra
43
43
``` bash
44
44
cd examples/clients/simple-auth-client
45
45
# Start client with streamable HTTP
46
- MCP_SERVER_PORT=8001 MCP_TRANSPORT_TYPE=streamable_http uv run mcp-simple-auth-client
46
+ MCP_SERVER_PORT=8001 MCP_TRANSPORT_TYPE=streamable-http uv run mcp-simple-auth-client
47
47
```
48
48
49
49
## How It Works
@@ -101,7 +101,7 @@ uv run mcp-simple-auth-legacy --port=8002
101
101
``` bash
102
102
# Test with client (will automatically fall back to legacy discovery)
103
103
cd examples/clients/simple-auth-client
104
- MCP_SERVER_PORT=8002 MCP_TRANSPORT_TYPE=streamable_http uv run mcp-simple-auth-client
104
+ MCP_SERVER_PORT=8002 MCP_TRANSPORT_TYPE=streamable-http uv run mcp-simple-auth-client
105
105
```
106
106
107
107
The client will:
You can’t perform that action at this time.
0 commit comments