langchain-mcp-tools 0.2.0__tar.gz → 0.2.1__tar.gz
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-0.2.0/src/langchain_mcp_tools.egg-info → langchain_mcp_tools-0.2.1}/PKG-INFO +22 -14
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/README.md +21 -13
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/pyproject.toml +1 -1
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1/src/langchain_mcp_tools.egg-info}/PKG-INFO +22 -14
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/LICENSE +0 -0
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/setup.cfg +0 -0
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/src/langchain_mcp_tools/__init__.py +0 -0
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/src/langchain_mcp_tools/langchain_mcp_tools.py +0 -0
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/src/langchain_mcp_tools/py.typed +0 -0
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/src/langchain_mcp_tools.egg-info/SOURCES.txt +0 -0
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/src/langchain_mcp_tools.egg-info/dependency_links.txt +0 -0
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/src/langchain_mcp_tools.egg-info/requires.txt +0 -0
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/src/langchain_mcp_tools.egg-info/top_level.txt +0 -0
- {langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/tests/test_langchain_mcp_tools.py +0 -0
{langchain_mcp_tools-0.2.0/src/langchain_mcp_tools.egg-info → langchain_mcp_tools-0.2.1}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: langchain-mcp-tools
|
3
|
-
Version: 0.2.
|
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=
|
106
|
-
model_provider=
|
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
|
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
|
-
|
161
|
+
The key name `cwd` is derived from Python SDK's `StdioServerParameters`.
|
159
162
|
|
160
|
-
|
161
|
-
|
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
|
-
|
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
|
-
-
|
188
|
+
- MCP features other than [Tools](https://modelcontextprotocol.io/docs/concepts/tools) are not supported.
|
181
189
|
|
182
190
|
## Change Log
|
183
191
|
|
@@ -41,6 +41,9 @@ pip install langchain-mcp-tools
|
|
41
41
|
|
42
42
|
## Quick Start
|
43
43
|
|
44
|
+
A minimal but complete working usage example can be found
|
45
|
+
[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)
|
46
|
+
|
44
47
|
`convert_mcp_to_langchain_tools()` utility function accepts MCP server configurations
|
45
48
|
that follow the same structure as
|
46
49
|
[Claude for Desktop](https://modelcontextprotocol.io/quickstart/user),
|
@@ -77,8 +80,8 @@ The returned tools can be used with LangChain, e.g.:
|
|
77
80
|
```python
|
78
81
|
# from langchain.chat_models import init_chat_model
|
79
82
|
llm = init_chat_model(
|
80
|
-
model=
|
81
|
-
model_provider=
|
83
|
+
model="claude-3-7-sonnet-latest",
|
84
|
+
model_provider="anthropic"
|
82
85
|
)
|
83
86
|
|
84
87
|
# from langgraph.prebuilt import create_react_agent
|
@@ -88,9 +91,6 @@ agent = create_react_agent(
|
|
88
91
|
)
|
89
92
|
```
|
90
93
|
|
91
|
-
Find complete, minimal working usage examples
|
92
|
-
[here](https://github.com/hideya/langchain-mcp-tools-py-usage/blob/main/src/example.py)
|
93
|
-
|
94
94
|
For hands-on experimentation with MCP server integration,
|
95
95
|
try [this LangChain application built with the utility](https://github.com/hideya/mcp-client-langchain-py)
|
96
96
|
|
@@ -113,14 +113,17 @@ For detailed information on how to use this library, please refer to the followi
|
|
113
113
|
},
|
114
114
|
```
|
115
115
|
|
116
|
-
Note that the key
|
116
|
+
Note that the key `"url"` may be changed in the future to match
|
117
117
|
the MCP server configurations used by Claude for Desktop once
|
118
118
|
it introduces remote server support.
|
119
119
|
|
120
|
+
A usage example can be found [here](
|
121
|
+
https://github.com/hideya/langchain-mcp-tools-py-usage/blob/e759edf886bdaef7c162e7f228e32fbb43993e37/src/example.py#L43-L54)
|
122
|
+
|
120
123
|
### Working Directory Configuration for Local MCP Servers
|
121
124
|
|
122
|
-
The working directory that is used when spawning a local MCP server
|
123
|
-
can be specified with the `cwd` key as follows:
|
125
|
+
The working directory that is used when spawning a local (stdio) MCP server
|
126
|
+
can be specified with the `"cwd"` key as follows:
|
124
127
|
|
125
128
|
```python
|
126
129
|
"local-server-name": {
|
@@ -130,10 +133,12 @@ can be specified with the `cwd` key as follows:
|
|
130
133
|
},
|
131
134
|
```
|
132
135
|
|
133
|
-
|
136
|
+
The key name `cwd` is derived from Python SDK's `StdioServerParameters`.
|
134
137
|
|
135
|
-
|
136
|
-
|
138
|
+
### Configuration for Local MCP Server `stderr` Redirection
|
139
|
+
|
140
|
+
A new key `"errlog"` has been introduced in to specify a file-like object
|
141
|
+
to which local (stdio) MCP server's stderr is redirected.
|
137
142
|
|
138
143
|
```python
|
139
144
|
log_path = f"mcp-server-{server_name}.log"
|
@@ -141,7 +146,10 @@ to which MCP server's stderr is redirected.
|
|
141
146
|
mcp_servers[server_name]["errlog"] = log_file
|
142
147
|
```
|
143
148
|
|
144
|
-
|
149
|
+
A usage example can be found [here](
|
150
|
+
https://github.com/hideya/langchain-mcp-tools-py-usage/blob/e759edf886bdaef7c162e7f228e32fbb43993e37/src/example.py#L88-L108)
|
151
|
+
|
152
|
+
**NOTE: Why the key name `errlog` was chosen:**
|
145
153
|
Unlike TypeScript SDK's `StdioServerParameters`, the Python
|
146
154
|
SDK's `StdioServerParameters` doesn't include `stderr: int`.
|
147
155
|
Instead, it calls `stdio_client()` with a separate argument
|
@@ -152,7 +160,7 @@ follow the Python SDK more closely.
|
|
152
160
|
## Limitations
|
153
161
|
|
154
162
|
- Currently, only text results of tool calls are supported.
|
155
|
-
-
|
163
|
+
- MCP features other than [Tools](https://modelcontextprotocol.io/docs/concepts/tools) are not supported.
|
156
164
|
|
157
165
|
## Change Log
|
158
166
|
|
{langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1/src/langchain_mcp_tools.egg-info}/PKG-INFO
RENAMED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: langchain-mcp-tools
|
3
|
-
Version: 0.2.
|
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=
|
106
|
-
model_provider=
|
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
|
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
|
-
|
161
|
+
The key name `cwd` is derived from Python SDK's `StdioServerParameters`.
|
159
162
|
|
160
|
-
|
161
|
-
|
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
|
-
|
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
|
-
-
|
188
|
+
- MCP features other than [Tools](https://modelcontextprotocol.io/docs/concepts/tools) are not supported.
|
181
189
|
|
182
190
|
## Change Log
|
183
191
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{langchain_mcp_tools-0.2.0 → langchain_mcp_tools-0.2.1}/src/langchain_mcp_tools.egg-info/SOURCES.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|