mcp-file-reader-server-example

mcp-file-reader-server-example

3.1

If you are the rightful owner of mcp-file-reader-server-example and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

MCP File Reader Server provides a simple MCP server for reading files, runnable in Stdio and SSE modes.

The MCP File Reader Server is designed to facilitate file reading operations through a Model-Control-Protocol (MCP) server. It operates in two distinct modes: Stdio Mode, managed by the Cursor application via a global configuration, and SSE Mode, which runs independently and is manually started. The server is built using Python and requires specific dependencies such as Uvicorn and Starlette for the SSE server, and httpx for the SSE client. The server is configured to read files from designated directories depending on the mode of operation. The Stdio server reads from a default directory in the user's home, while the SSE server reads from a project-specific directory. The server setup involves creating a virtual environment, installing necessary packages, and configuring the server through JSON configuration files. The server can be tested using a provided Python client script that interacts with the SSE server.

Features

  • Supports two modes: Stdio and SSE for flexible operation.
  • Utilizes Python virtual environments for dependency management.
  • Configurable through JSON files for easy setup and management.
  • Includes a client script for testing SSE server functionality.
  • Operates with Uvicorn and Starlette for SSE server operations.