Commit graph

232 commits

Author SHA1 Message Date
Jeremiah Lowin
5a98ceb5ca
Add v4.0.0b1 changelog and updates entries (#4681)
* Add v4.0.0b1 changelog and updates entries

* Drop meta note from b1 intro; add #4682 under enhancements

* File #4682 under fixes

* Correct the camelCase rename claim: Python model fields, not the wire

* Baseline the b1 changelog on v3.4.5

* Simplify the beta banner
2026-07-28 17:15:48 -04:00
Jeremiah Lowin
0175bc9235
Split the SDK upgrade guides by SDK version (#4684) 2026-07-28 10:47:39 -04:00
Jeremiah Lowin
4b09a040be
Unpublish v4 development notes; prep docs for beta 1 (#4644)
* Unpublish v4 development notes; prep docs for beta 1

* Nest development notes under dev-docs/

* Rewrite site-root links in dev notes as absolute URLs for GitHub rendering
2026-07-26 14:08:34 -04:00
Jeremiah Lowin
c556f07a66
Archive v3 docs and publish v4 as the primary version (#4613)
* Archive v3 docs under /v3 and publish v4 as the primary version

* Label primary docs version v4.0.0 (alpha 1)

* Add What's New in v4 page; fix upgrade-guide phrasing; point banner at What's New

* Rewrite What's New around v4's new capabilities, not the sampling deprecation

* Lead What's New with the SDK v2 engine swap and the SEPs it brings

* State ships now (link Session State); tasks arrive next alpha

* Exclude docs/v3 frozen snapshots from doc-example import validation
2026-07-23 19:47:57 -04:00
Jeremiah Lowin
8363ec4d26
Add stateless session state (UserSession / SessionId) (#4604)
* Design doc: stateless session state

* Add stateless session-state primitives: Scope, SessionCodec, scoped state

* Add SessionProvider and Session() annotation for stateless session state

* Rewrite session-state design to final shape (Session object, two patterns, no seal)

* Rework stateless session state to final Session/SessionId design

Remove Scope, SessionCodec/sealing, and scoped ctx.get_state. Add the
Session object (get/set/delete/clear over one dict per (principal,
session_id) key), injected session: Session (keyed by principal, requires
auth), session_id: SessionId argument with auto-filled description, and
SessionProvider contributing create_session/end_session.

* Rename injected marker to UserSession; auto-wire SessionProvider on SessionId

* Document stateless session state as a v4 feature

* Require SessionProvider and make sessions create-then-validate

Remove the implicit SessionProvider auto-wiring; a SessionProvider must now be
registered explicitly. create_session records an owned session and get_session
validates the id, rejecting uncreated or foreign ids.

* Add Session.id (public id for session_id sessions, None for UserSession)

* Fix ty: narrow Tool | None and ToolResult.structured_content in session tests

* Fix session-provider enforcement gap for non-local tools; stop embedding raw principal in UserSession key

* Fix disabled session_id tools blocking listing; reject local tools shadowing SessionProvider lifecycle names

* Decouple SessionId description from lifecycle tool name so it survives namespaced mounts

* Remove SessionProvider enforcement; get_session validation is the guarantee

* Fix stale enforcement/key-format docs; document store-owned session TTL

* Dedup SessionId contract description; tighten context.mdx session-state lead

* Make session store/description resolution work in Docket task workers and for partial tools

* Expose get_session as a standalone task-safe function; drop foreground-only Context.get_session

* Move get_session to dependencies alongside the other request accessors

* Reframe context state docs as Request State; cross-request persistence points to Session State

* Address UserSession injection edge cases from review

- inject a UserSession instance (not bare Session) so isinstance holds
- support session: UserSession | None = None (inject None when unauth)
- detect SessionId params past a partial's positional binding
2026-07-23 19:21:00 -04:00
Jeremiah Lowin
44d6d739ea
docs: v4 background-tasks design — rebuild on SEP-2663 as fastmcp-tasks 2026-07-21 20:18:58 -04:00
Jeremiah Lowin
f038cf3be7
Add machine-to-machine client authentication (#4583)
* Add M2M client credentials auth providers

Wrap the SDK's client_credentials and private_key_jwt OAuth providers as
FastMCP-idiomatic ClientCredentialsOAuthProvider and PrivateKeyJWTOAuthProvider,
enabling browser-free client authentication via Client(auth=...).

* Fix M2M token cache collision and explicit-scope drop

Namespace the token cache by client_id so distinct clients sharing one store don't overwrite each other's tokens; pin caller-supplied scopes so the token request keeps them; fix CodeQL URL-substring check in tests; drop unused logger.

* Preserve step-up scope union, scope-aware token cache, restore token expiry

Only pin the caller's explicit scopes on initial authorization, leaving the SDK's step-up scope union intact; namespace the token cache by requested scopes as well as client_id; restore persisted absolute expiry on init so an expired stored token is re-fetched.

* Skip expiry restore for non-expiring reloaded tokens

* Distinguish expires_in=0 from omitted when restoring expiry

* Scope step-up flag to the flow via ContextVar; runnable JWT signing example
2026-07-21 12:27:08 -04:00
Jeremiah Lowin
7417e974f4
Let a server answer argument-completion requests (#4582)
* Add server-side argument completion (@mcp.completion)

* Reference CompletionValues directly in cast so the import reads as used

* Import completion types from mcp_types, not the fastmcp.types mirror

* Fix test imports after dropping the fastmcp.types mirror

* Fix change-register example import after dropping the types mirror

* Enforce 100-value completion cap; make docs example runnable

* Document completion authorization contract

* Offload sync completion handlers to threadpool

* Exclude bare str from completion return type

* Pass Any-typed value in bare-string rejection test

* Point completion authoring types to mcp_types in v4 notes
2026-07-21 12:26:24 -04:00
Jeremiah Lowin
998b37f32b
Add server-side identity assertion (SEP-990 ID-JAG) (#4483)
* Add server-side SEP-990 identity assertion (ID-JAG)

* Test SEP-990 identity assertion token endpoint

* Format identity assertion test

* Document SEP-990 identity assertion

* Thread identity_assertion through OIDCProxy

* Harden ID-JAG: authoritative scopes and grant-type enforcement

Scopes for the issued token now derive only from the signed assertion (or server policy when it omits scopes); the client-supplied request scope may narrow but never widen them. Enforce the registered grant-type constraint the SDK check bypassed, and have proxy DCR add the jwt-bearer grant to registered clients when identity assertion is enabled.

* Harden ID-JAG: honor nbf, reject non-object payload, bound jti cache, preserve required_scopes

* Document per-process ID-JAG replay limitation and nbf check

* Harden ID-JAG round 3: resource indicator, non-object header, algorithm config

- Honor RFC 8707 resource on the jwt-bearer grant (invalid_target on
  mismatch), mirroring authorize()'s invariant incl. skip-when-unconfigured
- Reject JSON-array JOSE headers with invalid_grant instead of a 500
- Add IdentityAssertion.algorithm so ES256/PS256 issuers can be verified
  (JWTVerifier otherwise defaults to RS256)

* Bind ID-JAG exchange to the assertion's signed client_id and resource

SEP-990: the IdP signs which client and which resource the assertion was
minted for. With public proxy clients the presented client_id is
self-asserted, so the signed binding is what stops client B redeeming
client A's leaked assertion — and the signed resource claim stops an
assertion for server A being redeemed at server B behind the same IdP.

* Harden ID-JAG round 4: check bindings before jti consumption; validate temporal claims, algorithm, and discovery body

- Move the client_id/resource binding checks into the validator itself,
  before jti is recorded as consumed, so an assertion presented with the
  wrong binding is rejected without burning replay protection for whoever
  it actually belongs to
- Reject non-numeric exp/iat/nbf with invalid_grant instead of a 500
- Validate IdentityAssertion.algorithm at config time (must be an
  asymmetric JWS algorithm verifiable via JWKS)
- Reject a non-object OIDC discovery body with invalid_grant instead of a 500
- Centralize the resource-URL comparison helpers used by both the
  validator and OAuthProxy.authorize()

* Rebase onto httpx2/SDK b2 and harden ID-JAG round 5

- Migrate identity assertion + tests to httpx2 and the local httpx2_mock
  (legacy httpx is now banned; pytest-httpx no longer intercepts)
- Add is_optional to the shared httpx2_mock, mirroring pytest-httpx
- Tighten the algorithm allowlist to JWTVerifier's exact supported set
  (prefix check accepted typos like RS999 -> 500 on first exchange)
- Reject non-string jti before the cache lookup (unhashable -> 500)
- Track revocation for self-contained ID-JAG tokens: revoke_token records
  the jti and load_access_token rejects it until natural expiry
- Dedupe resource-URL helpers: proxy now imports the shared
  normalize_resource_url/server_url_has_query from identity_assertion

* Advertise 'none' token-endpoint auth method when ID-JAG is enabled without CIMD

DCR clients are public, so metadata consumers must see 'none' to use the
advertised jwt-bearer grant; previously only the CIMD path added it.

* Document 2026-07-28 protocol support as a distinct feature catalog

SEP-990 identity assertion leads: the SDK provides the wire contract and
provider hook; FastMCP provides the complete server-side implementation.
Inventories the full modern-era capability set for v4.

* Harden ID-JAG round 6: lazy re-export, dual-form audience, per-issuer algorithms, discovery backoff

- IdentityAssertion re-exported lazily from server.auth (the eager import
  bypassed the package's documented lazy-import boundary)
- Accept the ID-JAG aud both with and without base_url's trailing slash;
  metadata advertises the slashed form, so IdPs echoing it verbatim work
- algorithms={issuer: alg} per-issuer override, mirroring jwks_uris
- OIDC discovery serializes per-issuer and backs off 30s after a failure
  (discovery runs pre-signature, so garbage could amplify into HTTP floods)
2026-07-18 19:52:15 -04:00
Jeremiah Lowin
00cab8ba8f
Fix docs banner contrast (#4522)
* Fix docs banner contrast

* Banner: readable animated brand-rainbow in both themes
2026-07-18 15:38:03 -04:00
Jeremiah Lowin
9f251bad00
Forward-port Hugging Face auth provider (#4475) 2026-07-08 20:56:07 -04:00
Jeremiah Lowin
3522a98766
Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
Diogo Santos
989f6f8bde
docs: add tool fingerprinting recipe for stable schema hashing (#4233)
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2026-05-27 10:52:14 -04:00
Jeremiah Lowin
a25ca12a41
Restore Horizon docs banner (#4240) 2026-05-26 14:09:10 -04:00
Jeremiah Lowin
70013c5a91
Add fastmcp-remote bridge package (#4208) 2026-05-23 10:04:21 -04:00
Jeremiah Lowin
7a82b57efb
Document pip upgrade recovery for the fastmcp-slim package split (#4215) 2026-05-22 20:21:28 -04:00
Jeremiah Lowin
bb4894d215
Add fastmcp-slim for client-only installs (#4122)
* Add fastmcp-client workspace package

* Fix client package static checks

* Document client-only package

* Harden fastmcp-client package split

* Preserve forwarded headers in full package

* Switch to fastmcp-slim package

* Fix fastmcp-slim release edges

* Match pydantic-style slim layout

* Polish fastmcp-slim packaging
2026-05-11 17:13:21 -04:00
Mukunda Rao Katta
f5dea2a17c
docs(integrations): add Pydantic AI FastMCP toolset guide (#4070)
* docs(integrations): add Pydantic AI FastMCP toolset guide

* docs(integrations): add Pydantic AI to AI SDKs nav
2026-05-04 12:22:17 -04:00
Bill Easton
4be46c6fa6
Add a sandboxed-agents deployment guide (#4027)
* Add sandboxed agents deployment guide

* Tighten sandboxed agents guide

* Refine sandboxed agents docs flow

---------

Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2026-04-25 11:40:56 -04:00
Jeremiah Lowin
e1ea695d68
Restructure docs navigation (#3951)
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com>
Co-authored-by: Marvin Context Protocol <41898282+Marvin Context Protocol@users.noreply.github.com>
2026-04-17 16:42:39 -04:00
Jeremiah Lowin
b732a4a516
Overhaul apps docs (#3915) 2026-04-13 21:24:00 -04:00
Stephan Eberle
99bf81c64f
Add Keycloak OAuth Provider for Enterprise Authentication and local dev (#1937) 2026-04-13 12:23:10 -04:00
Jeremiah Lowin
eac646e744
chore: split SDK navigation into standalone $ref file (#3773) 2026-04-06 11:18:14 -04:00
Jeremiah Lowin
e2f72d863c
chore: split v2 docs navigation into separate file (#3762) 2026-04-04 21:17:39 -04:00
Adam Azzam
c3c41b4402
[codex] Add FastMCP docs telemetry (#3727) 2026-03-31 19:32:09 -04:00
Jeremiah Lowin
4a54be2d5f
Add examples gallery page (#3705) 2026-03-30 09:21:32 -04:00
marvin-context-protocol[bot]
85b7efd746
chore: Update SDK documentation (#3694)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-29 21:03:58 -04:00
Jeremiah Lowin
60d2817245
Polish apps docs for 3.2 release (#3693) 2026-03-29 11:01:38 -04:00
marvin-context-protocol[bot]
3354c40992
chore: Update SDK documentation (#3670)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-28 21:15:58 -04:00
Jeremiah Lowin
2c08edecec
Add FormInput provider, bump prefab-ui to 0.15.0 (#3687) 2026-03-28 21:15:13 -04:00
Jeremiah Lowin
beb35a4ed8
Add Approval and Choice providers (#3686) 2026-03-28 20:58:17 -04:00
Jeremiah Lowin
5338629474
Add FileUpload provider (#3669) 2026-03-28 19:45:43 -04:00
Jeremiah Lowin
3e1aadb282
Docs: showcase hero, narrative improvements, panel closed by default (#3657) 2026-03-27 14:39:32 -04:00
Jeremiah Lowin
8ff28c13fa
Fix blocking docs issues: chart imports, Select API, Rx consistency (#3652) 2026-03-27 10:32:22 -04:00
Jeremiah Lowin
426572670e
Docs: generative UI page, fix imports, add PrefabAppConfig (#3650) 2026-03-27 10:18:58 -04:00
marvin-context-protocol[bot]
145dbbfb4c
chore: Update SDK documentation (#3615)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-25 10:58:34 -04:00
marvin-context-protocol[bot]
c04c9d0ce5
chore: Update SDK documentation (#3592)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-24 20:26:38 -04:00
Jeremiah Lowin
c04ce8972f
Apps Phase 1: docs, examples, app-only tool filtering (#3593)
* Apps Phase 1: docs, examples, app-only tool filtering, Rx() migration

* Clarify architecture page is Prefab-specific

* Fix component reference inaccuracies and DataTable search prop

- Charts import: clarify they must come from prefab_ui.components.charts
- DataTable: searchable→search (the actual prop name), remove nonexistent
  table-level sortable prop
- Select: remove nonexistent options prop, show SelectOption children
- Tabs: default_value→value
- Fix search=True in inventory, patterns, datatable examples

* Consistent Rx usage across all examples, fix imports

* Address review: fix chart imports, Select import, docstring --stdio claims
2026-03-24 13:35:29 -04:00
Jeremiah Lowin
1be9b4d39c
Comprehensive MCP Apps docs, string CallTool resolution (#3575)
* Comprehensive MCP Apps docs, string CallTool resolution, bump prefab-ui >=0.13.0

Rewrites the apps documentation as a learning journey: overview → Prefab apps
→ FastMCPApp → patterns → dev tools → custom HTML. Adds a new FastMCPApp page
covering composable apps with @app.tool()/@app.ui(), CallTool, forms, actions,
and composition. Teaches Rx() and set_initial_state() as the primary state API.

Adds string-based CallTool resolution so CallTool("save_contact") resolves to
the tool's global key, matching callable ref behavior. Requires prefab-ui 0.13.0
which passes strings through the tool resolver.

* Detect ambiguous string CallTool resolution across apps

* Simplify string name registry to plain dict (last-write-wins)
2026-03-21 19:44:11 -04:00
marvin-context-protocol[bot]
55094fd49b
chore: Update SDK documentation (#3551)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-18 18:48:36 -04:00
marvin-context-protocol[bot]
754fb01088
chore: Update SDK documentation (#3541)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-18 10:38:33 -04:00
marvin-context-protocol[bot]
25d550caf1
chore: Update SDK documentation (#3478)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-15 16:51:51 -04:00
Jeremiah Lowin
e35a74f004
Add fastmcp dev apps command with browser UI preview (#3489)
* Add FastMCPApp — a Provider for composable MCP applications

* Wire Prefab callable resolver via to_json(tool_resolver=) parameter

* Remove inspect.signature compat check, use try/except until prefab 0.10.0

* Address review: fix add_tool registry gaps, normalize auth errors, bump prefab to 0.10.0

* Register global key after _add_component succeeds

* Simplify: extract decorator dispatch, use get_fastmcp_meta, expose get_global_tool

* Remove prek from Marvin workflows

These workflows run Claude to respond to /marvin mentions — linting
the repo is unnecessary and fails without renderer deps installed.

* Return ResolvedTool from callable resolver, add contacts example

The callable resolver now returns ResolvedTool (from prefab_ui) instead of a
plain string, carrying metadata like unwrap_result that the renderer needs to
correctly handle structuredContent envelopes. The unwrap_result flag is derived
from the tool's x-fastmcp-wrap-result output schema marker.

* Bump prefab-ui requirement to >=0.11.0

* Remove stale ty ignore comments now that prefab-ui 0.11 is published

* Add fastmcp dev apps command with browser UI preview

* Improve fastmcp dev apps: dropdown picker, reload flag, process cleanup

- Replace Tabs with Pages+Select for tool picker (Rx-based reactive state)
- Add --reload/--no-reload flag (default: True) to fastmcp dev apps
- Kill entire process group on shutdown so port 8000 is freed properly
- Suppress uvicorn websockets deprecation warning (websockets-sansio)
- Bump prefab-ui to >=0.11.1 (fixes get_renderer_head bug in 0.11.0)
- Add farewell tool to greet_server example for multi-tool testing

* Add docs for fastmcp dev apps command

* Fix orphaned server on startup failure, guard Unix-only signal handling

* Show tool title in picker, remove editable prefab source

* Bump prefab-ui to >=0.11.2

* Fail fast when prefab-ui is not installed

* Add apps/development docs, link from prefab and sidebar

* Fix optional field defaults, fail with non-zero on startup timeout
2026-03-14 12:29:37 -04:00
marvin-context-protocol[bot]
2c451bf6ba
chore: Update SDK documentation (#3378)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-13 18:07:14 -04:00
Jeremiah Lowin
d4a8354ba2
Add settings and environment variables reference (#3384)
* Add settings reference page

* Note .env caveat for nested Docket settings
2026-03-04 15:29:31 -05:00
marvin-context-protocol[bot]
d8e6540f24 chore: Update SDK documentation 2026-03-03 17:03:23 -05:00
Jeremiah Lowin
0cfc9399d7 Update docs banner and fix mobile layout
Replace PyAI Conf banner with Prefect Horizon banner. Add mobile
media query to reduce banner font size and padding so text stays
on one line at narrow viewports.
2026-03-03 14:34:49 -05:00
Jeremiah Lowin
8bc31360e8
Restructure docs navigation: CLI section, Composition, More (#3361)
* WIP: Move mounting docs to servers/composition, remove deprecated import_server content

* WIP: Add CLI section under More, move testing to Features, restructure nav

* WIP: Rename querying to client, remove factory functions from CLI overview

* WIP: Promote CLI to top-level section, move Upgrading to More

* WIP: Rename CLI installing page to install-mcp

* WIP

* Add Google Gemini sampling handler docs, fix version badges
2026-03-02 21:09:48 -05:00
marvin-context-protocol[bot]
902b63f676
chore: Update SDK documentation (#3313)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-02 17:27:38 -05:00
Jeremiah Lowin
59da3e4ed4
Decompose CodeMode into composable discovery tools (#3354)
* Decompose CodeMode into composable discovery tools

CodeMode now owns only the execute sandbox. Discovery tools (search,
get_schema, etc.) are composable via the discovery_tools parameter.
Each is a Callable[[GetToolCatalog], Tool] factory.

Ships SearchTool (lightweight name+description results) and SchemaTool
(brief markdown or full JSON schemas by tool name) as built-in defaults.

* Rename to Search/GetSchemas/Tags, add tag filtering, fix bugs

- Rename SearchTool→Search, SchemaTool→GetSchemas, Categories→Tags
- Add tags parameter to Search for LLM-side tag filtering
- Add Tags discovery tool for browsing tools by tag
- Fix shared singleton default factories (now per-instance)
- Fix get_schema full mode returning invalid JSON on partial matches
- Fix "untagged" filter inconsistency between Tags and Search
- Split serialization tests to comply with loq line limit
- Rewrite docs for conceptual clarity

* Add three-tier detail levels, remove default_arguments, rename Tags→GetTags, rewrite docs

* Clean up __all__ exports, return valid JSON for empty full-detail results
2026-03-02 16:35:55 -05:00