-
Notifications
You must be signed in to change notification settings - Fork 966
Feat/cognee mcp #400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat/cognee mcp #400
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,57 +1,41 @@ | ||||||||||||||||||||||||||
| # cognee MCP server | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| A MCP server project | ||||||||||||||||||||||||||
| 1. Clone the [cognee](www.github.com/topoteretes/cognee) repo | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Create a boilerplate server: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```jsx | ||||||||||||||||||||||||||
| uvx create-mcp-server | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 1. The command will ask you to name your server, e.g. mcp_cognee | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| 2. Answer “Y” to connect with Claude | ||||||||||||||||||||||||||
| Then run | ||||||||||||||||||||||||||
| 2. Install dependencies | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```jsx | ||||||||||||||||||||||||||
| cd mcp_cognee | ||||||||||||||||||||||||||
| cd cognee-mcp | ||||||||||||||||||||||||||
| uv sync --dev --all-extras | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Activate the venv with | ||||||||||||||||||||||||||
| 3. Activate the venv with | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```jsx | ||||||||||||||||||||||||||
| source .venv/bin/activate | ||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| This should already add the new server to your Claude config, but if not, add these lines manually: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
| "mcpcognee": { | ||||||||||||||||||||||||||
| "command": "uv", | ||||||||||||||||||||||||||
| "args": [ | ||||||||||||||||||||||||||
| "--directory", | ||||||||||||||||||||||||||
| "/Users/your_username/mcp/mcp_cognee", | ||||||||||||||||||||||||||
| "run", | ||||||||||||||||||||||||||
| "mcpcognee" | ||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||
| "env": { | ||||||||||||||||||||||||||
| "ENV": "local", | ||||||||||||||||||||||||||
| "TOKENIZERS_PARALLELISM": "false", | ||||||||||||||||||||||||||
| "LLM_API_KEY": "add_your_api_key_here", | ||||||||||||||||||||||||||
| "GRAPH_DATABASE_PROVIDER": "neo4j", | ||||||||||||||||||||||||||
| "GRAPH_DATABASE_URL": "bolt://localhost:7687", | ||||||||||||||||||||||||||
| "GRAPH_DATABASE_USERNAME": "add_username_here", | ||||||||||||||||||||||||||
| "GRAPH_DATABASE_PASSWORD": "add_pwd_here", | ||||||||||||||||||||||||||
| "VECTOR_DB_PROVIDER": "lancedb", | ||||||||||||||||||||||||||
| "DB_PROVIDER": "sqlite", | ||||||||||||||||||||||||||
| "DB_NAME": "postgres" | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| 4. Add the new server to your Claude config: | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| ```json | ||||||||||||||||||||||||||
| "cognee": { | ||||||||||||||||||||||||||
| "command": "uv", | ||||||||||||||||||||||||||
| "args": [ | ||||||||||||||||||||||||||
| "--directory", | ||||||||||||||||||||||||||
| "/{Absolute path to cognee directory}/cognee-mcp", | ||||||||||||||||||||||||||
| "run", | ||||||||||||||||||||||||||
| "cognee" | ||||||||||||||||||||||||||
| ], | ||||||||||||||||||||||||||
| "env": { | ||||||||||||||||||||||||||
| "ENV": "local", | ||||||||||||||||||||||||||
| "TOKENIZERS_PARALLELISM": "false", | ||||||||||||||||||||||||||
| "LLM_API_KEY": "add_your_api_key_here", | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||
|
Comment on lines
+30
to
+35
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix JSON format and add API key validation
"env": {
"ENV": "local",
"TOKENIZERS_PARALLELISM": "false",
- "LLM_API_KEY": "add_your_api_key_here",
+ "LLM_API_KEY": "add_your_api_key_here"
}📝 Committable suggestion
Suggested change
|
||||||||||||||||||||||||||
| ``` | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Then, edit the pyproject.toml in your new folder so that it includes packages from the cognee requirements. Use the pyproject.toml in your cognee library for this, but match the syntax of the automatically generated pyproject.toml so that it is compatible with uv. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| Define cognify tool in server.py | ||||||||||||||||||||||||||
| Restart your Claude desktop. | ||||||||||||||||||||||||||
| Restart your Claude desktop. | ||||||||||||||||||||||||||
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
Add virtual environment creation step
The instructions assume the virtual environment exists but don't explain how to create it. Consider adding the creation step before activation.