Skip to content

Commit ff60cb2

Browse files
committed
Remove examples superseded by stories/; update dangling references
- Delete examples/clients/* and examples/servers/simple-*, sse-polling-demo (each has an equivalent under examples/stories/) - examples/mcpserver/*.py: add TODO pointers to the corresponding story - README.v2.md, examples/snippets/clients/oauth_client.py: update paths that pointed at the removed examples - src/mcp/server/auth/middleware/bearer_auth.py: drop pragma now that the bearer_auth story exercises this path
1 parent d1810cf commit ff60cb2

73 files changed

Lines changed: 12 additions & 4079 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.v2.md

Lines changed: 5 additions & 8 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/servers/simple-auth/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-auth/).
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).
10601060

10611061
**Architecture:**
10621062

@@ -1341,10 +1341,7 @@ 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:
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/)
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/).
13481345

13491346
The streamable HTTP transport supports:
13501347

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

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

20972094
### Writing MCP Clients
20982095

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

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/).
2405+
For a complete working example, see [`examples/stories/oauth/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/stories/oauth/).
24092406

24102407
### Parsing Tool Results
24112408

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

Lines changed: 0 additions & 98 deletions
This file was deleted.

examples/clients/simple-auth-client/mcp_simple_auth_client/__init__.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)