mcp-file-reader-server-example
0
The MCP File Reader Server is a dual-mode server for reading files using MCP, supporting both Stdio and SSE protocols. It integrates with the Cursor application for configuration and management. The project includes setup scripts and client testing capabilities.
Overview
The MCP File Reader Server is designed for reading files using the Model-Control-Protocol (MCP). It operates in two modes:
- Stdio Mode: Managed by Cursor via global configuration.
- SSE Mode: Operates independently through manual start.
Features
- Supports both Stdio and SSE modes for flexibility in file reading operations.
- SSE server hosted via Starlette and Uvicorn.
- Configurations managed through MCP config files and project
.mcp.json
.
Usage
- Stdio Mode: Configure through Cursor settings and toggle the server on.
- SSE Mode: Start manually using the provided script
start_sse.sh
. - Provides scripts for SSE client testing and server management.
Troubleshooting
- Verify configurations and server statuses through Cursor settings and terminal outputs.
Advanced Usage
- Separate scripts for Stdio (
file_reader_server.py
) and SSE (file_reader_server_sse.py
) servers. - Utilize
run_sse_client.sh
for testing SSE connections manually.