Commit graph

798 commits

Author SHA1 Message Date
Daniel Chalef
ca61e11fc8 conductor-checkpoint-msg_018Z7AjbTkuDfhqdjB9iGbbD 2025-10-29 22:20:33 -07:00
Daniel Chalef
12316066ca docs: Update README with comprehensive features and database options
- Add comprehensive features list including all supported databases, LLM providers, and transports
- Document Kuzu as the default database with explanation of its benefits and archived status
- Add detailed instructions for running with different databases (Kuzu, Neo4j, FalkorDB)
- Update transport references from SSE to HTTP (default transport)
- Add database-specific Docker Compose instructions
- Update MCP client configurations to use /mcp/ endpoint
- Clarify prerequisites to reflect optional nature of external databases
- Add detailed database configuration examples for all supported backends
2025-10-29 22:09:39 -07:00
Daniel Chalef
d76b70de39 conductor-checkpoint-msg_01VsJQ3MgDxPwyb4ynvswZfb 2025-10-29 22:05:17 -07:00
Daniel Chalef
a85b1943ad fix: Move README back to mcp_server root folder
The main README for the MCP server should be in the root of the mcp_server folder for better discoverability
2025-10-29 21:22:56 -07:00
Daniel Chalef
fc639ae605 conductor-checkpoint-msg_01GuBj69k2CsqgojBsGJ2zFT 2025-10-29 21:22:01 -07:00
Daniel Chalef
4fe92a2b5b fix: Use contextlib.suppress instead of try-except-pass (SIM105)
- Replace try-except-pass with contextlib.suppress in test_async_operations.py
- Replace try-except-pass with contextlib.suppress in test_fixtures.py
- Fixes ruff SIM105 linting errors
2025-10-29 18:46:50 -07:00
Daniel Chalef
5b40df724e conductor-checkpoint-msg_01RedNheKT4yWyXcM83o3Nmv 2025-10-29 18:44:16 -07:00
Daniel Chalef
669aaae785 fix: Fix all linting errors in test suite
- Replace bare except with except Exception
- Remove unused imports and variables
- Fix type hints to use modern syntax
- Apply ruff formatting for line length
- Ensure all tests pass linting checks
2025-10-29 18:41:18 -07:00
Daniel Chalef
6d1c8ad17a conductor-checkpoint-msg_015EewQhKbqAGSQkasWtRQjp 2025-10-29 18:33:04 -07:00
Daniel Chalef
89e6e7c354 Merge branch 'main' into feat/mcp-server-v1-final
Resolved conflicts:
- Removed old mcp_server/graphiti_mcp_server.py (moved to src/)
- Kept our uv.lock with MCP dependencies
2025-10-29 18:31:42 -07:00
Daniel Chalef
dfaadc8fec conductor-checkpoint-msg_01NfviLNeAhFDA1G5841YKCS 2025-10-29 18:29:56 -07:00
Preston Rasmussen
c29f4da21e
update mmr to use bulk load overrides (#1029)
* update mmr to use bulk load overrides

* update returns

* update
2025-10-29 09:51:58 -04:00
Daniel Chalef
ae227ce927 @didier-durand has signed the CLA in getzep/graphiti#1028 2025-10-29 02:32:04 -07:00
Daniel Chalef
dfb99e742e fix: Improve test runner to load API keys from .env file
- Add dotenv loading support in test runner
- Fix duplicate os import issue
- Improve prerequisite checking with helpful hints
- Update error messages to guide users

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 12:20:14 -07:00
Daniel Chalef
b19b3c4b11 conductor-checkpoint-msg_01Q7VLFTJrtmpkaB7hfUzZLP 2025-10-27 12:15:35 -07:00
Daniel Chalef
56f6d09df0
Add MCP server release workflow (#1025)
* conductor-checkpoint-start

* conductor-checkpoint-msg_01B1n4yHQFoVrWWdKcqPQ4Qa

* conductor-checkpoint-msg_01LS1v8ok5qtzAofv1TFRDHt

* conductor-checkpoint-msg_01H5pxrRKDpizF4wv1irnvRz

* conductor-checkpoint-msg_01EFo2gQBKSFkGcJoJ4bUWNS

* conductor-checkpoint-msg_01QW92pnqMv17sfV4CxFKn7Y

* conductor-checkpoint-msg_01VqPRMaBRGpBf9E8sdpPeFa

* Fix critical issues in MCP server release workflow

- Fix Docker tag format: use version only (0.4.0) instead of mcp-v0.4.0
- Add Python 3.11 setup for tomllib compatibility
- Add workflow_dispatch trigger for testing without creating tags
- Add conditional push logic for manual testing

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove workflow_dispatch trigger from MCP server release

Simplify workflow to only trigger on mcp-v*.*.* tags.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_019AX8ymwf9eec2KF979CJCM

* conductor-checkpoint-msg_01LMofTLUNkicSq5vpFmsd1C

* Add semantic version validation to MCP server release

Validate tag follows X.Y.Z format before processing.
Rejects malformed tags like mcp-v1.0 or mcp-v1.0.0.0.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* conductor-checkpoint-msg_01Ndj59qcprSNRfe3vuciwwA

* conductor-checkpoint-msg_01PmA8bfCLKv7yHiaBz2MypS

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-27 12:06:38 -07:00
Preston Rasmussen
71f1f66d11
Search client update (#1026)
* update bulk interfae handling

* bump version

* format
2025-10-26 22:07:36 -04:00
Daniel Chalef
968c36c2d1 conductor-checkpoint-msg_01TscHXmijzkqcTJX5sGTYP8 2025-10-26 18:14:13 -07:00
Daniel Chalef
fefcd1a2de conductor-checkpoint-msg_014BF6Kzdy7qXc5AgC7eeVa5 2025-10-26 18:03:30 -07:00
Daniel Chalef
2037df875d fix: Configure consistent logging format between uvicorn and MCP server
- Use simplified format matching uvicorn's default (LEVEL message)
- Remove timestamps from custom logger format
- Suppress verbose MCP and uvicorn access logs
- Improve readability of server startup output

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 18:00:47 -07:00
Daniel Chalef
230b82a047 conductor-checkpoint-msg_01417YVh3s6afJadN5AM5Ahk 2025-10-26 17:59:47 -07:00
Daniel Chalef
7a65f6729a fix: Correct MCP HTTP endpoint path from / to /mcp/
- Remove incorrect /status endpoint reference
- Update logging to show correct MCP endpoint at /mcp/
- Align with FastMCP documentation standards

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 17:54:41 -07:00
Daniel Chalef
70c08e4c3e conductor-checkpoint-msg_01SNpbaZMdxWbefo2zsLprcW 2025-10-26 17:53:00 -07:00
Daniel Chalef
91d515871b feat: Add detailed server URL logging and improve access information
- Added comprehensive logging showing exact URLs to access the MCP server
- Display localhost instead of 0.0.0.0 for better usability
- Show MCP endpoint, transport type, and status endpoint information
- Added visual separators to make server info stand out in logs

This helps users understand exactly how to connect to the MCP server
and troubleshoot connection issues.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 17:48:56 -07:00
Daniel Chalef
a1aca3cc09 conductor-checkpoint-msg_01EaN8GZtehm8LV3a7CdWJ8u 2025-10-26 17:47:15 -07:00
Daniel Chalef
f3b793f244 fix: Update hardcoded default model to gpt-4.1 and fix config path
- Changed hardcoded default in schema.py from gpt-4o to gpt-4.1
- Fixed default config path to look in config/config.yaml relative to mcp_server directory
- This ensures the server uses gpt-4.1 as the default model everywhere

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 17:44:36 -07:00
Daniel Chalef
3c6bd3d9e0 conductor-checkpoint-msg_013HP1MYHKZ5wdTHHxrpBaT9 2025-10-26 17:42:39 -07:00
Daniel Chalef
bcf1ccd843 fix: Correct default OpenAI model to gpt-4.1
Changed the default LLM model from gpt-4o-mini to gpt-4.1 as requested.
This is the latest GPT-4 series model.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 17:40:12 -07:00
Daniel Chalef
d1036197f4 conductor-checkpoint-msg_01AJJ48RbkPaZ99G2GmE6HUi 2025-10-26 17:38:47 -07:00
Daniel Chalef
4788e80654 conductor-checkpoint-msg_01FETp6u9mWAMjJAeT6WFgAf 2025-10-26 17:38:12 -07:00
Daniel Chalef
38ea97e90c chore: Update default OpenAI model to gpt-4o-mini
Changed the default LLM model from gpt-4o to gpt-4o-mini across all
configuration files for better cost efficiency while maintaining quality.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 17:36:09 -07:00
Daniel Chalef
39e3bc0098 conductor-checkpoint-msg_01FErZjFG5iWrvbdUD2acQwQ 2025-10-26 17:34:48 -07:00
Daniel Chalef
0f2b7e9caa chore: Update default transport from SSE to HTTP
- Changed default transport to 'http' as SSE is deprecated
- Updated all configuration files to use HTTP transport
- Updated Docker compose commands to use HTTP transport
- Updated comments to reflect HTTP transport usage

This change ensures the MCP server uses the recommended HTTP transport
instead of the deprecated SSE transport.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 17:33:54 -07:00
Daniel Chalef
67779c94bf conductor-checkpoint-msg_01PCGAWzQUbmh7hAKBvadbYN 2025-10-26 17:32:01 -07:00
Daniel Chalef
0f85119443 fix: Improve MCP server configuration and initialization
- Fix API key detection: Remove hardcoded OpenAI checks, let factories handle provider-specific validation
- Fix .env file loading: Search for .env in mcp_server directory first
- Change default transport to SSE for broader compatibility (was stdio)
- Add proper error handling with warnings for failed client initialization
- Model already defaults to gpt-4o as requested

These changes ensure the MCP server properly loads API keys from .env files
and creates the appropriate LLM/embedder clients based on configuration.

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-26 17:31:32 -07:00
Daniel Chalef
fa2b5696bc conductor-checkpoint-msg_01PmXwij9S976CQk798DJ4PH 2025-10-26 17:29:06 -07:00
Daniel Chalef
21530c6408 feat: MCP Server v1.0.0rc0 - Complete refactoring with modular architecture
This is a major refactoring of the MCP Server to support multiple providers
through a YAML-based configuration system with factory pattern implementation.

## Key Changes

### Architecture Improvements
- Modular configuration system with YAML-based settings
- Factory pattern for LLM, Embedder, and Database providers
- Support for multiple database backends (Neo4j, FalkorDB, KuzuDB)
- Clean separation of concerns with dedicated service modules

### Provider Support
- **LLM**: OpenAI, Anthropic, Gemini, Groq
- **Embedders**: OpenAI, Voyage, Gemini, Anthropic, Sentence Transformers
- **Databases**: Neo4j, FalkorDB, KuzuDB (new default)
- Azure OpenAI support with AD authentication

### Configuration
- YAML configuration with environment variable expansion
- CLI argument overrides for runtime configuration
- Multiple pre-configured Docker Compose setups
- Proper boolean handling in environment variables

### Testing & CI
- Comprehensive test suite with unit and integration tests
- GitHub Actions workflows for linting and testing
- Multi-database testing support

### Docker Support
- Updated Docker images with multi-stage builds
- Database-specific docker-compose configurations
- Persistent volume support for all databases

### Bug Fixes
- Fixed KuzuDB connectivity checks
- Corrected Docker command paths
- Improved error handling and logging
- Fixed boolean environment variable expansion

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-26 17:23:57 -07:00
Daniel Chalef
6338378614 @dontang97 has signed the CLA in getzep/graphiti#1020 2025-10-22 02:52:17 -07:00
Naseem Ali
d0a3cd97ae
Integrate MCP for FalkorDB (#910)
* Integrate MCP for FalkorDB

* fix lint errors
2025-10-21 12:06:57 -04:00
Naseem Ali
7c38ce7830
Add FalkorDB support for docker compose (#911) 2025-10-21 11:47:38 -04:00
Jack Ryan
beae5a94c4
Add Zep vs Graphiti comparison table to README (#1014)
Changes auto-committed by Conductor
2025-10-20 17:49:31 -05:00
Daniel Chalef
6b62c75f03 @0fism has signed the CLA in getzep/graphiti#1005 2025-10-15 10:00:37 -07:00
Daniel Chalef
038a72b6aa @ngaiyuc has signed the CLA in getzep/graphiti#1005 2025-10-15 09:45:22 -07:00
Daniel Chalef
12ac194714
v0.22.0 bump (#1003) 2025-10-13 09:52:01 -07:00
Daniel Chalef
37a9ea65a2
Remove integration markers from database tests (#1000)
* Remove integration markers from database tests

Removed @pytest.mark.integration from database tests to allow them to run
while excluding API integration tests that call external services.

Database tests (now run):
- tests/test_edge_int.py
- tests/test_graphiti_int.py
- tests/test_node_int.py
- tests/test_entity_exclusion_int.py
- tests/cross_encoder/test_bge_reranker_client_int.py
- tests/driver/test_falkordb_driver.py

API integration tests (excluded):
- tests/llm_client/test_anthropic_client_int.py
- tests/utils/maintenance/test_temporal_operations_int.py

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Apply ruff formatting to falkordb driver and node queries

- Quote style fixes in falkordb_driver.py
- Trailing whitespace cleanup in node_db_queries.py
- Update uv.lock

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Remove api-integration-tests job from CI workflow

The api-integration-tests job has been removed since API integration tests
are now excluded via @pytest.mark.integration marker.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix database-integration-tests to run all database tests

Previously only ran test_graphiti_mock.py, now runs all database tests:
- tests/test_graphiti_mock.py
- tests/test_graphiti_int.py
- tests/test_node_int.py
- tests/test_edge_int.py
- tests/test_entity_exclusion_int.py
- tests/cross_encoder/test_bge_reranker_client_int.py
- tests/driver/test_falkordb_driver.py

The -m "not integration" filter excludes API integration tests that call
external services (Anthropic, OpenAI, etc).

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Restore integration markers for tests that call LLM APIs

test_graphiti_int.py and test_entity_exclusion_int.py call graphiti.add_episode()
and graphiti.search_() which require LLM API calls, so they are API integration
tests, not pure database tests.

Final categorization:

Pure unit tests (no external dependencies):
- tests/llm_client/test_*.py (except test_anthropic_client_int.py)
- tests/embedder/test_*.py
- tests/utils/maintenance/test_*.py (except test_temporal_operations_int.py)
- tests/utils/search/search_utils_test.py
- tests/test_text_utils.py

Database tests (require Neo4j/FalkorDB, no API calls):
- tests/test_graphiti_mock.py
- tests/test_node_int.py
- tests/test_edge_int.py
- tests/cross_encoder/test_bge_reranker_client_int.py
- tests/driver/test_falkordb_driver.py

API integration tests (excluded via @pytest.mark.integration):
- tests/test_graphiti_int.py
- tests/test_entity_exclusion_int.py
- tests/llm_client/test_anthropic_client_int.py
- tests/utils/maintenance/test_temporal_operations_int.py

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

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-12 10:16:34 -07:00
Naseem Ali
a8ec45b1bd
fix: wrap embeddings with vecf32() in FalkorDB single save paths (#991)
Fixes #972. Entity and edge single save operations now properly convert
embeddings to vecf32 type, matching bulk save behavior and preventing
type mismatch errors during vector similarity searches.
2025-10-12 09:42:52 -07:00
Daniel Chalef
b7358e52eb
Secure Claude PR reviews with two-workflow approach (#999)
Fixes permission errors for fork PRs while maintaining security.

Changes:
- Split into automatic (internal) and manual (fork) workflows
- Add fork detection to prevent auto-review of external PRs
- Add security-hardened prompts preventing secret disclosure
- Create manual workflow for maintainer-triggered fork reviews
- Add friendly notification for external contributors

Security model:
- Internal PRs: Auto-reviewed (trusted contributors)
- Fork PRs: Human gate-keeping required before optional Claude review
- Prevents prompt injection attacks via untrusted PR content

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-12 09:41:13 -07:00
Daniel Chalef
a5f26b6764
Fix FalkorDB index deletion implementation (#998)
* Update node_db_queries.py

* Update node_db_queries.py

* fix-delete-idx

* improve-delete

* fix uint tests

---------

Co-authored-by: Naseem Ali <34807727+Naseem77@users.noreply.github.com>
Co-authored-by: Gal Shubeli <galshubeli93@gmail.com>
2025-10-12 09:36:22 -07:00
Daniel Chalef
e72f81092e
Separate unit, database, and API integration tests (#997)
* Separate unit and integration tests to allow external contributors

This change addresses the issue where external contributor PRs fail unit
tests because GitHub secrets (API keys) are unavailable to external PRs
for security reasons.

Changes:
- Split GitHub Actions workflow into two jobs:
  - unit-tests: Runs without API keys or database connections (all PRs)
  - integration-tests: Runs only for internal contributors with API keys
- Renamed test_bge_reranker_client.py to test_bge_reranker_client_int.py
  to follow naming convention for integration tests
- Unit tests now skip all tests requiring databases or API keys
- Integration tests properly separated into:
  - Database integration tests (no API keys)
  - API integration tests (requires OPENAI_API_KEY, etc.)

The unit-tests job now:
- Runs for all PRs (internal and external)
- Requires no GitHub secrets
- Disables all database drivers
- Excludes all integration test files
- Passes 93 tests successfully

The integration-tests job:
- Only runs for internal contributors (same repo PRs or pushes to main)
- Has access to GitHub secrets
- Tests database operations and API integrations
- Uses conditional: github.event.pull_request.head.repo.full_name == github.repository

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Separate database tests from API integration tests

Restructured the workflow into three distinct jobs:

1. unit-tests: Runs on all PRs, no external dependencies (93 tests)
   - No API keys required
   - No database connections required
   - Fast execution

2. database-integration-tests: Runs on all PRs with databases (NEW)
   - Requires Neo4j and FalkorDB services
   - No API keys required
   - Tests database operations without external API calls
   - Includes: test_graphiti_mock.py, test_falkordb_driver.py,
     and utils/maintenance tests

3. api-integration-tests: Runs only for internal contributors
   - Requires API keys (OPENAI_API_KEY, ANTHROPIC_API_KEY, etc.)
   - Conditional execution for same-repo PRs only
   - Tests that make actual API calls to LLM providers

This ensures external contributor PRs can run both unit tests and
database integration tests successfully, while API integration tests
requiring secrets only run for internal contributors.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Disable Kuzu in CI database integration tests

Kuzu requires downloading extensions from external URLs which fails in CI
environment due to network restrictions. Disable Kuzu for database and API
integration tests.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Use pytest -k filter to skip Kuzu tests instead of DISABLE_KUZU

The original workflow used -k "neo4j" to filter tests. Kuzu requires
downloading FTS extensions from external URLs which fails in CI. Use
-k "neo4j or falkordb" to run tests against available databases while
skipping Kuzu parametrized tests.

This maintains the same test coverage as the original workflow while
properly separating unit, database, and API integration tests.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Upgrade Kuzu to v0.11.3+ to fix FTS extension download issue

Kuzu v0.11.3+ has FTS extension pre-installed, eliminating the need to
download it from external URLs. This fixes the "Could not establish
connection" error when trying to download libfts.kuzu_extension in CI.

Changes:
- Upgrade kuzu dependency from >=0.11.2 to >=0.11.3
- Remove pytest -k filters to run all database tests (Neo4j, FalkorDB, Kuzu)
- FTS extension is now available immediately without network calls

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Move pure unit tests from database integration to unit test job

The reviewer correctly identified that test_bulk_utils.py,
test_edge_operations.py, and test_node_operations.py are pure unit tests
using only mocks - they don't require database connections.

Changes:
- Removed tests/utils/maintenance/ from ignore list (too broad)
- Added specific ignore for test_temporal_operations_int.py (true integration test)
- Moved test_bulk_utils.py, test_edge_operations.py, test_node_operations.py to unit tests
- Kept test_graphiti_mock.py in database integration (uses real graph_driver fixture)

This reduces database integration test time and properly categorizes tests.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Skip flaky LLM-based tests in test_temporal_operations_int.py

- test_get_edge_contradictions_multiple_existing
- test_invalidate_edges_partial_update

These tests rely on OpenAI LLM responses for edge contradiction detection and produce non-deterministic results.

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Use pytest -k filter for API integration tests

Replace explicit file listing with `pytest tests/ -k "_int"` to automatically discover all integration tests in any subdirectory. This improves maintainability by eliminating the need to manually update the workflow when adding new integration test files.

Excludes:
- tests/driver/ (runs separately in database-integration-tests)
- tests/test_graphiti_mock.py (runs separately in database-integration-tests)

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Rename workflow from "Unit Tests" to "Tests"

The workflow now runs multiple test types (unit, database integration, and API integration), so "Tests" is a more accurate name.

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

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-10-12 09:07:24 -07:00
Guy Korland
0e2760d1ce
Update README.md fix wrong link (#768)
Co-authored-by: Daniel Chalef <131175+danielchalef@users.noreply.github.com>
2025-10-11 16:07:24 -07:00