Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call the demo of the file system based on stdio in the client, but there is no response #461

Open
flanremi opened this issue Jan 2, 2025 · 0 comments

Comments

@flanremi
Copy link

flanremi commented Jan 2, 2025

Hello, experts in the MCP field.
I encountered a problem. I implemented a client myself and called the server in the demo file system in the client.
But I encountered some problems. My client successfully connected to the server and returned the following message, but the code for awaiting self. session. initializes ()cannot be executed successfully and there are no other error messages.
To be precise, the code related to self.session cannot be executed, which did not occur when I executed the Python implemented server SQLite demo.
May I ask what might be the problem?
Here is my code:

server_params = StdioServerParameters(
      command="node",
      args=["D:\\git\\servers\\src\\filesystem\\dist\\index.js", "D:\\git\\servers\\src\\filesystem"],
      env=None
  )

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

  await self.session.initialize()

the return code is :
Secure MCP Filesystem Server running on stdio Allowed directories: [ 'D:\\git\\servers\\src\\filesystem' ]

In addition, I also tried calling it in readme, but it prompted that the path could not be found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant