You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Model Context Protocol (MCP)](https://modelcontextprotocol.io/) is the de facto industry standard
109
+
that dramatically expands the scope of LLMs by enabling the integration of external tools and resources,
110
+
including DBs, Cloud Storages, GitHub, Docker, Slack, and more.
111
+
There are quite a few useful MCP servers already available.
112
+
See [MCP Server Listing on the Official Site](https://github.com/modelcontextprotocol/servers?tab=readme-ov-file#model-context-protocol-servers).
113
+
114
+
This utility's goal is to make these numerous MCP servers easily accessible from LangChain.
115
+
It contains a utility function `convertMcpToLangchainTools()`.
116
+
This async function handles parallel initialization of specified multiple MCP servers
117
+
and converts their available tools into an array of LangChain-compatible tools.
118
+
It also performs LLM provider-specific schema transformations
119
+
to prevent [schema compatibility issues](https://github.com/hideya/langchain-mcp-tools-ts/blob/main/README.md#llm-provider-schema-compatibility)
120
+
121
+
For detailed information on how to use this library, please refer to the following document:
122
+
["Supercharging LangChain: Integrating 2000+ MCP with ReAct"](https://medium.com/@h1deya/supercharging-langchain-integrating-450-mcp-with-react-d4e467cbf41a).
131
123
132
124
## MCP Protocol Support
133
125
@@ -141,12 +133,19 @@ The library uses LangChain's `response_format: 'content'` (the default), which o
141
133
While MCP tools can return multiple content types (text, images, etc.), this library currently filters and uses only text content.
142
134
-**MCP Features**: Only MCP [Tools](https://modelcontextprotocol.io/docs/concepts/tools) are supported. Other MCP features like Resources, Prompts, and Sampling are not implemented.
143
135
144
-
### Notes:
136
+
### Notes
145
137
146
138
-**LLM Compatibility and Schema Transformations**: The library can perform schema transformations for LLM compatibility.
147
139
[See below](https://github.com/hideya/langchain-mcp-tools-ts/blob/main/README.md#llm-provider-schema-compatibility) for details.
148
140
-**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.
149
141
142
+
## API docs
143
+
144
+
Can be found [here](https://hideya.github.io/langchain-mcp-tools-ts/modules.html)
145
+
146
+
## Building from Source
147
+
148
+
See [README_DEV.md](https://github.com/hideya/langchain-mcp-tools-ts/blob/main/README_DEV.md) for details.
150
149
151
150
## Features
152
151
@@ -310,15 +309,25 @@ Can be found [here](https://github.com/hideya/langchain-mcp-tools-ts/blob/main/C
310
309
3.**Test explicit transports**: Try forcing specific transport types to isolate auto-detection issues
311
310
4.**Verify server independently**: Refer to [Debugging Section in MCP documentation](https://modelcontextprotocol.io/docs/tools/debugging)
312
311
312
+
### Debugging Authentication
313
+
314
+
1.**Check your tokens/credentials** - Most auth failures are due to expired or incorrect tokens
315
+
2.**Verify token permissions** - Some MCP servers require specific scopes (e.g., GitHub Copilot license)
316
+
3.**Test with curl** - Try a simple HTTP request to verify your auth setup:
0 commit comments