Skip to content

Commit 3117846

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

6 files changed

Lines changed: 41 additions & 20 deletions

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ generate_cli_script(server_name: str, server_spec: str, transport_code: str, ext
3333
Generate the full CLI script source code.
3434

3535

36-
### `generate_skill_content` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/generate.py#L621" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
36+
### `generate_skill_content` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/generate.py#L619" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
3737

3838
```python
3939
generate_skill_content(server_name: str, cli_filename: str, tools: list[mcp.types.Tool]) -> str
@@ -43,7 +43,7 @@ generate_skill_content(server_name: str, cli_filename: str, tools: list[mcp.type
4343
Generate a SKILL.md file for a generated CLI script.
4444

4545

46-
### `generate_cli_command` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/generate.py#L672" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
46+
### `generate_cli_command` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/generate.py#L670" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
4747

4848
```python
4949
generate_cli_command(server_spec: Annotated[str, cyclopts.Parameter(help='Server URL, Python file, MCPConfig JSON, discovered name, or .js file')], output: Annotated[str, cyclopts.Parameter(help='Output file path (default: cli.py)')] = 'cli.py') -> None

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Generate a Goose deeplink for installing an MCP extension.
2929
- A goose://extension?... deeplink URL.
3030

3131

32-
### `install_goose` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/goose.py#L86" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
32+
### `install_goose` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/goose.py#L85" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
3333

3434
```python
3535
install_goose(file: Path, server_object: str | None, name: str) -> bool
@@ -49,7 +49,7 @@ Install FastMCP server in Goose via deeplink.
4949
- True if installation was successful, False otherwise.
5050

5151

52-
### `goose_command` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/goose.py#L136" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
52+
### `goose_command` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/cli/install/goose.py#L135" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
5353

5454
```python
5555
goose_command(server_spec: str) -> None

docs/python-sdk/fastmcp-server-auth-auth.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ Get routes for this provider.
254254
Creates protected resource metadata routes (RFC 9728).
255255

256256

257-
### `MultiAuth` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L504" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
257+
### `MultiAuth` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L510" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
258258

259259

260260
Composes an optional auth server with additional token verifiers.
@@ -270,7 +270,7 @@ come from the server; verifiers contribute only token verification.
270270

271271
**Methods:**
272272

273-
#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L585" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
273+
#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L591" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
274274

275275
```python
276276
verify_token(self, token: str) -> AccessToken | None
@@ -283,7 +283,7 @@ it is logged and treated as a non-match so that remaining sources
283283
still get a chance to verify the token.
284284

285285

286-
#### `set_mcp_path` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L606" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
286+
#### `set_mcp_path` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L612" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
287287

288288
```python
289289
set_mcp_path(self, mcp_path: str | None) -> None
@@ -292,7 +292,7 @@ set_mcp_path(self, mcp_path: str | None) -> None
292292
Propagate MCP path to the server and all verifiers.
293293

294294

295-
#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L614" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
295+
#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L620" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
296296

297297
```python
298298
get_routes(self, mcp_path: str | None = None) -> list[Route]
@@ -301,7 +301,7 @@ get_routes(self, mcp_path: str | None = None) -> list[Route]
301301
Delegate route creation to the server.
302302

303303

304-
#### `get_well_known_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L620" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
304+
#### `get_well_known_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L626" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
305305

306306
```python
307307
get_well_known_routes(self, mcp_path: str | None = None) -> list[Route]
@@ -313,7 +313,7 @@ This ensures that server-specific well-known route logic (e.g.,
313313
OAuthProvider's RFC 8414 path-aware discovery) is preserved.
314314

315315

316-
### `OAuthProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L631" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
316+
### `OAuthProvider` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L637" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
317317

318318

319319
OAuth Authorization Server provider.
@@ -324,7 +324,7 @@ authorization flows, token issuance, and token verification.
324324

325325
**Methods:**
326326

327-
#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L702" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
327+
#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L708" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
328328

329329
```python
330330
verify_token(self, token: str) -> AccessToken | None
@@ -342,7 +342,7 @@ to our existing load_access_token method.
342342
- AccessToken object if valid, None if invalid or expired
343343

344344

345-
#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L717" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
345+
#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L723" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
346346

347347
```python
348348
get_routes(self, mcp_path: str | None = None) -> list[Route]
@@ -358,7 +358,7 @@ This method creates the full set of OAuth routes including:
358358
- List of OAuth routes
359359

360360

361-
#### `get_well_known_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L796" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
361+
#### `get_well_known_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/auth.py#L802" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
362362

363363
```python
364364
get_well_known_routes(self, mcp_path: str | None = None) -> list[Route]

docs/python-sdk/fastmcp-server-auth-providers-jwt.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ Validate a JWT bearer token and return an AccessToken when the token is valid.
9797
- AccessToken | None: An AccessToken populated from token claims if the token is valid; `None` if the token is expired, has an invalid signature or format, fails issuer/audience/scope validation, or any other validation error occurs.
9898

9999

100-
#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/jwt.py#L515" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
100+
#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/jwt.py#L523" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
101101

102102
```python
103103
verify_token(self, token: str) -> AccessToken | None
@@ -115,7 +115,7 @@ to our existing load_access_token method.
115115
- AccessToken object if valid, None if invalid or expired
116116

117117

118-
### `StaticTokenVerifier` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/jwt.py#L531" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
118+
### `StaticTokenVerifier` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/jwt.py#L539" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
119119

120120

121121
Simple static token verifier for testing and development.
@@ -136,7 +136,7 @@ WARNING: Never use this in production - tokens are stored in plain text!
136136

137137
**Methods:**
138138

139-
#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/jwt.py#L565" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
139+
#### `verify_token` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/jwt.py#L573" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
140140

141141
```python
142142
verify_token(self, token: str) -> AccessToken | None

docs/python-sdk/fastmcp-server-auth-providers-workos.mdx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,10 +82,31 @@ IMPORTANT SETUP REQUIREMENTS:
8282
For detailed setup instructions, see:
8383
https://workos.com/docs/authkit/mcp/integrating/token-verification
8484

85+
Token audience is bound to this server automatically: when the MCP
86+
mount path becomes known (typically at ``http_app()`` construction),
87+
``JWTVerifier.audience`` is set to the resource URL advertised in
88+
``.well-known/oauth-protected-resource``. Enable Resource Indicators
89+
(RFC 8707) in your WorkOS Dashboard and list that same URL — AuthKit
90+
will then mint tokens with the matching ``aud`` claim.
91+
8592

8693
**Methods:**
8794

88-
#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/workos.py#L357" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
95+
#### `set_mcp_path` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/workos.py#L362" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
96+
97+
```python
98+
set_mcp_path(self, mcp_path: str | None) -> None
99+
```
100+
101+
Bind the default verifier's audience to this server's resource URL.
102+
103+
AuthKit with Resource Indicators (RFC 8707) mints tokens whose ``aud``
104+
claim equals the resource URL the client requested — which is the URL
105+
we advertise in ``.well-known/oauth-protected-resource``. Binding the
106+
audience here keeps validation in lock-step with what clients are sent.
107+
108+
109+
#### `get_routes` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/auth/providers/workos.py#L384" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
89110

90111
```python
91112
get_routes(self, mcp_path: str | None = None) -> list[Route]

docs/python-sdk/fastmcp-server-providers-prefab_synthesis.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ the app name + tool name). CSP on the resource is the tool's
2323

