π The fast, Pythonic way to build MCP servers and clients.
Remove TaskConfig and client from root exports (#2580)
Jeremiah Lowinb20de51512af
diff --git a/docs/servers/tasks.mdx b/docs/servers/tasks.mdxindex 7e73a4860..049efd84c 100644--- a/docs/servers/tasks.mdx+++ b/docs/servers/tasks.mdx@@ -69,7 +69,8 @@ For fine-grained control over task execution behavior, use `TaskConfig` instead| `"required"` | Error: task required | Executes as background task |```python-from fastmcp import FastMCP, TaskConfig+from fastmcp import FastMCP+from fastmcp.server.tasks import TaskConfigmcp = FastMCP("MyServer")diff --git a/src/fastmcp/__init__.py b/src/fastmcp/__init__.pyindex 9d5a85698..14c0abc5b 100644--- a/src/fastmcp/__init__.py+++ b/src/fastmcp/__init__.py@@ -14,7 +14,6 @@ if settings.log_enabled:from fastmcp.server.server import FastMCPfrom fastmcp.server.context import Context-from fastmcp.server.tasks.config import TaskConfigimport fastmcp.serverfrom fastmcp.client import Client@@ -32,7 +31,5 @@ __all__ = ["Client","Context","FastMCP",- "TaskConfig",- "client","settings",]diff --git a/tests/server/tasks/test_task_config_modes.py b/tests/server/tasks/test_task_config_modes.pyindex 6870301b5..c00879996 100644--- a/tests/server/tasks/test_task_config_modes.py+++ b/tests/server/tasks/test_task_config_modes.py@@ -8,9 +8,10 @@ Tests that the server correctly enforces task execution modes:import pytest-from fastmcp import FastMCP, TaskConfig+from fastmcp import FastMCPfrom fastmcp.client import Clientfrom fastmcp.exceptions import ToolError+from fastmcp.server.tasks import TaskConfigclass TestTaskConfigNormalization:diff --git a/tests/server/tasks/test_task_mount.py b/tests/server/tasks/test_task_mount.pyindex ffff3cfc0..bdd234894 100644--- a/tests/server/tasks/test_task_mount.py+++ b/tests/server/tasks/test_task_mount.py@@ -10,9 +10,10 @@ import asyncioimport pytestfrom docket import Docket-from fastmcp import FastMCP, TaskConfig+from fastmcp import FastMCPfrom fastmcp.client import Clientfrom fastmcp.server.dependencies import CurrentDocket, CurrentFastMCP+from fastmcp.server.tasks import TaskConfig@pytest.fixture(autouse=True)