langchain-mcp-tools 0.2.0__py3-none-any.whl → 0.2.1__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langchain-mcp-tools
3
- Version: 0.2.0
3
+ Version: 0.2.1
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
@@ -66,6 +66,9 @@ pip install langchain-mcp-tools
66
66
 
67
67
  ## Quick Start
68
68
 
69
+ A minimal but complete working usage example can be found
70
+ [in this example in the langchain-mcp-tools-py-usage repo](https://github.com/hideya/langchain-mcp-tools-py-usage/blob/main/src/example.py)
71
+
69
72
  `convert_mcp_to_langchain_tools()` utility function accepts MCP server configurations
70
73
  that follow the same structure as
71
74
  [Claude for Desktop](https://modelcontextprotocol.io/quickstart/user),
@@ -102,8 +105,8 @@ The returned tools can be used with LangChain, e.g.:
102
105
  ```python
103
106
  # from langchain.chat_models import init_chat_model
104
107
  llm = init_chat_model(
105
- model='claude-3-7-sonnet-latest',
106
- model_provider='anthropic'
108
+ model="claude-3-7-sonnet-latest",
109
+ model_provider="anthropic"
107
110
  )
108
111
 
109
112
  # from langgraph.prebuilt import create_react_agent
@@ -113,9 +116,6 @@ agent = create_react_agent(
113
116
  )
114
117
  ```
115
118
 
116
- Find complete, minimal working usage examples
117
- [here](https://github.com/hideya/langchain-mcp-tools-py-usage/blob/main/src/example.py)
118
-
119
119
  For hands-on experimentation with MCP server integration,
120
120
  try [this LangChain application built with the utility](https://github.com/hideya/mcp-client-langchain-py)
121
121
 
@@ -138,14 +138,17 @@ For detailed information on how to use this library, please refer to the followi
138
138
  },
139
139
  ```
140
140
 
141
- Note that the key name `"url"` may be changed in the future to match
141
+ Note that the key `"url"` may be changed in the future to match
142
142
  the MCP server configurations used by Claude for Desktop once
143
143
  it introduces remote server support.
144
144
 
145
+ A usage example can be found [here](
146
+ https://github.com/hideya/langchain-mcp-tools-py-usage/blob/e759edf886bdaef7c162e7f228e32fbb43993e37/src/example.py#L43-L54)
147
+
145
148
  ### Working Directory Configuration for Local MCP Servers
146
149
 
147
- The working directory that is used when spawning a local MCP server
148
- can be specified with the `cwd` key as follows:
150
+ The working directory that is used when spawning a local (stdio) MCP server
151
+ can be specified with the `"cwd"` key as follows:
149
152
 
150
153
  ```python
151
154
  "local-server-name": {
@@ -155,10 +158,12 @@ can be specified with the `cwd` key as follows:
155
158
  },
156
159
  ```
157
160
 
158
- ### Configuration for MCP Server stderr Redirection
161
+ The key name `cwd` is derived from Python SDK's `StdioServerParameters`.
159
162
 
160
- A new key `errlog` has been introduced in to specify a file-like object
161
- to which MCP server's stderr is redirected.
163
+ ### Configuration for Local MCP Server `stderr` Redirection
164
+
165
+ A new key `"errlog"` has been introduced in to specify a file-like object
166
+ to which local (stdio) MCP server's stderr is redirected.
162
167
 
163
168
  ```python
164
169
  log_path = f"mcp-server-{server_name}.log"
@@ -166,7 +171,10 @@ to which MCP server's stderr is redirected.
166
171
  mcp_servers[server_name]["errlog"] = log_file
167
172
  ```
168
173
 
169
- **NOTE: Why the key name `errlog` for `server_config` was chosen:**
174
+ A usage example can be found [here](
175
+ https://github.com/hideya/langchain-mcp-tools-py-usage/blob/e759edf886bdaef7c162e7f228e32fbb43993e37/src/example.py#L88-L108)
176
+
177
+ **NOTE: Why the key name `errlog` was chosen:**
170
178
  Unlike TypeScript SDK's `StdioServerParameters`, the Python
171
179
  SDK's `StdioServerParameters` doesn't include `stderr: int`.
172
180
  Instead, it calls `stdio_client()` with a separate argument
@@ -177,7 +185,7 @@ follow the Python SDK more closely.
177
185
  ## Limitations
178
186
 
179
187
  - Currently, only text results of tool calls are supported.
180
- - Fatures other than [Tools](https://modelcontextprotocol.io/docs/concepts/tools) are not supported.
188
+ - MCP features other than [Tools](https://modelcontextprotocol.io/docs/concepts/tools) are not supported.
181
189
 
182
190
  ## Change Log
183
191
 
@@ -1,8 +1,8 @@
1
1
  langchain_mcp_tools/__init__.py,sha256=iatHG2fCpz143wgQUZpyFVilgri4yOh2P0vxr22gguE,114
2
2
  langchain_mcp_tools/langchain_mcp_tools.py,sha256=n4u9fN3_sVMG1CmSKk8FrlXrBt79Ly1tz0TLhmDUaic,15118
3
3
  langchain_mcp_tools/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- langchain_mcp_tools-0.2.0.dist-info/licenses/LICENSE,sha256=CRC91e8v116gCpnp7h49oIa6_zjhxqnHFTREeoZFJwA,1072
5
- langchain_mcp_tools-0.2.0.dist-info/METADATA,sha256=oCzGJZvkhbhF_OA8Pm-Iy2JSjbeIJEEK1cr8pPxxh1g,6808
6
- langchain_mcp_tools-0.2.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
7
- langchain_mcp_tools-0.2.0.dist-info/top_level.txt,sha256=aR_9V2A1Yt-Bca60KmndmGLUWb2wiM5IOG-Gkaf1dxY,20
8
- langchain_mcp_tools-0.2.0.dist-info/RECORD,,
4
+ langchain_mcp_tools-0.2.1.dist-info/licenses/LICENSE,sha256=CRC91e8v116gCpnp7h49oIa6_zjhxqnHFTREeoZFJwA,1072
5
+ langchain_mcp_tools-0.2.1.dist-info/METADATA,sha256=6_d5jxaN8KqL6ZyJHwVDI0YQLe30xy0-7sgyRs85Zlc,7287
6
+ langchain_mcp_tools-0.2.1.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
7
+ langchain_mcp_tools-0.2.1.dist-info/top_level.txt,sha256=aR_9V2A1Yt-Bca60KmndmGLUWb2wiM5IOG-Gkaf1dxY,20
8
+ langchain_mcp_tools-0.2.1.dist-info/RECORD,,