From 0bf3490d638ba9e1c21783c9162f9ef00be6da26 Mon Sep 17 00:00:00 2001 From: Daulet Amirkhanov Date: Wed, 1 Oct 2025 16:16:06 +0100 Subject: [PATCH 1/2] chore: update cognee-cli to use MCP Docker image from main. Bring back deprecation warnings --- cognee-mcp/pyproject.toml | 3 ++- cognee-mcp/src/__init__.py | 22 +++++++++++++++++++++- cognee/api/v1/ui/ui.py | 2 +- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/cognee-mcp/pyproject.toml b/cognee-mcp/pyproject.toml index e1a3a092c..bf9ecd51f 100644 --- a/cognee-mcp/pyproject.toml +++ b/cognee-mcp/pyproject.toml @@ -36,4 +36,5 @@ dev = [ allow-direct-references = true [project.scripts] -cognee-mcp = "src:main" +cognee = "src:main" +cognee-mcp = "src:main_mcp" \ No newline at end of file diff --git a/cognee-mcp/src/__init__.py b/cognee-mcp/src/__init__.py index 1939efe9f..77d325085 100644 --- a/cognee-mcp/src/__init__.py +++ b/cognee-mcp/src/__init__.py @@ -1,8 +1,28 @@ from .server import main as server_main +import warnings +import sys def main(): - """Main entry point for the package.""" + """Deprecated main entry point for the package.""" + import asyncio + + warnings.warn( + "The 'cognee' command for cognee-mcp is deprecated and will be removed in a future version. " + "Please use 'cognee-mcp' instead to avoid conflicts with the main cognee library.", + DeprecationWarning, + stacklevel=2, + ) + + print("⚠️ DEPRECATION WARNING: Use 'cognee-mcp' command instead of 'cognee'", file=sys.stderr) + print(" This avoids conflicts with the main cognee library.", file=sys.stderr) + print(file=sys.stderr) + + asyncio.run(server_main()) + + +def main_mcp(): + """Clean main entry point for cognee-mcp command.""" import asyncio asyncio.run(server_main()) diff --git a/cognee/api/v1/ui/ui.py b/cognee/api/v1/ui/ui.py index f22a1f00b..f4df0edde 100644 --- a/cognee/api/v1/ui/ui.py +++ b/cognee/api/v1/ui/ui.py @@ -516,7 +516,7 @@ def start_ui( env_file, "-e", "TRANSPORT_MODE=sse", - "cognee/cognee-mcp:daulet-dev", + "cognee/cognee-mcp:main", ], stdout=subprocess.PIPE, stderr=subprocess.PIPE, From dda44b0a4b0e12c8d6b172c83a1ed9387db50632 Mon Sep 17 00:00:00 2001 From: Daulet Amirkhanov Date: Tue, 7 Oct 2025 19:30:25 +0100 Subject: [PATCH 2/2] chore: change `cognee-mcp` deprecation message --- cognee-mcp/src/__init__.py | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/cognee-mcp/src/__init__.py b/cognee-mcp/src/__init__.py index 77d325085..933bcd73f 100644 --- a/cognee-mcp/src/__init__.py +++ b/cognee-mcp/src/__init__.py @@ -7,6 +7,36 @@ def main(): """Deprecated main entry point for the package.""" import asyncio + deprecation_notice = """ +DEPRECATION NOTICE +The CLI entry-point used to start the Cognee MCP service has been renamed from +"cognee" to "cognee-mcp". Calling the old entry-point will stop working in a +future release. + +WHAT YOU NEED TO DO: +Locate every place where you launch the MCP process and replace the final +argument cognee → cognee-mcp. + +For the example mcpServers block from Cursor shown below the change is: +{ + "mcpServers": { + "Cognee": { + "command": "uv", + "args": [ + "--directory", + "/path/to/cognee-mcp", + "run", + "cognee" // <-- CHANGE THIS to "cognee-mcp" + ] + } + } +} + +Continuing to use the old "cognee" entry-point will result in failures once it +is removed, so please update your configuration and any shell scripts as soon +as possible. +""" + warnings.warn( "The 'cognee' command for cognee-mcp is deprecated and will be removed in a future version. " "Please use 'cognee-mcp' instead to avoid conflicts with the main cognee library.", @@ -14,9 +44,8 @@ def main(): stacklevel=2, ) - print("⚠️ DEPRECATION WARNING: Use 'cognee-mcp' command instead of 'cognee'", file=sys.stderr) - print(" This avoids conflicts with the main cognee library.", file=sys.stderr) - print(file=sys.stderr) + print("⚠️ DEPRECATION WARNING", file=sys.stderr) + print(deprecation_notice, file=sys.stderr) asyncio.run(server_main())