From a7e3ae47bfdd88be0de4836cc5aa3b1575c47f7b Mon Sep 17 00:00:00 2001 From: zzstoatzz Date: Fri, 20 Jun 2025 17:07:19 -0500 Subject: [PATCH] fix rendering for some pages --- docs/docs.json | 8 ++++++++ docs/python-sdk/fastmcp-client-auth-oauth.mdx | 2 +- docs/python-sdk/fastmcp-server-auth-providers-bearer.mdx | 4 ++-- justfile | 4 ++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/docs.json b/docs/docs.json index 0c0677a67..2f5933cc1 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -177,9 +177,11 @@ { "group": "fastmcp.client", "pages": [ + "python-sdk/fastmcp-client-__init__", { "group": "auth", "pages": [ + "python-sdk/fastmcp-client-auth-__init__", "python-sdk/fastmcp-client-auth-bearer", "python-sdk/fastmcp-client-auth-oauth" ] @@ -196,6 +198,7 @@ { "group": "fastmcp.prompts", "pages": [ + "python-sdk/fastmcp-prompts-__init__", "python-sdk/fastmcp-prompts-prompt", "python-sdk/fastmcp-prompts-prompt_manager" ] @@ -203,6 +206,7 @@ { "group": "fastmcp.resources", "pages": [ + "python-sdk/fastmcp-resources-__init__", "python-sdk/fastmcp-resources-resource", "python-sdk/fastmcp-resources-resource_manager", "python-sdk/fastmcp-resources-template", @@ -212,13 +216,16 @@ { "group": "fastmcp.server", "pages": [ + "python-sdk/fastmcp-server-__init__", { "group": "auth", "pages": [ + "python-sdk/fastmcp-server-auth-__init__", "python-sdk/fastmcp-server-auth-auth", { "group": "providers", "pages": [ + "python-sdk/fastmcp-server-auth-providers-__init__", "python-sdk/fastmcp-server-auth-providers-bearer", "python-sdk/fastmcp-server-auth-providers-bearer_env", "python-sdk/fastmcp-server-auth-providers-in_memory" @@ -238,6 +245,7 @@ { "group": "fastmcp.tools", "pages": [ + "python-sdk/fastmcp-tools-__init__", "python-sdk/fastmcp-tools-tool", "python-sdk/fastmcp-tools-tool_manager", "python-sdk/fastmcp-tools-tool_transform" diff --git a/docs/python-sdk/fastmcp-client-auth-oauth.mdx b/docs/python-sdk/fastmcp-client-auth-oauth.mdx index d299c1a95..b8b3e64ad 100644 --- a/docs/python-sdk/fastmcp-client-auth-oauth.mdx +++ b/docs/python-sdk/fastmcp-client-auth-oauth.mdx @@ -27,7 +27,7 @@ httpx.AsyncClient (or appropriate FastMCP client/transport instance) **Args:** - `mcp_url`: Full URL to the MCP endpoint (e.g., -- `"http`: //host/mcp/sse") +- `"http`: //host/mcp/sse/") - `scopes`: OAuth scopes to request. Can be a - `client_name`: Name for this client during registration - `token_storage_cache_dir`: Directory for FileTokenStorage diff --git a/docs/python-sdk/fastmcp-server-auth-providers-bearer.mdx b/docs/python-sdk/fastmcp-server-auth-providers-bearer.mdx index d619de127..5e85ee1e9 100644 --- a/docs/python-sdk/fastmcp-server-auth-providers-bearer.mdx +++ b/docs/python-sdk/fastmcp-server-auth-providers-bearer.mdx @@ -38,7 +38,7 @@ Generate an RSA key pair for testing. #### `create_token` ```python -create_token(self, subject: str = 'fastmcp-user', issuer: str = 'https://fastmcp.example.com', audience: str | None = None, scopes: list[str] | None = None, expires_in_seconds: int = 3600, additional_claims: dict[str, Any] | None = None, kid: str | None = None) -> str +create_token(self, subject: str = 'fastmcp-user', issuer: str = 'https://fastmcp.example.com', audience: str | list[str] | None = None, scopes: list[str] | None = None, expires_in_seconds: int = 3600, additional_claims: dict[str, Any] | None = None, kid: str | None = None) -> str ``` Generate a test JWT token for testing purposes. @@ -47,7 +47,7 @@ Generate a test JWT token for testing purposes. - `private_key_pem`: RSA private key in PEM format - `subject`: Subject claim (usually user ID) - `issuer`: Issuer claim -- `audience`: Audience claim (optional) +- `audience`: Audience claim - can be a string or list of strings (optional) - `scopes`: List of scopes to include - `expires_in_seconds`: Token expiration time in seconds - `additional_claims`: Any additional claims to include diff --git a/justfile b/justfile index a27c2877f..94d7a37b0 100644 --- a/justfile +++ b/justfile @@ -16,11 +16,11 @@ docs: # Generate API reference documentation for all modules api-ref-all: - uvx --with-editable . --refresh-package mdxify mdxify@latest --all --root-module fastmcp + uv run --with-editable . --with git+https://github.com/zzstoatzz/mdxify.git@fix-navigation-structure mdxify --all --root-module fastmcp --anchor-name "SDK Reference" # Generate API reference for specific modules (e.g., just api-ref prefect.flows prefect.tasks) api-ref *MODULES: - uvx --with-editable . --refresh-package mdxify mdxify@latest {{MODULES}} --root-module fastmcp + uv run --with-editable . --with git+https://github.com/zzstoatzz/mdxify.git@fix-navigation-structure mdxify {{MODULES}} --root-module fastmcp --anchor-name "SDK Reference" # Clean up API reference documentation api-ref-clean: