mirror of
https://github.com/Dasemu/remote-mcp-manager.git
synced 2026-11-26 23:36:31 +00:00
chore: bootstrap Claude setup
Add root CLAUDE.md, docs/architecture.md, .claude/settings.json hooks (PostToolUse type-check, Stop build+test gate), and a version.yml workflow alongside the existing ci.yml (now also builds apps/web and scopes triggers to master). Record bootstrap version 2. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f11a23fb00
commit
3731f24a96
7 files changed
+144
No files matched your search
@@ -0,0 +1,33 @@
|
||||
# Architecture
|
||||
|
||||
## Components
|
||||
|
||||
- **`apps/server`** — Express + TypeScript API and proxy. Owns the SQLite DB
|
||||
(`apps/server/src/db`), the Docker/Podman control plane (`apps/server/src/docker`), the
|
||||
Nixpacks build pipeline (`apps/server/src/build`), secret encryption
|
||||
(`apps/server/src/crypto`), and the authenticated reverse proxy to installed MCP
|
||||
containers (`apps/server/src/proxy`).
|
||||
- **`apps/web`** — React + Vite single-page admin panel (install wizard, installation list
|
||||
and detail views, login).
|
||||
|
||||
## Installation lifecycle
|
||||
|
||||
1. Operator submits a repo URL (+ optional git ref) through the web UI.
|
||||
2. `apps/server/src/service/orchestrator.ts` clones (or updates) the repo, detects env vars
|
||||
from its `.env.example`, and creates a draft `Installation` row.
|
||||
3. On build, the repo is (re-)cloned and built with Nixpacks
|
||||
(`apps/server/src/build/nixpacks.ts`) into a Docker image.
|
||||
4. The image is run as a sibling container attached to the shared `mcp-net` Docker network
|
||||
(`apps/server/src/docker/containers.ts`), with the resource caps from `CONTAINER_MEMORY_MB`
|
||||
/ `CONTAINER_CPUS`.
|
||||
5. Requests to `/mcp/<slug>` are authenticated against the installation's bearer token
|
||||
(`apps/server/src/proxy/mcpProxy.ts`, constant-time comparison) and proxied to the
|
||||
container's IP on the shared network.
|
||||
|
||||
## Why the manager itself must run as a container
|
||||
|
||||
Rootless Podman isolates the host network namespace from the container bridge, so the
|
||||
manager can only reach sibling MCP containers (by IP on `mcp-net`) when it is itself
|
||||
attached to that network — running it directly on the host only works for routes that
|
||||
don't need to reach a sibling container (e.g. `/health`, `/api/auth`). See the README's
|
||||
"Local development (Podman)" section and `LESSONS.md` for the operational detail.
|
||||
Reference in new issue
Block a user