# Release v1.1.3
**Release Date:** 2025-12-23
## 🐛 Bug Fix
### Fixed .env File Path Resolution in MCP Environment
**Problem:** When running as an MCP server, the authentication module tried to create `.env` files in the root directory (`/`), causing `Read-only file system` errors.
**Root Cause:** The `_find_env_file()` method used `Path.cwd()` as fallback, which resolves to `/` when the MCP server is started by Claude Desktop.
**Solution:** Modified `auth.py:43-60` to prioritize the project root directory:
1. First checks project root (where the package is installed)
2. Then searches current directory and parent directories
3. Falls back to project root instead of `cwd()` to avoid permission issues
## Technical Details
### Changes in `src/withings_mcp_server/auth.py`
```python
def _find_env_file(self) -> Path:
"""Find .env file in current directory or parent directories."""
# First try to find from project root (where server.py is installed)
project_root = Path(__file__).parent.parent.parent
project_env = project_root / ".env"
if project_env.exists():
return project_env
# Then try current directory and parent directories
current = Path.cwd()
while current != current.parent:
env_path = current / ".env"
if env_path.exists():
return env_path
current = current.parent
# If not found, return .env in project root (not cwd to avoid permission issues)
return project_env
```
## Impact
- ✅ Fixes `Error: [Errno 30] Read-only file system: '/.env'`
- ✅ Ensures `.env` is always created/read from project directory
- ✅ No breaking changes - existing setups continue to work
## Upgrade Instructions
Update to the latest version:
```bash
pip install --upgrade withings-mcp-server
```
Or if installed in editable mode:
```bash
cd /path/to/withings-mcp-server
git pull
```
Then restart Claude Desktop.