Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 examples/clients/simple-auth-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@ mcp> quit
## Configuration

- `MCP_SERVER_PORT` - Server URL (default: 8000)
- `MCP_TRANSPORT_TYPE` - Transport type: `streamable_http` (default) or `sse`
- `MCP_TRANSPORT_TYPE` - Transport type: `streamable-http` (default) or `sse`
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def get_state(self):
class SimpleAuthClient:
"""Simple MCP client with auth support."""

def __init__(self, server_url: str, transport_type: str = "streamable_http"):
def __init__(self, server_url: str, transport_type: str = "streamable-http"):
self.server_url = server_url
self.transport_type = transport_type
self.session: ClientSession | None = None
Expand Down Expand Up @@ -334,10 +334,10 @@ async def main():
# Default server URL - can be overridden with environment variable
# Most MCP streamable HTTP servers use /mcp as the endpoint
server_url = os.getenv("MCP_SERVER_PORT", 8000)
transport_type = os.getenv("MCP_TRANSPORT_TYPE", "streamable_http")
transport_type = os.getenv("MCP_TRANSPORT_TYPE", "streamable-http")
server_url = (
f"http://localhost:{server_url}/mcp"
if transport_type == "streamable_http"
if transport_type == "streamable-http"
else f"http://localhost:{server_url}/sse"
)

Expand Down
4 changes: 2 additions & 2 deletions 4 examples/servers/simple-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ uv run mcp-simple-auth-rs --port=8001 --auth-server=http://localhost:9000 --tra
```bash
cd examples/clients/simple-auth-client
# Start client with streamable HTTP
MCP_SERVER_PORT=8001 MCP_TRANSPORT_TYPE=streamable_http uv run mcp-simple-auth-client
MCP_SERVER_PORT=8001 MCP_TRANSPORT_TYPE=streamable-http uv run mcp-simple-auth-client
```

## How It Works
Expand Down Expand Up @@ -101,7 +101,7 @@ uv run mcp-simple-auth-legacy --port=8002
```bash
# Test with client (will automatically fall back to legacy discovery)
cd examples/clients/simple-auth-client
MCP_SERVER_PORT=8002 MCP_TRANSPORT_TYPE=streamable_http uv run mcp-simple-auth-client
MCP_SERVER_PORT=8002 MCP_TRANSPORT_TYPE=streamable-http uv run mcp-simple-auth-client
```

The client will:
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.