@@ -14,8 +14,6 @@ option(FASTMCPP_BUILD_EXAMPLES "Build examples" ON)
1414option (FASTMCPP_ENABLE_POST_STREAMING "Enable POST streaming via libcurl (optional)" OFF )
1515option (FASTMCPP_FETCH_CURL "Fetch and build libcurl statically for POST streaming" ON )
1616option (FASTMCPP_ENABLE_SAMPLING_HTTP_HANDLERS "Enable built-in OpenAI/Anthropic sampling handlers (requires libcurl)" OFF )
17- option (FASTMCPP_ENABLE_WS_STREAMING_TESTS "Enable WebSocket streaming tests (requires external server)" OFF )
18- option (FASTMCPP_ENABLE_LOCAL_WS_TEST "Enable local WebSocket server test (depends on httplib ws server support)" OFF )
1917
2018add_library (fastmcpp_core STATIC
2119 src/types.cpp
@@ -24,7 +22,12 @@ add_library(fastmcpp_core STATIC
2422 src/providers/transforms/namespace.cpp
2523 src/providers/transforms/tool_transform.cpp
2624 src/providers/transforms/visibility.cpp
25+ src/providers/transforms/version_filter.cpp
26+ src/providers/transforms/prompts_as_tools.cpp
27+ src/providers/transforms/resources_as_tools.cpp
2728 src/providers/filesystem_provider.cpp
29+ src/providers/skills_provider.cpp
30+ src/providers/openapi_provider.cpp
2831 src/proxy.cpp
2932 src/mcp/handler.cpp
3033 src/mcp/tasks.cpp
@@ -40,6 +43,8 @@ add_library(fastmcpp_core STATIC
4043 src/server/context.cpp
4144 src/server/middleware.cpp
4245 src/server/security_middleware.cpp
46+ src/server/response_limiting_middleware.cpp
47+ src/server/ping_middleware.cpp
4348 src/server/sampling.cpp
4449 src/server/http_server.cpp
4550 src/server/stdio_server.cpp
@@ -92,19 +97,6 @@ if(NOT cpp_httplib_POPULATED)
9297endif ()
9398target_include_directories (fastmcpp_core PUBLIC ${cpp_httplib_SOURCE_DIR} )
9499
95- # Header-only WebSocket client (easywsclient)
96- FetchContent_Declare (
97- easywsclient
98- GIT_REPOSITORY https://github.com/dhbaird/easywsclient.git
99- GIT_TAG master
100- )
101- FetchContent_GetProperties (easywsclient)
102- if (NOT easywsclient_POPULATED)
103- FetchContent_Populate (easywsclient)
104- endif ()
105- target_include_directories (fastmcpp_core PUBLIC ${easywsclient_SOURCE_DIR} )
106- target_sources (fastmcpp_core PRIVATE ${easywsclient_SOURCE_DIR} /easywsclient.cpp )
107-
108100# Optional: libcurl for POST streaming and sampling handlers (modular)
109101if (FASTMCPP_ENABLE_POST_STREAMING OR FASTMCPP_ENABLE_SAMPLING_HTTP_HANDLERS)
110102 if (FASTMCPP_FETCH_CURL)
@@ -177,24 +169,8 @@ if(FASTMCPP_ENABLE_POST_STREAMING OR FASTMCPP_ENABLE_SAMPLING_HTTP_HANDLERS)
177169 endif ()
178170endif ()
179171
180- # TinyProcessLib for cross-platform subprocess (header-only)
181- FetchContent_Declare (
182- tiny_process_lib
183- GIT_REPOSITORY https://github.com/eidheim/tiny-process-library.git
184- GIT_TAG master
185- )
186- FetchContent_GetProperties (tiny_process_lib)
187- if (NOT tiny_process_lib_POPULATED)
188- FetchContent_Populate (tiny_process_lib)
189- endif ()
190- target_include_directories (fastmcpp_core PUBLIC ${tiny_process_lib_SOURCE_DIR} )
191- target_compile_definitions (fastmcpp_core PUBLIC TINY_PROCESS_LIB_AVAILABLE )
192- target_sources (fastmcpp_core PRIVATE ${tiny_process_lib_SOURCE_DIR} /process.cpp )
193- if (UNIX )
194- target_sources (fastmcpp_core PRIVATE ${tiny_process_lib_SOURCE_DIR} /process_unix.cpp )
195- elseif (WIN32 )
196- target_sources (fastmcpp_core PRIVATE ${tiny_process_lib_SOURCE_DIR} /process_win.cpp )
197- endif ()
172+ # Cross-platform subprocess management (replaces tiny-process-library)
173+ target_sources (fastmcpp_core PRIVATE src/internal/process.cpp )
198174find_package (Threads REQUIRED )
199175target_link_libraries (fastmcpp_core PRIVATE Threads::Threads )
200176
@@ -248,6 +224,9 @@ if(FASTMCPP_BUILD_TESTS)
248224 add_test (NAME fastmcpp_cli_tasks_demo COMMAND fastmcpp tasks demo )
249225 add_executable (fastmcpp_cli_tasks_ux tests/cli/tasks_cli.cpp )
250226 add_test (NAME fastmcpp_cli_tasks_ux COMMAND fastmcpp_cli_tasks_ux )
227+ add_executable (fastmcpp_cli_generated_e2e tests/cli/generated_cli_e2e.cpp )
228+ target_link_libraries (fastmcpp_cli_generated_e2e PRIVATE fastmcpp_core )
229+ add_test (NAME fastmcpp_cli_generated_e2e COMMAND fastmcpp_cli_generated_e2e )
251230
252231 add_executable (fastmcpp_http_integration tests/server/http_integration.cpp )
253232 target_link_libraries (fastmcpp_http_integration PRIVATE fastmcpp_core )
@@ -273,6 +252,10 @@ if(FASTMCPP_BUILD_TESTS)
273252 target_link_libraries (fastmcpp_schema_build PRIVATE fastmcpp_core )
274253 add_test (NAME fastmcpp_schema_build COMMAND fastmcpp_schema_build )
275254
255+ add_executable (fastmcpp_schema_dereference_toggle tests/schema/dereference_toggle.cpp )
256+ target_link_libraries (fastmcpp_schema_dereference_toggle PRIVATE fastmcpp_core )
257+ add_test (NAME fastmcpp_schema_dereference_toggle COMMAND fastmcpp_schema_dereference_toggle )
258+
276259 add_executable (fastmcpp_content tests/content.cpp )
277260 target_link_libraries (fastmcpp_content PRIVATE fastmcpp_core )
278261 add_test (NAME fastmcpp_content COMMAND fastmcpp_content )
@@ -467,6 +450,26 @@ if(FASTMCPP_BUILD_TESTS)
467450 target_link_libraries (fastmcpp_stdio_failure PRIVATE fastmcpp_core )
468451 add_test (NAME fastmcpp_stdio_failure COMMAND fastmcpp_stdio_failure )
469452
453+ add_executable (fastmcpp_stdio_lifecycle tests/transports/stdio_lifecycle.cpp )
454+ target_link_libraries (fastmcpp_stdio_lifecycle PRIVATE fastmcpp_core )
455+ add_test (NAME fastmcpp_stdio_lifecycle COMMAND fastmcpp_stdio_lifecycle )
456+ set_tests_properties (fastmcpp_stdio_lifecycle PROPERTIES
457+ WORKING_DIRECTORY "$<TARGET_FILE_DIR :fastmcpp_stdio_lifecycle >"
458+ )
459+
460+ add_executable (fastmcpp_stdio_stderr tests/transports/stdio_stderr.cpp )
461+ target_link_libraries (fastmcpp_stdio_stderr PRIVATE fastmcpp_core )
462+ add_test (NAME fastmcpp_stdio_stderr COMMAND fastmcpp_stdio_stderr )
463+ set_tests_properties (fastmcpp_stdio_stderr PROPERTIES
464+ WORKING_DIRECTORY "$<TARGET_FILE_DIR :fastmcpp_stdio_stderr >"
465+ )
466+
467+ add_executable (fastmcpp_stdio_timeout tests/transports/stdio_timeout.cpp )
468+ target_link_libraries (fastmcpp_stdio_timeout PRIVATE fastmcpp_core )
469+ add_test (NAME fastmcpp_stdio_timeout COMMAND fastmcpp_stdio_timeout )
470+ # Timeout test can take up to ~35 seconds
471+ set_tests_properties (fastmcpp_stdio_timeout PROPERTIES TIMEOUT 60 )
472+
470473 # App mounting tests
471474 add_executable (fastmcpp_app_mounting tests/app/mounting.cpp )
472475 target_link_libraries (fastmcpp_app_mounting PRIVATE fastmcpp_core )
@@ -477,6 +480,11 @@ if(FASTMCPP_BUILD_TESTS)
477480 target_link_libraries (fastmcpp_app_ergonomics PRIVATE fastmcpp_core )
478481 add_test (NAME fastmcpp_app_ergonomics COMMAND fastmcpp_app_ergonomics )
479482
483+ # MCP Apps metadata parity tests
484+ add_executable (fastmcpp_app_mcp_apps tests/app/mcp_apps.cpp )
485+ target_link_libraries (fastmcpp_app_mcp_apps PRIVATE fastmcpp_core )
486+ add_test (NAME fastmcpp_app_mcp_apps COMMAND fastmcpp_app_mcp_apps )
487+
480488 # Filesystem provider tests
481489 add_library (fastmcpp_fs_test_plugin SHARED tests/fs/test_plugin.cpp )
482490 target_compile_definitions (fastmcpp_fs_test_plugin PRIVATE FASTMCPP_PROVIDER_EXPORTS )
@@ -497,6 +505,22 @@ if(FASTMCPP_BUILD_TESTS)
497505 target_link_libraries (fastmcpp_provider_transforms PRIVATE fastmcpp_core )
498506 add_test (NAME fastmcpp_provider_transforms COMMAND fastmcpp_provider_transforms )
499507
508+ add_executable (fastmcpp_provider_version_filter tests/providers/version_filter.cpp )
509+ target_link_libraries (fastmcpp_provider_version_filter PRIVATE fastmcpp_core )
510+ add_test (NAME fastmcpp_provider_version_filter COMMAND fastmcpp_provider_version_filter )
511+
512+ add_executable (fastmcpp_provider_skills tests/providers/skills_provider.cpp )
513+ target_link_libraries (fastmcpp_provider_skills PRIVATE fastmcpp_core )
514+ add_test (NAME fastmcpp_provider_skills COMMAND fastmcpp_provider_skills )
515+
516+ add_executable (fastmcpp_provider_skills_paths tests/providers/skills_path_resolution.cpp )
517+ target_link_libraries (fastmcpp_provider_skills_paths PRIVATE fastmcpp_core )
518+ add_test (NAME fastmcpp_provider_skills_paths COMMAND fastmcpp_provider_skills_paths )
519+
520+ add_executable (fastmcpp_provider_openapi tests/providers/openapi_provider.cpp )
521+ target_link_libraries (fastmcpp_provider_openapi PRIVATE fastmcpp_core )
522+ add_test (NAME fastmcpp_provider_openapi COMMAND fastmcpp_provider_openapi )
523+
500524 # Proxy tests
501525 add_executable (fastmcpp_proxy_basic tests/proxy/basic.cpp )
502526 target_link_libraries (fastmcpp_proxy_basic PRIVATE fastmcpp_core )
@@ -507,6 +531,31 @@ if(FASTMCPP_BUILD_TESTS)
507531 target_link_libraries (fastmcpp_main_header PRIVATE fastmcpp_core )
508532 add_test (NAME fastmcpp_main_header COMMAND fastmcpp_main_header )
509533
534+ # Sync-cycle tests (Phase 11)
535+ add_executable (fastmcpp_mcp_error_codes tests/mcp/test_error_codes.cpp )
536+ target_link_libraries (fastmcpp_mcp_error_codes PRIVATE fastmcpp_core )
537+ add_test (NAME fastmcpp_mcp_error_codes COMMAND fastmcpp_mcp_error_codes )
538+
539+ add_executable (fastmcpp_pagination tests/mcp/test_pagination.cpp )
540+ target_link_libraries (fastmcpp_pagination PRIVATE fastmcpp_core )
541+ add_test (NAME fastmcpp_pagination COMMAND fastmcpp_pagination )
542+
543+ add_executable (fastmcpp_tools_transform_enabled tests/tools/test_tool_transform_enabled.cpp )
544+ target_link_libraries (fastmcpp_tools_transform_enabled PRIVATE fastmcpp_core )
545+ add_test (NAME fastmcpp_tools_transform_enabled COMMAND fastmcpp_tools_transform_enabled )
546+
547+ add_executable (fastmcpp_tools_sequential tests/tools/test_tool_sequential.cpp )
548+ target_link_libraries (fastmcpp_tools_sequential PRIVATE fastmcpp_core )
549+ add_test (NAME fastmcpp_tools_sequential COMMAND fastmcpp_tools_sequential )
550+
551+ add_executable (fastmcpp_session_state tests/server/test_session_state.cpp )
552+ target_link_libraries (fastmcpp_session_state PRIVATE fastmcpp_core )
553+ add_test (NAME fastmcpp_session_state COMMAND fastmcpp_session_state )
554+
555+ add_executable (fastmcpp_response_limiting tests/server/test_response_limiting.cpp )
556+ target_link_libraries (fastmcpp_response_limiting PRIVATE fastmcpp_core )
557+ add_test (NAME fastmcpp_response_limiting COMMAND fastmcpp_response_limiting )
558+
510559 set_tests_properties (fastmcpp_stdio_client PROPERTIES
511560 LABELS "conformance"
512561 WORKING_DIRECTORY "$<TARGET_FILE_DIR :fastmcpp_stdio_client >"
@@ -527,20 +576,6 @@ if(FASTMCPP_BUILD_TESTS)
527576 set_tests_properties (fastmcpp_streaming_sse PROPERTIES RUN_SERIAL TRUE )
528577 endif ()
529578
530- if (FASTMCPP_ENABLE_WS_STREAMING_TESTS)
531- add_executable (fastmcpp_ws_streaming tests/transports/ws_streaming.cpp )
532- target_link_libraries (fastmcpp_ws_streaming PRIVATE fastmcpp_core )
533- add_test (NAME fastmcpp_ws_streaming COMMAND fastmcpp_ws_streaming )
534- # Test auto-skips if FASTMCPP_WS_URL is not set
535-
536- if (FASTMCPP_ENABLE_LOCAL_WS_TEST)
537- add_executable (fastmcpp_ws_streaming_local tests/transports/ws_streaming_local.cpp )
538- target_link_libraries (fastmcpp_ws_streaming_local PRIVATE fastmcpp_core )
539- add_test (NAME fastmcpp_ws_streaming_local COMMAND fastmcpp_ws_streaming_local )
540- set_tests_properties (fastmcpp_ws_streaming_local PROPERTIES RUN_SERIAL TRUE )
541- endif ()
542- endif ()
543-
544579 # POST streaming transport test (requires libcurl)
545580 if (FASTMCPP_ENABLE_POST_STREAMING AND TARGET CURL::libcurl)
546581 add_executable (fastmcpp_post_streaming tests/transports/post_streaming.cpp )
@@ -585,6 +620,18 @@ if(FASTMCPP_BUILD_EXAMPLES)
585620 add_executable (fastmcpp_example_tags_example examples/tags_example.cpp )
586621 target_link_libraries (fastmcpp_example_tags_example PRIVATE fastmcpp_core )
587622
623+ # MCP Apps example (FastMCP 3.x surface)
624+ add_executable (fastmcpp_example_mcp_apps examples/mcp_apps.cpp )
625+ target_link_libraries (fastmcpp_example_mcp_apps PRIVATE fastmcpp_core )
626+
627+ # Skills provider example
628+ add_executable (fastmcpp_example_skills_provider examples/skills_provider.cpp )
629+ target_link_libraries (fastmcpp_example_skills_provider PRIVATE fastmcpp_core )
630+
631+ # OpenAPI provider example
632+ add_executable (fastmcpp_example_openapi_provider examples/openapi_provider.cpp )
633+ target_link_libraries (fastmcpp_example_openapi_provider PRIVATE fastmcpp_core )
634+
588635 # Context API example (v2.13.0+)
589636 add_executable (fastmcpp_example_context_introspection examples/context_introspection.cpp )
590637 target_link_libraries (fastmcpp_example_context_introspection PRIVATE fastmcpp_core )
@@ -605,6 +652,10 @@ if(FASTMCPP_BUILD_EXAMPLES)
605652 add_executable (fastmcpp_example_tool_injection_middleware examples/tool_injection_middleware.cpp )
606653 target_link_libraries (fastmcpp_example_tool_injection_middleware PRIVATE fastmcpp_core )
607654
655+ # Response Limiting Middleware example
656+ add_executable (fastmcpp_example_response_limiting_middleware examples/response_limiting_middleware.cpp )
657+ target_link_libraries (fastmcpp_example_response_limiting_middleware PRIVATE fastmcpp_core )
658+
608659 # Server Metadata example (v2.13.0+)
609660 add_executable (fastmcpp_example_server_metadata examples/server_metadata.cpp )
610661 target_link_libraries (fastmcpp_example_server_metadata PRIVATE fastmcpp_core )
0 commit comments