Skip to content

Commit 9c54d06

Browse files
docs: add Read the Docs configuration for versioned documentation
Currently, the documentation for the current release is published at https://modelcontextprotocol.github.io/python-sdk/. However, documentation for older releases is unavailable. This commit adds a `.readthedocs.yaml` configuration file to enable publishing versioned documentation to Read the Docs in addition to the existing GitHub Pages deployment. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0dedbd9 commit 9c54d06

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

.readthedocs.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Read the Docs configuration file
2+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
3+
4+
version: 2
5+
6+
build:
7+
os: ubuntu-24.04
8+
tools:
9+
python: "3.12"
10+
11+
mkdocs:
12+
configuration: mkdocs.yml
13+
14+
python:
15+
install:
16+
- method: pip
17+
path: .
18+
extra_requirements:
19+
- docs

README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -676,7 +676,7 @@ The Context object provides the following capabilities:
676676
- `ctx.session` - Access to the underlying session for advanced communication (see [Session Properties and Methods](#session-properties-and-methods))
677677
- `ctx.request_context` - Access to request-specific data and lifespan resources (see [Request Context Properties](#request-context-properties))
678678
- `await ctx.debug(message)` - Send debug log message
679-
- `await ctx.info(message)` - Send info log message
679+
- `await ctx.info(message)` - Send info log message
680680
- `await ctx.warning(message)` - Send warning log message
681681
- `await ctx.error(message)` - Send error log message
682682
- `await ctx.log(level, message, logger_name=None)` - Send log with custom level
@@ -1107,13 +1107,13 @@ The session object accessible via `ctx.session` provides advanced control over c
11071107
async def notify_data_update(resource_uri: str, ctx: Context) -> str:
11081108
"""Update data and notify clients of the change."""
11091109
# Perform data update logic here
1110-
1110+
11111111
# Notify clients that this specific resource changed
11121112
await ctx.session.send_resource_updated(AnyUrl(resource_uri))
1113-
1113+
11141114
# If this affects the overall resource list, notify about that too
11151115
await ctx.session.send_resource_list_changed()
1116-
1116+
11171117
return f"Updated {resource_uri} and notified clients"
11181118
```
11191119

@@ -1142,11 +1142,11 @@ def query_with_config(query: str, ctx: Context) -> str:
11421142
"""Execute a query using shared database and configuration."""
11431143
# Access typed lifespan context
11441144
app_ctx: AppContext = ctx.request_context.lifespan_context
1145-
1145+
11461146
# Use shared resources
11471147
connection = app_ctx.db
11481148
settings = app_ctx.config
1149-
1149+
11501150
# Execute query with configuration
11511151
result = connection.execute(query, timeout=settings.query_timeout)
11521152
return str(result)
@@ -2545,7 +2545,9 @@ MCP servers declare capabilities during initialization:
25452545

25462546
## Documentation
25472547

2548-
- [API Reference](https://modelcontextprotocol.github.io/python-sdk/api/)
2548+
- [Current Release Documentation](https://modelcontextprotocol.github.io/python-sdk/)
2549+
- [Current Release API Reference](https://modelcontextprotocol.github.io/python-sdk/api/)
2550+
- [Versioned Documentation](https://mcp-python-sdk.readthedocs.io/)
25492551
- [Experimental Features (Tasks)](https://modelcontextprotocol.github.io/python-sdk/experimental/tasks/)
25502552
- [Model Context Protocol documentation](https://modelcontextprotocol.io)
25512553
- [Model Context Protocol specification](https://modelcontextprotocol.io/specification/latest)

0 commit comments

Comments
 (0)