Skip to content

StdioServerTransport Fails to Invoke Tool Handlers on Linux (Python SDK) #1278

@Postmanplayx

Description

@Postmanplayx

Hello,

I'm hoping you might be able to offer some guidance. I'm trying to use the Python SDK to integrate a tool (Basic Memory) as a persistent stdio subprocess on Linux, but I'm encountering some behavior that I don't understand.

My Goal & Setup:
OS: Ubuntu 24.04
Tool: Basic Memory by Basic Machines
Architecture: The tool is run as an stdio subprocess, managed by mcp-proxy and a systemd service.

Observed Behavior:

The service initializes correctly and the logs confirm it successfully indexes all 8,900+ of my local files. However, when a client calls a registered tool (the search function), the handler code on the server doesn't appear to be invoked, and the client receives a generic failure response ("word not found").

To rule out any issues on my side, I've spent a lot of time troubleshooting. Here’s a brief summary of what I’ve checked:
File Permissions: I used setfacl to ensure the service user has full read access to all necessary files. This seems to be working correctly.
Tool Configuration: I confirmed the tool is configured to use the correct project and data directory. The startup logs show it is scanning the right location.

Systemd Service: I built a clean, simple service file to ensure the process starts reliably and without errors.

A Potentially Related Clue:

During my research, I found an issue I previously opened for the TypeScript SDK (typescript-sdk#576). The symptoms described there (a tool handler not being invoked when run as an stdio subprocess) are remarkably similar to what I'm seeing now in the Python SDK.
I'm not certain it's the same root cause, but the parallel is strong enough that I wanted to bring it to your attention in case it's helpful for diagnostics.

My Questions:

Is this expected behavior under these conditions, or is there something I might be misunderstanding in my setup?
Could you recommend a best practice for running a tool as a persistent stdio subprocess on Linux using your SDK?
Based on the description, does anything stand out as a potential misconfiguration on my part?
I apologize for the long message, but I wanted to provide all the context. Any advice or direction you could offer would be greatly appreciated.

Thank you for any help you can provide.

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