Commit graph

68 commits

Author SHA1 Message Date
Daniel Chalef
c4fe9aa0e2 conductor-checkpoint-msg_018NLrtFxs5zfcNwQnNCfvNg 2025-10-30 07:00:52 -07:00
Daniel Chalef
fa2cc39122 conductor-checkpoint-msg_01Qdskq96hJ6Q9DPg1h5Jjgg 2025-10-30 06:57:33 -07:00
Daniel Chalef
c9404e7c92 conductor-checkpoint-msg_01QLbhPMGDeB5EHbMq5KT86U 2025-10-30 06:56:08 -07:00
Daniel Chalef
5a0a85ee6e conductor-checkpoint-msg_016GKc3DYwYUjngGw8pArRJK 2025-10-30 06:53:32 -07:00
Daniel Chalef
b159667152 conductor-checkpoint-msg_01KL3wzQUn3gekDmznXVgXne 2025-10-30 06:48:49 -07:00
Daniel Chalef
1af906139a conductor-checkpoint-msg_01KgGgzpbiuM31KWKxQhNBfY 2025-10-30 06:46:56 -07:00
Daniel Chalef
61c46e258c conductor-checkpoint-msg_01K7QC1X8iPiYaMdvbi7WtR5 2025-10-30 06:45:26 -07:00
Daniel Chalef
ae47a7087f conductor-checkpoint-msg_01SNsax9AwiCBFrC7Fpo7BNe 2025-10-29 23:39:54 -07:00
Daniel Chalef
153927d0e9 conductor-checkpoint-msg_01MHw4g8TicrXegSK9phncfw 2025-10-29 23:31:26 -07:00
Daniel Chalef
79be1a3472 conductor-checkpoint-msg_01MGFAenMDnTX3H9HSZEbj2T 2025-10-29 23:30:49 -07:00
Daniel Chalef
62cb4175da conductor-checkpoint-msg_018d52yUXdPF48UBWPQdiB4W 2025-10-29 23:17:00 -07:00
Daniel Chalef
8c02683174 fix: Remove protected 'name' attribute from entity type models
Pydantic BaseModel reserves 'name' as a protected attribute. Removed
the 'name' attribute from dynamically created entity type models as
it's not needed - the entity type name is already stored as the class
name and dict key.

Fixed error: name cannot be used as an attribute for Requirement as
it is a protected attribute name.
2025-10-29 22:58:56 -07:00
Daniel Chalef
b434a6b680 fix: Convert entity_types from list to dict for Graphiti API
The Graphiti add_episode() API expects entity_types as a
dict[str, type[BaseModel]], not a list. Changed entity type
building to create a dictionary mapping entity names to their
Pydantic model classes.

Fixed error: 'list' object has no attribute 'items'

Changes:
- Build entity_types as dict instead of list in config processing
- Add fallback to convert ENTITY_TYPES list to dict if needed
- Map entity type names to their model classes
2025-10-29 22:51:24 -07:00
Daniel Chalef
d940b6fb7d fix: Use timezone.utc instead of UTC for Python 3.10 compatibility
The UTC constant was added in Python 3.11. Changed to use
timezone.utc which is available in Python 3.10+.

Fixed ImportError: cannot import name 'UTC' from 'datetime'
2025-10-29 22:46:17 -07:00
Daniel Chalef
12eb564eda fix: Resolve database connection and episode processing errors
Fixed two critical runtime errors:

1. Database connection check for KuzuDB
   - KuzuDB session.run() returns None, causing async iteration error
   - Added special handling for KuzuDB (in-memory, no query needed)
   - Other databases (Neo4j, FalkorDB) still perform connection test

2. Episode processing parameter error
   - Changed 'episode_type' parameter to 'source' to match Graphiti API
   - Added required 'reference_time' parameter with current timestamp
   - Added datetime imports (UTC, datetime)

Errors fixed:
- 'async for' requires an object with __aiter__ method, got NoneType
- Graphiti.add_episode() got an unexpected keyword argument 'episode_type'
2025-10-29 22:43:09 -07:00
Daniel Chalef
bb7883a4ee feat: Update default embedding model to text-embedding-3-small
Replace outdated text-embedding-ada-002 with the newer, more efficient
text-embedding-3-small model as the default embedder. The new model
offers better performance and is more cost-effective.

