File Rank MCP Server

by admica
Verified
# Windows Setup Guide for File Rank MCP This guide will help you set up the File Rank Model Context Protocol (MCP) server on Windows. ## Prerequisites - Node.js 18+ installed - Windows 10 or 11 - [Cursor Editor](https://cursor.sh/) ## Installation Steps 1. Clone this repository to your local machine: ``` git clone <repository-url> cd file-rank-mcp ``` 2. Run the Windows build script: ``` .\build.bat ``` This script will: - Verify Node.js is installed - Install NPM dependencies - Compile TypeScript - Generate the MCP configuration file with Windows-compatible paths 3. Alternatively, you can manually install and build: ``` npm install npm run build ``` 4. Then generate the MCP configuration: ``` powershell -Command "(Get-Content mcp.json.win.txt) -replace '\{projectRoot\}', '%cd:\=\\%' | Set-Content mcp.json" ``` ## Setting up with Cursor 1. Copy the generated `mcp.json` file to your Cursor AI project's `.cursor` directory: ``` copy mcp.json %USERPROFILE%\path\to\your\project\.cursor\ ``` 2. Restart Cursor AI to load the MCP configuration. ## Running the MCP Server Manually If you prefer to run the server directly: ``` node dist/mcp-server.js ``` ## Troubleshooting - **Path issues**: If you encounter path-related errors, ensure your paths are using Windows backslashes (`\`) or make sure the path normalization is working correctly. - **File watching**: If file updates aren't being detected, ensure your project doesn't have too many files that could exceed the watcher limits. - **Node version**: This project requires Node.js 18+. Check your version with `node --version`. - **Log files**: Check the log file in your `%TEMP%` directory for detailed error information. ## Development The codebase includes utilities for Windows path compatibility. Key functions: - `normalizePath()`: Converts platform-specific paths to a normalized form - `toPlatformPath()`: Converts normalized paths back to platform-specific format These functions handle the differences between Windows backslashes (`\`) and Unix forward slashes (`/`).