Open Source replication server for the popular Bible memory app Remember Me, using Django
  • Python 99.6%
  • Shell 0.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
pschaffl c05b6144af Merge branch 'feature/174-mcp-db-connection' into 'develop'
...
#174: MCP servers replace a dropped database connection

See merge request remem-me/server!152
2026-11-16 16:21:35 +00:00
.claude Add test environment settings and configuration files 2026-02-17 20:43:58 +01:00
.run #118: progress level limit reduced 2025-10-20 19:05:27 +02:00
access app#733: Review fixes: a restore is checked like a create, a deleted account frees what is in it, deleted verses' links count only against the ceiling, a sync's deletes free space for all of its writes, no misleading email at the ceiling, counts read only the indexes 2026-10-25 15:02:23 +01:00
doc #154: Document the uWSGI worker teardown crash and its site-config fix 2026-10-04 20:32:29 +02:00
main #174: The MCP servers discard a dropped database connection before and after each request, as Django does 2026-11-16 16:58:31 +01:00
mcp_server #174: The MCP servers discard a dropped database connection before and after each request, as Django does 2026-11-16 16:58:31 +01:00
misc test doc moved 2026-06-16 07:46:00 +02:00
rm_replication #40: Inactive users get two warnings and are then deleted after a configurable number of days; every signed-in use and a keep button count as use; admin and endpoint share one deletion that blacklists tokens; storage first-year tier lasts 360 days 2026-10-15 10:07:27 +02:00
.gitignore chore: split dev deps into requirements-dev.txt, ignore .vscode 2026-04-19 22:11:50 +02:00
.gitlab-ci.yml #162: Dependency updates (Django 6.0.8, DRF 3.17.2, PyJWT 2.15.1, mcp 1.30.0, …), keeping large syncs and MCP sessions as they were 2026-10-04 07:40:48 +02:00
assembleDjangoPo #14: dependencies updated 2021-04-24 08:02:35 +02:00
CLAUDE.md #174: CLAUDE.md describes how run_mcp starts the MCP servers, and why CloseOldConnections must wrap them 2026-11-16 17:13:36 +01:00
CODE_OF_CONDUCT.md #6: open source documents added 2020-09-18 10:49:16 +02:00
CONTRIBUTING.md #13: paginated requests 2021-02-27 14:37:44 +01:00
LICENSE.txt #6: open source documents added 2020-09-18 10:49:16 +02:00
manage.py Add production settings, environment variable loading, and dotenv dependency 2026-02-17 07:50:31 +01:00
newrelic-alerts-setup.md #40: Inactive users get two warnings and are then deleted after a configurable number of days; every signed-in use and a keep button count as use; admin and endpoint share one deletion that blacklists tokens; storage first-year tier lasts 360 days 2026-10-15 10:07:27 +02:00
newrelic.ini DAU stats: drop unreliable event emission, go metric-only 2026-07-05 09:33:51 +00:00
post-receive MCP: default omitted DCR registrations to public 'none' (upstream of SDK) + restart auth site on deploy 2026-07-06 07:35:46 +00:00
post-receive-test Add staging post-receive hook: rebuild + reseed test DB on deploy 2026-06-18 16:01:08 +02:00
pytest.ini #100: exclude streaks from high scores 2025-05-23 21:23:16 +02:00
README.md doc#30: README step for MUSE_CHALLENGE on the auth site 2026-11-07 15:18:14 +01:00
requirements-dev.txt #162: Dependency updates (Django 6.0.8, DRF 3.17.2, PyJWT 2.15.1, mcp 1.30.0, …), keeping large syncs and MCP sessions as they were 2026-10-04 07:40:48 +02:00
requirements.txt #162: Dependency updates (Django 6.0.8, DRF 3.17.2, PyJWT 2.15.1, mcp 1.30.0, …), keeping large syncs and MCP sessions as they were 2026-10-04 07:40:48 +02:00

Remember Me Replication Server

Replication server for the Bible memorization app Remember Me

