- 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>
62 lines
1 KiB
TOML
62 lines
1 KiB
TOML
[project]
|
|
name = "mcp-server"
|
|
version = "0.5.0"
|
|
description = "Graphiti MCP Server"
|
|
readme = "README.md"
|
|
requires-python = ">=3.10,<4"
|
|
dependencies = [
|
|
"mcp>=1.9.4",
|
|
"openai>=1.91.0",
|
|
"graphiti-core>=0.16.0",
|
|
"azure-identity>=1.21.0",
|
|
"pydantic-settings>=2.0.0",
|
|
"pyyaml>=6.0",
|
|
]
|
|
|
|
[project.optional-dependencies]
|
|
providers = [
|
|
"google-genai>=1.8.0",
|
|
"anthropic>=0.49.0",
|
|
"groq>=0.2.0",
|
|
"voyageai>=0.2.3",
|
|
"sentence-transformers>=2.0.0",
|
|
]
|
|
|
|
[dependency-groups]
|
|
dev = [
|
|
"graphiti-core>=0.16.0",
|
|
"httpx>=0.28.1",
|
|
"mcp>=1.9.4",
|
|
"pyright>=1.1.404",
|
|
"ruff>=0.7.1",
|
|
]
|
|
|
|
[tool.pyright]
|
|
include = ["src", "tests"]
|
|
pythonVersion = "3.10"
|
|
typeCheckingMode = "basic"
|
|
|
|
[tool.ruff]
|
|
line-length = 100
|
|
|
|
[tool.ruff.lint]
|
|
select = [
|
|
# pycodestyle
|
|
"E",
|
|
# Pyflakes
|
|
"F",
|
|
# pyupgrade
|
|
"UP",
|
|
# flake8-bugbear
|
|
"B",
|
|
# flake8-simplify
|
|
"SIM",
|
|
# isort
|
|
"I",
|
|
]
|
|
ignore = ["E501"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "single"
|
|
indent-style = "space"
|
|
docstring-code-format = true
|