Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Listing tools with streamablehttp_client (with OAuth) is much slower when compared to the Inspector #1204

Copy link
Copy link
@keurcien

Description

@keurcien
Issue body actions

Question

I have been trying to get an MCP client to communicate with Notion's MCP server using this simple code snippet:

async with streamablehttp_client("https://mcp.notion.com/mcp", auth=oauth_auth) as (read, write, _):

    async with ClientSession(read, write) as session:
        await session.initialize()
        tools = await session.list_tools()
        print(f"Available tools: {[tool.name for tool in tools.tools]}")
        resources = await session.list_resources()
        print(f"Available resources: {[r.uri for r in resources.resources]}")

        tool_result = await session.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

python 3.11
mcp==1.12.2
Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requestedFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.