Troubleshooting
April 28, 2026 · View on GitHub
Project not initializing
FileScopeMCP auto-initializes to the current working directory when Claude Code starts. For a different directory, call set_base_directory(path: "/your/project"). For Cursor AI or daemon mode, pass --base-dir=/your/project as a startup argument.
MCP server not appearing in Claude Code
- Run
claude mcp listto check registration - If missing, run
npm run register-mcp - Check
~/.claude.json— it should have aFileScopeMCPentry undermcpServers - Restart Claude Code after registration
- If working inside the FileScopeMCP repo itself, the committed
.mcp.json(repo scope) can coexist with the user-scope entry created bybuild.sh. The repo-scope entry uses a relative path (dist/mcp-server.js) and only resolves when Claude Code's CWD is the repo root; if the subprocess is spawned elsewhere the server fails silently. Useclaude mcp listto see what is active, andclaude mcp remove --scope user FileScopeMCP(or--scope project) to disambiguate if both are registered.
npm install fails on native modules
better-sqlite3 and tree-sitter include native addons. If prebuilt binaries aren't available:
- Linux:
sudo apt install build-essential python3 - macOS:
xcode-select --install - Windows: Install Visual Studio Build Tools with C++ workload
LLM broker not generating metadata
- Call
status()— checkbroker.brokerConnected - Check
~/.filescope/broker.logfor connection errors - If llama-server is running locally:
curl http://localhost:8880/v1/models - Check
~/.filescope/broker.json—baseURLandmodelmust be correct - Run
./setup-llm.sh --statusto verify llama-server reachability
For the WSL2 + Windows alternative setup, see the troubleshooting section in llm-setup.md.
Stale PID file ("daemon already running" error)
cat /path/to/project/.filescope/instance.pid
kill -0 <PID> 2>/dev/null && echo "Running" || echo "Stale"
# If stale:
rm /path/to/project/.filescope/instance.pid
Database corruption
rm /path/to/project/.filescope/data.db
rm -f /path/to/project/.filescope/data.db-wal
rm -f /path/to/project/.filescope/data.db-shm
The database is rebuilt from scratch on next startup.
Log file locations
| File | When active | Location |
|---|---|---|
~/.filescope/broker.log | Always (broker process) | Global directory |
.filescope-daemon.log | Daemon mode | Project root |
.filescope/mcp-server.log | MCP server mode | Global directory (~/.filescope/) |