fix: Improve MCP server robustness and debugging

- Refactor  for more reliable project root detection, particularly when running within integrated environments like Cursor IDE. Includes deriving root from script path and avoiding fallback to '/'.
- Enhance error handling in :
    - Add detailed debug information (paths searched, CWD, etc.) to the error message when  is not found in the provided project root.
    - Improve clarity of error messages and potential solutions.
- Add verbose logging in  to trace session object content and the finally resolved project root path, aiding in debugging path-related issues.
- Add default values for  and  to the example  environment configuration.
This commit is contained in:
Eyal Toledano
2025-04-02 22:04:00 -04:00
parent 1a547fac91
commit 189d9288c1

View File

@@ -0,0 +1,20 @@
{
"mcpServers": {
"taskmaster-ai": {
"command": "node",
"args": [
"./mcp-server/server.js"
],
"env": {
"ANTHROPIC_API_KEY": "%ANTHROPIC_API_KEY%",
"PERPLEXITY_API_KEY": "%PERPLEXITY_API_KEY%",
"MODEL": "%MODEL%",
"PERPLEXITY_MODEL": "%PERPLEXITY_MODEL%",
"MAX_TOKENS": "%MAX_TOKENS%",
"TEMPERATURE": "%TEMPERATURE%",
"DEFAULT_SUBTASKS": 5,
"DEFAULT_PRIORITY": "medium"
}
}
}
}