i18n/de/skills/troubleshoot-mcp-connection/SKILL.md
Diagnose and fix MCP server connection issues zwischen Claude Code, Claude Desktop, and MCP servers. Umfasst Windows argument parsing, Authentifizierung failures, transport issues, and platform-specific debugging. Verwenden wenn Claude Code or Claude Desktop fails to connect to an MCP server, when MCP tools don't appear in sessions, on "cannot attach der Server" errors, when a working connection has stopped, or when setting up MCP on a new machine.
npx skillsauth add pjt222/agent-almanac troubleshoot-mcp-connectionInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Diagnose and resolve MCP server connection failures.
Claude Code (WSL):
# View MCP configuration
claude mcp list
claude mcp get server-name
# Configuration stored in
cat ~/.claude.json | python3 -m json.tool
Claude Desktop (Windows):
# Configuration file location
cat "/mnt/c/Users/$USER/AppData/Roaming/Claude/claude_desktop_config.json"
Erwartet: Configuration file is located and readable, showing the MCP server entries with command, args, and env fields.
Bei Fehler: If the config file nicht exist or is empty, der Server was never configured. Follow the configure-mcp-server skill to set it up from scratch.
R mcptools:
# Test if R can start the server
"/mnt/c/Program Files/R/R-4.5.0/bin/Rscript.exe" -e "mcptools::mcp_server()"
If this fails:
ls "/mnt/c/Program Files/R/"Rscript -e "library(mcptools)"Rscript -e "library(ellmer)"Hugging Face MCP:
# Test mcp-remote directly
mcp-remote https://huggingface.co/mcp
# Check if mcp-remote is installed
which mcp-remote
npm list -g mcp-remote
Erwartet: The server process starts and produces initialization output (JSON-RPC handshake or "listening" message) ohne errors.
Bei Fehler: If R mcptools fails, check that the R version path is correct and that mcptools is installed in the R library. If mcp-remote fails, reinstall globally with npm install -g mcp-remote and verify it is on the PATH.
"Cannot attach der Server" (Claude Desktop)
Root cause: Windows command argument parsing.
Fix: Use Umgebungsvariables stattdessen of --header arguments:
{
"hf-mcp-server": {
"command": "mcp-remote",
"args": ["https://huggingface.co/mcp"],
"env": { "HF_TOKEN": "your_token" }
}
}
Also ensure mcp-remote is globally installed (npm install -g mcp-remote), not relying on npx.
"Connection refused"
"Command not found"
C:\\PROGRA~1\\... for paths with spacesMCP tools don't appear but no error
Erwartet: Error pattern matched to one of the documented categories (cannot attach, connection refused, command not found, or silent failure).
Bei Fehler: If der Fehler nicht match any known pattern, capture the full error output and check server-side logs. Suchen for the exact Fehlermeldung in the MCP server's GitHub issues.
# Test Hugging Face API connectivity
curl -I "https://huggingface.co/mcp"
# Verify token validity
curl -H "Authorization: Bearer $HF_TOKEN" https://huggingface.co/api/whoami
Erwartet: HTTP endpoint returns 200 status and the whoami call returns your Hugging Face username, confirming network connectivity and valid Authentifizierung.
Bei Fehler: If curl returns a connection error, check DNS resolution and proxy settings. If the token is rejected (401), regenerate the token at huggingface.co/settings/tokens and update die Konfiguration.
# Validate JSON (common issue: trailing commas, missing quotes)
python3 -m json.tool /path/to/config.json
Erwartet: JSON parses ohne errors, confirming die Konfiguration file has valid syntax.
Bei Fehler: The most common JSON issues are trailing commas nach the last entry in an object or array, missing quotes around string values, and mismatched braces. Beheben the syntax error reported by the parser and re-validate.
Windows (Claude Desktop):
C:\PROGRA~1\R\R-45~1.0\bin\x64\Rscript.exeWSL (Claude Code):
Erwartet: Platform-specific issue identified (e.g., Windows argument parsing, WSL path resolution, or NVM context loading).
Bei Fehler: If das Problem is Windows-specific, switch from command-line arguments to Umgebungsvariables for Authentifizierung. If WSL-specific, verify that the Windows executable path is accessible from WSL using the full /mnt/c/... path.
If all else fails:
# Remove and re-add the server (Claude Code)
claude mcp remove server-name
claude mcp add server-name stdio "/full/path/to/executable" -- args
# Restart Claude Desktop after config changes
# (close and reopen the application)
Erwartet: After removing and re-adding der Server, claude mcp list shows der Server with the correct configuration and a fresh connection attempt succeeds.
Bei Fehler: If re-adding fails, check that the executable path is correct and the command works when run directly in the terminal. For Claude Desktop, ensure die Anwendung is fully closed (check system tray) vor restarting.
Claude Code: Look for MCP errors in the terminal output when starting a session.
Claude Desktop: Check application logs (location varies by OS).
Server-side: Hinzufuegen logging to the MCP server to capture incoming requests and errors.
Erwartet: Log entries reveal the specific point of failure (server startup, handshake, Authentifizierung, or tool registration).
Bei Fehler: If no logs are available, add stderr capture to der Server command (e.g., redirect to a log file) and reproduce the failure. For Claude Desktop, check %APPDATA%\Claude\logs\ for application-level logs.
~/.claude.json) vs Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json)configure-mcp-server - initial MCP setupbuild-custom-mcp-server - custom server debugging contextsetup-wsl-dev-environment - WSL prerequisite setuptesting
Launch all available agents in parallel waves for open-ended hypothesis generation on problems where the correct domain is unknown. Use when facing a cross-domain problem with no clear starting point, when single-agent approaches have stalled, or when diverse perspectives are more valuable than deep expertise. Produces a ranked hypothesis set with convergence analysis and adversarial refinement.
tools
Write integration tests for a Node.js CLI application using the built-in node:test module. Covers the exec helper pattern, output assertions, filesystem state verification, cleanup hooks, JSON output parsing, error case testing, and state restoration after destructive tests. Use when adding tests to an existing CLI, testing a new command, verifying adapter behavior across frameworks, or setting up CI for a CLI tool.
development
Screen a proposed trademark for conflicts and distinctiveness before filing. Covers trademark database searches (TMview, WIPO Global Brand Database, USPTO TESS), distinctiveness analysis using the Abercrombie spectrum, likelihood of confusion assessment using DuPont factors and EUIPO relative grounds, common law rights evaluation, and goods/services overlap analysis. Produces a conflict report with a risk matrix. Use before adopting a new brand name, logo, or slogan — distinct from patent prior art search, which uses different databases, legal frameworks, and analysis methods.
tools
Scaffold a new CLI command using Commander.js with options, action handler, three output modes (human-readable, quiet, JSON), and optional ceremony variant. Covers command naming, option design, shared context patterns, error handling, and integration testing. Use when adding a command to an existing Commander.js CLI, designing a new CLI tool from scratch, or standardizing command structure across a multi-command CLI.