Commit graph

73 commits

Author SHA1 Message Date
Jeremiah Lowin
c3111a8978
Unify discovery API: deduplicate at protocol layer only (#2919) 2026-01-18 21:01:53 -05:00
Jeremiah Lowin
2b6a0faf1c
Add loq file size limits and clean up type ignores (#2859) 2026-01-13 07:29:12 -05:00
Jeremiah Lowin
42dcb8918d
Add --reload flag for auto-restart on file changes (#2816) 2026-01-09 08:44:27 -05:00
Jeremiah Lowin
9c83482f4c
Make FASTMCP_SHOW_SERVER_BANNER apply to all server startup methods (#2771) 2025-12-29 08:29:15 -05:00
Jeremiah Lowin
a39ab0734e
Update classes to inherit from FastMCPBaseModel instead of BaseModel (#2739) 2025-12-26 08:33:23 -05:00
Jeremiah Lowin
125f79ff39
Consolidate get_* and _list_* methods into single API (#2719) 2025-12-24 22:26:52 -05:00
Jeremiah Lowin
049bd22827
Replace type: ignore[attr-defined] with isinstance assertions in tests (#2665)
* Replace type: ignore[attr-defined] with isinstance assertions in tests

* Fix isinstance assertions in failing tests

- Fix enum test to check for ResponseEnum instead of str
- Fix binary resource test to check for BlobResourceContents instead of TextResourceContents
- Fix Root type tests to check attributes directly instead of isinstance checks

* Fix type errors without using type: ignore

- Remove execution methods from TransformingProvider (only handles transformations)
- Add execution methods to base Provider class with default implementations
- Fix type narrowing in tests using cast() instead of type: ignore
- Fix PromptResult type handling in prompt render tests
- Fix type narrowing in middleware test for arguments and structured_content
2025-12-21 16:37:20 -05:00
Chris Guidry
47d3044b06 Remove enable_docket setting; Docket is now always on
Docket provides background task execution and is now always available
for all FastMCP servers. Only `enable_tasks` remains to control the
SEP-1686 task protocol support.

Changes:
- Remove `enable_docket` setting and related validation
- Docket/Worker lifecycle is always active in server lifespan
- CurrentDocket and CurrentWorker dependencies work without config
- Add server readiness signaling via `_started` event
- Fix test timing issues with proper port probing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-05 11:40:04 -05:00
Chris Guidry
66aaf420c9
[2.14] SEP-1686 tasks (#2378)
* Implement MCP background tasks (SEP-1686) using Docket

Adds support for background task execution via the MCP task protocol,
powered by Docket for task queue management.

- Tools, resources, and prompts can be marked with `task=True` to run async
- Progress dependency for tracking task progress
- CurrentDocket and CurrentWorker dependencies for advanced use cases
- Client API with `.call_tool(..., task=True)` returns task handles
- Task status notifications via subscriptions
- CLI worker command for distributed task processing

Configuration via environment:
- FASTMCP_ENABLE_DOCKET=true
- FASTMCP_ENABLE_TASKS=true
- FASTMCP_DOCKET_URL=redis://... (or memory:// for single-process)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix tasks example import (TaskStatusResponse → GetTaskResult)

The example was using a non-existent TaskStatusResponse type.
Updated to use mcp.types.GetTaskResult which is what the
on_status_change callback actually receives.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix env var name in Docket error messages

The error messages referenced FASTMCP_EXPERIMENTAL_ENABLE_DOCKET but the
actual setting is FASTMCP_ENABLE_DOCKET.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove deprecated code re-added from pre-#2329 branch

- Remove ExtendedEnvSettingsSource (FASTMCP_SERVER_ prefix support)
- Remove dependencies parameter from FastMCP.__init__

* Replace fakeredis git pin with PyPI release

* Remove redundant fakeredis dev dep (pulled via pydocket)

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.com>
2025-12-04 20:10:35 -05:00
Jeremiah Lowin
80d10d23f4
Fix: URL-encode server name in Cursor deeplinks (#2369)
Server names with special characters (&, ?, #, etc.) were creating
malformed deeplink URLs. Now properly percent-encoded.
2025-11-04 11:26:57 -05:00
Cole Murray
0e97a261cf
Security: Validate Cursor deeplink URLs and use safer Windows API (#2348)
* 🤖 Security: Validate Cursor deeplink URLs and replace cmd.exe on Windows

- Add URL scheme validation to reject non-cursor:// URLs
- Replace subprocess cmd.exe call with os.startfile() on Windows
- Add tests for scheme validation and error handling

* 🤖 Fix tests for cross-platform deeplink validation
2025-11-02 19:49:07 -05:00
Jeremiah Lowin
3321644ad3
Replace subprocess tests with in-process async servers (#2006)
* Use anyio as testing backend

* Remove asyncio markers

* Update streamable http tests

* Replace all subprocess tests

* Replace anyio task groups with asyncio context managers in tests

- Convert run_server_async from anyio task group pattern to asyncio.create_task with async context manager
- Remove task_group fixture from conftest
- Update all test fixtures to use async with run_server_async pattern
- Remove TaskGroup imports from all test files
- Tests now work with pytest-asyncio instead of pytest-anyio

* Update test_github_provider_integration.py
2025-10-19 10:47:54 -04:00
Jeremiah Lowin
5f8461b7f0
Remove shell=True from Windows subprocess calls (#2091) 2025-10-14 12:30:46 -07:00
Chris Guidry
7f4119dcf6
Fix asyncio error when running FastMCP 1.x servers (#2084)
Co-authored-by: Claude <noreply@anthropic.com>
2025-10-14 11:24:51 -07:00
Jeremiah Lowin
3a21e7b9b2
Fix path resolution in install commands (#1951) 2025-09-29 20:04:12 -04:00
Jeremiah Lowin
d4cc1fbf10
Add log level support for stdio and HTTP transports (#1840) 2025-09-19 13:46:30 -04:00
Jeremiah Lowin
9e5e75d73e
Add show_cli_banner setting to control banner display (#1780) 2025-09-07 20:59:27 -04:00
Jeremiah Lowin
54b7a3b79f
Remove run_with_uv() and inline UV logic in cli.py (#1770) 2025-09-07 12:17:03 -04:00
William Easton
fe4f31c2c7
Enable more type checking rules (#1775) 2025-09-07 11:11:44 -04:00
Jeremiah Lowin
66da6d2f6a
Clean up uvenvironment and ensure uv run --with fastmcp is used by install commands (#1769) 2025-09-06 14:21:56 -04:00
Jack Wotherspoon
e5e426279e
feat: add support for Gemini CLI integration (#1709) 2025-09-06 12:08:56 -04:00
Jeremiah Lowin
8ffed6a3d9
Hotfix: restore --transport streamable http at CLI (#1743) 2025-09-03 17:24:22 -04:00
Jeremiah Lowin
183275c8c3
Add type field to Environment base class (#1676) 2025-08-30 07:47:24 -04:00
Jeremiah Lowin
ea47d232bc
Refactor Environment to support multiple runtime types (#1673) 2025-08-29 22:29:35 -04:00
Jeremiah Lowin
6d46192659
Internal refactor: fastmcp config to mcp server config (#1672) 2025-08-29 21:37:39 -04:00
Jeremiah Lowin
536ccde9e8
Consolidate CLI config parsing and prevent infinite loops (#1660) 2025-08-29 09:43:39 -04:00
Jeremiah Lowin
f4ab2e8127
Enhance inspect command with structured output and format options (#1481) 2025-08-26 10:39:28 -04:00
Jeremiah Lowin
ddf691cf53
Support multiple --with-editable flags in CLI commands (#1634) 2025-08-26 10:06:51 -04:00
Jeremiah Lowin
465e4033e7
Improve fastmcp.json environment configuration and project-based deployments (#1631) 2025-08-25 22:09:27 -04:00
Jeremiah Lowin
9c5c4f5113
Consolidate server loading logic into FileSystemSource (#1614) 2025-08-24 20:50:25 -04:00
Jeremiah Lowin
1f3f82d245
Implement typed source system for FastMCP configuration (#1607) 2025-08-24 16:32:37 -04:00
Jeremiah Lowin
afedabeaf0
Fix and centralize CLI path resolution (#1590) 2025-08-23 15:37:00 -04:00
Jeremiah Lowin
b34519c356
Update schema path (#1595) 2025-08-23 09:47:58 -04:00
Jeremiah Lowin
2d3d5392f1
feat: introduce fastmcp.json configuration system (#1517) 2025-08-19 16:06:04 -04:00
Jeremiah Lowin
108ad4b70d
feat: Add --workspace flag to fastmcp install cursor (#1522)
Co-authored-by: Jeremiah Lowin <jlowin@users.noreply.github.com>
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2025-08-19 15:38:55 -04:00
Jeremiah Lowin
d52d6d8fff
Support factory functions in fastmcp run (#1384) 2025-08-06 13:12:52 -04:00
Jeremiah Lowin
a9e79d5ffc
Change server flag to --name (#1248) 2025-08-01 17:06:15 -04:00
Tapan Chugh
7705858266
Fix server argument passing in CLI run command (#1293)
Co-authored-by: Tapan Chugh <tapanc@cs.washington.edu>
2025-07-29 15:13:01 -04:00
Jeremiah Lowin
1ea3ee82fe
Merge pull request #1138 from strawgate/run-mcp-config 2025-07-19 21:18:40 -04:00
Jeremiah Lowin
a65bfd10be
Add --python, --project, and --with-requirements options to CLI commands (#1190) 2025-07-19 21:16:09 -04:00
Jeremiah Lowin
c9255f483f Add validation test 2025-07-19 16:11:14 -04:00
Jeremiah Lowin
d8779d2c2e Merge branch 'main' into pr/1138 2025-07-19 16:04:43 -04:00
Jeremiah Lowin
ea54851736
Fix mcp-json output format to include server name (#1185)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-19 13:31:11 -04:00
William Easton
7532e1a8ee
update for windows? 2025-07-13 15:52:24 -05:00
William Easton
c6501c1060
Support running fastmcp directly with an MCPConfig 2025-07-13 15:19:57 -05:00
Jeremiah Lowin
4f4d06ffdb
Ensure the CLI accepts "streamable-http" as a valid transport (#1099)
* Ensure the CLI accepts "streamable-http" as a valid transport

* Add test for transport aliases
2025-07-09 09:35:26 -04:00
David Ben Kalifa
15f01a01d8
feat: Add --path Option to CLI for HTTP/SSE Route (#1087)
* add path to cli

* update cli.mdx

* update test
2025-07-08 11:20:15 -04:00
Jeremiah Lowin
7efecafbb7 Update test_cli.py 2025-07-07 10:46:59 -04:00
Jeremiah Lowin
4dcc757aa6 Ensure fastmcp version copy is plaintext 2025-07-07 10:31:17 -04:00
Jeremiah Lowin
6b38fbc8bc Fix duplicate test 2025-07-07 10:13:57 -04:00