Skip to content

Bug: MCP closes connection after one request #72

Description

@Gyurmatag

In the commented out code, we make a request for the MCP and it finishes we are calling:
await this.mcp.closeConnection(mcpConnection.id);
So the connection is closed and the second request for an MCP tool fails with this:

error: ToolExecutionError [AI_ToolExecutionError]: Error executing tool XIWj-FhT_browser_navigate: Not connected

What about calling it in the destroy() function on the agent? The agent will live in the durable object so I don't think we need to close the connection until the agent is destroyes. I will make a PR about it and we can discuss this in that, @threepointone !

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions