Skip to content

Commit 488e343

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 b7cb400 commit 488e343

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
@@ -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/servers/simple-auth/`](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-auth/).
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).
10621062

10631063
**Architecture:**
10641064

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

13511348
The streamable HTTP transport supports:
13521349

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

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

21052102
### Writing MCP Clients
21062103

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

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

24202417
### Parsing Tool Results
24212418

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)