Skip to content

Conversation

@daukadolt
Copy link
Contributor

@daukadolt daukadolt commented Aug 20, 2025

Description

Rendered README

DCO Affirmation

I affirm that all code in every commit of this pull request conforms to the terms of the Topoteretes Developer Certificate of Origin.

@pull-checklist
Copy link

Please make sure all the checkboxes are checked:

  • I have tested these changes locally.
  • I have reviewed the code changes.
  • I have added end-to-end and unit tests (if applicable).
  • I have updated the documentation and README.md file (if necessary).
  • I have removed unnecessary code and debug statements.
  • PR title is clear and follows the convention.
  • I have tagged reviewers or team members for feedback.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 20, 2025

Walkthrough

The README for cognee-mcp was updated to switch Docker transport configuration from CLI flags to the TRANSPORT_MODE environment variable, add detailed SSE/HTTP client configuration examples and a Docker vs direct usage note, remove a Cursor IDE section, and adjust development steps and formatting.

Changes

Cohort / File(s) Summary
Docs: Transport configuration and client setup
cognee-mcp/README.md
Replaced Docker --transport flag with TRANSPORT_MODE env; added Docker vs direct usage guidance; added SSE and HTTP client configuration examples (Claude/Cursor, health checks, dual config snippet); removed Cursor IDE section; updated development step wording and minor formatting/content edits.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Docker as Docker Container
  participant Server as MCP Server
  participant Client as MCP Client (Claude/Cursor)

  rect rgb(235,245,255)
    note over User,Docker: Start server with TRANSPORT_MODE env
    User->>Docker: docker run -e TRANSPORT_MODE=sse|http ...
    Docker->>Server: Start server with selected transport
    note over Server: Server listens on SSE or HTTP
  end

  alt SSE transport
    Client->>Server: Connect to SSE endpoint
    Server-->>Client: Event stream / health responses
  else HTTP transport
    Client->>Server: HTTP requests (health, calls)
    Server-->>Client: HTTP responses
  end

  note over Client,Server: Only enable the active server entry to avoid errors
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

run-checks

Suggested reviewers

  • dexters1
  • Vasilije1990
  • borisarzentar

Poem

A rabbit hops in docs so wide,
Swaps flags for TRANSPORT_MODE with pride.
SSE whispers, HTTP sings,
Clients dance on incoming strings.
Cursor's old notes softly hide — hooray, new guides! 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs/update-cognee-mcp-readme

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@daukadolt daukadolt marked this pull request as ready for review August 20, 2025 11:09
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (6)
cognee-mcp/README.md (6)

106-111: Confirm container network binding (host accessibility).

If the server inside the container binds to 127.0.0.1 by default, publishing -p 8000:8000 won’t expose it to the host. Please verify the HTTP/SSE server binds to 0.0.0.0 in Docker, and document how to adjust it if needed (e.g., via an env var or image entrypoint default).

I can update the README with a short “Troubleshooting: port not reachable” note once you confirm the binding behavior for the image.


122-131: Minor copy edit: hyphenate “command-line”.

Improves readability/consistency and addresses the linter nits.

-**Docker uses environment variables**, not command line arguments:
+**Docker uses environment variables**, not command-line arguments:
@@
-**Direct Python usage** uses command line arguments:
+**Direct Python usage** uses command-line arguments:

156-160: Add a language to the fenced block (fixes MD040).

Declare the block as text/console to satisfy markdownlint and improve rendering.

-```
+```text
 Checking MCP server health...
 
 cognee-sse: http://localhost:8000/sse (SSE) - ✓ Connected
-```
+```

206-211: Add a language to the fenced block (fixes MD040).

Same as above for the HTTP example.

-```
+```text
 Checking MCP server health...
 
 cognee-http: http://localhost:8000/mcp (HTTP) - ✓ Connected
-```
+```

176-185: Align Cursor config examples: include “type” consistently.

Cursor examples omit the “type” while the dual example includes it. Recommend adding “type” to the Cursor SSE/HTTP examples for consistency and to reduce user confusion.

