-
Notifications
You must be signed in to change notification settings - Fork 26
[BUG] 看起来mcp的支持有问题,点进来查看更多内容 #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
你好, 很难准确判断你遇到的问题,但我怀疑你碰到了 #52 中描述的问题。我刚刚更新了 请确保你使用的是这些包的最新版本,并再次尝试运行。如果你想验证 MCP 服务器为工具生成的 JSON Schema,可以使用 [mcp inspector](https://modelcontextprotocol.io/docs/tools/inspector) 工具。如果你在 inspector 中看到的 schema 不符合预期,可以尝试直接使用 JSON Schema 来定义服务器端的 schema,而不是使用 zod。 如果这些方法仍然不能解决问题,请回复我,我会进一步查看。 Hello, It's hard to say exactly what's happening here, but I suspect that you're running into the issue described in #52. I just updated Please make sure that you're using the latest versions of all of these packages and try again. You can also use the mcp inspector tool to validate the JSON schema generated for your tools by your MCP server implementation. If the schema you see in the inspector doesn't match your expectations, you can try defining the schema in your server using JSON schema directly, rather than using zod. If none of that works, please report back and I'll have a closer look. |
Upgrading to the latest version as you said does solve the problem. At least the problem I encountered is solved, but it shows that there were indeed big problems before. I will write down my previous versions of the package and the current package for you to see.
"@langchain/community": "^0.3.39",
"@langchain/core": "^0.3.43",
"@langchain/langgraph": "^0.2.63",
"@langchain/langgraph-checkpoint-postgres": "^0.0.4",
"@langchain/langgraph-supervisor": "^0.0.9",
"@langchain/mcp-adapters": "^0.4.0",
"@langchain/openai": "^0.4.9",
I believe you have been working hard on the construction. Since I have not participated in the construction, I have raised many bugs, but this can be frustrating sometimes. I have known you for a long time, and I have used a lot of your products. You can see that I am using all your products above. Although this problem frustrated me yesterday, I am full of confidence today. One reason is that you gave a detailed reply. For example, after you wrote so many words, you used both Chinese and English. For the sake of politeness, I will reply in English to show my respect.
The above code is what I have tested. You can also use the old version to test and find the problem. At that time, in order to let you understand the problem, I also wrote the test code.
|
After testing, I found that @langchain/mcp-adapters solved the problem, but @langchain/langgraph-supervisor ended before completing the problem and was interrupted. The effect was very bad. I think @langchain/langgraph-supervisor may not be used in production, but only developed for testing. Therefore, I encountered problems when applying it in the production environment, indicating that it cannot be used in the production environment.
|
The test found that google/gemini-2.0-flash-001 has problems, openrouter/quasar-alpha has no problems, The task is interrupted before it is completed |
When I use claude, it prompts
|
found other people also have feedback langchain-ai/langchainjs#6349 |
首先是参数的问题,参数有大小写,但是它并没有按照zod严格的来筛选,经过我的测试对比,发现兼容性没有 @langchain/core/tools 好
然后就是对话还没有结束,程序就停止了,这是一个问题严重的问题
我相信只需要按照我的对话里面的功能进行对话,就能够重新尝试这个问题
结论:
1.mcp兼容性存在问题,大小写和类型验证判断(可能没有准确传入参数给ai?)
2.流程控制有问题,无论哪个ai模型,已测试过各种模型
claude3.5 3.7 4o quasar-alpha gemini any
这些模型都测试过上面了,下面是代码
你只需要运行
main.ts
为了帮助改进我已经提供案例代码,
经常遇到的问题,默认是 Binance,但是总是会使用BINANCE,
我还在开发项目,我相信我有时间的时候也会加入一起开发和修复,
同样的对话 @langchain/core/tools 没有问题
The text was updated successfully, but these errors were encountered: