@@ -31,19 +31,27 @@ find_package(rclcpp_components REQUIRED)
3131find_package (std_msgs REQUIRED)
3232find_package (pluginlib REQUIRED)
3333find_package (robot_mcp_msg_pluginlib REQUIRED)
34+ find_package (bondcpp REQUIRED)
3435find_package (nlohmann_json REQUIRED)
36+ find_package (OpenSSL REQUIRED)
3537
3638set (include_dir ${CMAKE_CURRENT_SOURCE_DIR} /include )
3739
3840# Server library
3941add_library (${PROJECT_NAME} SHARED
4042 src/robot_mcp_server_node.cpp
4143 src/mcp_config/config_parser.cpp
44+ src/mcp_http_server/auth_middleware.cpp
45+ src/mcp_http_server/json_rpc_handler.cpp
46+ src/mcp_http_server/http_server.cpp
4247)
4348target_include_directories (${PROJECT_NAME} PUBLIC
4449 $<BUILD_INTERFACE:${include_dir} >
4550 $<INSTALL_INTERFACE:include >
4651)
52+ target_compile_definitions (${PROJECT_NAME} PRIVATE
53+ CPPHTTPLIB_OPENSSL_SUPPORT
54+ )
4755target_link_libraries (${PROJECT_NAME}
4856 PUBLIC
4957 robot_mcp_msg_pluginlib::robot_mcp_msg_pluginlib
@@ -54,7 +62,11 @@ target_link_libraries(${PROJECT_NAME}
5462 rclcpp_components::component
5563 ${std_msgs_TARGETS}
5664 pluginlib::pluginlib
65+ bondcpp::bondcpp
5766 nlohmann_json::nlohmann_json
67+ OpenSSL::SSL
68+ OpenSSL::Crypto
69+ cpp-httplib
5870)
5971
6072# Register as a rclcpp_components component
@@ -80,8 +92,10 @@ install(DIRECTORY include/
8092)
8193
8294# Install test configuration files
83- install (DIRECTORY test_mcp_config/
84- DESTINATION share/${PROJECT_NAME} /test_mcp_config
95+ install (DIRECTORY test /launch_tests/
96+ DESTINATION share/${PROJECT_NAME} /test /launch_tests
97+ FILES_MATCHING
98+ PATTERN "*.yaml"
8599)
86100
87101if (BUILD_TESTING)
@@ -99,13 +113,24 @@ if(BUILD_TESTING)
99113 ${PROJECT_NAME}
100114 )
101115
102- # Add configuration parser launch tests
116+ # Add HTTP component tests (Catch2)
117+ add_robot_mcp_test(test_http_components
118+ test /test_http_components.cpp
119+ LIBRARIES
120+ ${PROJECT_NAME}
121+ )
122+
123+ # Add launch tests
124+ add_launch_test(
125+ test /launch_tests/test_complete_config.py
126+ )
127+
103128 add_launch_test(
104- test_mcp_config/test_complete_config .py
129+ test /launch_tests/test_minimal_config .py
105130 )
106131
107132 add_launch_test(
108- test_mcp_config/test_minimal_config .py
133+ test /launch_tests/test_http_integration .py
109134 )
110135endif ()
111136
0 commit comments