/** * @file mcp_server_main.cpp * @brief OpenManus MCP Server Implementation * * This file implements the OpenManus MCP server that provides tool invocation functionality. * Currently implements the PythonExecute tool. */ #include "../mcp/include/mcp_server.h" #include "../mcp/include/mcp_tool.h" #include "../mcp/include/mcp_resource.h" #include #include #include #include // Import Python execution tool extern void register_python_execute_tool(mcp::server& server); int main() { // Create and configure server mcp::server server("localhost", 8818); server.set_server_info("OpenManusMCPServer", "0.0.1"); // Set server capabilities mcp::json capabilities = { {"tools", mcp::json::object()} }; server.set_capabilities(capabilities); // Register Python execution tool register_python_execute_tool(server); // Start server std::cout << "Starting OpenManus MCP server at localhost:8818..." << std::endl; std::cout << "Press Ctrl+C to stop server" << std::endl; server.start(true); // Blocking mode return 0; }