Debugging Sync Issues
If servers from your agent configuration files (like ~/.claude.json) aren't showing up correctly in the UI, follow these steps to diagnose the issue.
Step 1: Check the Debug Page
Build and run the app:
dotnet build dotnet run --project src/McpManager.Web # Or for Desktop: dotnet run --project src/McpManager.DesktopNavigate to the Debug page:
- Click "Debug Info" in the left sidebar
- Or go to:
http://localhost:5000/debug
Check the following:
- ✅ Is your agent detected? (e.g., "Claude Code")
- ✅ Does the config path exist?
- ✅ Are server IDs listed under "Configured Server IDs (from config file)"?
- ✅ Are there installation records?
- ⚠️ Look for "server(s) not tracked" warnings
Expand "Show Config File Contents":
- Verify your
~/.claude.jsonfile is being read correctly - Check that the
mcpServerssection has your servers
- Verify your
Step 2: Check Console Logs
When the app starts, the console will show detailed logs like:
[ClaudeCodeConnector] Checking user config at: C:\Users\jd\.claude.json
[ClaudeCodeConnector] File exists: True
[ClaudeCodeConnector] Config file size: 12345 bytes
[ClaudeCodeConnector] Found 1 user-level MCP servers
[ClaudeCodeConnector] Adding server: github
Look for:
- ✅ "File exists: True" - Your config file is found
- ✅ "Found X user-level MCP servers" - Servers are detected
- ❌ "File exists: False" - Config file not found (wrong path?)
- ❌ "Error reading user config" - JSON parsing error
Step 3: Check for Sync Errors
On the Agent Details page (e.g., /agents/claudecode):
- Look for a yellow warning banner at the top
- If present, it will show sync errors like:
- "Error syncing server 'github': ..."
Common Issues and Solutions
Issue 1: Config File Not Found
Symptoms:
- Console shows:
File exists: False - Debug page shows: Config File Exists = ✗ No
Solutions:
- Verify the file exists at
~/.claude.json(not~/.claude/settings.json) - On Windows, this should be:
C:\Users\YourUsername\.claude.json - Check file permissions - the app needs read access
Issue 2: Servers Detected But Not Tracked
Symptoms:
- Debug page shows servers under "Configured Server IDs"
- But "Installation Records" is empty or missing servers
- Console shows servers being added
- UI still shows "Add to Agent" button
Solutions:
- Check for sync errors on the Agent Details page
- Look for exceptions in the console
- Try clicking the "🔄 Refresh" button on the Agent Details page
- Restart the app (installations are in-memory, not persisted)
Issue 3: JSON Parsing Errors
Symptoms:
- Console shows:
Error reading user config: ... - Debug page shows: Config file exists but no servers detected
Solutions:
- Validate your JSON at https://jsonlint.com
- Common issues:
- Missing commas between properties
- Trailing commas (not allowed in JSON)
- Incorrect quotes (use double quotes, not single)
- Example valid structure:
{ "mcpServers": { "github": { "type": "http", "url": "https://api.githubcopilot.com/mcp/" } } }
Issue 4: Case Sensitivity
Symptoms:
- Servers show as "Not Configured" even though they're in the file
Possible causes:
- Server ID mismatch (e.g., "GitHub" vs "github")
- The connector uses the exact ID from the config file
- MCP Manager might have installed it with a different ID
Solutions:
- Check the Debug page to see both:
- "Configured Server IDs (from config file)"
- "All Installed Servers"
- Ensure IDs match exactly (case-sensitive)
Issue 5: Installation Records Lost on Restart
Symptoms:
- Servers show correctly after app start
- After restart, they need to be synced again
- "Active Installations" count is 0 on dashboard after restart
Explanation:
- Installation records are stored in-memory only (not persisted to database)
- This is by design for the current version
- The UI syncs automatically on page load to rebuild the relationships
Solutions:
- This is normal behavior
- The sync happens automatically when you visit agent pages
- Future version will persist installations to the database
Step 4: Manual Sync
If automatic sync isn't working:
- Go to the Agent Details page (e.g.,
/agents/claudecode) - Click the "🔄 Refresh" button in the Quick Actions panel
- This triggers a fresh sync with the config file
Step 5: Force Re-sync
If nothing works:
- Stop the app
- Verify your config file:
# On Windows: notepad %USERPROFILE%\.claude.json # On Linux/Mac: cat ~/.claude.json - Restart the app
- Wait 5 seconds for background sync to complete
- Navigate to
/agents/claudecode - Check the Debug page
Reporting Issues
If you're still having problems, please provide:
- Debug page screenshot - Shows detection status
- Console logs - Copy relevant
[ClaudeCodeConnector]lines - Config file - Sanitize sensitive data first
- Operating system - Windows/Linux/Mac
- App version - Shown in bottom-left of sidebar
Example Debug Session
Good state:
Debug page shows:
✓ Config File Exists: Yes
✓ Configured Server IDs: github
✓ Installation Records: github (Enabled)
✓ Sync Status: All servers tracked
Console shows:
[ClaudeCodeConnector] File exists: True
[ClaudeCodeConnector] Found 1 user-level MCP servers
[ClaudeCodeConnector] Adding server: github
UI shows:
✓ Enabled button with Configure/Disable/Remove options
Problem state:
Debug page shows:
✓ Config File Exists: Yes
✓ Configured Server IDs: github
✗ Installation Records: (empty)
⚠ Sync Status: 1 server(s) not tracked - github
Agent Details page shows:
⚠ Sync Warning: Error syncing server 'github': ...
UI shows:
➕ Add to Agent button (wrong!)
Next Steps
Based on what you find:
- File not found → Check path and permissions
- Parsing error → Validate JSON
- Sync error → Check error message details
- Everything looks good but still wrong → File an issue with debug info