Apply to SSE Cursor example:

 {
   "mcpServers": {
     "cognee-sse": {
+      "type": "sse",
       "url": "http://localhost:8000/sse"
     }
   }
 }

Apply to HTTP Cursor example:

 {
   "mcpServers": {
     "cognee-http": {
+      "type": "http",
       "url": "http://localhost:8000/mcp"
     }
   }
 }

No change needed to the dual example; it’s already explicit.

If Cursor intentionally infers transport type from URL and “type” is unnecessary, consider removing “type” from the dual example instead to keep all Cursor examples uniform. I can update either direction once confirmed.

Also applies to: 227-236, 242-254


313-313: Minor grammar tweak.

Add the article for smoother reading.

-1. Update dependencies in cognee folder if needed
+1. Update dependencies in the cognee folder if needed
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 1b88459 and b1bf8fb.

📒 Files selected for processing (1)
  • cognee-mcp/README.md (3 hunks)
🧰 Additional context used
🪛 LanguageTool
cognee-mcp/README.md

[grammar] ~122-~122: There might be a mistake here.
Context: ... ### Important: Docker vs Direct Usage Docker uses environment variables, not...

(QB_NEW_EN)


[grammar] ~123-~123: There might be a mistake here.
Context: ...variables**, not command line arguments: - ✅ Docker: -e TRANSPORT_MODE=http - ❌ D...

(QB_NEW_EN)


