Skip to content

Commit 85cc51f

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

26 files changed

+403
-260
lines changed

docs/docs.json

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,10 @@
119119
{
120120
"group": "Essentials",
121121
"icon": "cube",
122-
"pages": ["clients/client", "clients/transports"]
122+
"pages": [
123+
"clients/client",
124+
"clients/transports"
125+
]
123126
},
124127
{
125128
"group": "Core Operations",
@@ -145,7 +148,10 @@
145148
{
146149
"group": "Authentication",
147150
"icon": "user-shield",
148-
"pages": ["clients/auth/oauth", "clients/auth/bearer"]
151+
"pages": [
152+
"clients/auth/oauth",
153+
"clients/auth/bearer"
154+
]
149155
}
150156
]
151157
},
@@ -224,12 +230,17 @@
224230
},
225231
{
226232
"anchor": "What's New",
227-
"pages": ["updates", "changelog"]
233+
"pages": [
234+
"updates",
235+
"changelog"
236+
]
228237
},
229238
{
230239
"anchor": "Community",
231240
"icon": "users",
232-
"pages": ["community/showcase"]
241+
"pages": [
242+
"community/showcase"
243+
]
233244
}
234245
],
235246
"tab": "Documentation"
@@ -327,6 +338,7 @@
327338
"python-sdk/fastmcp-server-auth-providers-workos"
328339
]
329340
},
341+
"python-sdk/fastmcp-server-auth-redirect_validation",
330342
"python-sdk/fastmcp-server-auth-registry"
331343
]
332344
},
@@ -367,6 +379,7 @@
367379
"python-sdk/fastmcp-utilities-cli",
368380
"python-sdk/fastmcp-utilities-components",
369381
"python-sdk/fastmcp-utilities-exceptions",
382+
"python-sdk/fastmcp-utilities-fastmcp_config",
370383
"python-sdk/fastmcp-utilities-http",
371384
"python-sdk/fastmcp-utilities-inspect",
372385
"python-sdk/fastmcp-utilities-json_schema",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Claude app integration utilities.
1010

1111
## Functions
1212

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

1515
```python
1616
get_claude_config_path() -> Path | None
@@ -20,7 +20,7 @@ get_claude_config_path() -> Path | None
2020
Get the Claude config directory based on platform.
2121

2222

23-
### `update_claude_config` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/claude.py#L32" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
23+
### `update_claude_config` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/claude.py#L33" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
2424

2525
```python
2626
update_claude_config(file_spec: str, server_name: str) -> bool

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

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

1111
## Functions
1212

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

1515
```python
1616
version()
@@ -20,45 +20,47 @@ version()
2020
Display version information and platform details.
2121

2222

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

2525
```python
26-
dev(server_spec: str) -> None
26+
dev(server_spec: str | None = None) -> None
2727
```
2828

2929

3030
Run an MCP server with the MCP Inspector for development.
3131

3232
**Args:**
33-
- `server_spec`: Python file to run, optionally with \:object suffix
33+
- `server_spec`: Python file to run, optionally with \:object suffix, or None to auto-detect fastmcp.json
3434

3535

36-
### `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>
36+
### `run` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L319" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
3737

3838
```python
39-
run(server_spec: str, *server_args: str) -> None
39+
run(server_spec: str | None = None, *server_args: str) -> None
4040
```
4141

4242

4343
Run an MCP server or connect to a remote one.
4444

45-
The server can be specified in four ways:
45+
The server can be specified in several ways:
4646
1. Module approach: "server.py" - runs the module directly, looking for an object named 'mcp', 'server', or 'app'
4747
2. Import approach: "server.py:app" - imports and runs the specified server object
4848
3. URL approach: "http://server-url" - connects to a remote server and creates a proxy
4949
4. MCPConfig file: "mcp.json" - runs as a proxy server for the MCP Servers in the MCPConfig file
50+
5. FastMCP config: "fastmcp.json" - runs server using FastMCP configuration
51+
6. No argument: looks for fastmcp.json in current directory
5052

5153
Server arguments can be passed after -- :
5254
fastmcp run server.py -- --config config.json --debug
5355

5456
**Args:**
55-
- `server_spec`: Python file, object specification (file\:obj), MCPConfig file, or URL
57+
- `server_spec`: Python file, object specification (file\:obj), config file, URL, or None to auto-detect
5658

5759

58-
### `inspect` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L439" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
60+
### `inspect` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/cli.py#L582" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
5961

6062
```python
61-
inspect(server_spec: str) -> None
63+
inspect(server_spec: str | None = None) -> None
6264
```
6365

6466

@@ -74,7 +76,9 @@ fastmcp inspect server.py
7476
fastmcp inspect server.py -o report.json
7577
fastmcp inspect server.py:mcp -o analysis.json
7678
fastmcp inspect path/to/server.py:app -o /tmp/server-info.json
79+
fastmcp inspect fastmcp.json
80+
fastmcp inspect # auto-detect fastmcp.json
7781

7882
**Args:**
79-
- `server_spec`: Python file to inspect, optionally with \:object suffix
83+
- `server_spec`: Python file to inspect, optionally with \:object suffix, or fastmcp.json
8084

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Claude Code integration for FastMCP install using Cyclopts.
1010

1111
## Functions
1212

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

1515
```python
1616
find_claude_command() -> str | None
@@ -23,7 +23,7 @@ Checks common installation locations since 'claude' is often a shell alias
2323
that doesn't work with subprocess calls.
2424

2525

26-
### `check_claude_code_available` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/claude_code.py#L67" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
26+
### `check_claude_code_available` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/claude_code.py#L68" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
2727

2828
```python
2929
check_claude_code_available() -> bool
@@ -33,7 +33,7 @@ check_claude_code_available() -> bool
3333
Check if Claude Code CLI is available.
3434

