summaryrefslogtreecommitdiff
path: root/misc/cpp-mcp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--misc/cpp-mcp/Makefile21
-rw-r--r--misc/cpp-mcp/distinfo3
-rw-r--r--misc/cpp-mcp/files/patch-CMakeLists.txt12
-rw-r--r--misc/cpp-mcp/files/patch-src_CMakeLists.txt17
-rw-r--r--misc/cpp-mcp/pkg-descr14
-rw-r--r--misc/cpp-mcp/pkg-plist10
6 files changed, 77 insertions, 0 deletions
diff --git a/misc/cpp-mcp/Makefile b/misc/cpp-mcp/Makefile
new file mode 100644
index 000000000000..197ffad16c7e
--- /dev/null
+++ b/misc/cpp-mcp/Makefile
@@ -0,0 +1,21 @@
+PORTNAME= cpp-mcp
+PORTVERSION= g20250523
+CATEGORIES= misc devel # machine-learning
+
+MAINTAINER= yuri@FreeBSD.org
+COMMENT= Lightweight C++ MCP (Model Context Protocol) SDK
+WWW= https://github.com/hkr04/cpp-mcp
+
+LICENSE= MIT
+LICENSE_FILE= ${WRKSRC}/LICENSE
+
+USES= cmake compiler:c++17-lang
+USE_LDCONFIG= yes
+
+USE_GITHUB= yes
+GH_ACCOUNT= hkr04
+GH_TAGNAME= 86856a2
+
+CMAKE_ON= BUILD_SHARED_LIBS
+
+.include <bsd.port.mk>
diff --git a/misc/cpp-mcp/distinfo b/misc/cpp-mcp/distinfo
new file mode 100644
index 000000000000..b959d6c23075
--- /dev/null
+++ b/misc/cpp-mcp/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1756358008
+SHA256 (hkr04-cpp-mcp-g20250523-86856a2_GH0.tar.gz) = 6beea2a0bf155ad28c956e6c47fd6140dc28adaa2c2356e7222e8bf218e6abc3
+SIZE (hkr04-cpp-mcp-g20250523-86856a2_GH0.tar.gz) = 510803
diff --git a/misc/cpp-mcp/files/patch-CMakeLists.txt b/misc/cpp-mcp/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..1c9f239fbece
--- /dev/null
+++ b/misc/cpp-mcp/files/patch-CMakeLists.txt
@@ -0,0 +1,12 @@
+--- CMakeLists.txt.orig 2025-08-28 05:34:14 UTC
++++ CMakeLists.txt
+@@ -46,7 +46,9 @@ add_subdirectory(src)
+ add_subdirectory(src)
+
+ # Add examples
++if (CPP_MCP_BUILD_EXAMPLES)
+ add_subdirectory(examples)
++endif()
+
+ # Add test directory
+ option(MCP_BUILD_TESTS "Build the tests" OFF)
diff --git a/misc/cpp-mcp/files/patch-src_CMakeLists.txt b/misc/cpp-mcp/files/patch-src_CMakeLists.txt
new file mode 100644
index 000000000000..5c0e3ca7398f
--- /dev/null
+++ b/misc/cpp-mcp/files/patch-src_CMakeLists.txt
@@ -0,0 +1,17 @@
+--- src/CMakeLists.txt.orig 2025-05-24 06:53:57 UTC
++++ src/CMakeLists.txt
+@@ -1,6 +1,6 @@ set(TARGET mcp)
+ set(TARGET mcp)
+
+-add_library(${TARGET} STATIC
++add_library(${TARGET}
+ ../include/mcp_client.h
+ mcp_message.cpp
+ ../include/mcp_message.h
+@@ -22,3 +22,6 @@ endif()
+ if(OPENSSL_FOUND)
+ target_link_libraries(${TARGET} PUBLIC ${OPENSSL_LIBRARIES})
+ endif()
++
++install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../include/. DESTINATION include/mcp)
++install(TARGETS ${TARGET} DESTINATION lib)
diff --git a/misc/cpp-mcp/pkg-descr b/misc/cpp-mcp/pkg-descr
new file mode 100644
index 000000000000..a3d8abe4f7e9
--- /dev/null
+++ b/misc/cpp-mcp/pkg-descr
@@ -0,0 +1,14 @@
+Model Context Protocol (MCP) is an open protocol that provides a standardized
+way for AI models and agents to interact with various resources, tools, and
+services. This framework implements the core functionality of the MCP
+protocol, conforming to the 2024-11-05 basic protocol specification.
+
+Core Features:
+* JSON-RPC 2.0 Communication: Request/response communication based on JSON-RPC
+ 2.0 standard
+* Resource Abstraction: Standard interfaces for resources such as files,
+ APIs, etc.
+* Tool Registration: Register and call tools with structured parameters
+* Extensible Architecture: Easy to extend with new resource types and tools
+* Multi-Transport Support: Supports HTTP and standard input/output (stdio)
+ communication methods
diff --git a/misc/cpp-mcp/pkg-plist b/misc/cpp-mcp/pkg-plist
new file mode 100644
index 000000000000..06f20ccae3bb
--- /dev/null
+++ b/misc/cpp-mcp/pkg-plist
@@ -0,0 +1,10 @@
+include/mcp/mcp_client.h
+include/mcp/mcp_logger.h
+include/mcp/mcp_message.h
+include/mcp/mcp_resource.h
+include/mcp/mcp_server.h
+include/mcp/mcp_sse_client.h
+include/mcp/mcp_stdio_client.h
+include/mcp/mcp_thread_pool.h
+include/mcp/mcp_tool.h
+lib/libmcp.so