Skip to content

Commit 6fd6b70

Browse files
committed
docs: fix InMemoryTaskStore import path in experimental tasks docs
The docs import InMemoryTaskStore from the package root: from mcp.shared.experimental.tasks import InMemoryTaskStore but the class is not re-exported there, so this raises ImportError. The package __init__ explicitly directs callers to import from the submodule, and all library code and tests use: from mcp.shared.experimental.tasks.in_memory_task_store import InMemoryTaskStore Update both doc snippets (tasks.md, tasks-client.md) to the working path. Signed-off-by: Vidit Patankar <vidit.patankar16@gmail.com>
1 parent 616476f commit 6fd6b70

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

docs/experimental/tasks-client.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ from mcp.types import (
211211
CreateTaskResult, GetTaskResult, GetTaskPayloadResult,
212212
TaskMetadata, ElicitRequestParams,
213213
)
214-
from mcp.shared.experimental.tasks import InMemoryTaskStore
214+
from mcp.shared.experimental.tasks.in_memory_task_store import InMemoryTaskStore
215215

216216
# Client-side task store
217217
client_store = InMemoryTaskStore()

docs/experimental/tasks.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ The `ttl` (time-to-live) specifies how long the task and result are retained aft
114114
Servers persist task state in a `TaskStore`. The SDK provides `InMemoryTaskStore` for development:
115115

116116
```python
117-
from mcp.shared.experimental.tasks import InMemoryTaskStore
117+
from mcp.shared.experimental.tasks.in_memory_task_store import InMemoryTaskStore
118118

119119
store = InMemoryTaskStore()
120120
```

0 commit comments

Comments
 (0)