Skip to content

Commit c72fbf7

Browse files
committed
switch to uv commands
1 parent 60507a6 commit c72fbf7

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

examples/servers/simple-auth/README.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This example demonstrates OAuth 2.0 authentication with the Model Context Protoc
1313

1414
**Set environment variables:**
1515
```bash
16-
export MCP_GITHUB_CLIENT_ID="your_client_id_here"
16+
export MCP_GITHUB_CLIENT_ID="your_client_id_here"
1717
export MCP_GITHUB_CLIENT_SECRET="your_client_secret_here"
1818
```
1919

@@ -28,7 +28,7 @@ export MCP_GITHUB_CLIENT_SECRET="your_client_secret_here"
2828
cd examples/servers/simple-auth
2929

3030
# Start Authorization Server on port 9000
31-
python -m mcp_simple_auth.auth_server --port=9000
31+
uv run mcp-simple-auth-as --port=9000
3232
```
3333

3434
**What it provides:**
@@ -46,16 +46,16 @@ python -m mcp_simple_auth.auth_server --port=9000
4646
cd examples/servers/simple-auth
4747

4848
# Start Resource Server on port 8001, connected to Authorization Server
49-
python -m mcp_simple_auth.server --port=8001 --auth-server=http://localhost:9000 --transport=streamable-http
49+
uv run mcp-simple-auth-rs --port=8001 --auth-server=http://localhost:9000 --transport=streamable-http
5050
```
5151

5252

5353
### Step 3: Test with Client
5454

5555
```bash
5656
cd examples/clients/simple-auth-client
57-
# Start client with streamable HTTP
58-
MCP_SERVER_PORT=8001 MCP_TRANSPORT_TYPE=streamable_http python -m mcp_simple_auth_client.main
57+
# Start client with streamable HTTP
58+
MCP_SERVER_PORT=8001 MCP_TRANSPORT_TYPE=streamable_http uv run mcp-simple-auth-client
5959
```
6060

6161

@@ -94,7 +94,7 @@ For backwards compatibility with older MCP implementations, a legacy server is p
9494

9595
```bash
9696
# Start legacy authorization server on port 8002
97-
python -m mcp_simple_auth.legacy_as_server --port=8002
97+
uv run mcp-simple-auth-legacy --port=8002
9898
```
9999

100100
**Differences from the new architecture:**
@@ -108,12 +108,13 @@ python -m mcp_simple_auth.legacy_as_server --port=8002
108108

109109
```bash
110110
# Test with client (will automatically fall back to legacy discovery)
111-
MCP_SERVER_PORT=8002 MCP_TRANSPORT_TYPE=streamable_http python -m mcp_simple_auth_client.main
111+
cd examples/clients/simple-auth-client
112+
MCP_SERVER_PORT=8002 MCP_TRANSPORT_TYPE=streamable_http uv run mcp-simple-auth-client
112113
```
113114

114115
The client will:
115116
1. Try RFC 9728 discovery at `/.well-known/oauth-protected-resource` (404 on legacy server)
116-
2. Fall back to direct OAuth discovery at `/.well-known/oauth-authorization-server`
117+
2. Fall back to direct OAuth discovery at `/.well-known/oauth-authorization-server`
117118
3. Complete authentication with the MCP server acting as its own AS
118119

119120
This ensures existing MCP servers (which could optionally act as Authorization Servers under the old spec) continue to work while the ecosystem transitions to the new architecture where MCP servers are Resource Servers only.

examples/servers/simple-auth/pyproject.toml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ dependencies = [
1818
]
1919

2020
[project.scripts]
21-
mcp-simple-auth = "mcp_simple_auth.server:main"
21+
mcp-simple-auth-rs = "mcp_simple_auth.server:main"
22+
mcp-simple-auth-as = "mcp_simple_auth.auth_server:main"
23+
mcp-simple-auth-legacy = "mcp_simple_auth.legacy_as_server:main"
2224

2325
[build-system]
2426
requires = ["hatchling"]
@@ -28,4 +30,4 @@ build-backend = "hatchling.build"
2830
packages = ["mcp_simple_auth"]
2931

3032
[tool.uv]
31-
dev-dependencies = ["pyright>=1.1.391", "pytest>=8.3.4", "ruff>=0.8.5"]
33+
dev-dependencies = ["pyright>=1.1.391", "pytest>=8.3.4", "ruff>=0.8.5"]

0 commit comments

Comments
 (0)