[grammar] ~124-~124: There might be a mistake here.
Context: ...not command line arguments: - ✅ Docker: -e TRANSPORT_MODE=http - ❌ Docker: --transport http (won't work...

(QB_NEW_EN)


[grammar] ~127-~127: There might be a mistake here.
Context: ...hon usage** uses command line arguments: - ✅ Direct: `python src/server.py --transp...

(QB_NEW_EN)


[grammar] ~128-~128: There might be a mistake here.
Context: ...ses command line arguments: - ✅ Direct: python src/server.py --transport http - ❌ Direct: -e TRANSPORT_MODE=http (won'...

(QB_NEW_EN)


[grammar] ~132-~132: There might be a mistake here.
Context: ...t work) ## 🔗 MCP Client Configuration After starting your Cognee MCP server wit...

(QB_NEW_EN)


[grammar] ~238-~238: There might be a mistake here.
Context: ... } ``` ### Dual Configuration Example You can configure both transports simult...

(QB_NEW_EN)


[grammar] ~258-~258: There might be a mistake here.
Context: ...id connection errors. ## 💻 Basic Usage The MCP server exposes its functionality ...

(QB_NEW_EN)


[grammar] ~313-~313: There might be a mistake here.
Context: ...you need to do: 1. Update dependencies in cognee folder if needed 2. `uv sync --d...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
cognee-mcp/README.md

156-156: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


207-207: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: Basic Tests / Run Basic Graph Tests
  • GitHub Check: Basic Tests / Run Simple Examples
  • GitHub Check: Basic Tests / Run Formatting Check
  • GitHub Check: Basic Tests / Run Unit Tests
  • GitHub Check: End-to-End Tests / Deletion Test
  • GitHub Check: Basic Tests / Run Simple Examples BAML
  • GitHub Check: Basic Tests / Run Integration Tests
  • GitHub Check: End-to-End Tests / Run Telemetry Pipeline Test
  • GitHub Check: Basic Tests / Run Linting
  • GitHub Check: End-to-End Tests / Test permissions with different situations in Cognee
  • GitHub Check: End-to-End Tests / S3 Bucket Test
  • GitHub Check: End-to-End Tests / Test graph edge ingestion
  • GitHub Check: End-to-End Tests / Deduplication Test
  • GitHub Check: End-to-End Tests / Test using different async databases in parallel in Cognee
  • GitHub Check: End-to-End Tests / Server Start Test
  • GitHub Check: End-to-End Tests / Run Telemetry Test
🔇 Additional comments (2)
cognee-mcp/README.md (2)

115-120: Mirror the host-binding note for the Docker Hub image.

Same concern as above applies to the pulled image: ensure it listens on 0.0.0.0 in the container so the mapped port is reachable from the host.


294-294: Good clarifying tip.

Calling out CODE search type for code graphs is helpful.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
cognee-mcp/README.md (1)

59-66: Correct UV installation method (pip install is misleading/incorrect).

Astral’s uv is not installed via pip. The recommended install is the official shell/Powershell script; otherwise users will get the wrong package or a broken setup.

Apply this diff to fix Step 3:

-3. Install uv if you don't have one
-    ```
-    pip install uv
-    ```
+3. Install uv if you don't have it installed
+    - macOS/Linux:
+      ```bash
+      curl -LsSf https://astral.sh/uv/install.sh | sh
+      ```
+    - Windows (PowerShell):
+      ```powershell
+      irm https://astral.sh/uv/install.ps1 | iex
+      ```
+    - Verify:
+      ```bash
+      uv --version
+      ```
🧹 Nitpick comments (5)
cognee-mcp/README.md (5)

106-111: Clarify/verify server defaults and env overrides for HTTP/SSE in Docker.

Examples assume the container listens on 0.0.0.0:8000, HTTP path “/mcp” and SSE path “/sse”. If these differ, clients will fail. Recommend documenting HOST/PORT/PATH envs (if supported) and confirming defaults.

Consider adding a short note under each docker run example stating:

  • Defaults: HOST=0.0.0.0, PORT=8000, HTTP_PATH=/mcp, SSE_PATH=/sse
  • How to override with env vars (if supported), e.g.:
    -e HOST=0.0.0.0 -e PORT=8000 -e HTTP_PATH=/mcp -e SSE_PATH=/sse

If these envs aren’t wired up in the image, either remove the suggestion or add support in the entrypoint.

Example doc tweak within these blocks:

       # For HTTP transport (recommended for web deployments)
-      docker run -e TRANSPORT_MODE=http --env-file ./.env -p 8000:8000 --rm -it cognee/cognee-mcp:main
+      docker run \
+        -e TRANSPORT_MODE=http \
+        -e HOST=0.0.0.0 -e PORT=8000 -e HTTP_PATH=/mcp \
+        --env-file ./.env -p 8000:8000 --rm -it cognee/cognee-mcp:main
       # For SSE transport  
-      docker run -e TRANSPORT_MODE=sse --env-file ./.env -p 8000:8000 --rm -it cognee/cognee-mcp:main
+      docker run \
+        -e TRANSPORT_MODE=sse \
+        -e HOST=0.0.0.0 -e PORT=8000 -e SSE_PATH=/sse \
+        --env-file ./.env -p 8000:8000 --rm -it cognee/cognee-mcp:main
       # For stdio transport (default)
       docker run -e TRANSPORT_MODE=stdio --env-file ./.env --rm -it cognee/cognee-mcp:main

Please verify the entrypoint actually reads these envs (or adjust names accordingly) before merging. I can help patch the Dockerfile/entrypoint if needed.

Also applies to: 115-120


122-130: Hyphenate “command-line” and minor copy edits in the Important note.

Small grammar polish for clarity and consistency.

Apply this diff:

-### **Important: Docker vs Direct Usage**
-**Docker uses environment variables**, not command line arguments:
+### **Important: Docker vs Direct Usage**
+**Docker uses environment variables**, not command-line arguments:
 - ✅ Docker: `-e TRANSPORT_MODE=http`
 - ❌ Docker: `--transport http` (won't work)

-**Direct Python usage** uses command line arguments:
+**Direct Python usage** uses command-line arguments:
 - ✅ Direct: `python src/server.py --transport http`
 - ❌ Direct: `-e TRANSPORT_MODE=http` (won't work)

156-160: Add a code fence language to satisfy markdownlint (MD040).

The output block is missing a language. Use “text” for console output.

Apply this diff:

-```
+```text
 Checking MCP server health...

 cognee-sse: http://localhost:8000/sse (SSE) - ✓ Connected

---

`206-211`: **Add a code fence language to satisfy markdownlint (MD040).**

Same linter issue as above; specify a language.


Apply this diff:

```diff
-```
+```text
 Checking MCP server health...

 cognee-http: http://localhost:8000/mcp (HTTP) - ✓ Connected

---

`311-311`: **Minor grammar: add article for readability.**


Apply this diff:

```diff
-1. Update dependencies in cognee folder if needed
+1. Update dependencies in the cognee folder if needed
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between b1bf8fb and 05295f3.

📒 Files selected for processing (1)
  • cognee-mcp/README.md (2 hunks)
🧰 Additional context used
🪛 LanguageTool
cognee-mcp/README.md

[grammar] ~122-~122: There might be a mistake here.
Context: ... ### Important: Docker vs Direct Usage Docker uses environment variables, not...

(QB_NEW_EN)


[grammar] ~123-~123: There might be a mistake here.
Context: ...variables**, not command line arguments: - ✅ Docker: -e TRANSPORT_MODE=http - ❌ D...

(QB_NEW_EN)


[grammar] ~124-~124: There might be a mistake here.
Context: ...not command line arguments: - ✅ Docker: -e TRANSPORT_MODE=http - ❌ Docker: --transport http (won't work...

(QB_NEW_EN)


[grammar] ~127-~127: There might be a mistake here.
Context: ...hon usage** uses command line arguments: - ✅ Direct: `python src/server.py --transp...

(QB_NEW_EN)


[grammar] ~128-~128: There might be a mistake here.
Context: ...ses command line arguments: - ✅ Direct: python src/server.py --transport http - ❌ Direct: -e TRANSPORT_MODE=http (won'...

(QB_NEW_EN)


[grammar] ~132-~132: There might be a mistake here.
Context: ...t work) ## 🔗 MCP Client Configuration After starting your Cognee MCP server wit...

(QB_NEW_EN)


[grammar] ~238-~238: There might be a mistake here.
Context: ... } ``` ### Dual Configuration Example You can configure both transports simult...

(QB_NEW_EN)


[grammar] ~258-~258: There might be a mistake here.
Context: ...id connection errors. ## 💻 Basic Usage The MCP server exposes its functionality ...

(QB_NEW_EN)


[grammar] ~311-~311: There might be a mistake here.
Context: ...you need to do: 1. Update dependencies in cognee folder if needed 2. `uv sync --d...

