Skip to content

Error with request ID not integer #157

@stefanolissa

Description

@stefanolissa

Hi, trying to expose an MCP server and connect with Mistral, I get this error:

Unexpected error in handle_mcp_request | Context: {"transport":"WP\\MCP\\Transport\\Infrastructure\\HttpRequestHandler","server_id":"mcp1","error":"WP\\MCP\\Infrastructure\\ErrorHandling\\McpErrorFactory::internal_error(): Argument #1 ($id) must be of type int, string given, called in .../plugins\/satollo-mcpservers\/vendor\/wordpress\/mcp-adapter\/includes\/Transport\/Infrastructure\/RequestRouter.php on line 130"} | User ID: 2

And actually Mistral is sending as request ID a UUID (string). I don't know if this is a bug in the adapter or a problem in Mistral. The MCP standard seems to allows string as a request ID.

Since the error happens during the "initialize" command, I think the problem is in the signature of the method InitializeHandler:: handle() requiring an int for the $request_id (even if not used inside the method.

Thanks, Stefano.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions