Skip to content

Operations

Logan Besecker edited this page Oct 1, 2026 · 1 revision

Operations

Deploying

Every merge to main runs three jobs in order:

  1. test — mix format --check-formatted, compile with warnings as errors, and the test suite.
  2. deploy — builds a release and installs it on the host, running migrations on start.
  3. publish-mcp-registry — republishes server.json to the official MCP Registry (below).

deploy/deploy.sh does the same by hand, and sets up a new host.

Publishing to the official registry

The last job publishes MCP Harbor as io.github.lbesecker195/mcp-registry-search-directory, authenticating with GitHub OIDC, so there is no secret to manage.

  • It publishes only when the registry answers 404 for the current version. A 5xx is retried and then skipped with a warning — a deploy never fails because the registry had a bad moment. To publish changed metadata, bump version in server.json.
  • Renaming: add the old name to RETIRED_SERVER_NAMES in the workflow. It is marked deleted before the new name is published, because the registry allows one active server per endpoint URL and treats one server under several names as spam.

Configuration

Set in the host's environment file.

Variable Purpose
PHX_HOST, PORT, PHX_IP, PHX_SERVER where the site is served
DATABASE_URL, POOL_SIZE PostgreSQL
SECRET_KEY_BASE session signing
REGISTRY_PUBLISH_TOKEN lets API and MCP submissions publish immediately, and authorises review
MCP_REGISTRY_LICENSE_KEY required for the app to start; ask the project owner for one
OFFICIAL_REGISTRY_SYNC the 6-hourly mirror of the official registry
PROBE_ENABLED, PROBE_BATCH_SIZE, PROBE_CONCURRENCY the prober
DOCUMENTS_ENABLED the llms.txt / AGENTS.md fetcher
DISCOVERY_PUSH, INDEXNOW_KEY announcing new and changed pages to search engines
GEO_BLOCK_ENABLED, GEOIP_SOURCE, MAXMIND_LICENSE_KEY optional city-level geo block; off unless enabled
SSA_ACCOUNT_ID, SSA_PROJECT usage analytics via SeriouslySimpleAnalytics

Each scheduler can be switched off on its own with its *_ENABLED variable and a restart; no code change is needed.

Memory

The app runs under systemd with MemoryHigh=2G (soft — the kernel throttles past it) and MemoryMax=3G (hard). If pages slow down while the host has free memory, read the service's cgroup memory.events: a rising high count means the app is being throttled at its own limit, not starved by the machine.

Useful commands

On the host, against the running release:

bin/mcp_registry rpc "McpRegistry.OfficialRegistry.sync()"
bin/mcp_registry rpc "McpRegistry.Probe.Runner.run_batch(limit: 100)"
bin/mcp_registry rpc "McpRegistry.Documents.check_batch()"

OfficialRegistry.sync(reapply: true) pushes every upstream entry through the mapping again — needed once after the mapping starts reading a new server.json field. It writes only rows that actually change and announces nothing.

Locally, as Mix tasks: mix registry.sync_official, mix probe.tools, mix mcp.approve <name>, mix discovery.announce, mix content.generate.

Clone this wiki locally