Merge pull request #88 from modelcontextprotocol/fix/issue-74

Simplify logging comment in TypeScript first server guide
This commit is contained in:
David Soria Parra 2024-12-19 14:35:41 +00:00 • committed by GitHub
commit 9976f83969
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,6 +80,23 @@ Use the Network panel to inspect:
## Common issues
### Working directory
When using MCP servers with Claude Desktop:
- The working directory for servers launched via `claude_desktop_config.json` may be undefined (like `/` on macOS) since Claude Desktop could be started from anywhere
- Always use absolute paths in your configuration and `.env` files to ensure reliable operation
- For testing servers directly via command line, the working directory will be where you run the command
For example in `claude_desktop_config.json`, use:
```json
{
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/data"]
}
```
Instead of relative paths like `./data`
### Environment variables
MCP servers inherit only a subset of environment variables automatically, like `USER`, `HOME`, and `PATH`.