1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 hatchling,
6 jsonref,
7 langchain,
8 langgraph,
9 llama-index,
10 mcp,
11 pytest-asyncio,
12 pytestCheckHook,
13 python-dotenv,
14 smolagents,
15 soundfile,
16 torchaudio,
17}:
18
19buildPythonPackage rec {
20 pname = "mcpadapt";
21 version = "0.1.16";
22 pyproject = true;
23
24 src = fetchFromGitHub {
25 owner = "grll";
26 repo = "mcpadapt";
27 tag = "v${version}";
28 hash = "sha256-uhphBJ9gab/5i8rTnEzfhCm0caJ756XdGqJeHoHP0tM=";
29 };
30
31 build-system = [ hatchling ];
32
33 dependencies = [
34 jsonref
35 mcp
36 python-dotenv
37 ];
38
39 optional-dependencies = {
40 audio = [
41 torchaudio
42 soundfile
43 ];
44 # crewai = [ crewai ];
45 langchain = [
46 langchain
47 # langchain-anthropic
48 langgraph
49 ];
50 llamaindex = [ llama-index ];
51 smolagents = [ smolagents ];
52 };
53
54 pythonImportsCheck = [ "mcpadapt" ];
55
56 # Circular dependency smolagents
57 doCheck = false;
58
59 meta = {
60 description = "MCP servers tool";
61 homepage = "https://github.com/grll/mcpadapt";
62 changelog = "https://github.com/grll/mcpadapt/releases/tag/${src.tag}";
63 license = lib.licenses.mit;
64 maintainers = with lib.maintainers; [ fab ];
65 };
66}