Skip to content

Commit 6b69f63

Browse files
authored
docs: fix simple-auth README references to non-existent scripts (#1829)
1 parent 3ffe142 commit 6b69f63

File tree

2 files changed

+51
-26
lines changed

2 files changed

+51
-26
lines changed

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

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,63 +12,87 @@ A demonstration of how to use the MCP Python SDK with OAuth authentication over
1212

1313
```bash
1414
cd examples/clients/simple-auth-client
15-
uv sync --reinstall
15+
uv sync --reinstall
1616
```
1717

1818
## Usage
1919

2020
### 1. Start an MCP server with OAuth support
2121

22+
The simple-auth server example provides three server configurations. See [examples/servers/simple-auth/README.md](../../servers/simple-auth/README.md) for full details.
23+
24+
#### Option A: New Architecture (Recommended)
25+
26+
Separate Authorization Server and Resource Server:
27+
28+
```bash
29+
# Terminal 1: Start Authorization Server on port 9000
30+
cd examples/servers/simple-auth
31+
uv run mcp-simple-auth-as --port=9000
32+
33+
# Terminal 2: Start Resource Server on port 8001
34+
cd examples/servers/simple-auth
35+
uv run mcp-simple-auth-rs --port=8001 --auth-server=http://localhost:9000 --transport=streamable-http
36+
```
37+
38+
#### Option B: Legacy Server (Backwards Compatibility)
39+
2240
```bash
23-
# Example with mcp-simple-auth
24-
cd path/to/mcp-simple-auth
25-
uv run mcp-simple-auth --transport streamable-http --port 3001
41+
# Single server that acts as both AS and RS (port 8000)
42+
cd examples/servers/simple-auth
43+
uv run mcp-simple-auth-legacy --port=8000 --transport=streamable-http
2644
```
2745

2846
### 2. Run the client
2947

3048
```bash
31-
uv run mcp-simple-auth-client
49+
# Connect to Resource Server (new architecture, default port 8001)
50+
MCP_SERVER_PORT=8001 uv run mcp-simple-auth-client
3251

33-
# Or with custom server URL
34-
MCP_SERVER_PORT=3001 uv run mcp-simple-auth-client
52+
# Connect to Legacy Server (port 8000)
53+
uv run mcp-simple-auth-client
3554

3655
# Use SSE transport
37-
MCP_TRANSPORT_TYPE=sse uv run mcp-simple-auth-client
56+
MCP_SERVER_PORT=8001 MCP_TRANSPORT_TYPE=sse uv run mcp-simple-auth-client
3857
```
3958

4059
### 3. Complete OAuth flow
4160

4261
The client will open your browser for authentication. After completing OAuth, you can use commands:
4362

4463
- `list` - List available tools
45-
- `call <tool_name> [args]` - Call a tool with optional JSON arguments
64+
- `call <tool_name> [args]` - Call a tool with optional JSON arguments
4665
- `quit` - Exit
4766

4867
## Example
4968

5069
```markdown
51-
🔐 Simple MCP Auth Client
52-
Connecting to: http://localhost:3001
70+
🚀 Simple MCP Auth Client
71+
Connecting to: http://localhost:8001/mcp
72+
Transport type: streamable-http
5373

54-
Please visit the following URL to authorize the application:
55-
http://localhost:3001/authorize?response_type=code&client_id=...
74+
🔗 Attempting to connect to http://localhost:8001/mcp...
75+
📡 Opening StreamableHTTP transport connection with auth...
76+
Opening browser for authorization: http://localhost:9000/authorize?...
5677

57-
✅ Connected to MCP server at http://localhost:3001
78+
✅ Connected to MCP server at http://localhost:8001/mcp
5879

5980
mcp> list
6081
📋 Available tools:
61-
1. echo - Echo back the input text
82+
1. get_time
83+
Description: Get the current server time.
6284

63-
mcp> call echo {"text": "Hello, world!"}
64-
🔧 Tool 'echo' result:
65-
Hello, world!
85+
mcp> call get_time
86+
🔧 Tool 'get_time' result:
87+
{"current_time": "2024-01-15T10:30:00", "timezone": "UTC", ...}
6688

6789
mcp> quit
68-
👋 Goodbye!
6990
```
7091

7192
## Configuration
7293

73-
- `MCP_SERVER_PORT` - Server URL (default: 8000)
74-
- `MCP_TRANSPORT_TYPE` - Transport type: `streamable-http` (default) or `sse`
94+
| Environment Variable | Description | Default |
95+
|---------------------|-------------|---------|
96+
| `MCP_SERVER_PORT` | Port number of the MCP server | `8000` |
97+
| `MCP_TRANSPORT_TYPE` | Transport type: `streamable-http` or `sse` | `streamable-http` |
98+
| `MCP_CLIENT_METADATA_URL` | Optional URL for client metadata (CIMD) | None |

examples/servers/simple-auth/README.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ uv run mcp-simple-auth-as --port=9000
3131
cd examples/servers/simple-auth
3232

3333
# Start Resource Server on port 8001, connected to Authorization Server
34-
uv run mcp-simple-auth-rs --port=8001 --auth-server=http://localhost:9000 --transport=streamable-http
34+
uv run mcp-simple-auth-rs --port=8001 --auth-server=http://localhost:9000 --transport=streamable-http
3535

3636
# With RFC 8707 strict resource validation (recommended for production)
37-
uv run mcp-simple-auth-rs --port=8001 --auth-server=http://localhost:9000 --transport=streamable-http --oauth-strict
37+
uv run mcp-simple-auth-rs --port=8001 --auth-server=http://localhost:9000 --transport=streamable-http --oauth-strict
3838

3939
```
4040

@@ -84,8 +84,9 @@ For backwards compatibility with older MCP implementations, a legacy server is p
8484
### Running the Legacy Server
8585

8686
```bash
87-
# Start legacy authorization server on port 8002
88-
uv run mcp-simple-auth-legacy --port=8002
87+
# Start legacy server on port 8000 (the default)
88+
cd examples/servers/simple-auth
89+
uv run mcp-simple-auth-legacy --port=8000 --transport=streamable-http
8990
```
9091

9192
**Differences from the new architecture:**
@@ -101,7 +102,7 @@ uv run mcp-simple-auth-legacy --port=8002
101102
```bash
102103
# Test with client (will automatically fall back to legacy discovery)
103104
cd examples/clients/simple-auth-client
104-
MCP_SERVER_PORT=8002 MCP_TRANSPORT_TYPE=streamable-http uv run mcp-simple-auth-client
105+
MCP_SERVER_PORT=8000 MCP_TRANSPORT_TYPE=streamable-http uv run mcp-simple-auth-client
105106
```
106107

107108
The client will:

0 commit comments

Comments
 (0)