- Reorganized MCP server into clean, scalable directory structure: - `src/config/` - Configuration modules (schema, managers, provider configs) - `src/services/` - Services (queue, factories) - `src/models/` - Data models (entities, responses) - `src/utils/` - Utilities (formatting, helpers) - `tests/` - All test files - `config/` - Configuration files (YAML, examples) - `docker/` - Docker setup files - `docs/` - Documentation - Added `main.py` wrapper for seamless transition - Maintains existing command-line interface - All deployment scripts continue to work unchanged - **Queue Service Interface Fix**: Fixed missing `add_episode()` and `initialize()` methods - Server calls at `graphiti_mcp_server.py:276` and `:755` now work correctly - Eliminates runtime crashes on startup and episode processing - Updated imports throughout restructured codebase - Fixed Python module name conflicts (renamed `types/` to `models/`) - **MCP Server Tests Action** (`.github/workflows/mcp-server-tests.yml`) - Runs on PRs targeting main with `mcp_server/**` changes - Configuration validation, syntax checking, unit tests - Import structure validation, dependency verification - Main.py wrapper functionality testing - **MCP Server Lint Action** (`.github/workflows/mcp-server-lint.yml`) - Code formatting with ruff (100 char line length, single quotes) - Comprehensive linting with GitHub-formatted output - Type checking with pyright (baseline approach for existing errors) - Import sorting validation - Added ruff and pyright configuration to `mcp_server/pyproject.toml` - Proper tool configuration for the new structure - Enhanced development dependencies with formatting/linting tools - All existing tests moved and updated for new structure - Import paths updated throughout test suite - Validation scripts enhanced for restructured codebase - **Improved Maintainability**: Clear separation of concerns - **Better Scalability**: Organized structure supports growth - **Enhanced Developer Experience**: Proper linting, formatting, type checking - **Automated Quality Gates**: CI/CD ensures code quality on every PR - **Zero Breaking Changes**: Maintains full backwards compatibility 🤖 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" |