fix: MCP server respects remote backend configuration #124

Merged
jonas.hanisch merged 1 commit from fix/122-mcp-remote-backend into main 2026-01-24 11:42:46 +00:00
Owner

Summary

  • MCP server now respects REMOTE_MODE, REMOTE_URL, and REMOTE_TOKEN settings
  • Adds Authorization header with Bearer token for all API calls in remote mode
  • Falls back to localhost with env var overrides when not in remote mode

Changes

  • Import loadSettings() from @claude-mem/shared
  • Check REMOTE_MODE and REMOTE_URL to determine backend URL
  • Add auth headers to both GET requests (via callBackendAPI) and POST requests (save_memory)

Test plan

  • Configure REMOTE_MODE: true, REMOTE_URL, and REMOTE_TOKEN in settings.json
  • Start MCP server and verify it connects to remote backend
  • Test search, timeline, get_observations tools (GET requests)
  • Test save_memory tool (POST request)
  • Verify local mode still works without remote settings

Closes #122

🤖 Generated with Claude Code

## Summary - MCP server now respects `REMOTE_MODE`, `REMOTE_URL`, and `REMOTE_TOKEN` settings - Adds `Authorization` header with Bearer token for all API calls in remote mode - Falls back to localhost with env var overrides when not in remote mode ## Changes - Import `loadSettings()` from `@claude-mem/shared` - Check `REMOTE_MODE` and `REMOTE_URL` to determine backend URL - Add auth headers to both GET requests (via `callBackendAPI`) and POST requests (`save_memory`) ## Test plan - [ ] Configure `REMOTE_MODE: true`, `REMOTE_URL`, and `REMOTE_TOKEN` in settings.json - [ ] Start MCP server and verify it connects to remote backend - [ ] Test `search`, `timeline`, `get_observations` tools (GET requests) - [ ] Test `save_memory` tool (POST request) - [ ] Verify local mode still works without remote settings Closes #122 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix: MCP server respects remote backend configuration
All checks were successful
CI / check (pull_request) Successful in 0s
CI / build (pull_request) Successful in 41s
CI / validate-plugin (pull_request) Successful in 36s
280ca611f3
The MCP server was ignoring REMOTE_MODE, REMOTE_URL, and REMOTE_TOKEN
settings, always connecting to localhost. This fix:

- Loads settings via loadSettings() from @claude-mem/shared
- Uses REMOTE_URL when REMOTE_MODE is enabled
- Adds Authorization header with REMOTE_TOKEN for all API calls
- Falls back to localhost with env var overrides in local mode

Fixes #122

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
jonas.hanisch force-pushed fix/122-mcp-remote-backend from 280ca611f3
All checks were successful
CI / check (pull_request) Successful in 0s
CI / build (pull_request) Successful in 41s
CI / validate-plugin (pull_request) Successful in 36s
to f8bc7bbb9b
All checks were successful
CI / check (pull_request) Successful in 1s
CI / build (pull_request) Successful in 1m25s
CI / validate-plugin (pull_request) Successful in 1m3s
2026-01-24 10:39:55 +00:00
Compare
jonas.hanisch force-pushed fix/122-mcp-remote-backend from f8bc7bbb9b
All checks were successful
CI / check (pull_request) Successful in 1s
CI / build (pull_request) Successful in 1m25s
CI / validate-plugin (pull_request) Successful in 1m3s
to b3a8a94e6d
All checks were successful
CI / build (pull_request) Successful in 9m54s
2026-01-24 11:32:40 +00:00
Compare
jonas.hanisch deleted branch fix/122-mcp-remote-backend 2026-01-24 11:42:46 +00:00
Sign in to join this conversation.
No description provided.