Commit graph

883 commits

Author SHA1 Message Date
Jeremiah Lowin
4262cfc16a
Add fastmcp generate-cli command (#3065)
* Add `fastmcp generate-cli` command

Connects to any MCP server, reads its tool/resource/prompt schemas,
and writes a standalone Python CLI script with typed subcommands.

* docs: add generate-cli documentation

* docs: add generate-cli documentation; skip Windows executable test

* fix: address PR review feedback

- Sanitize tool and parameter names to valid Python identifiers
- Replace bare except Exception with specific exception types
- Escape server name in generated string literals
- Handle trailing colon edge case in _derive_server_name
- Clarify in docs that generated CLI is a client, not a bundled server

* Fix string escaping issues in generate-cli

- Use single-quoted docstrings to avoid triple-quote escaping issues
- Escape quotes in app_name derived from server_name
- Add tests for descriptions with quotes and server names with quotes

Addresses CodeRabbit review comments about insufficient escaping.

* Implement smart parameter handling for generate-cli

- Simple types (str, int, float, bool): Direct typed flags
- Arrays of simple types (list[str], list[int]): Repeatable flags via cyclopts
- Complex types (objects, nested arrays): Accept JSON strings with parsing
- JSON schema shown in help text for complex parameters
- Proper escaping of newlines and quotes in help text
- Filter out None and empty list defaults when calling tools

This gives typed, discoverable CLIs for common cases while handling
complex schemas via JSON input.

* Update generate-cli docs to explain smart parameter handling

- Document simple types as direct typed flags
- Document arrays of simple types as repeatable flags
- Document complex types as JSON strings with schema in help
- Add examples showing all three patterns

* Fix Codex review issues in generate-cli

High priority fixes:
- Complex type defaults: Serialize dict/list defaults to JSON strings
- List params: Preserve help metadata with Annotated wrapper
- Name collisions: Detect and error on sanitized name conflicts
- JSON parsing: Use isinstance check for safety with defaults

Added tests for:
- Complex types with default values
- Parameter name collision detection
- Updated existing tests to match new format

* Use pydantic_core.to_json for consistency

- Generator now uses pydantic_core.to_json() instead of json.dumps()
- Consistent with rest of fastmcp codebase
- Generated CLI still uses plain json module (standalone script)

* Move local imports to module level in generate-cli

* Handle union item types and Python keyword collisions in generate-cli
2026-02-03 21:08:51 -05:00
marvin-context-protocol[bot]
f6988c9206
chore: Update SDK documentation (#2995)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-02-03 21:08:20 -05:00
Jeremiah Lowin
5fd41b2e15
Remove OpenAPI timeout parameter, make client optional, surface timeout errors (#3067)
* Remove OpenAPI timeout param, make client optional, surface timeout errors

* Close auto-created httpx client via provider lifespan
2026-02-03 21:08:09 -05:00
Jeremiah Lowin
fe432de156
Add release notes for v2.14.4 and v2.14.5 (#3064) 2026-02-03 10:47:06 -05:00
Jeremiah Lowin
b076b2154c
Add AzureJWTVerifier for Managed Identity token verification (#3058) 2026-02-02 19:59:13 -05:00
Jeremiah Lowin
adf21ac630
Add fastmcp discover and name-based server resolution (#3055) 2026-02-01 21:27:22 -05:00
Jeremiah Lowin
bd37763e98
Add fastmcp list and fastmcp call CLI commands (#3054) 2026-02-01 18:30:14 -05:00
Bill Easton
6b1394ebf8
Merge branch 'main' into fix-typos-b 2026-01-31 15:01:57 -06:00
Jeremiah Lowin
1bbbee37a6
feat: add fastmcp install goose command (#3040) 2026-01-31 10:53:24 -05:00
Jeremiah Lowin
12cb58f220
MCP Apps: structured CSP/permissions types, resource meta propagation fix, QR example (#3031) 2026-01-30 14:05:25 -05:00
Jeremiah Lowin
2629631536
docs: document expanded reload behavior and restructure beta sections (#3039)
Co-authored-by: claude[bot] <41898282+claude[bot]@users.noreply.github.com>
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com>
2026-01-30 13:51:24 -05:00
Jeremiah Lowin
003df5b22b
Add fastmcp install stdio command (#3032) 2026-01-29 22:19:15 -05:00
Jeremiah Lowin
d52534ae32
Add MCP Apps Phase 1 — SDK compatibility (SEP-1865) (#3009) 2026-01-29 16:28:03 -05:00
Jonas Krüger Svensson
8b3010825e
fix: automatically include offline_access as a scope in the Azure provider to enable automatic token refreshing (#3001)
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2026-01-29 09:15:09 -05:00
Didier Durand
96280b3d2c
[Doc]: fixing spelling issues in multiple files 2026-01-23 07:17:38 +01:00
marvin-context-protocol[bot]
fde9068efb
chore: Update SDK documentation (#2990)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-01-22 19:41:15 -05:00
Jeremiah Lowin
c1f50e49be
Add enabled field to ToolTransformConfig (#2991) 2026-01-22 17:44:38 -05:00
marvin-context-protocol[bot]
1ad3704e17
chore: Update SDK documentation (#2979)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-01-22 09:23:29 -05:00
Jeremiah Lowin
884b81a0f8
Add dependency injection documentation and DI-style dependencies (#2980) 2026-01-22 09:08:20 -05:00
Jeremiah Lowin
41c56481af
Pin httpx < 1.0 and simplify beta install docs (#2975) 2026-01-21 21:08:46 -05:00
Jeremiah Lowin
62cc28c7b0
Update FastMCP Cloud references to Prefect Horizon (#2978) 2026-01-21 20:52:08 -05:00
Jeremiah Lowin
6efbc5db1d
Restructure README and docs with motivated narrative (#2964) 2026-01-20 22:30:57 -05:00
Jeremiah Lowin
27d318810f
Fix FastAPI mounting examples in docs (#2962) 2026-01-20 17:58:39 -05:00
Jeremiah Lowin
287ae44ff3
Restructure README and welcome page with motivated narrative (#2963) 2026-01-20 17:58:10 -05:00
Jeremiah Lowin
1a61361764
Update brand images (#2960) 2026-01-20 10:52:30 -05:00
Jeremiah Lowin
abccd53573
Update example MCP version in installation docs (#2959) 2026-01-20 09:24:31 -05:00
Jeremiah Lowin
4b1a7f51b0
Remove pip --pre warning from installation docs (#2958)
Co-authored-by: Claude <noreply@anthropic.com>
2026-01-20 08:40:24 -05:00
Jeremiah Lowin
6dba73b69d
Restructure docs: move transforms to dedicated section (#2956) 2026-01-20 00:38:35 -05:00
Jeremiah Lowin
2cf7b0b0d7
Update version dropdown (#2955) 2026-01-20 00:17:48 -05:00
Jeremiah Lowin
0be4cda159
Prepare docs for v3.0 beta release (#2954) 2026-01-20 00:13:18 -05:00
Jeremiah Lowin
c14ef132da
Clarify installation for FastMCP 3.0 beta (#2953) 2026-01-19 23:24:47 -05:00
Jeremiah Lowin
3df38584cf
Fix broken documentation links (#2952) 2026-01-19 23:17:29 -05:00
Jeremiah Lowin
3af9de197a
Restructure documentation for FastMCP 3.0 (#2951) 2026-01-19 21:33:35 -05:00
marvin-context-protocol[bot]
8596c09fdf
chore: Update SDK documentation (#2949)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-01-19 21:22:39 -05:00
Jeremiah Lowin
0e4d519c86
Rename Enabled transform to Visibility (#2950) 2026-01-19 20:46:58 -05:00
Jeremiah Lowin
ba18a716bf
Add client utilities for downloading skills (#2948) 2026-01-19 20:10:39 -05:00
marvin-context-protocol[bot]
7d40b1dd4c
chore: Update SDK documentation (#2945)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-01-19 19:22:38 -05:00
Jeremiah Lowin
16ffc9432f
Add Skills Provider for exposing agent skills as MCP resources (#2944) 2026-01-19 18:29:16 -05:00
Jeremiah Lowin
c0ef90e713
Add PromptsAsTools transform (#2946) 2026-01-19 18:19:53 -05:00
Jeremiah Lowin
15921ca960
Update v3 features that were missed in PRs (#2947)
Co-authored-by: Claude <noreply@anthropic.com>
2026-01-19 18:12:38 -05:00
Jeremiah Lowin
d3327269d7
Add ResourcesAsTools transform (#2943) 2026-01-19 17:40:31 -05:00
marvin-context-protocol[bot]
a036ad31e2
chore: Update SDK documentation (#2940)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-01-19 16:49:12 -05:00
Jeremiah Lowin
4d2feb0c29
Refactor transform list methods to pure function pattern (#2942) 2026-01-19 16:21:35 -05:00
marvin-context-protocol[bot]
c9c8b41bde
chore: Update SDK documentation (#2938)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-01-19 10:17:10 -05:00
marvin-context-protocol[bot]
e98e04fb83
chore: Update SDK documentation (#2932)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-01-19 10:16:14 -05:00
marvin-context-protocol[bot]
36876c5148
chore: Update SDK documentation (#2930)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-01-19 08:31:18 -05:00
marvin-context-protocol[bot]
5c457f2ef4
chore: Update SDK documentation (#2922)
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-01-18 22:35:25 -05:00
Jeremiah Lowin
d8ab493664
Add session-specific visibility control via Context (#2917) 2026-01-18 22:31:06 -05:00
Jeremiah Lowin
8b0d016c30
Split transports.py into modular structure (#2921) 2026-01-18 22:11:25 -05:00
Jeremiah Lowin
2d200a887b
Fix custom provider docs to show correct interface (#2920) 2026-01-18 21:37:30 -05:00