Skip to content

There is an error in the cline plugin, but it runs normally. #36

Open
@marcusbai

Description

@marcusbai

Issue Description

When using the MySQL MCP server, error messages indicating connection failures are displayed despite the server functioning correctly and queries executing successfully.

Error Message

Error: Failed to use MCP tool: Error: Failed to connect to MCP server: mcp-server-mysql

Server Logs

2025-04-18 23:23:33,870 - mcp.server.lowlevel.server - INFO - Processing request of type ListToolsRequest
2025-04-18 23:23:33,870 - mysql_mcp_server - INFO - Listing tools...
2025-04-18 23:23:33,879 - mcp.server.lowlevel.server - INFO - Processing request of type ListResourcesRequest
2025-04-18 23:23:34,188 - mysql_mcp_server - INFO - Found tables: [('city',), ('country',), ('countrylanguage',)]
2025-04-18 23:23:34,192 - mcp.server.lowlevel.server - INFO - Processing request of type ListResourceTemplatesRequest

Reproduction Steps

  1. Start the MySQL MCP server
  2. Attempt to use any MySQL MCP tool or access any MySQL resource
  3. Observe error message about connection failure
  4. Note that despite the error message, the query results are returned correctly

Test Results

Test 1: Show Tables

Command:

<use_mcp_tool>
<server_name>mcp-server-mysql</server_name>
<tool_name>execute_sql</tool_name>
<arguments>
{
  "query": "SHOW TABLES;"
}
</arguments>
</use_mcp_tool>

Error Message:

Error: Failed to use MCP tool: Error: Failed to connect to MCP server: mcp-server-mysql

Actual Result:

Tables_in_world
city
country
countrylanguage

Test 2: Count Query

Command:

<use_mcp_tool>
<server_name>mcp-server-mysql</server_name>
<tool_name>execute_sql</tool_name>
<arguments>
{
  "query": "SELECT COUNT(*) FROM city;"
}
</arguments>
</use_mcp_tool>

Error Message:

Error: Failed to use MCP tool: Error: Failed to connect to MCP server: mcp-server-mysql

Actual Result:

COUNT(*)
4079

Test 3: Resource Access

Command:

<access_mcp_resource>
<server_name>mcp-server-mysql</server_name>
<uri>mysql://city/data</uri>
</access_mcp_resource>

Error Message:

Error: Failed to access MCP resource: Error: Failed to connect to MCP server: mcp-server-mysql

Actual Result:
Data from the city table was successfully returned (first 100 rows)

Test 4: Complex Query

Command:

<use_mcp_tool>
<server_name>mcp-server-mysql</server_name>
<tool_name>execute_sql</tool_name>
<arguments>
{
  "query": "SELECT Name, Population FROM country ORDER BY Population DESC LIMIT 10;"
}
</arguments>
</use_mcp_tool>

Error Message:

Error: Failed to use MCP tool: Error: Failed to connect to MCP server: mcp-server-mysql

Actual Result:

Name,Population
China,1277558000
India,1013662000
United States,278357000
Indonesia,212107000
Brazil,170115000
Pakistan,156483000
Russian Federation,146934000
Bangladesh,129155000
Japan,126714000
Nigeria,111506000

Technical Details

  • The MySQL MCP server is correctly connecting to the database and executing queries
  • The server is correctly finding and listing tables (city, country, countrylanguage)
  • All queries return the expected results
  • The error appears to be in the MCP system's error reporting mechanism, not in the actual database connection
  • This is likely a UI/reporting bug in how the MCP system reports connection status

Environment Information

  • Date: 2025-04-18
  • Time: Around 23:30 (UTC+8:00)
  • Operating System: Windows 11

Image

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions