@h1deya/langchain-mcp-tools 0.3.9 → 0.4.1

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.
Files changed (2) hide show
  1. package/README.md +18 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -91,10 +91,10 @@ to be invoked to close all MCP server sessions when finished.
91
91
  The returned tools can be used with LangChain, e.g.:
92
92
 
93
93
  ```ts
94
- // import { createAgent } from "langchain";
94
+ // import { ChatGoogleGenerativeAI } from "@langchain/google-genai";
95
95
  const model = new ChatGoogleGenerativeAI({ model: "gemini-2.5-flash" });
96
96
 
97
- // import { createReactAgent } from "@langchain/langgraph/prebuilt";
97
+ // import { createAgent } from "langchain";
98
98
  const agent = createAgent({
99
99
  model,
100
100
  tools
@@ -167,10 +167,25 @@ While MCP tools can return multiple content types (text, images, etc.), this lib
167
167
 
168
168
  - **LLM Compatibility and Schema Transformations**: The library can perform schema transformations for LLM compatibility.
169
169
  [See below](https://github.com/hideya/langchain-mcp-tools-ts/blob/main/README.md#llm-provider-schema-compatibility) for details.
170
- - **Passing PATH Env Variable**: The library automatically adds the `PATH` environment variable to stdio server configrations if not explicitly provided to ensure servers can find required executables.
170
+ - **Passing PATH Env Variable**: The library automatically adds the `PATH` environment variable to local (stdio) server configrations if not explicitly provided to ensure servers can find required executables.
171
171
 
172
172
  ## Features
173
173
 
174
+ ### Environment Variable Configuration for Local MCP Server
175
+
176
+ If you need to pass an API key or other configurations to a local MCP server
177
+ via environment variables, use this example as a guide:
178
+
179
+ ```ts
180
+ brave: {
181
+ command: "npx",
182
+ args: [ "-y", "@modelcontextprotocol/server-brave-search"],
183
+ env: { "BRAVE_API_KEY": `${process.env.BRAVE_API_KEY}` }
184
+ },
185
+ ```
186
+
187
+ **Note**: The library automatically adds the `PATH` environment variable to local (stdio) server configrations, if not explicitly provided, to ensure servers can find required executables.
188
+
174
189
  ### `stderr` Redirection for Local MCP Server
175
190
 
176
191
  A new key `"stderr"` has been introduced to specify a file descriptor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h1deya/langchain-mcp-tools",
3
- "version": "0.3.9",
3
+ "version": "0.4.1",
4
4
  "description": "MCP To LangChain Tools Conversion Utility",
5
5
  "license": "MIT",
6
6
  "keywords": [