Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: Resolve return value of status function
  • Loading branch information
dexters1 committed Apr 28, 2025
commit 2b6635b37ca6758c1cdd5cc49926feb03defe721
5 changes: 5 additions & 0 deletions cognee-mcp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ readme = "README.md"
requires-python = ">=3.10"

dependencies = [
# For local cognee repo usage remove comment bellow
#"cognee[postgres,codegraph,gemini,huggingface] @ file:/Users/igorilic/Desktop/cognee",
"cognee[postgres,codegraph,gemini,huggingface]==0.1.40",
"fastmcp>=1.0",
"mcp==1.5.0",
Expand All @@ -28,5 +30,8 @@ dev = [
"debugpy>=1.8.12",
]

[tool.hatch.metadata]
allow-direct-references = true

[project.scripts]
cognee = "src:main"
12 changes: 6 additions & 6 deletions cognee-mcp/src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ async def cognify_task(

text = (
f"Background process launched due to MCP timeout limitations.\n"
f"Average completion time is around 4 minutes.\n"
f"For current cognify status you can check the log file at: {log_file}"
f"To check current cognify status use the cognify_status tool\n"
f"or check the log file at: {log_file}"
)

return [
Expand Down Expand Up @@ -88,8 +88,8 @@ async def codify_task(repo_path: str):

text = (
f"Background process launched due to MCP timeout limitations.\n"
f"Average completion time is around 4 minutes.\n"
f"For current codify status you can check the log file at: {log_file}"
f"To check current codify status use the codify_status tool\n"
f"or you can check the log file at: {log_file}"
)

return [
Expand Down Expand Up @@ -146,7 +146,7 @@ async def cognify_status():
status = await cognee_datasets.get_status(
[await cognee_datasets.get_unique_dataset_id("main_dataset", user)]
)
return [types.TextContent(type="text", text=status)]
return [types.TextContent(type="text", text=str(status))]


@mcp.tool()
Expand All @@ -157,7 +157,7 @@ async def codify_status():
status = await cognee_datasets.get_status(
[await cognee_datasets.get_unique_dataset_id("codebase", user)]
)
return [types.TextContent(type="text", text=status)]
return [types.TextContent(type="text", text=str(status))]


def node_to_string(node):
Expand Down