Skip to content

Commit 7a8a38e

Browse files
committed
Restore original references to old example dirs (revert remainder)
1 parent 9c90e4c commit 7a8a38e

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
@@ -1056,7 +1056,7 @@ if __name__ == "__main__":
10561056
_Full example: [examples/snippets/servers/oauth_server.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/servers/oauth_server.py)_
10571057
<!-- /snippet-source -->
10581058

1059-
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).
1059+
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/).
10601060

10611061
**Architecture:**
10621062

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

1344-
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/).
1344+
For low level server with Streamable HTTP implementations, see:
1345+
1346+
- Stateful server: [`examples/servers/simple-streamablehttp/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-streamablehttp/)
1347+
- Stateless server: [`examples/servers/simple-streamablehttp-stateless/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-streamablehttp-stateless/)
13451348

13461349
The streamable HTTP transport supports:
13471350

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

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

20942097
### Writing MCP Clients
20952098

@@ -2307,7 +2310,7 @@ The SDK includes [authorization support](https://modelcontextprotocol.io/specifi
23072310
```python
23082311
"""Before running, specify running MCP RS server URL.
23092312
To spin up RS server locally, see
2310-
examples/stories/oauth/README.md
2313+
examples/servers/simple-auth/README.md
23112314
23122315
cd to the `examples/snippets` directory and run:
23132316
uv run oauth-client
@@ -2402,7 +2405,7 @@ if __name__ == "__main__":
24022405
_Full example: [examples/snippets/clients/oauth_client.py](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/snippets/clients/oauth_client.py)_
24032406
<!-- /snippet-source -->
24042407

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

24072410
### Parsing Tool Results
24082411

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)