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
Copy file name to clipboardExpand all lines: rust-mcp-server-syncable-cli/README.md
+110Lines changed: 110 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -262,6 +262,116 @@ We are planning to add **first-class support for the [LangGraph](https://github.
262
262
263
263
---
264
264
265
+
## Python LangGraph Agent Integration
266
+
267
+
You can use the [LangGraph](https://github.com/langchain-ai/langgraph) framework to connect to this MCP server in both stdio and SSE modes. Below are example Python scripts for each mode.
268
+
269
+
### Using Stdio Mode
270
+
271
+
This example launches the `mcp-stdio` binary and connects via stdio:
272
+
273
+
```python
274
+
import asyncio
275
+
import os
276
+
from dotenv import load_dotenv
277
+
from langchain_mcp_adapters.client import MultiServerMCPClient
278
+
from langgraph.prebuilt import create_react_agent
279
+
import openai
280
+
281
+
load_dotenv()
282
+
openai.api_key = os.getenv("OPENAI_API_KEY")
283
+
284
+
asyncdefmain():
285
+
client = MultiServerMCPClient({
286
+
"syncable_cli": {
287
+
"command": "mcp-stdio", # Ensure mcp-stdio is in your PATH
0 commit comments