Troubleshooting
This guide provides solutions for common issues encountered while installing or using CodeGraphContext.
1. Installation Issues
uvx or pipx command not found
- Solution: Ensure that your Python environment is correctly set up and that the installation directory for
pipxoruvis in your system'sPATH. - Verification: Run
python -m pip install --user pipxfollowed bypipx ensurepath.
Failed to install real_ladybug (KùzuDB)
- Cause: KùzuDB requires C++ build tools on some platforms during installation.
- Solution:
- Windows: Install Visual Studio Build Tools.
- macOS: Run
xcode-select --install. - Linux: Install
build-essentialandpython3-dev.
2. Database Connectivity
"No database backend available"
- Cause: No supported database is installed or configured.
- Solution: Install KùzuDB (recommended):
pip install real_ladybug.
Neo4j: "Authentication failed"
- Cause: Incorrect credentials in environment variables or
.envfile. - Solution: Verify
NEO4J_USERNAMEandNEO4J_PASSWORD. Runcgc config listto check current settings.
3. MCP Integration
Tools do not appear in Claude/Cursor
- Check 1: Ensure the MCP server is running correctly. Run
cgc mcpin your terminal. It should wait for input without exiting immediately. - Check 2: Verify the path to the
cgcexecutable in your configuration file. Use absolute paths if necessary. - Check 3: Look at the logs. CGC logs to
~/.codegraphcontext/logs/mcp.logby default.
"Connection refused" in MCP
- Cause: The database backend is not reachable by the MCP server.
- Solution: Ensure your database (e.g., Neo4j Docker container) is running before starting the MCP server.
4. Indexing Issues
Indexing is slow
- Tip: Use the
watchcommand for incremental updates instead of full re-indexes. - Tip: Exclude large, irrelevant directories (like
node_modulesordist) using a.cgcignorefile.
"Tree-sitter parser not found"
- Cause: The parser for a specific language failed to load or is not supported.
- Solution: Ensure you are using a recent version of
codegraphcontext. Runpip install --upgrade codegraphcontext.
5. Diagnostic Command
If you are still having trouble, run the built-in diagnostic tool:
cgc doctor
This command checks for: * Python version compatibility. * Installed database backends. * Active configuration settings. * Write permissions for log and data directories.