Commit graph

170 commits

Author SHA1 Message Date
Igor Ilic
69fe35bdee refactor: add ruff formatting 2026-01-08 13:32:15 +01:00
Igor Ilic
be738df88a refactor: Use same default_k value in MCP as for Cognee 2026-01-08 12:47:42 +01:00
AnveshJarabani
6a5ba70ced
docs: Add comprehensive docstrings and fix default top_k consistency
Address PR feedback from CodeRabbit AI:
- Add detailed docstring for search_task internal function
- Document top_k parameter in main search function docstring
- Fix default top_k inconsistency (was 10 in client, now 5 everywhere)
- Clarify performance implications of different top_k values

Changes:
- server.py: Add top_k parameter documentation and search_task docstring
- cognee_client.py: Change default top_k from 10 to 5 for consistency

This ensures consistent behavior across the MCP call chain and
provides clear guidance for users on choosing appropriate top_k values.
2026-01-03 01:33:13 -06:00
AnveshJarabani
7ee36f883b
Fix: Add top_k parameter support to MCP search tool
## Problem
The MCP search wrapper doesn't expose the top_k parameter, causing:
- Unlimited result returns (113KB+ responses)
- Extremely slow search performance (30+ seconds for GRAPH_COMPLETION)
- Context window exhaustion in production use

## Solution
1. Add top_k parameter (default=5) to MCP search tool in server.py
2. Thread parameter through search_task internal function
3. Forward top_k to cognee_client.search() call
4. Update cognee_client.py to pass top_k to core cognee.search()

## Impact
- **Performance**: 97% reduction in response size (113KB → 3KB)
- **Latency**: 80-90% faster (30s → 2-5s for GRAPH_COMPLETION)
- **Backward Compatible**: Default top_k=5 maintains existing behavior
- **User Control**: Configurable from top_k=3 (quick) to top_k=20 (comprehensive)

