Skip to content

Commit 9976f83

Browse files
authored
Merge pull request modelcontextprotocol#88 from modelcontextprotocol/fix/issue-74
Simplify logging comment in TypeScript first server guide
2 parents da30af7 + b07b6eb commit 9976f83

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

docs/tools/debugging.mdx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,23 @@ Use the Network panel to inspect:
8080

8181
## Common issues
8282

83+
### Working directory
84+
85+
When using MCP servers with Claude Desktop:
86+
87+
- 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
88+
- Always use absolute paths in your configuration and `.env` files to ensure reliable operation
89+
- For testing servers directly via command line, the working directory will be where you run the command
90+
91+
For example in `claude_desktop_config.json`, use:
92+
```json
93+
{
94+
"command": "npx",
95+
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/Users/username/data"]
96+
}
97+
```
98+
Instead of relative paths like `./data`
99+
83100
### Environment variables
84101

85102
MCP servers inherit only a subset of environment variables automatically, like `USER`, `HOME`, and `PATH`.

0 commit comments

Comments
 (0)