Getting started

Configuration

The server requires the following environment variables for deployment:

  • WEB_APP_BASE_URL - Base URL of the frontend web application
    • Used for password reset links, activation emails, and redirects
    • Format: Full URL with protocol (http or https)
    • Allowed domains: localhost, *.local, *.remem.me
    • Examples: https://web.remem.me, http://localhost:3000
    • Default: https://web.remem.me

For a complete list of configuration options, see CLAUDE.md.

MCP Server

The project includes an MCP server that exposes Remember Me to AI agents. It runs as two instances:

Public (mcp.remem.me, no sign-in) — read-only access to the published library:

  • browse_collections — Search and filter published collections by keyword, language, or popularity
  • get_collection_detail — Get full collection with all verse text, references, and topics
  • get_collection_metrics — Community engagement stats (progress, mastery, activity)

Authenticated (auth.remem.me, OAuth sign-in) — the public tools plus your own workspace:

  • list_accounts / list_verses / get_verse / search_verses / find_existing_verses — find your accounts, lists and verses
  • add_verse / update_verse / delete_verse — manage your personal verses; add_verses / update_verses add or change up to 100 at once
  • create_collection / update_collection / delete_collection — manage collections you publish; filing cards under one (add_verse, add_verses, update_verses, by its id) adds them to it. The verse tools take a list by id or label; a label that several lists share is refused with their ids
  • get_daily_reading — the day's readings from a one-year Bible plan
  • get_review_queue — your New/Due/Known boxes for a hands-free spoken review. It mirrors the app's flashcard run — the same box vocabulary in your language, the same remembered/forgotten verdicts, the same quiz direction per box — so a spoken session and the screen agree. The session is transient: nothing is written back and no due date changes.

Local development

python manage.py run_mcp           # public server  → 127.0.0.1:8001
python manage.py run_mcp --auth    # authenticated  → 127.0.0.1:8002

Streamable HTTP transport, served at /mcp.

Production deployment (Alwaysdata)

Each MCP instance runs as its own Alwaysdata site — its own uvicorn process — alongside the main Django app, which is served via WSGI (rm_replication/wsgi.py). The Django app has no ASGI entrypoint; uvicorn/ASGI is used only by the MCP servers.

  1. In the Alwaysdata admin panel, create a site per instance:

    • Type: User program
    • Command: cd ~/rm_replication && venv/bin/python manage.py run_mcp --host 0.0.0.0 --port 8001 --settings=rm_replication.settings.prod (add --auth and use port 8002 for the authenticated instance)
    • Domain: mcp.remem.me (public) / auth.remem.me (authenticated)
  2. Add each site's ID to the post-receive hook so it restarts on deploy. Tool descriptions are registered once at process startup, so a restart is required for tool changes to reach clients.

  3. Set NEW_RELIC_LICENSE_KEY in each site's environment. The servers then send a usage event per tool call (McpToolCall) and per connection step (McpAuth) to New Relic (mcp_server/usage.py); without it they send nothing.

  4. For OpenAI's plugin portal, set OPENAI_APPS_CHALLENGE on the authenticated site to the token the portal shows when you connect the server, then restart the site. It is served as plain text at https://auth.remem.me/.well-known/openai-apps-challenge; without it that path answers 404.

  5. For Meta's Muse Connector Platform (Technical details → Verify server), set MUSE_CHALLENGE on the authenticated site to the bare token from the file URL the portal shows, then restart the site. https://auth.remem.me/.well-known/muse-challenge/<token> then answers muse-challenge=<token> as plain text; any other token answers 404. A challenge expires after a day, so a new one needs the new token and another restart.

Need help?

Please use the user forum for help requests and how-to questions. Please open Gitlab issues for bugs and enhancements only, not general help requests.

Want to contribute?

If you want to contribute through code or documentation, the Contributing guide is the best place to start. If you have questions, feel free to ask.

Want to support us?

If you want to support us financially, you can help fund the project through a Paypal donation.