Commit 0cad2078 authored by Fabian Affolter's avatar Fabian Affolter
Browse files

python313Packages.docling-mcp: init at 1.2.0

Making docling agentic through MCP

https://github.com/docling-project/docling-mcp
parent 5c61cbbe
Loading
Loading
Loading
Loading
+101 −0
Original line number Diff line number Diff line
{
  lib,
  accelerate,
  buildPythonPackage,
  docling,
  fetchFromGitHub,
  hatchling,
  httpx,
  llama-index-core,
  llama-index-embeddings-huggingface,
  llama-index-embeddings-openai,
  llama-index-llms-openai-like,
  llama-index-node-parser-docling,
  llama-index-readers-docling,
  llama-index-readers-file,
  llama-index-vector-stores-milvus,
  llama-index,
  llama-stack-client,
  mcp,
  ollama,
  pydantic-settings,
  pydantic,
  pytest-asyncio,
  pytestCheckHook,
  python-dotenv,
  smolagents,
  torch,
  transformers,
}:

buildPythonPackage rec {
  pname = "docling-mcp";
  version = "1.2.0";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "docling-project";
    repo = "docling-mcp";
    tag = "v${version}";
    hash = "sha256-ktJ5K+1Qb7/lUHPkmv2FMnSe6PiIQ1BvWj5qIG8xfdE=";
  };

  pythonRemoveDeps = [
    # Disabled due to circular dependency
    "mellea"
  ];

  build-system = [ hatchling ];

  dependencies = [
    docling
    httpx
    mcp
    pydantic
    pydantic-settings
    python-dotenv
  ];

  optional-dependencies = {
    llama-index-rag = [
      llama-index
      llama-index-core
      llama-index-embeddings-huggingface
      llama-index-embeddings-openai
      llama-index-llms-openai-like
      llama-index-node-parser-docling
      llama-index-readers-docling
      llama-index-readers-file
      llama-index-vector-stores-milvus
    ];
    llama-stack = [ llama-stack-client ];
    smolagents = [
      accelerate
      ollama
      smolagents
      torch
      transformers
    ];
  };

  nativeCheckInputs = [
    pytest-asyncio
    pytestCheckHook
  ];

  pythonImportsCheck = [ "docling_mcp" ];

  disabledTestPaths = [
    # Tests require network access
    "tests/test_mcp_server.py"
    "tests/test_conversion_tools.py"
  ];

  meta = {
    description = "Making docling agentic through MCP";
    homepage = "https://github.com/docling-project/docling-mcp";
    changelog = "https://github.com/docling-project/docling-mcp/blob/${src.tag}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ fab ];
  };
}
+2 −0
Original line number Diff line number Diff line
@@ -4268,6 +4268,8 @@ self: super: with self; {
  docling-jobkit = callPackage ../development/python-modules/docling-jobkit { };
  docling-mcp = callPackage ../development/python-modules/docling-mcp { };
  docling-parse = callPackage ../development/python-modules/docling-parse {
    loguru-cpp = pkgs.loguru;
  };