langchain-mcp-tools 0.0.14__py3-none-any.whl → 0.0.16__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- langchain_mcp_tools/langchain_mcp_tools.py +7 -5
- {langchain_mcp_tools-0.0.14.dist-info → langchain_mcp_tools-0.0.16.dist-info}/METADATA +9 -10
- langchain_mcp_tools-0.0.16.dist-info/RECORD +8 -0
- langchain_mcp_tools-0.0.14.dist-info/RECORD +0 -8
- {langchain_mcp_tools-0.0.14.dist-info → langchain_mcp_tools-0.0.16.dist-info}/LICENSE +0 -0
- {langchain_mcp_tools-0.0.14.dist-info → langchain_mcp_tools-0.0.16.dist-info}/WHEEL +0 -0
- {langchain_mcp_tools-0.0.14.dist-info → langchain_mcp_tools-0.0.16.dist-info}/top_level.txt +0 -0
@@ -37,7 +37,13 @@ require context managers while enabling parallel initialization.
|
|
37
37
|
The key aspects are:
|
38
38
|
|
39
39
|
1. Core Challenge:
|
40
|
-
|
40
|
+
|
41
|
+
A key requirement for parallel initialization is that each server must be
|
42
|
+
initialized in its own dedicated task - there's no way around this as far as
|
43
|
+
I know. However, this poses a challenge when combined with
|
44
|
+
`asynccontextmanager`.
|
45
|
+
|
46
|
+
- Resources management for `stdio_client` and `ClientSession` seems
|
41
47
|
to require relying exclusively on `asynccontextmanager` for cleanup,
|
42
48
|
with no manual cleanup options
|
43
49
|
(based on [the mcp python-sdk impl as of Jan 14, 2025](https://github.com/modelcontextprotocol/python-sdk/tree/99727a9/src/mcp/client))
|
@@ -48,10 +54,6 @@ The key aspects are:
|
|
48
54
|
- Need to ensure proper cleanup later in the same task that created them
|
49
55
|
|
50
56
|
2. Solution Strategy:
|
51
|
-
A key requirement for parallel initialization is that each server must be
|
52
|
-
initialized in its own dedicated task - there's no way around this as far
|
53
|
-
as I understand. However, this creates a challenge since we also need to
|
54
|
-
maintain long-lived sessions and handle cleanup properly.
|
55
57
|
|
56
58
|
The key insight is to keep the initialization tasks alive throughout the
|
57
59
|
session lifetime, rather than letting them complete after initialization.
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: langchain-mcp-tools
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.16
|
4
4
|
Summary: Model Context Protocol (MCP) To LangChain Tools Conversion Utility
|
5
5
|
Project-URL: Bug Tracker, https://github.com/hideya/langchain-mcp-tools-py/issues
|
6
6
|
Project-URL: Source Code, https://github.com/hideya/langchain-mcp-tools-py
|
@@ -18,8 +18,6 @@ Requires-Dist: mcp>=1.2.0
|
|
18
18
|
Requires-Dist: pyjson5>=1.6.8
|
19
19
|
Requires-Dist: pympler>=1.1
|
20
20
|
Requires-Dist: python-dotenv>=1.0.1
|
21
|
-
Requires-Dist: pytest>=8.3.4
|
22
|
-
Requires-Dist: pytest-asyncio>=0.25.2
|
23
21
|
Provides-Extra: dev
|
24
22
|
Requires-Dist: twine>=6.0.1; extra == "dev"
|
25
23
|
|
@@ -108,7 +106,7 @@ Currently, only text results of tool calls are supported.
|
|
108
106
|
## Technical Details
|
109
107
|
|
110
108
|
It was very tricky (for me) to get the parallel MCP server initialization
|
111
|
-
to work
|
109
|
+
to work, including successful final resource cleanup...
|
112
110
|
|
113
111
|
I'm new to Python, so it is very possible that my ignorance is playing
|
114
112
|
a big role here...
|
@@ -119,7 +117,13 @@ Any comments pointing out something I am missing would be greatly appreciated!
|
|
119
117
|
[(comment here)](https://github.com/hideya/langchain-mcp-tools-ts/issues)
|
120
118
|
|
121
119
|
1. Core Challenge:
|
122
|
-
|
120
|
+
|
121
|
+
A key requirement for parallel initialization is that each server must be
|
122
|
+
initialized in its own dedicated task - there's no way around this as far as
|
123
|
+
I know. However, this poses a challenge when combined with
|
124
|
+
`asynccontextmanager`.
|
125
|
+
|
126
|
+
- Resources management for `stdio_client` and `ClientSession` seems
|
123
127
|
to require relying exclusively on `asynccontextmanager` for cleanup,
|
124
128
|
with no manual cleanup options
|
125
129
|
(based on [the mcp python-sdk impl as of Jan 14, 2025](https://github.com/modelcontextprotocol/python-sdk/tree/99727a9/src/mcp/client))
|
@@ -131,11 +135,6 @@ Any comments pointing out something I am missing would be greatly appreciated!
|
|
131
135
|
|
132
136
|
2. Solution Strategy:
|
133
137
|
|
134
|
-
A key requirement for parallel initialization is that each server must be
|
135
|
-
initialized in its own dedicated task - there's no way around this as far
|
136
|
-
as I understand. However, this creates a challenge since we also need to
|
137
|
-
maintain long-lived sessions and handle cleanup properly.
|
138
|
-
|
139
138
|
The key insight is to keep the initialization tasks alive throughout the
|
140
139
|
session lifetime, rather than letting them complete after initialization.
|
141
140
|
|
@@ -0,0 +1,8 @@
|
|
1
|
+
langchain_mcp_tools/__init__.py,sha256=Xtv2VphhrWB_KlxTIofHZqtCIGtNEl0MxugnrNXTERA,94
|
2
|
+
langchain_mcp_tools/langchain_mcp_tools.py,sha256=EJgm28o2M3mBsFkeDtpw6hooSE1oWwjFJYhRfirxCgE,10511
|
3
|
+
langchain_mcp_tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
+
langchain_mcp_tools-0.0.16.dist-info/LICENSE,sha256=CRC91e8v116gCpnp7h49oIa6_zjhxqnHFTREeoZFJwA,1072
|
5
|
+
langchain_mcp_tools-0.0.16.dist-info/METADATA,sha256=S7Ii62KuH2HTe1eg3eqSqfpUWWagTKz0diIn3Wdc-Ns,6876
|
6
|
+
langchain_mcp_tools-0.0.16.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
7
|
+
langchain_mcp_tools-0.0.16.dist-info/top_level.txt,sha256=aR_9V2A1Yt-Bca60KmndmGLUWb2wiM5IOG-Gkaf1dxY,20
|
8
|
+
langchain_mcp_tools-0.0.16.dist-info/RECORD,,
|
@@ -1,8 +0,0 @@
|
|
1
|
-
langchain_mcp_tools/__init__.py,sha256=Xtv2VphhrWB_KlxTIofHZqtCIGtNEl0MxugnrNXTERA,94
|
2
|
-
langchain_mcp_tools/langchain_mcp_tools.py,sha256=LptcccMFDM9t9ZYPOGvNuTBW7JFPP8Nhv3JwLr0Mits,10561
|
3
|
-
langchain_mcp_tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
4
|
-
langchain_mcp_tools-0.0.14.dist-info/LICENSE,sha256=CRC91e8v116gCpnp7h49oIa6_zjhxqnHFTREeoZFJwA,1072
|
5
|
-
langchain_mcp_tools-0.0.14.dist-info/METADATA,sha256=XNhz-pzd91ROR5Av0wjJ4qvB3dGcLST_ruBUKprJhrE,6962
|
6
|
-
langchain_mcp_tools-0.0.14.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
7
|
-
langchain_mcp_tools-0.0.14.dist-info/top_level.txt,sha256=aR_9V2A1Yt-Bca60KmndmGLUWb2wiM5IOG-Gkaf1dxY,20
|
8
|
-
langchain_mcp_tools-0.0.14.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|