Troubleshooting
Common issues and solutions for Kodebase setup and usage
This guide covers common issues you might encounter when setting up and using Kodebase, along with solutions and debugging tips.
Installation Issues
MCP Server Not Found
Symptoms:
- AI assistant shows "Tool not available" or "Server not found"
- No Kodebase tools appear in the tool list
Causes and Solutions:
-
Config file in wrong location
Check your MCP config file is in the correct location:
Client Config Path Claude Code (macOS) ~/.claude/claude_desktop_config.jsonClaude Code (Windows) %APPDATA%\Claude\claude_desktop_config.jsonClaude Code (Linux) ~/.config/claude/claude_desktop_config.jsonCursor (project) .cursor/mcp.jsonCursor (global) ~/.cursor/mcp.json -
Invalid JSON syntax
Validate your config file has valid JSON:
# macOS/Linux cat ~/.claude/claude_desktop_config.json | python -m json.tool # Or use an online JSON validator -
Missing kodebase entry
Ensure your config includes the kodebase server:
{ "mcpServers": { "kodebase": { "command": "npx", "args": ["kodebase@latest"], "env": { "KODEBASE_PROJECT_ROOT": "/path/to/your/project" } } } } -
Restart required
After updating the config, restart your AI assistant (Claude Code or Cursor) completely.
Node.js Version Incompatibility
Symptoms:
- Error:
Unsupported engine - Error:
SyntaxError: Unexpected token - Server fails to start
Solution:
Kodebase requires Node.js 22 or later. Check your version:
node --version
If you need to upgrade:
# Using nvm (recommended)
nvm install 22
nvm use 22
# Or download from nodejs.org
Permission Denied During npm Install
Symptoms:
- Error:
EACCES: permission denied - Error:
npm ERR! code EACCES
Solutions:
-
Don't use sudo with npm
Instead, fix npm permissions:
mkdir -p ~/.npm-global npm config set prefix '~/.npm-global' # Add to your shell profile (~/.bashrc or ~/.zshrc): export PATH=~/.npm-global/bin:$PATH -
Use npx instead of global install
The recommended approach avoids global installs:
{ "mcpServers": { "kodebase": { "command": "npx", "args": ["kodebase@latest"] } } }
Environment Issues
KODEBASE_PROJECT_ROOT Not Set or Invalid
Symptoms:
- Error:
Configuration not found - Error:
Cannot find .kodebase directory - Tools work but can't find artifacts
Solutions:
-
Set the environment variable
In your MCP config:
{ "mcpServers": { "kodebase": { "command": "npx", "args": ["kodebase@latest"], "env": { "KODEBASE_PROJECT_ROOT": "/absolute/path/to/your/project" } } } } -
Use absolute paths
The path must be absolute, not relative:
// ✓ Correct "KODEBASE_PROJECT_ROOT": "/Users/yourname/projects/my-app" // ✗ Wrong "KODEBASE_PROJECT_ROOT": "./my-app" "KODEBASE_PROJECT_ROOT": "~/projects/my-app" -
Verify the path exists
ls -la /path/to/your/project/.kodebase
.kodebase/artifacts Directory Not Found
Symptoms:
- Error:
Artifact not found sherpa_get_statusreturns empty results- Scout can't generate artifacts
Solutions:
-
Initialize Kodebase in your project
cd /path/to/your/project kb init -
Create the directory structure manually
mkdir -p .kodebase/artifacts mkdir -p .kodebase/config -
Check you're in the right directory
Verify
KODEBASE_PROJECT_ROOTpoints to a project with.kodebase/:ls -la $KODEBASE_PROJECT_ROOT/.kodebase/
MCP Connection Issues
Claude Code Doesn't Show Kodebase Tools After Config Update
Symptoms:
- Updated config but tools don't appear
- Old tool list showing
Solutions:
-
Restart Claude Code completely
- Quit Claude Code entirely (not just close window)
- Wait a few seconds
- Reopen Claude Code
-
Verify config file location
The config might be in a different location than expected. Check both:
~/.claude/claude_desktop_config.json- Your project's
.claude/mcp.json
-
Ask the assistant to list tools
After restart, ask: "What Kodebase tools do you have access to?"
Expected tools:
scout_start_sessionscout_submit_answersscout_validate_specscout_generate_artifactssherpa_get_statussherpa_get_contextsherpa_get_guidancekodebase_get_configkodebase_update_config
How to Check MCP Server Logs
For debugging connection issues:
-
Run the server manually
# Set the project root and run KODEBASE_PROJECT_ROOT=/path/to/project npx kodebase@latestIf there are startup errors, they'll appear in the terminal.
-
Use MCP Inspector
npx @modelcontextprotocol/inspector npx kodebase@latestThis opens a web interface where you can:
- See all registered tools
- Test tool calls interactively
- View request/response logs
-
Check Claude Code logs
On macOS, check:
tail -f ~/Library/Logs/Claude/mcp*.log
How to Verify the Server Is Running Correctly
Quick verification steps:
-
Test the server starts
KODEBASE_PROJECT_ROOT=/path/to/project npx kodebase@latest # Should start without errors # Press Ctrl+C to stop -
Test tool availability
Ask your AI assistant:
What Kodebase tools do you have access to? -
Test a simple tool call
Ask your AI assistant:
Can you run kodebase_get_config to check the current configuration? -
Test artifact discovery
Ask your AI assistant:
What issues are ready to start? (use sherpa_get_status)
Common Runtime Errors
Session Not Found
Error: Session not found: scout-xxxxx-xxxxxx
Cause: The Scout session has expired or was never created.
Solution: Start a new session with scout_start_session.
Artifact Not Found
Error: Artifact not found: A.1.1
Causes:
- The artifact ID doesn't exist
KODEBASE_PROJECT_ROOTpoints to wrong directory- Artifacts haven't been created yet
Solution: Check the artifact exists:
ls -la $KODEBASE_PROJECT_ROOT/.kodebase/artifacts/
Invalid Phase Transition
Error: Invalid phase transition from 'gathering' to 'approved'
Cause: Scout sessions must progress through phases in order.
Solution: Follow the phase sequence:
gathering→refiningrefining→validatingvalidating→approved
Dependencies Not Met
Error: Issue A.1.2 has unmet dependencies: A.1.1
Cause: Trying to start an issue that's blocked by incomplete dependencies.
Solution: Complete the blocking issues first, or use sherpa_get_status to find issues that are ready.
Getting Help
If you're still experiencing issues:
-
Check the documentation
-
Join the community
- Discord - Get help from the community
-
Report a bug
- GitHub Issues - Report bugs with reproduction steps
When reporting issues, please include:
- Your operating system
- Node.js version (
node --version) - Kodebase version (
npx kodebase@latest --version) - The full error message
- Steps to reproduce the issue