- JavaScript 73.7%
- HTML 9.5%
- Python 8.9%
- CSS 7.9%
| bin | ||
| config | ||
| public | ||
| searxng | ||
| tests | ||
| .env.example | ||
| .gitignore | ||
| compose.yml | ||
| Dockerfile.agent-gateway | ||
| Dockerfile.mnemosyne | ||
| LICENSE | ||
| README.md | ||
Atractio Agent Hub
A self-hosted, multi-tenant MCP gateway with Forgejo OAuth, per-user Mnemosyne memory, policy enforcement, approvals, audit records, a control console, and a context-light client bridge.
Live deployment: https://agent.atractio.lol
Forgejo: https://git.barem.atractio.lol/rethinger/atractio-agent-hub
Client tool: https://git.barem.atractio.lol/rethinger/atractio-tool
What is included
- Forgejo OAuth 2.0 login and rotating hub tokens.
- A stable isolated Mnemosyne bank for every Forgejo identity.
- SSE MCP routing for memory, search, browser, docs, code, repositories and Git.
- Scope checks, tenant ownership, server deny policies and exact-operation approvals.
- Account-wide Always approve without bypassing hard security boundaries.
- Audit, sessions, policies, jobs, temporary outputs, CI and notifications.
- Public landing page, status page and authenticated control console.
- A compact local MCP bridge that keeps only four meta-tools in model context.
Requirements
- Docker Engine with Compose v2.
- A Forgejo instance reachable from the gateway.
- A TLS reverse proxy for the public hub URL.
- At least 8 GiB RAM for the full browser/code/media tool image.
Quick start
-
Clone the repository.
-
Copy the environment template and generate independent random secrets:
cp .env.example .env openssl rand -base64 48 -
In Forgejo, create an OAuth application with callback:
https://agent.example.com/auth/callback -
Put the OAuth client ID, client secret, Forgejo URLs and generated secrets in
.env. -
Start the stack:
docker compose up -d --build -
Reverse proxy your public HTTPS hostname to
127.0.0.1:8080. -
Open
/auth/login, sign in through Forgejo, then use/consoleto manage the account.
The Compose file intentionally binds the gateway to loopback by default. Do not expose port 8080 directly to the internet.
Forgejo OAuth
The gateway needs a confidential Forgejo OAuth application. FORGEJO_PUBLIC_URL is the browser-facing URL; FORGEJO_API_URL is the URL reachable from the gateway container. They may be the same URL.
Existing installations can bind legacy bootstrap memory to an administrator with LEGACY_MCP_BANK. New Forgejo identities receive stable user_<forgejo-id> banks and cannot select another user's bank.
Client installation
Download a ready-to-run bundle or use the installer from the companion repository:
curl -fsSL https://git.barem.atractio.lol/rethinger/atractio-tool/raw/branch/main/install.sh | sh
Windows PowerShell:
irm https://git.barem.atractio.lol/rethinger/atractio-tool/raw/branch/main/install.ps1 | iex
The installer stores the token separately with user-only permissions, asks which MCP services to enable initially, and writes ready-to-copy client configurations. It never places the token inside a repository.
Development
Run the focused platform tests:
node --test tests/hub_platform.test.js
Validate client scripts:
node --check public/console.js
node --check public/landing.js
node --check public/status.js
Security
- Never commit
.env, runtime state, memory banks, Forgejo data or generated outputs. - Use unique random values for every secret in
.env. - Terminate TLS before the gateway and keep its container port bound to loopback.
- Repository and browser tools retain their server-side deny lists even when Always approve is enabled.
- Report vulnerabilities privately to the deployment operator before opening a public issue.
License
MIT. See LICENSE.