Updated:
- config/config.yaml: Changed default model
- README.md: Updated documentation to reflect new default
2025-10-29 22:36:52 -07:00
Daniel Chalef
bb12a91ebd docs: Remove telemetry from features list
Telemetry is not a feature but a notice about data collection,
so it shouldn't be listed as a feature.

Addresses review comment on line 29
2025-10-29 22:34:51 -07:00
Daniel Chalef
6a3a1ba706 docs: Remove SSE transport reference from Claude Desktop section
Since the MCP server no longer supports SSE transport, removed the
mention of SSE from the mcp-remote description. The server only
uses HTTP transport.

Addresses review comment on line 514
2025-10-29 22:33:39 -07:00
Daniel Chalef
9193b52179 docs: Address README review comments
- Shorten Kuzu database description to be more concise
- Update Ollama model example to use 'gpt-oss:120b'
- Restore Azure OpenAI environment variables documentation
- Remove implementation details from Docker section (irrelevant to container users)
- Clarify mcp-remote supports both HTTP and SSE transports

Addresses review comments #1-7 on the PR
2025-10-29 22:22:51 -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
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
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
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
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
968c36c2d1 conductor-checkpoint-msg_01TscHXmijzkqcTJX5sGTYP8 2025-10-26 18:14:13 -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
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
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
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
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
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
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
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
Naseem Ali
d0a3cd97ae
Integrate MCP for FalkorDB (#910)
* Integrate MCP for FalkorDB

* fix lint errors
2025-10-21 12:06:57 -04:00
Charles Chan
cb44ae932e
fix: neo4j username/password should not be hardcoded (#711)
fix: neo4j password should not be hardcoded
2025-07-13 09:12:06 -07:00
Daniel Chalef
4b578c1d53
bump v0.17.0 (#700)
* bump v0.17.0

* bump mcp
2025-07-10 16:14:11 -07:00
Daniel Chalef
aa6e38856a
[REFACTOR][FIX] Move away from DEFAULT_DATABASE environment variable in favour of driver-config support (dc) (#699)
* fix: remove global DEFAULT_DATABASE usage in favor of driver-specific
config

Fixes bugs introduced in PR #607. This removes reliance on the global
DEFAULT_DATABASE environment variable. It specifies the database within
each driver. PR #607 introduced a Neo4j compatability, as the database
names are different when attempting to support FalkorDB.

This refactor improves compatability across database types and ensures
future reliance by isolating the configuraiton to the driver level.

* fix: make falkordb support optional

This ensures that the the optional dependency and subsequent import is compliant with the graphiti-core project dependencies.

* chore: fmt code

* chore: undo changes to uv.lock

* fix: undo potentially breaking changes to drive interface

* fix: ensure a default database of "None" is provided - falling back to internal default

* chore: ensure default value exists for session and delete_all_indexes

* chore: fix typos and grammar

* chore: update package versions and dependencies in uv.lock and bulk_utils.py

* docs: update database configuration instructions for Neo4j and FalkorDB

Clarified default database names and how to override them in driver constructors. Updated testing requirements to include specific commands for running integration and unit tests.

* fix: ensure params defaults to an empty dictionary in Neo4jDriver

Updated the execute_query method to initialize params as an empty dictionary if not provided, ensuring compatibility with the database configuration.

---------

Co-authored-by: Urmzd <urmzd@dal.ca>
2025-07-10 17:25:39 -04:00
jawwadfirdousi
4e3f3618fb
REFACTOR: use env variables in docker-compose for mcp (#663)
* use env variables in docker-compose for mcp

* add defaults

---------

Co-authored-by: Daniel Chalef <131175+danielchalef@users.noreply.github.com>
2025-07-04 17:51:57 -07:00
Daniel Chalef
743d5e8612
Refactor: Replace dictionary responses with structured response classes in graphiti_mcp_server.py (#668)
Updated the error and success responses in various functions to utilize structured response classes (ErrorResponse, SuccessResponse, FactSearchResponse, EpisodeSearchResponse, StatusResponse) for improved consistency and clarity. Incremented version in pyproject.toml to 0.2.1.
2025-07-02 22:18:50 -07:00
Daniel Chalef
027035a241
feat: add pre-built Docker image for Graphiti MCP server (#657)
* Update Docker Compose to use the latest Graphiti MCP image and enhance README documentation

* Enhance README.md with updated quick start instructions for various clients, including specific sections for Claude Desktop and Cursor, and clarify service startup steps using Docker Compose.
2025-07-01 16:14:41 -07:00
Daniel Chalef
4652161c92
Add GitHub Actions workflow for building and pushing MCP Server Docker image (#656)
* Add GitHub Actions workflow for building and pushing MCP Server Docker image

This commit introduces a new workflow that triggers on changes to the pyproject.toml file in the main branch. It builds and pushes the Docker image to Docker Hub, extracting the version from the pyproject.toml and setting up necessary permissions and steps for the process.

* Add workflow_dispatch input to MCP Server Docker workflow

This commit adds an optional input parameter, `push_image`, to the GitHub Actions workflow for the MCP Server Docker image. This allows users to control whether to push the image to the registry during manual workflow dispatch, enhancing flexibility for testing purposes.

* Update Docker workflow conditions and increment version to 0.2.0

This commit modifies the MCP Server Docker workflow to include the `push_image` input conditionally for both pull requests and manual dispatches. Additionally, the version in `pyproject.toml` is updated from 0.1.0 to 0.2.0 to reflect the changes made.

* Remove unnecessary package write permission from MCP Server Docker workflow

* Add permissions for packages, actions, and security events in MCP Server Docker workflow

* Update MCP Server Docker workflow to use Ubuntu 24.04 for build environment

* Update MCP Server Docker workflow permissions to include id-token write access

* Remove unused cache configuration from MCP Server Docker workflow
2025-07-01 15:55:08 -07:00
Daniel Chalef
19772aa5a1
update mcp to graphiti 0.14 (#641)
* Update dependencies in pyproject.toml and uv.lock: bump graphiti-core to 0.14.0, add backoff and posthog packages, and update related version specifications.

* Update Dockerfile to change ownership command for app directory to verbose mode
2025-06-27 14:43:53 -07:00
Daniel Chalef
cb4e187aed
feat: add telemetry with PostHog and update Docker configurations (#633)
* Implement telemetry feature for anonymous usage statistics collection in Graphiti; update Dockerfile CMD format for better signal handling; adjust Neo4j URI and healthcheck in docker-compose.yml; add new dependencies in pyproject.toml and poetry.lock.

* remove duplicated properties

* Update Dockerfile CMD to use JSON array format for improved signal handling

* remove tommlib dep only in 3.11

* Delete server/graph_service/logging_config.py
2025-06-27 12:23:30 -07:00
Daniel Chalef
a7ca777af5
migrate to uv (#634) 2025-06-27 12:12:49 -07:00
Daniel Chalef
fc104cbe41
Update SEMAPHORE_LIMIT default value in docker-compose.yml to 10 for improved concurrency management (#628) 2025-06-25 21:45:46 -07:00
Daniel Chalef
9cc2e86071
Azure OpenAI improvements and fixes; Improve Graphiti Azure OpenAI config (#620)
* Azure OpenAI improvements and fixes; Improve Graphiti Azure OpenAI config

* format
2025-06-25 14:48:12 -04:00
Daniel Chalef
a7ae6784c8
mcp concurrency limit (#623)
* update graphiti dep

* - Introduce SEMAPHORE_LIMIT environment variable in graphiti_mcp_server.py to manage concurrency and mitigate 429 rate limit errors.
- Document SEMAPHORE_LIMIT usage in README.md for better user guidance.

* Log the concurrency limit in Graphiti initialization for better visibility.

* Document SEMAPHORE_LIMIT environment variable in README.md to clarify its role in managing episode processing concurrency and handling 429 rate limit errors.
2025-06-24 15:35:33 -07:00