(QB_NEW_EN)

🪛 markdownlint-cli2 (0.17.2)
cognee-mcp/README.md

156-156: Fenced code blocks should have a language specified

(MD040, fenced-code-language)


207-207: Fenced code blocks should have a language specified

(MD040, fenced-code-language)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (16)
  • GitHub Check: End-to-End Tests / S3 Bucket Test
  • GitHub Check: End-to-End Tests / Deduplication Test
  • GitHub Check: End-to-End Tests / Test graph edge ingestion
  • GitHub Check: End-to-End Tests / Test permissions with different situations in Cognee
  • GitHub Check: End-to-End Tests / Deletion Test
  • GitHub Check: Basic Tests / Run Basic Graph Tests
  • GitHub Check: End-to-End Tests / Test using different async databases in parallel in Cognee
  • GitHub Check: End-to-End Tests / Run Telemetry Pipeline Test
  • GitHub Check: End-to-End Tests / Run Telemetry Test
  • GitHub Check: End-to-End Tests / Server Start Test
  • GitHub Check: Basic Tests / Run Simple Examples
  • GitHub Check: Basic Tests / Run Formatting Check
  • GitHub Check: Basic Tests / Run Linting
  • GitHub Check: Basic Tests / Run Simple Examples BAML
  • GitHub Check: Basic Tests / Run Integration Tests
  • GitHub Check: Basic Tests / Run Unit Tests
🔇 Additional comments (3)
cognee-mcp/README.md (3)

187-236: HTTP section looks good; mirror the syntax/version note as with SSE.

Content is clear and correct assuming defaults. Once the Claude CLI syntax is verified in the SSE section, mirror any required version note here for consistency.


