Skip to content

[BUG] Error status with Roo Code MCP. #74

Closed

Description

@CaydeLKC

Although it is green light but it reported error as below:

Processing request of type server.py:534 ListToolsRequest Processing request of type server.py:534 ListResourcesRequest Processing request of type server.py:534 ListResourceTemplatesRequest

Activity

  1. phernandez commented on Apr 4, 2025

    @phernandez
    Member

    Hi, @CaydeLKC. Thanks for submitting an issue. Can you share the config you used to setup the mcp? Any logs would be helpful also.

  2. wtfzambo commented on Apr 4, 2025

    @wtfzambo

    Been having a similar issue using Cline.

    I get this error:

    console.ts:137 [Extension Host] Server "Basic Memory" stderr: /Users/wtfzambo/.asdf/installs/python/3.12.1/lib/python3.12/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 8 leaked semaphore objects to clean up at shutdown
      warnings.warn('resource_tracker: There appear to be %d '
    
     ERR [Extension Host] Server "Basic Memory" stderr: [04/04/25 13:08:17] INFO     Processing request of type            server.py:534
                                 ListToolsRequest        
    

    And in fact the interface is not too happy with it:

    Image

    but when I interact with it in the chat, it still works (prompt was: "Can you list the tools, resources and prompts of basic memory MCP ?")

    Image

    Here's my config:

        "Basic Memory": {
          "autoApprove": [],
          "disabled": false,
          "timeout": 60,
          "command": "uvx",
          "args": [
            "basic-memory",
            "mcp"
          ],
          "transportType": "stdio"
        }

    (the values that you don't recognize is just Cline default boilerplate)


    It does however work in Continue.dev:

    Image
  3. phernandez commented on Apr 5, 2025

    @phernandez
    Member

    claude: any hints about why roo code is not working for the user?

  4. github-actions commented on Apr 5, 2025

    @github-actions
    Contributor

    Claude Code Analysis

    Based on my analysis of the codebase and the error message, I can provide insights into Issue #74: "Error status with Roo Code MCP".

    Problem Analysis

    The issue involves the Basic Memory MCP server and Roo Code MCP integration. The error message shows:

    Processing request of type server.py:534 ListToolsRequest Processing request of type server.py:534 ListResourcesRequest Processing request of type server.py:534 ListResourceTemplatesRequest
    

    Key findings:

    1. Basic Memory uses MCP (Model Context Protocol) v1.2.0+ as a dependency
    2. The server.py in Basic Memory is minimal (only 12 lines) and delegates to an external MCP package
    3. Line 534 mentioned in the error is from the external MCP package, not Basic Memory's code
    4. "Roo Code" appears to be a third-party MCP client (likely similar to Claude Desktop)
    5. The error occurs despite a "green light" status, suggesting a connection is established but requests aren't properly handled

    Likely Causes

    1. Version Mismatch: The Basic Memory MCP server (v1.2.0+) may not be fully compatible with the Roo Code MCP client

    2. Request Handling Issue: The server might be logging these requests but not properly responding to them:

      • ListToolsRequest
      • ListResourcesRequest
      • ListResourceTemplatesRequest
    3. Configuration Problem: Incorrect configuration in Roo Code's setup for connecting to Basic Memory

    4. Protocol Implementation Gap: Basic Memory might not fully implement all MCP request types that Roo Code expects

    Potential Fixes

    1. Update MCP Package:

      # in pyproject.toml
      dependencies = [
          "mcp>=1.2.0",  # Update to a newer version if available
      ]
    2. Enhance Request Handling:
      Modify src/basic_memory/mcp/server.py to properly handle the specific request types:

      """Enhanced FastMCP server instance for Basic Memory."""
      
      from mcp.server.fastmcp import FastMCP
      from mcp.server.fastmcp.utilities.logging import configure_logging
      
      # mcp console logging
      configure_logging(level="INFO")
      
      # Create the shared server instance with custom handlers
      mcp = FastMCP("Basic Memory")
      
      # Potentially register custom handlers for the specific request types
      # This would require understanding the MCP protocol details
    3. Add Resource Support:
      Since the error includes ListResourcesRequest and ListResourceTemplatesRequest, Basic Memory might need to implement resource support:

      # In src/basic_memory/mcp/main.py
      
      # Register resources
      from basic_memory.mcp.resources import register_resources  # This would need to be created
      register_resources(mcp)
    4. Better Error Handling:

      # In src/basic_memory/mcp/server.py
      
      try:
          mcp = FastMCP("Basic Memory")
          # Add error handlers or custom request processors
      except Exception as e:
          logger.error(f"Failed to initialize MCP server: {e}")
    5. Roo Code Configuration Documentation:
      Create specific documentation for Roo Code users in docs/ directory, similar to the Claude Desktop configuration instructions.

    Files to Modify

    1. src/basic_memory/mcp/server.py - Enhance the MCP server configuration
    2. src/basic_memory/mcp/main.py - Add proper error handling and resource registration
    3. README.md - Add section about Roo Code integration with specific configuration requirements
    4. Create a new file src/basic_memory/mcp/resources/__init__.py to implement resource support

    Additional Investigation Needed

    To fully resolve this issue, more information would be helpful:

    1. What is Roo Code MCP? (Documentation or specifications)
    2. Which version of the MCP protocol does Roo Code implement?
    3. What specific resources does Roo Code expect?
    4. Are there differences in how Roo Code expects responses compared to Claude Desktop?

    This appears to be an integration issue between the Basic Memory MCP server and the Roo Code MCP client. The logging shows requests being received but potentially not properly processed, despite the connection itself working (green light).


    🤖 Generated with Claude Code GitHub Action

  5. phernandez commented on Apr 5, 2025

    @phernandez
    Member

    FYI, I was able to run the basic-memory mcp tools successfully in Cline v3.9.1 using the anthropic-3.7-sonnet model.

    I've successfully tested all the basic-memory MCP tools:
    
    project_info: Retrieved detailed statistics about the Basic Memory project, showing 315 entities, 932 observations, and 566 relations.
    
    search: Searched for "LLM" in the knowledge base and found relevant content including notes about text-based knowledge systems and LLM interfaces.
    
    write_note: Created a test note "Test Note for Basic Memory Tools" in the tests folder with tags.
    
    read_note: Successfully read back the test note using its permalink.
    
    recent_activity: Retrieved recent activity from the knowledge base, showing our test note and other recently created content.
    
    build_context: Built context from a memory URI (memory://tests/test-note-for-basic-memory-tools), retrieving the note and its metadata.
    
    read_content: Read the raw file content of our test note using its permalink.
    
    canvas: Created a visualization canvas showing the relationships between different Basic Memory tools.
    
    delete_note: Successfully deleted our test note.
    
    access_mcp_resource: Accessed the AI assistant guide resource, which provides comprehensive documentation on how to effectively use Basic Memory tools.
    
    All tools are functioning correctly and provide powerful capabilities for knowledge management, including creating, reading, searching, visualizing, and deleting content in the Basic Memory knowledge base.
    

    Here's the content of my cline_mcp_settings.json

    {
      "mcpServers": {
        "basic-memory": {
          "disabled": false,
          "timeout": 60,
          "command": "uvx",
          "args": [
            "basic-memory",
            "mcp"
          ],
          "transportType": "stdio"
        }
      }
    }```
    
  6. phernandez commented on Apr 5, 2025

    @phernandez
    Member

    ERR [Extension Host] Server "Basic Memory" stderr: [04/04/25 13:08:17] INFO Processing request of type server.py:534
    ListToolsRequest

    It seems this is actually FastMCP outputting this to stderr for some reason. Not terribly helpful. This issue cline/cline#1272

    indicates setting the log level to ERROR can help that. I'll give it a try.

  7. phernandez commented on Apr 6, 2025

    @phernandez
    Member

    claude-fix: lets change the startup to: mcp = FastMCP("Basic Memory", log_level="ERROR")

  8. added this to the v0.12.0 milestone on Apr 6, 2025
  9. phernandez commented on Apr 6, 2025

    @phernandez
    Member

    @CaydeLKC @wtfzambo FYI this issue has been fixed in the v0.12.0 release.

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

    bugSomething isn't working

    Projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions