Question
I have been trying to get an MCP client to communicate with Notion's MCP server using this simple code snippet:
asyncwithstreamablehttp_client("https://mcp.notion.com/mcp", auth=oauth_auth) as (read, write, _):
asyncwithClientSession(read, write) assession:
awaitsession.initialize()
tools=awaitsession.list_tools()
print(f"Available tools: {[tool.namefortoolintools.tools]}")
resources=awaitsession.list_resources()
print(f"Available resources: {[r.uriforrinresources.resources]}")
tool_result=awaitsession.call_tool(name="search", arguments={"query": "John Doe"})Works perfectly, but it takes 10 seconds for the session to initialize, 10 other seconds for listing tools, 10 seconds for listing resources, and 10 seconds for the tool call as well. When connecting the MCP Inspector to the same MCP server, everything shows up instantly (less than a second), for each execution.
Is this normal (maybe Node vs Python?) or is there something we can do about it?
Additional Context
Question
I have been trying to get an MCP client to communicate with Notion's MCP server using this simple code snippet:
Works perfectly, but it takes 10 seconds for the session to initialize, 10 other seconds for listing tools, 10 seconds for listing resources, and 10 seconds for the tool call as well. When connecting the MCP Inspector to the same MCP server, everything shows up instantly (less than a second), for each execution.
Is this normal (maybe Node vs Python?) or is there something we can do about it?
Additional Context