## Testing
-  Code review validates proper parameter threading
-  Backward compatible (default value ensures no breaking changes)
-  Production usage confirms performance improvements

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-03 01:27:16 -06:00
Igor Ilic
109b889b68 fix: Fix MCP on main branch 2025-12-16 10:47:10 +01:00
Pavel Zorin
40e1b9bfed mcp: uv lock 2025-12-15 20:34:51 +01:00
Pavel Zorin
b42ea166a8 Release: Bump cognee and MCP versions to 0.5.0 2025-12-15 20:29:29 +01:00
Andrej Milicevic
116b6f1eeb chore: formatting 2025-12-12 13:46:16 +01:00
Andrej Milicevic
a225d7fc61 test: revert some changes 2025-12-12 13:44:58 +01:00
Andrej Milicevic
a337f4e54c test: testing logger 2025-12-12 13:02:55 +01:00
Andrej Milicevic
bce6094010 test: change logger 2025-12-12 12:43:54 +01:00
Andrej Milicevic
c48b274571 test: remove delete error from mcp test 2025-12-12 11:53:40 +01:00
Andrej Milicevic
3b8a607b5f test: fix errors in mcp test 2025-12-12 11:37:27 +01:00
Andrej Milicevic
248ba74592 test: remove codify-related stuff from mcp test 2025-12-11 18:18:42 +01:00
Vasilije
9571641199
refactor: move codify pipeline out of main repo (#1738)
<!-- .github/pull_request_template.md -->

## Description
<!--
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->
This PR removes codify, and the code graph pipeline, out of the
repository. It also introduces a Custom Pipeline interface, which can be
used in the future to define custom pipelines.

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [x] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## 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.
2025-12-04 23:10:39 -08:00
Igor Ilic
0bb4ece4d8 Merge branch 'main' into main-merge-vol4 2025-12-01 11:16:59 +01:00
Andrej Milicevic
5a2a5f64d2 merge dev 2025-11-26 11:04:11 +01:00
BOBDA DJIMO ARMEL HYACINTHE
a5aa58a7d7 docs(mcp): correct tool name in README
- Update the tool name from cognify_add_developer_rules to cognee_add_developer_rules.
2025-11-17 19:55:32 +04:00
Pavel Zorin
c6454338f9 Fix: MCP remove cognee.add() preprequisite from the doc 2025-11-13 17:35:16 +01:00
Andrej Milicevic
21b1f6b39c fix: remove add_ and get_developer_rules 2025-11-07 18:28:30 +01:00
Igor Ilic
96c8bba580 refactor: Add db creation as step in MCP creation 2025-11-06 19:12:09 +01:00
BOBDA DJIMO ARMEL HYACINTHE
41b973a61e docs(mcp): update available tools documentation
- Add missing tools: cognify_add_developer_rules, get_developer_rules, save_interaction
- Enhance search tool description with all supported search types
- Documentation now accurately reflects all 10 tools implemented in server.py
2025-11-05 20:19:52 +04:00
Andrej Milicevic
c481b87d58 refactor: Remove codify and code_graph pipeline from main repo 2025-11-05 12:56:17 +01:00
Vasilije
9865e4c5ec
Merge branch 'dev' into main 2025-10-29 20:34:58 +01:00
Daulet Amirkhanov
598adf56bd docs: update cognee-mcp README.md 2025-10-29 17:03:43 +00:00
Daulet Amirkhanov
f5dfeaa85a feat: Add installation of optional dependencies 2025-10-29 17:03:31 +00:00
vasilije
23e219b547 add format 2025-10-25 11:59:46 +02:00
vasilije
67c700db3b removed coding assistance 2025-10-25 11:58:34 +02:00
vasilije
2ef6ff9a75 added fix to MCP 2025-10-23 20:53:33 +02:00
Igor Ilic
42ca782e59 fix: Resolve issue with MCP 2025-10-14 15:44:21 +02:00
Vasilije
4ac49dd27f
Merge branch 'dev' into feat/mcp-add-support-for-non-standalone-mode 2025-10-12 13:57:55 +02:00
Geoffrey Robinson
5e69438ec7
Merge branch 'dev' into feature/web_scraping_connector_task 2025-10-11 14:40:18 +05:30
Vasilije
fa7aa38b8f
COG-3050 - remove insights search (#1506)
<!-- .github/pull_request_template.md -->

## Description
<!--
Please provide a clear, human-generated description of the changes in
this PR.
DO NOT use AI-generated descriptions. We want to understand your thought
process and reasoning.
-->

As per COG-3050:
1. Remove insights search type and clean up any orphaned code
2. Replace callsites with default search type - `GRAPH_COMPLETION` -
where applicable

## Type of Change
<!-- Please check the relevant option -->
- [ ] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [x] Code refactoring
- [ ] Performance improvement
- [ ] Other (please specify):

## Screenshots/Videos (if applicable)
<!-- Add screenshots or videos to help explain your changes -->

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [ ] **I have tested my changes thoroughly before submitting this PR**
- [ ] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## 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.
2025-10-11 09:09:56 +02:00
Daulet Amirkhanov
d480ea23a1 docs: clarify API_TOKEN requirement in README and improve JSON handling in CogneeClient 2025-10-10 16:03:16 +01:00
Daulet Amirkhanov
c7ca4c6782 chore: update Docker image comment and improve import handling for CogneeClient 2025-10-10 16:02:58 +01:00
Daulet Amirkhanov
fb03f9ce93
Merge branch 'dev' into feat/mcp-add-support-for-non-standalone-mode 2025-10-10 14:22:16 +01:00
Geoffrey Robinson
4e5c681e62
Merge branch 'dev' into feature/web_scraping_connector_task 2025-10-10 16:16:36 +05:30
Daulet Amirkhanov
0031a13f44 Refactor initialization of CogneeClient to use bool for API mode determination 2025-10-09 16:09:43 +01:00
Daulet Amirkhanov
67306786f1 docs: update README.md 2025-10-09 14:03:26 +01:00
Daulet Amirkhanov
bd49dd7bb5 Configure cognee-cli -ui mcp to connect to cognee backend 2025-10-09 14:01:28 +01:00
hajdul88
faeca138d9
fix: fixes distributed pipeline (#1454)
<!-- .github/pull_request_template.md -->

## Description
This PR fixes distributed pipeline + updates core changes in distr
logic.

## Type of Change
<!-- Please check the relevant option -->
- [x] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [x] Code refactoring
- [x] Performance improvement
- [ ] Other (please specify):

## Changes Made
Fixes distributed pipeline:
-Changed spawning logic + adds incremental loading to
run_tasks_diistributed
-Adds batching to consumer nodes
-Fixes consumer stopping criteria by adding stop signal + handling
-Changed edge embedding solution to avoid huge network load in a case of
a multicontainer environment

## Testing
Tested it by running 1GB on modal + manually

## Screenshots/Videos (if applicable)
None

## Pre-submission Checklist
<!-- Please check all boxes that apply before submitting your PR -->
- [x] **I have tested my changes thoroughly before submitting this PR**
- [x] **This PR contains minimal changes necessary to address the
issue/feature**
- [ ] My code follows the project's coding standards and style
guidelines
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have added necessary documentation (if applicable)
- [ ] All new and existing tests pass
- [ ] I have searched existing PRs to ensure this change hasn't been
submitted already
- [ ] I have linked any relevant issues in the description
- [ ] My commits have clear and descriptive messages

## Related Issues
None

## Additional Notes
None

## 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.

---------

Co-authored-by: Boris <boris@topoteretes.com>
Co-authored-by: Boris Arzentar <borisarzentar@gmail.com>
2025-10-09 14:06:25 +02:00
Daulet Amirkhanov
3e23c96595 route server tools calls through cognee_client 2025-10-08 18:36:44 +01:00
Daulet Amirkhanov
806298d508 create cognee_client for handling api calls 2025-10-08 18:36:08 +01:00
Geoffrey Robinson
e934f808fc
Merge branch 'main' into feature/web_scraping_connector_task 2025-10-08 17:00:39 +05:30
Daulet Amirkhanov
97f90c95ed Remove all references to SearchType.INSIGHTS across the codebase, meaningfully replacing it with SearchType.GRAPH_COMPLETION where applicable. 2025-10-08 12:13:59 +01:00
Daulet Amirkhanov
63a1463073 Deprecate SearchType.INSIGHTS, replace all references to default search type - SearchType.GRAPH_COMPLETION 2025-10-08 12:13:59 +01:00
Daulet Amirkhanov
6aeaa6877a
Merge branch 'dev' into chore/update-cognee-ui-cli-mcp-docker-image 2025-10-07 19:52:17 +01:00
Daulet Amirkhanov
dda44b0a4b chore: change cognee-mcp deprecation message 2025-10-07 19:30:25 +01:00
Igor Ilic
b4eaea2133 Merge branch 'main' into main-merge-vol7 2025-10-07 19:56:38 +02:00
Boris
b01cf4e6bd
Merge branch 'dev' into chore/update-cognee-ui-cli-mcp-docker-image 2025-10-07 19:33:33 +02:00