Skip to content

Commit d35b867

Browse files
chore: Update SDK documentation (#2517)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
1 parent 080ffa5 commit d35b867

36 files changed

+1740
-416
lines changed

docs/docs.json

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@
276276
"anchor": "Python SDK",
277277
"icon": "python",
278278
"pages": [
279+
"python-sdk/fastmcp-dependencies",
279280
"python-sdk/fastmcp-exceptions",
280281
"python-sdk/fastmcp-mcp_config",
281282
"python-sdk/fastmcp-settings",
@@ -296,7 +297,8 @@
296297
"python-sdk/fastmcp-cli-install-shared"
297298
]
298299
},
299-
"python-sdk/fastmcp-cli-run"
300+
"python-sdk/fastmcp-cli-run",
301+
"python-sdk/fastmcp-cli-tasks"
300302
]
301303
},
302304
{
@@ -319,6 +321,7 @@
319321
"python-sdk/fastmcp-client-progress",
320322
"python-sdk/fastmcp-client-roots",
321323
"python-sdk/fastmcp-client-sampling",
324+
"python-sdk/fastmcp-client-tasks",
322325
"python-sdk/fastmcp-client-transports"
323326
]
324327
},
@@ -380,6 +383,7 @@
380383
"python-sdk/fastmcp-server-context",
381384
"python-sdk/fastmcp-server-dependencies",
382385
"python-sdk/fastmcp-server-elicitation",
386+
"python-sdk/fastmcp-server-event_store",
383387
"python-sdk/fastmcp-server-http",
384388
"python-sdk/fastmcp-server-low_level",
385389
{
@@ -405,7 +409,20 @@
405409
]
406410
},
407411
"python-sdk/fastmcp-server-proxy",
408-
"python-sdk/fastmcp-server-server"
412+
"python-sdk/fastmcp-server-server",
413+
{
414+
"group": "tasks",
415+
"pages": [
416+
"python-sdk/fastmcp-server-tasks-__init__",
417+
"python-sdk/fastmcp-server-tasks-capabilities",
418+
"python-sdk/fastmcp-server-tasks-config",
419+
"python-sdk/fastmcp-server-tasks-converters",
420+
"python-sdk/fastmcp-server-tasks-handlers",
421+
"python-sdk/fastmcp-server-tasks-keys",
422+
"python-sdk/fastmcp-server-tasks-protocol",
423+
"python-sdk/fastmcp-server-tasks-subscriptions"
424+
]
425+
}
409426
]
410427
},
411428
{

docs/python-sdk/fastmcp-cli-cli.mdx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ FastMCP CLI tools using Cyclopts.
1010

1111
## Functions
1212

13-
### `with_argv` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L65" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
13+
### `with_argv` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L66" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
1414

1515
```python
1616
with_argv(args: list[str] | None)
@@ -27,7 +27,7 @@ Args are provided without the script name, so we preserve sys.argv[0]
2727
and replace the rest.
2828

2929

30-
### `version` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L88" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
30+
### `version` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L89" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
3131

3232
```python
3333
version()
@@ -37,7 +37,7 @@ version()
3737
Display version information and platform details.
3838

3939

40-
### `dev` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L126" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
40+
### `dev` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L127" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
4141

4242
```python
4343
dev(server_spec: str | None = None) -> None
@@ -50,7 +50,7 @@ Run an MCP server with the MCP Inspector for development.
5050
- `server_spec`: Python file to run, optionally with \:object suffix, or None to auto-detect fastmcp.json
5151

5252

53-
### `run` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L286" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
53+
### `run` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L287" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
5454

5555
```python
5656
run(server_spec: str | None = None, *server_args: str) -> None
@@ -74,7 +74,7 @@ fastmcp run server.py -- --config config.json --debug
7474
- `server_spec`: Python file, object specification (file\:obj), config file, URL, or None to auto-detect
7575

7676

77-
### `inspect` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L520" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
77+
### `inspect` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L521" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
7878

7979
```python
8080
inspect(server_spec: str | None = None) -> None
@@ -105,7 +105,7 @@ fastmcp inspect # auto-detect fastmcp.json
105105
- `server_spec`: Python file to inspect, optionally with \:object suffix, or fastmcp.json
106106

107107

108-
### `prepare` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L765" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
108+
### `prepare` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L766" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
109109

110110
```python
111111
prepare(config_path: Annotated[str | None, cyclopts.Parameter(help='Path to fastmcp.json configuration file')] = None, output_dir: Annotated[str | None, cyclopts.Parameter(help='Directory to create the persistent environment in')] = None, skip_source: Annotated[bool, cyclopts.Parameter(help='Skip source preparation (e.g., git clone)')] = False) -> None
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: tasks
3+
sidebarTitle: tasks
4+
---
5+
6+
# `fastmcp.cli.tasks`
7+
8+
9+
FastMCP tasks CLI for Docket task management.
10+
11+
## Functions
12+
13+
### `check_distributed_backend` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/tasks.py#L22" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
14+
15+
```python
16+
check_distributed_backend() -> None
17+
```
18+
19+
20+
Check if Docket is configured with a distributed backend.
21+
22+
The CLI worker runs as a separate process, so it needs Redis/Valkey
23+
to coordinate with the main server process.
24+
25+
**Raises:**
26+
- `SystemExit`: If using memory\:// URL
27+
28+
29+
### `worker` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/tasks.py#L61" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
30+
31+
```python
32+
worker(server_spec: Annotated[str | None, cyclopts.Parameter(help='Python file to run, optionally with :object suffix, or None to auto-detect fastmcp.json')] = None) -> None
33+
```
34+
35+
36+
Start an additional worker to process background tasks.
37+
38+
Connects to your Docket backend and processes tasks in parallel with
39+
any other running workers. Configure via environment variables
40+
(FASTMCP_DOCKET_*).
41+

docs/python-sdk/fastmcp-client-auth-oauth.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebarTitle: oauth
77

88
## Functions
99

10-
### `check_if_auth_required` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L41" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
10+
### `check_if_auth_required` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L40" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
1111

1212
```python
1313
check_if_auth_required(mcp_url: str, httpx_kwargs: dict[str, Any] | None = None) -> bool
@@ -22,47 +22,47 @@ Check if the MCP endpoint requires authentication by making a test request.
2222

2323
## Classes
2424

25-
### `ClientNotFoundError` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L37" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
25+
### `ClientNotFoundError` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L36" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
2626

2727

2828
Raised when OAuth client credentials are not found on the server.
2929

3030

31-
### `TokenStorageAdapter` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L71" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
31+
### `TokenStorageAdapter` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L70" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
3232

3333
**Methods:**
3434

35-
#### `clear` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L99" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
35+
#### `clear` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L98" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
3636

3737
```python
3838
clear(self) -> None
3939
```
4040

41-
#### `get_tokens` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L104" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
41+
#### `get_tokens` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L103" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
4242

4343
```python
4444
get_tokens(self) -> OAuthToken | None
4545
```
4646

47-
#### `set_tokens` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L108" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
47+
#### `set_tokens` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L107" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
4848

4949
```python
5050
set_tokens(self, tokens: OAuthToken) -> None
5151
```
5252

53-
#### `get_client_info` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L116" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
53+
#### `get_client_info` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L115" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
5454

5555
```python
5656
get_client_info(self) -> OAuthClientInformationFull | None
5757
```
5858

59-
#### `set_client_info` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L122" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
59+
#### `set_client_info` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L121" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
6060

6161
```python
6262
set_client_info(self, client_info: OAuthClientInformationFull) -> None
6363
```
6464

65-
### `OAuth` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L135" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
65+
### `OAuth` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/client/auth/oauth.py#L134" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
6666

6767

6868
OAuth client provider for MCP servers with browser-based authentication.

0 commit comments

Comments
 (0)