firecrawl-mcp-server icon indicating copy to clipboard operation
firecrawl-mcp-server copied to clipboard

Initialization problem on custom client

Open anilaltuner opened this issue 10 months ago • 6 comments

Hi, I'm working on custom client and using with stdio.

` server_params = StdioServerParameters( command=self.server_config.command, args=self.server_config.args, env=self.server_config.env, )

        stdio_transport = await self.exit_stack.enter_async_context(
            stdio_client(server_params)
        )
        self.stdio, self.write = stdio_transport
        session = await self.exit_stack.enter_async_context(
            ClientSession(self.stdio, self.write)
        )

        await session.initialize()

`

On the initialization, it gives log

FireCrawl MCP Server running on stdio

But do not continue after it. It seems hang or stuck.

I'm using latest mcp library for Python.

anilaltuner avatar Feb 27 '25 13:02 anilaltuner

I encountered the same problem, my pyther mcp version is the latest mcp==1.3.0. Have you solved it?

Hi, I'm working on custom client and using with stdio.嗨,我正在开发定制客户端并使用 stdio。

` server_params = StdioServerParameters(server_params = StdioServerParameters( command=self.server_config.command, args=self.server_config.args, env=self.server_config.env, )

        stdio_transport = await self.exit_stack.enter_async_context(
            stdio_client(server_params)
        )
        self.stdio, self.write = stdio_transport
        session = await self.exit_stack.enter_async_context(
            ClientSession(self.stdio, self.write)
        )

        await session.initialize()

`

On the initialization, it gives log初始化时,它给出日志

FireCrawl MCP Server running on stdio

But do not continue after it. It seems hang or stuck.但是不要继续之后。它似乎挂起或卡住了。

I'm using latest mcp library for Python.我正在使用最新的 Python mcp 库。

I encountered the same problem, my pyther mcp version is the latest mcp==1.3.0. Have you solved it?

Yu-Xiao-Sheng avatar Mar 04 '25 03:03 Yu-Xiao-Sheng

I encountered the same problem, my pyther mcp version is the latest mcp==1.3.0. Have you solved it?

Hi, I'm working on custom client and using with stdio.嗨,我正在开发定制客户端并使用 stdio。 ` server_params = StdioServerParameters(server_params = StdioServerParameters( command=self.server_config.command, args=self.server_config.args, env=self.server_config.env, )

        stdio_transport = await self.exit_stack.enter_async_context(
            stdio_client(server_params)
        )
        self.stdio, self.write = stdio_transport
        session = await self.exit_stack.enter_async_context(
            ClientSession(self.stdio, self.write)
        )

        await session.initialize()

On the initialization, it gives log初始化时,它给出日志FireCrawl MCP Server running on stdio` But do not continue after it. It seems hang or stuck.但是不要继续之后。它似乎挂起或卡住了。 I'm using latest mcp library for Python.我正在使用最新的 Python mcp 库。

I encountered the same problem, my pyther mcp version is the latest mcp==1.3.0. Have you solved it?

did you solve the issue?

neko avatar Mar 11 '25 10:03 neko

No, I can not. I believe lots of MCP's are not yet production level

anilaltuner avatar Mar 11 '25 10:03 anilaltuner

someone was able to make it work on python?

DanOfir avatar Mar 13 '25 12:03 DanOfir

Encounter the same problem

Henry-Jessie avatar Mar 15 '25 11:03 Henry-Jessie

"It seems like there's some sort of two-way communication deadlock happening. I managed to get around it by commenting out the success initialization message code in my local index.js file (which, for me, was located at ~/.npm/_npx/xxxxx/node_modules/firecrawl-mcp/dist).

server.sendLoggingMessage({
    level: 'info',
    data: 'FireCrawl MCP Server initialized successfully',
});
server.sendLoggingMessage({
    level: 'info',
    data: `Configuration: API URL: ${FIRECRAWL_API_URL || 'default'}`,
});

After doing that, it runs successfully, so this might be a temporary workaround. My guess is that the asynchronous code just above,

await server.connect(transport);

might be the culprit. Perhaps the subsequent success initialization messages are being sent before the connection is fully established? I haven't looked into it deeply.

Henry-Jessie avatar Mar 15 '25 15:03 Henry-Jessie

Commenting out the code mentioned above allows the MCP server to start, but similar hanging problems occur when tools are called. My solution was to comment out all server.sendLoggingMessage statements, and so far, everything seems to be working fine.

Henry-Jessie avatar Mar 16 '25 15:03 Henry-Jessie

comment out all server.sendLoggingMessage statements ??? I met the same issue. when will the issue be fixed?

bladexxx avatar Mar 17 '25 12:03 bladexxx