Commit graph

889 commits

Author SHA1 Message Date
Jeremiah Lowin
e2f72d863c
chore: split v2 docs navigation into separate file (#3762) 2026-04-04 21:17:39 -04:00
marvin-context-protocol[bot]
697426b39e
chore: Update SDK documentation (#3755)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-04-03 10:44:08 -04:00
Justin Quick (C4ADS)
927a03bee1
use result.object otherwise CallToolResult not scriptable (#3753) 2026-04-03 10:17:53 -04:00
Adam Azzam
c3c41b4402
[codex] Add FastMCP docs telemetry (#3727) 2026-03-31 19:32:09 -04:00
marvin-context-protocol[bot]
4f7668807a
chore: Update SDK documentation (#3712)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-31 12:02:59 -04:00
Jeremiah Lowin
6faa2d61f8
Remove hardcoded prefab-ui version from pinning warnings (#3708) 2026-03-30 11:09:26 -04:00
marvin-context-protocol[bot]
dd8816c6cc
chore: Update SDK documentation (#3701)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-30 09:33:47 -04:00
Jeremiah Lowin
d27495960a
docs: note that custom routes are unauthenticated (#3706) 2026-03-30 09:32:38 -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
493989f231
Improve quickstart: pie chart, interactive row selection, screenshots (#3699) 2026-03-29 16:15:42 -04:00
Jeremiah Lowin
9b89eb192d
Add apps quickstart tutorial (#3695) 2026-03-29 12:08:50 -04:00
Jeremiah Lowin
60d2817245
Polish apps docs for 3.2 release (#3693) 2026-03-29 11:01:38 -04:00
Jeremiah Lowin
596210c2ba
Fix docs gaps in app provider pages (#3690) 2026-03-28 21:26:21 -04:00
Jeremiah Lowin
79821c4eff
Reorganize apps overview TOC (#3689) 2026-03-28 21:18:51 -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
d4289b27c0
Add prefab-ui version pinning warning to docs (#3688) 2026-03-28 21:15:27 -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
marvin-context-protocol[bot]
1d8a8bcf36
chore: Update SDK documentation (#3668)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-27 21:48:45 -04:00
Miguel Miranda Dias
5879119de5
fix: HTTP request headers not accessible in background task workers (#3631)
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2026-03-27 21:48:33 -04:00
Bill Easton
376a4a57e2
Docs: add FileTreeStore sanitization warnings and update examples (#3661)
Co-authored-by: Marvin Context Protocol <41898282+Marvin Context Protocol@users.noreply.github.com>
Co-authored-by: Bill Easton <strawgate@users.noreply.github.com>
2026-03-27 21:41:56 -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
c63be5d178
Add release notes for v3.1.0, v3.1.1, and v2.14.6 (#3659) 2026-03-27 14:34:13 -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
Jeremiah Lowin
ce7758e9b3
Add GenerativeUI provider, bump prefab-ui 0.14.0 (#3647) 2026-03-27 09:20:40 -04:00
Jeremiah Lowin
6c76bea3e8
Add tag to deployment pages (#3624) 2026-03-25 11:39:25 -04:00
Jeremiah Lowin
ec5de0d26f
fix(docs): correct misleading stateless_http header (#3622)
Co-authored-by: Marvin Context Protocol <41898282+Marvin Context Protocol@users.noreply.github.com>
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com>
2026-03-25 11:00:27 -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
marvin-context-protocol[bot]
352525c8e5
chore: Update SDK documentation (#3573)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-03-22 19:59:33 -04:00
Marcus Shu
2d7bc4e73d
Add encoding parameter to FileResource (#3580)
* feat: Add encoding parameter to FileResource

- Add optional encoding field (str | None, default None) to FileResource.
- Pass encoding through to read_text() for cross-platform text file reading.
- Preserve backward compatibility by defaulting to system encoding.

* test: Add tests for FileResource encoding parameter

- Test UTF-8 reading with explicit encoding for non-ASCII content.
- Test backward compatibility when no encoding is specified.
- Test that encoding is ignored for binary file reads.
- Test Latin-1 reading with matching encoding.

* docs: Document FileResource encoding parameter

- Add encoding="utf-8" to FileResource example in resource classes guide.
- Update FileResource description to mention encoding support.

* feat: Change FileResource encoding default from None to utf-8

- Default to utf-8 instead of system encoding to prevent cross-platform footgun.
- Update field description to reflect new default.
- Update test to verify default encoding is utf-8 with non-ASCII content.
- Remove redundant encoding="utf-8" from docs example since it is now the default.
2026-03-22 09:55:16 -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
f9ed06176a
fix: route ResourcesAsTools/PromptsAsTools through server middleware (#3495)
* fix: enforce auth/visibility in ResourcesAsTools and PromptsAsTools for non-FastMCP providers

🤖 Co-authored-by: Claude <noreply@anthropic.com>

* fix: honor stdio auth bypass and correct transform ordering in provider wrappers

Co-authored-by: Claude <noreply@anthropic.com>

* fix: move context/dependencies imports into function to break circular import

* fix: route ResourcesAsTools/PromptsAsTools through ctx.fastmcp

Instead of manually reimplementing auth, visibility, and session
transforms in the transform layer, tool functions now call
ctx.fastmcp.read_resource() / ctx.fastmcp.render_prompt() which
routes through the server's full middleware chain. This matches
the pattern CodeMode uses with ctx.fastmcp.call_tool().

The isinstance(provider, FastMCP) branching is removed entirely.

* feat: add _scope parameter for provider-scoped listing

AggregateProvider can now filter which child providers to query when
listing components. ResourcesAsTools and PromptsAsTools use this to
scope listings to their configured provider while still routing
through ctx.fastmcp for full middleware coverage.

The scope matching walks wrapped providers, so a
WrappedProvider(Namespace, inner=MyProvider) matches if MyProvider
is in the scope list.

* test: add coverage for ResourcesAsTools scoped to a sub-server

* fix: delegate to super() when _scope is None, add AggregateProvider to scope matching

* simplify: remove _scope machinery, route everything through ctx.fastmcp

Reverts the _scope parameter from Provider/AggregateProvider/Server.
ResourcesAsTools and PromptsAsTools now simply route through
ctx.fastmcp for all operations. Apply to a FastMCP server instance
for proper auth/visibility/middleware coverage.

Tests rewritten to use FastMCP server directly instead of raw providers.

* warn when ResourcesAsTools/PromptsAsTools is applied to a non-FastMCP provider

* docs: explain that ResourcesAsTools/PromptsAsTools should wrap a FastMCP server

* raise TypeError instead of warning when applied to non-FastMCP provider

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-03-15 16:35:54 -04:00
Matt Hallowell
943af98b0d
move stateless_http transport kwarg to http_app as FastMCP constructor no longer supports stateless_http as kwarg (#3510) 2026-03-15 11:51:43 -04:00
Jeremiah Lowin
ea529f6a49
feat: make upstream_client_secret optional in OAuthProxy (#3486)
* feat: make upstream_client_secret optional in OAuthProxy

Extract _create_upstream_oauth_client() factory method for subclass
override. Cookie signing falls back to JWT key material when no secret.

* fix: include client_id in revocation requests for public clients

* fix: use factory method for revocation auth
2026-03-15 11:14:56 -04:00
Jeremiah Lowin
9be42d9013
perf: reduce PBKDF2 iterations in tests, fix warnings and timeouts (#3504)
- Use 10 PBKDF2 iterations in test_mode (vs 1M in production) for
  JWT key derivation — cuts auth test setup from ~2.5s to <0.1s
- Add timeout(15) to subprocess-spawning tests (TestKeepAlive,
  test_mcp_config) that exceed 5s under parallel CI load
- Remove pytestmark filterwarnings overrides in tests/deprecated/
  that were leaking DeprecationWarning to test output
- Fix deprecated add_tool_transformation() usage in test_authorization
- Document new settings in settings.mdx
2026-03-14 16:42:06 -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
Jeremiah Lowin
0b8479ad73
Add verify parameter for SSL certificate configuration (#3487)
* feat: add `verify` parameter for SSL certificate configuration

* Propagate verify to OAuth preflight clients

* Propagate verify to pre-constructed OAuth instances

* Fix verify override not propagating to existing OAuth factory

* Warn when both httpx_client_factory and verify are provided

* Preserve user-provided OAuth factory when transport has verify

* Skip OAuth re-sync when transport has custom httpx_client_factory
2026-03-14 11:48:32 -04:00
Jeremiah Lowin
e2bdc9288b
Support logging/setLevel and add client_log_level setting (#3491) 2026-03-14 10:36:01 -04:00
Jeremiah Lowin
a52036ed0f
Cache component lists in ProxyProvider (#3479)
* fix: cache component lists in ProxyProvider to avoid redundant backend connections

Every call_tool through a proxy was triggering _list_tools() to resolve
the tool by name, opening a full MCP session just for the lookup, then
opening a second session for the actual execution. This caches component
lists on the ProxyProvider with a configurable TTL (default 300s),
cutting backend handshakes in half for repeated calls.

* docs: document component caching and session reuse for proxy providers

* fix: add sleep in cache TTL test for Windows clock resolution

* docs: clarify cache scope and dynamic backend guidance
2026-03-13 19:44:45 -04:00
Jeremiah Lowin
e1338e06a2 Set readOnlyHint=True on ResourcesAsTools generated tools 2026-03-13 17:32:21 -05: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
e3b6b0c470
Deprecate PromptToolMiddleware and ResourceToolMiddleware (#3389)
* Deprecate PromptToolMiddleware and ResourceToolMiddleware

* Remove deprecated middleware from docs entirely

* Remove entire Tool Injection section from middleware docs
2026-03-06 17:17:01 -05:00