-
Notifications
You must be signed in to change notification settings - Fork 210
Description
Version
latest
App
- Cursor
- Windsurf
- VSCode
- VSCode Insiders
- Claude Desktop
- Other
Affected Models (if applicable)
- Claude 3.5 Sonnet
- Claude 3.7 Sonnet
- GPT-4a
- o4-mini
- Other
Bug Description
I am using following python script
import asyncio
from langchain_mcp_adapters.client import MultiServerMCPClient
from langchain_mcp_adapters.tools import load_mcp_tools
async def main():
client = MultiServerMCPClient(
{
"mongodb": {
"transport": "stdio",
"command": "npx",
"args": [
"-y",
"mongodb-mcp-server@latest",
"--readOnly"
],
"env": {
"MDB_MCP_CONNECTION_STRING": "mongodb://localhost:27017"
}
}
}
)
async with client.session("mongodb") as session:
tools = await load_mcp_tools(session)
print(f"Loaded {len(tools)} tools:")
for tool in tools:
print(f" - {tool.name}")
asyncio.run(main())Output
Loaded 17 tools:
- aggregate
- collection-indexes
- collection-schema
- collection-storage-size
- connect
- count
- db-stats
- explain
- export
- find
- list-collections
- list-databases
- mongodb-logs
- atlas-local-connect-deployment
- atlas-local-list-deployments
- list-knowledge-sources
- search-knowledge
And it is stuck here.
I am using
Python 3.12.11langchain-mcp-adapters == 0.2.1
Reactions are currently unavailable