[project]
name = "deephaven-mcp"
dynamic = ["version"]
description = "Unified Python package providing Model Context Protocol (MCP) servers for Deephaven: orchestrate Community Core data workers and power Documentation Q&A with LLMs. Supports AI-driven data workflows and agentic documentation assistance in a single deployable package."
readme = "README.md"
requires-python = ">=3.11"
authors = [
{ name = "Deephaven Data Labs", email = "support@deephaven.io" }
]
license = { text = "Apache-2.0" }
keywords = ["deephaven", "mcp", "model-context-protocol", "ai", "documentation", "llm", "orchestration", "community-core", "docs", "q&a"]
classifiers = [
# TODO: Update development status when the project reaches a stable state
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: System :: Distributed Computing"
]
dependencies = [
# Core async file/network dependencies
"typing_extensions>=4.3.0", # Backports for typing features (override, etc.)
"aiofiles>=23.2.1", # Async file support
"aiohttp>=3.11.18", # Async HTTP client (stress testing, SSE)
# MCP protocol and orchestration
"autogen-ext[mcp]>=0.5.4", # MCP orchestration and agentic tools
"mcp[cli]>=1.12.0", # CLI and fastmcp server
"mcp-proxy", # SSE/Streamable-HTTP proxy support
# Deephaven integration
"pydeephaven>=0.39", # Deephaven Python API
# Docs/LLM and web server dependencies
"fastapi>=0.116.0", # FastAPI web framework for Docs server
"uvicorn[standard]>=0.35.0", # ASGI server for FastAPI
"openai>=1.0.0", # OpenAI Python SDK for LLM Q&A
"pydantic>=2.0.0", # Data validation and settings
"python-dotenv>=1.0.0", # Load .env files for config
# Configuration file parsing
"json5>=0.9.0", # JSON5 format support (comments, trailing commas)
# Rate limiting and advanced agent tools
"aiolimiter>=1.1.0", # Global async rate limiting
"autogen-core", # Test client CancellationToken, etc.
"autogen-ext", # Test client SseServerParams, etc.
# Structured logging for GCP Cloud Run
"google-cloud-logging>=3.8.0", # Google Cloud Logging
# Process monitoring for debugging
"psutil>=5.9.0", # Process and system monitoring
# Table formatting for AI agents
"pyyaml>=6.0", # YAML formatting support
]
[project.optional-dependencies]
# Testing (coverage, etc.)
test = [
"pytest>=8.0.0", # Test framework
"pytest-asyncio>=0.23.0", # Async test support
"pytest-cov>=4.1.0", # Code coverage reporting
"pytest-timeout>=2.1.0", # Test timeout support for integration tests
"httpx[cli]>=0.24.0", # HTTP client for integration and stress tests
"deephaven-server>=0.39", # Deephaven server for integration tests
]
# Code quality tools (linting, formatting, type checking)
lint = [
# Code formatting and style tools
"black>=24.0.0", # Code formatter
"ruff>=0.1.0", # Linter and code quality tool
"isort>=5.12.0", # Import sorter
"pydocstyle>=6.3.0", # Docstring style checker
# Type checking and static analysis
"mypy>=1.6.0", # Static type checker
"types-aiofiles", # Type stubs for aiofiles
"typing_extensions>=4.3.0", # Typing backports for type checking
]
# Community Core session creation (python launch method)
community = [
"deephaven-server>=0.39", # Deephaven Community Core server for python-based session creation
]
# Enterprise support (Deephaven Core+)
enterprise = [
"deephaven-coreplus-client", # Client for Deephaven Enterprise (Core+) systems
]
# Full development environment (all features + tools)
dev = [
"deephaven-mcp[test,community,enterprise,lint]", # All features and tools
]
[project.urls]
Homepage = "https://deephaven.io"
Documentation = "https://deephaven.io/docs/"
Repository = "https://github.com/deephaven/deephaven-mcp"
Issues = "https://github.com/deephaven/deephaven-mcp/issues"
[project.scripts]
dh-mcp-systems-server = "deephaven_mcp.mcp_systems_server.main:main"
dh-mcp-docs-server = "deephaven_mcp.mcp_docs_server.main:main"
[tool.uv]
package = true
[build-system]
requires = ["setuptools>=61.0", "setuptools_scm[toml]>=7.0"]
build-backend = "setuptools.build_meta"
[tool.setuptools.packages.find]
where = ["src"]
[tool.setuptools_scm]
write_to = "src/deephaven_mcp/_version.py"
version_scheme = "python-simplified-semver"
local_scheme = "no-local-version"
fallback_version = "0.0.0"
# Black configuration for code formatting
[tool.black]
line-length = 88
target-version = ["py310"]
# Ruff configuration for linting and code quality
[tool.ruff]
[tool.ruff.lint]
select = ["E", "F", "I", "B", "C", "U", "Q", "S"] # Select specific linting rules
ignore = ["E501"] # Ignore line length warnings since we use black
# Isort configuration for import sorting
[tool.isort]
profile = "black" # Use black's style for import sorting
# pydocstyle configuration for docstring linting
[tool.pydocstyle]
convention = "pep257"
match = '(?!test_).*\.py' # Ignore test files by default
# Pytest configuration for testing
[tool.pytest.ini_options]
testpaths = ["tests"] # Directory containing test files
addopts = "-W error -W ignore::pytest.PytestUnraisableExceptionWarning --cov=deephaven_mcp --cov-report=term-missing --cov-report=xml -m 'not integration'"
python_files = ["test_*.py"] # Test file naming pattern
python_classes = ["Test"] # Test class naming pattern
python_functions = ["test_"] # Test function naming pattern
markers = [
"integration: marks tests as integration tests (require Docker/pip, skipped by default). IMPORTANT: Run with -s flag to disable output capture",
]
asyncio_mode = "strict"
filterwarnings = [
"ignore:The NumPy module was reloaded (imported a second time).*:UserWarning"
]
asyncio_default_fixture_loop_scope = "function"
# Coverage configuration
[tool.coverage.run]
omit = [
"**/_version.py", # Autogenerated version file
]
# Mypy configuration for type checking
[tool.mypy]
python_version = "3.11" # Target Python version
ignore_missing_imports = true # Allow imports that may not be present at runtime
strict_optional = true # Enable strict optional checking
warn_unused_ignores = true # Warn about unused # type: ignore comments
warn_redundant_casts = true # Warn about unnecessary casts
warn_unused_configs = true # Warn about unused mypy.ini settings
warn_no_return = true # Warn about functions without return statements
warn_return_any = true # Warn about functions returning Any
warn_unreachable = true # Warn about unreachable code
disallow_untyped_defs = true # Require type annotations for function definitions
disallow_incomplete_defs = true # Require complete type annotations
disallow_untyped_decorators = true # Require decorators to be typed
disallow_untyped_calls = true # Require all function calls to be type checked