From 2f210d7ccf4d95627db5dce37e596b324dae39c0 Mon Sep 17 00:00:00 2001 From: kexsh <769014005@qq.com> Date: Sat, 1 Nov 2025 10:41:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B3=E9=85=8D=E7=BD=AE=E6=96=87?= =?UTF-8?q?=E4=BB=B6=E6=89=BE=E4=B8=8D=E5=88=B0=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9B=20=E8=A7=A3=E5=86=B3block=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + mcp_servers.json | 9 +++++++++ src/mcp/mcp_tools.py | 2 +- 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 mcp_servers.json diff --git a/README.md b/README.md index 5bd2dd2..6532d06 100644 --- a/README.md +++ b/README.md @@ -39,6 +39,7 @@ LANGSMITH_API_KEY=lsv2... ```shell langgraph dev +langgraph dev --allow-blocking ``` For more information on getting started with LangGraph Server, [see here](https://langchain-ai.github.io/langgraph/tutorials/langgraph-platform/local-server/). diff --git a/mcp_servers.json b/mcp_servers.json new file mode 100644 index 0000000..fe2eb83 --- /dev/null +++ b/mcp_servers.json @@ -0,0 +1,9 @@ +{ + "math": { + "command": "python", + "args": [ + "/home/kexsh/src/knightutils/test/mcp/math_server.py" + ], + "transport": "stdio" + } +} \ No newline at end of file diff --git a/src/mcp/mcp_tools.py b/src/mcp/mcp_tools.py index 74390e7..df0c07a 100644 --- a/src/mcp/mcp_tools.py +++ b/src/mcp/mcp_tools.py @@ -2,7 +2,7 @@ from langchain_mcp_adapters.client import MultiServerMCPClient import json def get_client() -> MultiServerMCPClient: - mcp_tools = json.load(open("mcp_tools.json")) + mcp_tools = json.load(open("mcp_servers.json")) client = MultiServerMCPClient(mcp_tools)