How to initialize MultiServerMCPClient as a global variable in Flask app #212
Unanswered
gauravmindzk
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello everyone, I'm developing a Flask based chatbot.
In it, I'm using Langgraph's create_react_agent for question-answering and MultiServerMCPClient to get the tools provided by my MCP server.
The MCP server currently contains only 1 tool i.e. retrieve_context ( to get data from pinecone index ).
Below is the flask api route for the Ask API .
I want to initialize the 'MultiServerMCPClient' globally as it's used in my other apis as well and if possible I also want to cache it like I've cached client data
Beta Was this translation helpful? Give feedback.
All reactions