-
I am trying to write a chatbot that uses MCP to interact with Elasticserver. If I want to use Claude Desktop for my client, I'd add the following to my Claude Desktop configuration. "mcpServers": {
"elasticsearch-mcp-server-local": {
"command": "node",
"args": ["./dist/index.js"],
"env": {
"ES_URL": "https://eslasticserach-server:443",
"ES_API_KEY": "**********"
}
}
} Instead of using Claude Desktop, I want to write a LangGraph client. I'm trying to do this with client = MultiServerMCPClient(
{
"elasticsearch": {
"command": "node",
"args": ["./dist/index.js"],
"transport": "stdio",
}
}
)
tools = await client.get_tools()
agent = create_react_agent(
model=model,
tools=tools,
checkpointer=checkpointer,
prompt=prompt,
) The
And everything is hung. It looks like I am failing to pass the How do I write an client for this MCP server using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Looks like you can pass in a |
Beta Was this translation helpful? Give feedback.
Looks like you can pass in a
"env"
value to theMultiServerMCPClient
configuration. Is that documented anywhere?