238-256: Dual configuration example is clear; good cautionary note.

The example JSON and the note about enabling only the running server are helpful.


132-256: Overall: Excellent clarity on Docker vs direct usage and client configs.

The new sections significantly improve onboarding and reduce configuration footguns. Once the UV install and minor lints are fixed, this will be very solid.

Comment on lines +145 to +149
#### **Claude CLI (Easiest)**
```bash
claude mcp add cognee-sse -t sse http://localhost:8000/sse
```

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Verification agent

🧩 Analysis chain

Confirm current Claude CLI syntax for adding MCP servers.

CLI interfaces change. Please verify that claude mcp add <name> -t sse <url> matches the current Claude CLI version you target.

Run this web check to confirm the latest syntax and, if needed, include a minimal supported version note in the README:


🌐 Web query:

What is the current syntax for adding an MCP server in the Claude CLI (command: "claude mcp add") and the valid transport type flags for SSE and HTTP?

💡 Result:

The current syntax to add an MCP server in the Claude CLI is:

claude mcp add [options] <name> <commandOrUrl> [args...]
  • For a typical case:
    claude mcp add github --scope user

  • To explicitly specify transport type, use -t or --transport:

    • Example (SSE):
      claude mcp add myserver --transport sse -- npx my-server --flag
    • Example (HTTP, for a remote server):
      claude mcp add myserver --transport http --url http://localhost:8000/mcp[3][8][5][6].

Valid Transport Type Flags

The primary valid values for the --transport flag are:

  • stdio (default)
  • sse
  • http

Usage examples:

  • For SSE:
    • claude mcp add myserver -t sse --url http://localhost:8080/mcp
  • For HTTP:
    • claude mcp add myserver -t http --url http://localhost:8000/mcp
  • For stdio:
    • claude mcp add myserver -t stdio -- npx my-stdio-mcp-server[3][8][6].

Notes on related options:

  • --env KEY=value sets environment variables.
  • --header X-Api-Key:foobar sets HTTP headers (for SSE or HTTP)[3].
  • --scope controls scope (local, user, project; defaults to local)[3][1].

References to Docs:

  • Configurable via direct edits to claude_desktop_config.json or by importing from Claude Desktop[1][2].

Summary Table: Valid Transport Types

Flag Value Description When to Use
stdio Local process, default for CLI tools For local scripts
sse Server-Sent Events (push updates) For event streams
http Standard HTTP API endpoint For web servers

If using JSON to add a server:

claude mcp add-json <name> '{"type":"sse"|"http"|"stdio", ... }'

This configures the transport type explicitly in the JSON object[5][3][6].

Citations:


Update README to use official claude mcp add syntax

The snippet on lines 145–149 should explicitly include the --url flag for HTTP/SSE transports and use the correct --transport (or -t) option. For example:

claude mcp add cognee-sse --transport sse --url http://localhost:8000/sse

And for HTTP:

claude mcp add cognee-http --transport http --url http://localhost:8000/mcp

• Replace the existing

claude mcp add cognee-sse -t sse http://localhost:8000/sse

with the first example above.
• Add a note that --transport supports stdio (default), sse, and http.
• Optionally mention the equivalent short flag (-t) and related options (--env, --header, --scope) for completeness.

🤖 Prompt for AI Agents
In cognee-mcp/README.md around lines 145 to 149, the Claude CLI example uses an
incomplete invocation; replace the current snippet with a version that
explicitly passes the --transport and --url flags (e.g., "claude mcp add
cognee-sse --transport sse --url http://localhost:8000/sse"), and add a short
note that --transport supports stdio (default), sse, and http plus the
equivalent short flag -t and related options (--env, --header, --scope) so
readers know the available transports and common flags.

@Vasilije1990 Vasilije1990 self-requested a review August 20, 2025 11:24
@Vasilije1990 Vasilije1990 merged commit bfa176c into main Aug 20, 2025
22 of 23 checks passed
@Vasilije1990 Vasilije1990 deleted the docs/update-cognee-mcp-readme branch August 20, 2025 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants