Skip to content

Commit 123b265

Browse files
committed
Restore original references to old example dirs (revert remainder)
1 parent bf8a62b commit 123b265

7 files changed

Lines changed: 12 additions & 12 deletions

File tree

README.v2.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,7 +1058,7 @@ if __name__ == "__main__":
10581058
_Full example: [examples/snippets/servers/oauth_server.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/oauth_server.py)_
10591059
<!-- /snippet-source -->
10601060

1061-
For a complete example with separate Authorization Server and Resource Server implementations, see [`examples/stories/oauth/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/stories/oauth/) (and [`examples/stories/bearer_auth/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/stories/bearer_auth/) for static-token auth).
1061+
For a complete example with separate Authorization Server and Resource Server implementations, see [`examples/servers/simple-auth/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-auth/).
10621062

10631063
**Architecture:**
10641064

@@ -1343,7 +1343,10 @@ app = Starlette(
13431343
_Full example: [examples/snippets/servers/streamable_starlette_mount.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/streamable_starlette_mount.py)_
13441344
<!-- /snippet-source -->
13451345

1346-
For low level server with Streamable HTTP implementations, see [`examples/stories/stateless_legacy/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/stories/stateless_legacy/).
1346+
For low level server with Streamable HTTP implementations, see:
1347+
1348+
- Stateful server: [`examples/servers/simple-streamablehttp/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-streamablehttp/)
1349+
- Stateless server: [`examples/servers/simple-streamablehttp-stateless/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-streamablehttp-stateless/)
13471350

13481351
The streamable HTTP transport supports:
13491352

@@ -2097,7 +2100,7 @@ _Full example: [examples/snippets/clients/pagination_client.py](https://github.c
20972100
- **Backward compatible** - clients that don't support pagination will still work (they'll just get the first page)
20982101
- **Flexible page sizes** - Each endpoint can define its own page size based on data characteristics
20992102

2100-
See the [pagination example](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/stories/pagination) for a complete implementation.
2103+
See the [simple-pagination example](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-pagination) for a complete implementation.
21012104

21022105
### Writing MCP Clients
21032106

@@ -2317,7 +2320,7 @@ The SDK includes [authorization support](https://modelcontextprotocol.io/specifi
23172320
```python
23182321
"""Before running, specify running MCP RS server URL.
23192322
To spin up RS server locally, see
2320-
examples/stories/oauth/README.md
2323+
examples/servers/simple-auth/README.md
23212324
23222325
cd to the `examples/snippets` directory and run:
23232326
uv run oauth-client
@@ -2412,7 +2415,7 @@ if __name__ == "__main__":
24122415
_Full example: [examples/snippets/clients/oauth_client.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/clients/oauth_client.py)_
24132416
<!-- /snippet-source -->
24142417

2415-
For a complete working example, see [`examples/stories/oauth/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/stories/oauth/).
2418+
For a complete working example, see [`examples/clients/simple-auth-client/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/clients/simple-auth-client/).
24162419

24172420
### Parsing Tool Results
24182421

examples/mcpserver/complex_inputs.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# TODO: superseded by examples/stories/schema_validators/; remove once tests/test_examples.py is migrated.
21
"""MCPServer Complex inputs Example
32
43
Demonstrates validation via pydantic with complex models.

examples/mcpserver/desktop.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# TODO: superseded by examples/stories/resources/; remove once tests/test_examples.py is migrated.
21
"""MCPServer Desktop Example
32
43
A simple example that exposes the desktop directory as a resource.

examples/mcpserver/direct_call_tool_result_return.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# TODO: superseded by examples/stories/tools/; remove once tests/test_examples.py is migrated.
21
"""MCPServer Echo Server with direct CallToolResult return"""
32

43
from typing import Annotated

examples/mcpserver/simple_echo.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# TODO: superseded by examples/stories/tools/; remove once tests/test_examples.py is migrated.
21
"""MCPServer Echo Server"""
32

43
from mcp.server.mcpserver import MCPServer

examples/snippets/clients/oauth_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
"""Before running, specify running MCP RS server URL.
22
To spin up RS server locally, see
3-
examples/stories/oauth/README.md
3+
examples/servers/simple-auth/README.md
44
55
cd to the `examples/snippets` directory and run:
66
uv run oauth-client

src/mcp/server/auth/middleware/bearer_auth.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ def authorization_context(user: AuthenticatedUser) -> AuthorizationContext:
3131
verifier does not supply are `None`, so the comparison degrades to the
3232
remaining components.
3333
34-
See `examples/stories/bearer_auth/server.py` for a verifier that
35-
populates `subject` and `client_id`."""
34+
See `examples/servers/simple-auth/mcp_simple_auth/token_verifier.py` for
35+
a verifier that populates `subject` and `claims` from an introspection
36+
response."""
3637
token = user.access_token
3738
issuer = (token.claims or {}).get("iss")
3839
return AuthorizationContext(

0 commit comments

Comments
 (0)