Spaces:
Running
Running
zzstoatzz commited on
Commit ·
18d0508
1
Parent(s): 8e52c19
adapt to new structure
Browse files- docs/docs.json +20 -6
- docs/python-sdk/fastmcp-cli-cli.mdx +21 -0
- docs/python-sdk/fastmcp-utilities-inspect.mdx +41 -0
- docs/python-sdk/fastmcp-utilities-tests.mdx +42 -0
- justfile +1 -1
docs/docs.json
CHANGED
|
@@ -76,7 +76,9 @@
|
|
| 76 |
{
|
| 77 |
"group": "Authentication",
|
| 78 |
"icon": "shield-check",
|
| 79 |
-
"pages": [
|
|
|
|
|
|
|
| 80 |
},
|
| 81 |
"servers/middleware",
|
| 82 |
"servers/openapi",
|
|
@@ -85,7 +87,10 @@
|
|
| 85 |
{
|
| 86 |
"group": "Deployment",
|
| 87 |
"icon": "upload",
|
| 88 |
-
"pages": [
|
|
|
|
|
|
|
|
|
|
| 89 |
}
|
| 90 |
]
|
| 91 |
},
|
|
@@ -116,7 +121,10 @@
|
|
| 116 |
{
|
| 117 |
"group": "Authentication",
|
| 118 |
"icon": "user-shield",
|
| 119 |
-
"pages": [
|
|
|
|
|
|
|
|
|
|
| 120 |
}
|
| 121 |
]
|
| 122 |
},
|
|
@@ -155,13 +163,17 @@
|
|
| 155 |
},
|
| 156 |
{
|
| 157 |
"anchor": "What's New",
|
| 158 |
-
"pages": [
|
|
|
|
|
|
|
|
|
|
| 159 |
},
|
| 160 |
-
|
| 161 |
{
|
| 162 |
"anchor": "Community",
|
| 163 |
"icon": "users",
|
| 164 |
-
"pages": [
|
|
|
|
|
|
|
| 165 |
}
|
| 166 |
]
|
| 167 |
},
|
|
@@ -268,10 +280,12 @@
|
|
| 268 |
"python-sdk/fastmcp-utilities-components",
|
| 269 |
"python-sdk/fastmcp-utilities-exceptions",
|
| 270 |
"python-sdk/fastmcp-utilities-http",
|
|
|
|
| 271 |
"python-sdk/fastmcp-utilities-json_schema",
|
| 272 |
"python-sdk/fastmcp-utilities-logging",
|
| 273 |
"python-sdk/fastmcp-utilities-mcp_config",
|
| 274 |
"python-sdk/fastmcp-utilities-openapi",
|
|
|
|
| 275 |
"python-sdk/fastmcp-utilities-types"
|
| 276 |
]
|
| 277 |
}
|
|
|
|
| 76 |
{
|
| 77 |
"group": "Authentication",
|
| 78 |
"icon": "shield-check",
|
| 79 |
+
"pages": [
|
| 80 |
+
"servers/auth/bearer"
|
| 81 |
+
]
|
| 82 |
},
|
| 83 |
"servers/middleware",
|
| 84 |
"servers/openapi",
|
|
|
|
| 87 |
{
|
| 88 |
"group": "Deployment",
|
| 89 |
"icon": "upload",
|
| 90 |
+
"pages": [
|
| 91 |
+
"deployment/running-server",
|
| 92 |
+
"deployment/asgi"
|
| 93 |
+
]
|
| 94 |
}
|
| 95 |
]
|
| 96 |
},
|
|
|
|
| 121 |
{
|
| 122 |
"group": "Authentication",
|
| 123 |
"icon": "user-shield",
|
| 124 |
+
"pages": [
|
| 125 |
+
"clients/auth/oauth",
|
| 126 |
+
"clients/auth/bearer"
|
| 127 |
+
]
|
| 128 |
}
|
| 129 |
]
|
| 130 |
},
|
|
|
|
| 163 |
},
|
| 164 |
{
|
| 165 |
"anchor": "What's New",
|
| 166 |
+
"pages": [
|
| 167 |
+
"updates",
|
| 168 |
+
"changelog"
|
| 169 |
+
]
|
| 170 |
},
|
|
|
|
| 171 |
{
|
| 172 |
"anchor": "Community",
|
| 173 |
"icon": "users",
|
| 174 |
+
"pages": [
|
| 175 |
+
"community/showcase"
|
| 176 |
+
]
|
| 177 |
}
|
| 178 |
]
|
| 179 |
},
|
|
|
|
| 280 |
"python-sdk/fastmcp-utilities-components",
|
| 281 |
"python-sdk/fastmcp-utilities-exceptions",
|
| 282 |
"python-sdk/fastmcp-utilities-http",
|
| 283 |
+
"python-sdk/fastmcp-utilities-inspect",
|
| 284 |
"python-sdk/fastmcp-utilities-json_schema",
|
| 285 |
"python-sdk/fastmcp-utilities-logging",
|
| 286 |
"python-sdk/fastmcp-utilities-mcp_config",
|
| 287 |
"python-sdk/fastmcp-utilities-openapi",
|
| 288 |
+
"python-sdk/fastmcp-utilities-tests",
|
| 289 |
"python-sdk/fastmcp-utilities-types"
|
| 290 |
]
|
| 291 |
}
|
docs/python-sdk/fastmcp-cli-cli.mdx
CHANGED
|
@@ -63,3 +63,24 @@ Install a MCP server in the Claude desktop app.
|
|
| 63 |
Environment variables are preserved once added and only updated if new values
|
| 64 |
are explicitly provided.
|
| 65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
Environment variables are preserved once added and only updated if new values
|
| 64 |
are explicitly provided.
|
| 65 |
|
| 66 |
+
|
| 67 |
+
### `inspect`
|
| 68 |
+
|
| 69 |
+
```python
|
| 70 |
+
inspect(server_spec: str = typer.Argument(..., help='Python file to inspect, optionally with :object suffix'), output: Annotated[Path, typer.Option('--output', '-o', help='Output file path for the JSON report (default: server-info.json)')] = Path('server-info.json')) -> None
|
| 71 |
+
```
|
| 72 |
+
|
| 73 |
+
|
| 74 |
+
Inspect a FastMCP server and generate a JSON report.
|
| 75 |
+
|
| 76 |
+
This command analyzes a FastMCP server (v1.x or v2.x) and generates
|
| 77 |
+
a comprehensive JSON report containing information about the server's
|
| 78 |
+
name, instructions, version, tools, prompts, resources, templates,
|
| 79 |
+
and capabilities.
|
| 80 |
+
|
| 81 |
+
Examples:
|
| 82 |
+
fastmcp inspect server.py
|
| 83 |
+
fastmcp inspect server.py -o report.json
|
| 84 |
+
fastmcp inspect server.py:mcp -o analysis.json
|
| 85 |
+
fastmcp inspect path/to/server.py:app -o /tmp/server-info.json
|
| 86 |
+
|
docs/python-sdk/fastmcp-utilities-inspect.mdx
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: inspect
|
| 3 |
+
sidebarTitle: inspect
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# `fastmcp.utilities.inspect`
|
| 7 |
+
|
| 8 |
+
|
| 9 |
+
Utilities for inspecting FastMCP instances.
|
| 10 |
+
|
| 11 |
+
## Classes
|
| 12 |
+
|
| 13 |
+
### `ToolInfo`
|
| 14 |
+
|
| 15 |
+
|
| 16 |
+
Information about a tool.
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
### `PromptInfo`
|
| 20 |
+
|
| 21 |
+
|
| 22 |
+
Information about a prompt.
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
### `ResourceInfo`
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
Information about a resource.
|
| 29 |
+
|
| 30 |
+
|
| 31 |
+
### `TemplateInfo`
|
| 32 |
+
|
| 33 |
+
|
| 34 |
+
Information about a resource template.
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
### `FastMCPInfo`
|
| 38 |
+
|
| 39 |
+
|
| 40 |
+
Information extracted from a FastMCP instance.
|
| 41 |
+
|
docs/python-sdk/fastmcp-utilities-tests.mdx
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: tests
|
| 3 |
+
sidebarTitle: tests
|
| 4 |
+
---
|
| 5 |
+
|
| 6 |
+
# `fastmcp.utilities.tests`
|
| 7 |
+
|
| 8 |
+
## Functions
|
| 9 |
+
|
| 10 |
+
### `temporary_settings`
|
| 11 |
+
|
| 12 |
+
```python
|
| 13 |
+
temporary_settings(**kwargs: Any)
|
| 14 |
+
```
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
Temporarily override ControlFlow setting values.
|
| 18 |
+
|
| 19 |
+
**Args:**
|
| 20 |
+
- `**kwargs`: The settings to override, including nested settings.
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
### `run_server_in_process`
|
| 24 |
+
|
| 25 |
+
```python
|
| 26 |
+
run_server_in_process(server_fn: Callable[..., None], *args, **kwargs) -> Generator[str, None, None]
|
| 27 |
+
```
|
| 28 |
+
|
| 29 |
+
|
| 30 |
+
Context manager that runs a FastMCP server in a separate process and
|
| 31 |
+
returns the server URL. When the context manager is exited, the server process is killed.
|
| 32 |
+
|
| 33 |
+
**Args:**
|
| 34 |
+
- `server_fn`: The function that runs a FastMCP server. FastMCP servers are
|
| 35 |
+
not pickleable, so we need a function that creates and runs one.
|
| 36 |
+
- `*args`: Arguments to pass to the server function.
|
| 37 |
+
- `provide_host_and_port`: Whether to provide the host and port to the server function as kwargs.
|
| 38 |
+
- `**kwargs`: Keyword arguments to pass to the server function.
|
| 39 |
+
|
| 40 |
+
**Returns:**
|
| 41 |
+
- The server URL.
|
| 42 |
+
|
justfile
CHANGED
|
@@ -16,7 +16,7 @@ docs:
|
|
| 16 |
|
| 17 |
# Generate API reference documentation for all modules
|
| 18 |
api-ref-all:
|
| 19 |
-
|
| 20 |
|
| 21 |
# Generate API reference for specific modules (e.g., just api-ref prefect.flows prefect.tasks)
|
| 22 |
api-ref *MODULES:
|
|
|
|
| 16 |
|
| 17 |
# Generate API reference documentation for all modules
|
| 18 |
api-ref-all:
|
| 19 |
+
uv run --with-editable . --with git+https://github.com/zzstoatzz/mdxify.git@fix-nested-anchor-navigation mdxify --all --root-module fastmcp --anchor-name "Python SDK" --exclude fastmcp.contrib
|
| 20 |
|
| 21 |
# Generate API reference for specific modules (e.g., just api-ref prefect.flows prefect.tasks)
|
| 22 |
api-ref *MODULES:
|