Skip to content

Commit 8862507

Browse files
committed
remove use of http clients in auth provider
1 parent f2e31ca commit 8862507

File tree

4 files changed

+772
-1664
lines changed

4 files changed

+772
-1664
lines changed

examples/servers/simple-auth/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ export MCP_GITHUB_CLIENT_SECRET="your_client_secret_here"
2525

2626
```bash
2727
# Navigate to the simple-auth directory
28-
cd /Users/inna/code/mcp/python-sdk/examples/servers/simple-auth
28+
cd examples/servers/simple-auth
2929

3030
# Start Authorization Server on port 9000
3131
python -m mcp_simple_auth.auth_server --port=9000
@@ -43,7 +43,7 @@ python -m mcp_simple_auth.auth_server --port=9000
4343

4444
```bash
4545
# In another terminal, navigate to the simple-auth directory
46-
cd /Users/inna/code/mcp/python-sdk/examples/servers/simple-auth
46+
cd examples/servers/simple-auth
4747

4848
# Start Resource Server on port 8001, connected to Authorization Server
4949
python -m mcp_simple_auth.server --port=8001 --auth-server=http://localhost:9000 --transport=streamable-http
@@ -53,9 +53,7 @@ python -m mcp_simple_auth.server --port=8001 --auth-server=http://localhost:9000
5353
### Step 3: Test with Client
5454

5555
```bash
56-
# Start Resource Server with streamable HTTP
57-
python -m mcp_simple_auth.server --port=8001 --auth-server=http://localhost:9000 --transport=streamable-http
58-
56+
cd examples/clients/simple-auth-client
5957
# Start client with streamable HTTP
6058
MCP_SERVER_PORT=8001 MCP_TRANSPORT_TYPE=streamable_http python -m mcp_simple_auth_client.main
6159
```

examples/servers/simple-auth/mcp_simple_auth/legacy_as_server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,10 +358,10 @@ def main(port: int, host: str, transport: Literal["sse", "streamable-http"]) ->
358358
# No hardcoded credentials - all from environment variables
359359
server_url = f"http://{host}:{port}"
360360
settings = ServerSettings(
361-
host=host,
361+
host=host,
362362
port=port,
363363
server_url=AnyHttpUrl(server_url),
364-
github_callback_path=f"{server_url}/github/callback"
364+
github_callback_path=f"{server_url}/github/callback",
365365
)
366366
except ValueError as e:
367367
logger.error("Failed to load settings. Make sure environment variables are set:")

0 commit comments

Comments
 (0)