2424
## Functions
2525

26-
### `synthesize_prefab_resources` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/prefab_synthesis.py#L198" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
26+
### `synthesize_prefab_resources` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/prefab_synthesis.py#L200" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
2727

2828
```python
2929
synthesize_prefab_resources(server: FastMCP) -> list[Resource]
@@ -33,7 +33,7 @@ synthesize_prefab_resources(server: FastMCP) -> list[Resource]
3333
Return fresh synthetic Prefab resources for all prefab tools. Pure.
3434

3535

36-
### `synthesize_prefab_resource_by_uri` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/prefab_synthesis.py#L213" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
36+
### `synthesize_prefab_resource_by_uri` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/prefab_synthesis.py#L215" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
3737

3838
```python
3939
synthesize_prefab_resource_by_uri(server: FastMCP, uri: str) -> Resource | None
@@ -43,7 +43,7 @@ synthesize_prefab_resource_by_uri(server: FastMCP, uri: str) -> Resource | None
4343
Intercept a Prefab renderer URI and synthesize on demand.
4444

4545

46-
### `rewrite_tool_meta_for_wire` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/prefab_synthesis.py#L226" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
46+
### `rewrite_tool_meta_for_wire` <sup><a href="https://github.com/PrefectHQ/fastmcp/blob/main/src/fastmcp/server/providers/prefab_synthesis.py#L228" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
4747

4848
```python
4949
rewrite_tool_meta_for_wire(tool: Tool) -> Tool

0 commit comments

Comments
 (0)