Major improvements to the Graphiti MCP server configuration:
Configuration System:
- Add YAML-based configuration with config.yaml
- Support environment variable expansion in YAML (${VAR_NAME} syntax)
- Implement hierarchical configuration: CLI > env > YAML > defaults
- Add pydantic-settings for robust configuration management
Multi-Provider Support:
- Add factory pattern for LLM clients (OpenAI, Anthropic, Gemini, Groq, Azure)
- Add factory pattern for embedder clients (OpenAI, Azure, Gemini, Voyage)
- Add factory pattern for database drivers (Neo4j, FalkorDB)
- Graceful handling of unavailable providers
Code Improvements:
- Refactor main server to use unified configuration system
- Remove obsolete graphiti_service.py with hardcoded Neo4j configs
- Clean up deprecated type hints and fix all lint issues
- Add comprehensive test suite for configuration loading
Documentation:
- Update README with concise configuration instructions
- Add VS Code integration example
- Remove overly verbose separate documentation
Docker Updates:
- Update Dockerfile to include config.yaml
- Enhance docker-compose.yml with provider environment variables
- Support configuration volume mounting
Breaking Changes:
- None - full backward compatibility maintained
- All existing CLI arguments and environment variables still work
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
96 lines
No EOL
2.8 KiB
YAML
96 lines
No EOL
2.8 KiB
YAML
# Graphiti MCP Server Configuration
|
|
# This file supports environment variable expansion using ${VAR_NAME} or ${VAR_NAME:default_value}
|
|
|
|
server:
|
|
transport: "stdio" # Options: stdio, sse
|
|
host: "0.0.0.0"
|
|
port: 8000
|
|
|
|
llm:
|
|
provider: "openai" # Options: openai, azure_openai, anthropic, gemini, groq
|
|
model: "gpt-4o"
|
|
temperature: 0.0
|
|
max_tokens: 4096
|
|
|
|
providers:
|
|
openai:
|
|
api_key: ${OPENAI_API_KEY}
|
|
api_url: ${OPENAI_API_URL:https://api.openai.com/v1}
|
|
organization_id: ${OPENAI_ORGANIZATION_ID:}
|
|
|
|
azure_openai:
|
|
api_key: ${AZURE_OPENAI_API_KEY}
|
|
api_url: ${AZURE_OPENAI_ENDPOINT}
|
|
api_version: ${AZURE_OPENAI_API_VERSION:2024-10-21}
|
|
deployment_name: ${AZURE_OPENAI_DEPLOYMENT}
|
|
use_azure_ad: ${USE_AZURE_AD:false}
|
|
|
|
anthropic:
|
|
api_key: ${ANTHROPIC_API_KEY}
|
|
api_url: ${ANTHROPIC_API_URL:https://api.anthropic.com}
|
|
max_retries: 3
|
|
|
|
gemini:
|
|
api_key: ${GOOGLE_API_KEY}
|
|
project_id: ${GOOGLE_PROJECT_ID:}
|
|
location: ${GOOGLE_LOCATION:us-central1}
|
|
|
|
groq:
|
|
api_key: ${GROQ_API_KEY}
|
|
api_url: ${GROQ_API_URL:https://api.groq.com/openai/v1}
|
|
|
|
embedder:
|
|
provider: "openai" # Options: openai, azure_openai, gemini, voyage
|
|
model: "text-embedding-ada-002"
|
|
dimensions: 1536
|
|
|
|
providers:
|
|
openai:
|
|
api_key: ${OPENAI_API_KEY}
|
|
api_url: ${OPENAI_API_URL:https://api.openai.com/v1}
|
|
organization_id: ${OPENAI_ORGANIZATION_ID:}
|
|
|
|
azure_openai:
|
|
api_key: ${AZURE_OPENAI_API_KEY}
|
|
api_url: ${AZURE_OPENAI_EMBEDDINGS_ENDPOINT}
|
|
api_version: ${AZURE_OPENAI_API_VERSION:2024-10-21}
|
|
deployment_name: ${AZURE_OPENAI_EMBEDDINGS_DEPLOYMENT}
|
|
use_azure_ad: ${USE_AZURE_AD:false}
|
|
|
|
gemini:
|
|
api_key: ${GOOGLE_API_KEY}
|
|
project_id: ${GOOGLE_PROJECT_ID:}
|
|
location: ${GOOGLE_LOCATION:us-central1}
|
|
|
|
voyage:
|
|
api_key: ${VOYAGE_API_KEY}
|
|
api_url: ${VOYAGE_API_URL:https://api.voyageai.com/v1}
|
|
model: "voyage-3"
|
|
|
|
database:
|
|
provider: "neo4j" # Options: neo4j, falkordb
|
|
|
|
providers:
|
|
neo4j:
|
|
uri: ${NEO4J_URI:bolt://localhost:7687}
|
|
username: ${NEO4J_USER:neo4j}
|
|
password: ${NEO4J_PASSWORD}
|
|
database: ${NEO4J_DATABASE:neo4j}
|
|
use_parallel_runtime: ${USE_PARALLEL_RUNTIME:false}
|
|
|
|
falkordb:
|
|
uri: ${FALKORDB_URI:redis://localhost:6379}
|
|
password: ${FALKORDB_PASSWORD:}
|
|
database: ${FALKORDB_DATABASE:default_db}
|
|
|
|
graphiti:
|
|
group_id: ${GRAPHITI_GROUP_ID:main}
|
|
episode_id_prefix: ${EPISODE_ID_PREFIX:}
|
|
user_id: ${USER_ID:mcp_user}
|
|
entity_types:
|
|
- name: "Requirement"
|
|
description: "Represents a requirement"
|
|
- name: "Preference"
|
|
description: "User preferences and settings"
|
|
- name: "Procedure"
|
|
description: "Standard operating procedures" |