3535

36-
### `install_claude_code` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/claude_code.py#L72" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
36+
### `install_claude_code` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/claude_code.py#L73" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
3737

3838
```python
3939
install_claude_code(file: Path, server_object: str | None, name: str) -> bool
@@ -57,7 +57,7 @@ Install FastMCP server in Claude Code.
5757
- True if installation was successful, False otherwise
5858

5959

60-
### `claude_code_command` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/claude_code.py#L170" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
60+
### `claude_code_command` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/claude_code.py#L163" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
6161

6262
```python
6363
claude_code_command(server_spec: str) -> None

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Claude Desktop integration for FastMCP install using Cyclopts.
1010

1111
## Functions
1212

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

1515
```python
1616
get_claude_config_path() -> Path | None
@@ -20,7 +20,7 @@ get_claude_config_path() -> Path | None
2020
Get the Claude config directory based on platform.
2121

2222

23-
### `install_claude_desktop` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/claude_desktop.py#L37" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
23+
### `install_claude_desktop` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/claude_desktop.py#L38" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
2424

2525
```python
2626
install_claude_desktop(file: Path, server_object: str | None, name: str) -> bool
@@ -44,7 +44,7 @@ Install FastMCP server in Claude Desktop.
4444
- True if installation was successful, False otherwise
4545

4646

47-
### `claude_desktop_command` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/claude_desktop.py#L143" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
47+
### `claude_desktop_command` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/claude_desktop.py#L135" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
4848

4949
```python
5050
claude_desktop_command(server_spec: str) -> None

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

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Cursor integration for FastMCP install using Cyclopts.
1010

1111
## Functions
1212

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

1515
```python
1616
generate_cursor_deeplink(server_name: str, server_config: StdioMCPServer) -> str
@@ -27,7 +27,7 @@ Generate a Cursor deeplink for installing the MCP server.
2727
- Deeplink URL that can be clicked to install the server
2828

2929

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

3232
```python
3333
open_deeplink(deeplink: str) -> bool
@@ -43,7 +43,32 @@ Attempt to open a deeplink URL using the system's default handler.
4343
- True if the command succeeded, False otherwise
4444

4545

46-
### `install_cursor` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/cursor.py#L67" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
46+
### `install_cursor_workspace` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/cursor.py#L68" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
47+
48+
```python
49+
install_cursor_workspace(file: Path, server_object: str | None, name: str, workspace_path: Path) -> bool
50+
```
51+
52+
53+
Install FastMCP server to workspace-specific Cursor configuration.
54+
55+
**Args:**
56+
- `file`: Path to the server file
57+
- `server_object`: Optional server object name (for \:object suffix)
58+
- `name`: Name for the server in Cursor
59+
- `workspace_path`: Path to the workspace directory
60+
- `with_editable`: Optional directory to install in editable mode
61+
- `with_packages`: Optional list of additional packages to install
62+
- `env_vars`: Optional dictionary of environment variables
63+
- `python_version`: Optional Python version to use
64+
- `with_requirements`: Optional requirements file to install from
65+
- `project`: Optional project directory to run within
66+
67+
**Returns:**
68+
- True if installation was successful, False otherwise
69+
70+
71+
### `install_cursor` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/cursor.py#L159" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
4772

4873
```python
4974
install_cursor(file: Path, server_object: str | None, name: str) -> bool
@@ -62,12 +87,13 @@ Install FastMCP server in Cursor.
6287
- `python_version`: Optional Python version to use
6388
- `with_requirements`: Optional requirements file to install from
6489
- `project`: Optional project directory to run within
90+
- `workspace`: Optional workspace directory for project-specific installation
6591

6692
**Returns:**
6793
- True if installation was successful, False otherwise
6894

6995

70-
### `cursor_command` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/cursor.py#L153" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
96+
### `cursor_command` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/cursor.py#L254" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
7197

7298
```python
7399
cursor_command(server_spec: str) -> None

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ MCP configuration JSON generation for FastMCP install using Cyclopts.
1010

1111
## Functions
1212

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

1515
```python
1616
install_mcp_json(file: Path, server_object: str | None, name: str) -> bool
@@ -35,7 +35,7 @@ Generate MCP configuration JSON for manual installation.
3535
- True if generation was successful, False otherwise
3636

3737

38-
### `mcp_json_command` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/mcp_json.py#L116" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
38+
### `mcp_json_command` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/mcp_json.py#L108" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
3939

4040
```python
4141
mcp_json_command(server_spec: str) -> None

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Shared utilities for install commands.
1010

1111
## Functions
1212

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

1515
```python
1616
parse_env_var(env_var: str) -> tuple[str, str]
@@ -20,7 +20,7 @@ parse_env_var(env_var: str) -> tuple[str, str]
2020
Parse environment variable string in format KEY=VALUE.
2121

2222

23-
### `process_common_args` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/shared.py#L26" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
23+
### `process_common_args` <sup><a href="https://github.com/jlowin/fastmcp/blob/main/src/fastmcp/cli/install/shared.py#L29" target="_blank"><Icon icon="github" style="width: 14px; height: 14px;" /></a></sup>
2424

2525
```python
2626
process_common_args(server_spec: str, server_name: str | None, with_packages: list[str], env_vars: list[str], env_file: Path | None) -> tuple[Path, str | None, str, list[str], dict[str, str] | None]
@@ -29,3 +29,5 @@ process_common_args(server_spec: str, server_name: str | None, with_packages: li
2929

3030
Process common arguments shared by all install commands.
3131

32+
Handles both fastmcp.json config files and traditional file.py:object syntax.
33+

0 commit comments

Comments
 (0)