-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
7,035 additions
and
956 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: ruff format | ||
on: [ pull_request ] | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: astral-sh/ruff-action@v2 | ||
with: | ||
args: "format --check" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: ruff lint | ||
on: [ pull_request ] | ||
|
||
jobs: | ||
ruff: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: astral-sh/ruff-action@v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-yaml | ||
- id: check-added-large-files | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.8.3 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
types_or: [ python, pyi ] | ||
# Run the formatter. | ||
- id: ruff-format | ||
types_or: [ python, pyi ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,57 +1,85 @@ | ||
# cognee MCP server | ||
|
||
|
||
|
||
|
||
### Installing Manually | ||
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. Install dependencies | ||
|
||
``` | ||
pip install uv | ||
``` | ||
``` | ||
brew install postgresql | ||
``` | ||
|
||
2. Answer “Y” to connect with Claude | ||
Then run | ||
``` | ||
brew install rust | ||
``` | ||
|
||
```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: | ||
4. Add the new server to your Claude config: | ||
|
||
The file should be located here: ~/Library/Application\ Support/Claude/ | ||
You need to create claude_desktop_config.json in this folder if it doesn't exist | ||
|
||
``` | ||
"mcpcognee": { | ||
"command": "uv", | ||
"args": [ | ||
{ | ||
"mcpServers": { | ||
"cognee": { | ||
"command": "/Users/{user}/cognee/.venv/bin/uv", | ||
"args": [ | ||
"--directory", | ||
"/Users/your_username/mcp/mcp_cognee", | ||
"/Users/{user}/cognee/cognee-mcp", | ||
"run", | ||
"mcpcognee" | ||
"cognee" | ||
], | ||
"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" | ||
"LLM_API_KEY": "sk-" | ||
} | ||
}, | ||
"filesystem": { | ||
"command": "npx", | ||
"args": [ | ||
"-y", | ||
"@modelcontextprotocol/server-filesystem", | ||
"/Users/{user}/Desktop", | ||
"/Users/{user}/Projects" | ||
] | ||
} | ||
} | ||
} | ||
``` | ||
|
||
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. | ||
Restart your Claude desktop. | ||
|
||
### Installing via Smithery | ||
|
||
To install Cognee for Claude Desktop automatically via [Smithery](https://smithery.ai/server/cognee): | ||
|
||
```bash | ||
npx -y @smithery/cli install cognee --client claude | ||
``` | ||
|
||
Define cognify tool in server.py | ||
Restart your Claude desktop. | ||
Restart your Claude desktop. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.