Connect AI agents to any API, anywhere. Securely. Open-source Agent Connectivity Gateway.
NyxID lets your AI agents (Claude Code, Cursor, n8n) reach any API you have, public or private, and handles all the credentials so your agent never sees a raw key.
flowchart LR
subgraph Agents["AI Agents"]
CC[Claude Code]
CU[Cursor]
N8[n8n]
end
subgraph NyxID["NyxID Gateway"]
AUTH[OIDC and API Key Auth]
PROXY[Credential Injection Proxy]
MCP[MCP Tool Wrapping]
end
subgraph Connectivity["Private Reach"]
NODE[Credential Node]
end
subgraph Targets["Connected Services"]
PUB[Public APIs]
INT[Internal APIs]
LOC[Localhost Services]
end
CC --> AUTH
CU --> AUTH
N8 --> AUTH
AUTH --> PROXY
PROXY --> MCP
PROXY -->|Direct proxy| PUB
PROXY -->|Private network| INT
PROXY -->|NAT traversal| NODE
NODE --> LOC
classDef agents fill:#eef2ff,stroke:#4f46e5,color:#111827,stroke-width:1.5px;
classDef gateway fill:#111827,stroke:#22d3ee,color:#ffffff,stroke-width:2px;
classDef tooling fill:#e0f2fe,stroke:#0284c7,color:#0f172a,stroke-width:1.5px;
classDef node fill:#fef3c7,stroke:#f59e0b,color:#111827,stroke-width:1.5px;
classDef targets fill:#ecfeff,stroke:#14b8a6,color:#0f172a,stroke-width:1.5px;
class CC,CU,N8 agents;
class AUTH,PROXY gateway;
class MCP tooling;
class NODE node;
class PUB,INT,LOC targets;
NyxID proxies requests, injects credentials automatically, punches through NAT (Network Address Translation) to reach your local services, and wraps any REST API as MCP (Model Context Protocol) tools.
What NyxID Does
- Reach anything — public APIs, internal APIs, localhost services via credential nodes (
nyxid node). SSH (Secure Shell) tunneling (nyxid ssh) reaches remote hosts. No VPN (Virtual Private Network), no port forwarding. - Never expose keys — the reverse proxy injects credentials automatically. Your agent talks to NyxID; NyxID talks to the API with the real key.
- MCP auto-wrap — REST APIs with OpenAPI specs become MCP (Model Context Protocol) tools.
nyxid mcp config --tool cursorgenerates the config. Works with Claude Code, Cursor, VS Code, and any MCP client. - Per-agent isolation — each agent gets a scoped token. Agent A accesses Slack and Gmail. Agent B only accesses your internal API. Revoke any session without touching the underlying credentials.
- Full identity layer — OIDC (OpenID Connect) / OAuth 2.0 with PKCE (Proof Key for Code Exchange), RBAC (Role-Based Access Control), service accounts, transaction approval (Telegram + mobile push), LLM (Large Language Model) gateway for 7 providers.
Why NyxID
Other tools solve parts of this — NyxID combines credential injection, NAT traversal, and MCP tooling in one open-source gateway:
| NyxID | 1Password Universal Autofill | Cloudflare Tunnel | Keycloak | |
|---|---|---|---|---|
| Open source | Yes | No | No | Yes |
| NAT traversal to localhost | Yes (nyxid node) | No | Yes (no credentials) | No |
| Credential injection | Yes (any API) | Partner integrations | No | No |
| REST to MCP auto-wrap | Yes | No | No | No |
| Per-agent isolation | Yes | No | No | No |
| OIDC / OAuth 2.0 | Yes | No | No | Yes |
Quick Start
There are two ways to use NyxID — pick the one that fits your situation:
| Hosted | Self-host | |
|---|---|---|
| What it is | We run NyxID for you in the cloud | You run NyxID on your own machine |
| Best for | Getting started quickly, no setup | Full control, private networks, offline use |
| Status | Closed beta (invitation only) | Open — anyone can run it |
Option A: Hosted (closed beta)
Sign up at the NyxID console, then use the nyxid CLI — or point your AI agent at it — to connect your services. Currently invitation-only — join the waitlist.
Option B: Self-host
Run NyxID on your own machine. This sets up three Docker containers (database, backend, frontend) — takes about 2 minutes.
flowchart LR
A["1. Check prerequisites"] --> B["2. Clone & configure"]
B --> C["Start Docker stack"]
C --> D["3. Register account"]
D --> E{Connect AI agent}
E --> F[AI-assisted]
E --> G[Manual CLI]
E --> H[Web console]
Prerequisites:
- Docker — required for the server stack (backend, frontend, MongoDB). ~2 GB disk for images on first pull.
- A bash-compatible terminal — macOS Terminal, Linux shell, or WSL (Windows Subsystem for Linux) on Windows.
- Rust / Cargo — optional, only needed if you install the
nyxidCLI (see Manual CLI below). The installer will set this up automatically if missing. Budget ~1.5 GB disk (~300 MB for the toolchain plus ~1 GB for the build cache) and 3–10 minutes for the first compile.
Total disk footprint: ~2 GB for the server only, ~3.5 GB if you also install the CLI from source.
AI-assisted (recommended)
If you have Claude Code, Cursor, or any AI coding assistant open, paste this prompt and it will drive the entire self-host flow for you — clone, env generation, Docker stack, health check, optional CLI install, login, first credential, and MCP config:
I want to self-host NyxID on this machine (the repo is https://github.com/ChronoAIProject/NyxID). Walk me through the full quickstart interactively:
- Confirm Docker is installed and running before touching anything (check
git,docker,openssl,curl,docker composev2, anddocker info).- Before cloning or generating anything, check whether NyxID install STATE is present — look for a
./NyxID/.env.devfile OR any Docker volume matchingnyx*_mongodb_data(rundocker volume ls --format '{{.Name}}' | grep -E 'nyx.*_mongodb_data$'— this catches the defaultnyxid_mongodb_dataplus any variant from a renamed checkout). A bare./NyxIDdirectory alone does NOT count as "installed" —uninstall.shleaves the source tree in place, so the directory can exist with no state. If install state is present, stop and tell me the quickstart is a first-time-only install. Ask whether I want to (a) uninstall first — if./NyxIDexists, runcd NyxID && ./scripts/uninstall.sh --yes && cd ..; if only the stale Docker volume is orphaned (checkout was manually deleted earlier), rundocker volume ls --format '{{.Name}}' | grep -E 'nyx.*_mongodb_data$' | xargs -r docker volume rmdirectly. Either path wipes the volume, containers, and (for the script path).env.dev/keys — destroys all NyxID accounts and encrypted credentials. Or (b) keep my existing install and stop here — I can verify it's still running withcurl -sf http://localhost:3001/health. Do not proceed to step 3 until I answer.- If
./NyxIDalready exists (post-uninstall reinstall),cdinto it; otherwise clone the repo into the current directory andcdin. Generate.env.devwith a freshENCRYPTION_KEYandMONGO_ROOT_PASSWORD(setENVIRONMENT=development,INVITE_CODE_REQUIRED=false,AUTO_VERIFY_EMAIL=true, andEMAIL_AUTH_ENABLED=trueso I don't get stuck on email verification or a locked-down signup page), symlink it to.env.production, create the PKCS#1 JWT signing keys underkeys/(with a LibreSSL fallback using-puboutif-RSAPublicKey_outisn't supported), then pull images and start the stack withdocker compose -f docker-compose.yml -f docker-compose.prod.yml --env-file .env.production up -d. Wait up to 90 seconds forhttp://localhost:3001/healthto return 200 — if it times out, tell me to rundocker logs nyxid-backend. If the logs showSCRAM failure: Authentication failed, that means the MongoDB volume has a stale password from a previous install — tell me to run./scripts/uninstall.sh --yes(or, if the checkout is gone,docker volume ls --format '{{.Name}}' | grep -E 'nyx.*_mongodb_data$' | xargs -r docker volume rmto remove any nyx-flavored orphan volume) and retry. Show me the generatedENCRYPTION_KEYso I can back it up.- Tell me to open http://localhost:3000 and register my account (no email verification needed — accounts are auto-verified in dev mode), and wait until I confirm I've done that.
- Ask me whether I want to install the
nyxidCLI. Explain that it's optional, that the installer will pull the Rust toolchain (~300 MB) if I don't have it, and that the first build takes 3–10 minutes and ~1.5 GB of disk. If I say yes, install it using https://raw.githubusercontent.com/ChronoAIProject/NyxID/main/skills/nyxid/tools/install.sh, thensource ~/.cargo/env, log me in withnyxid login --base-url http://localhost:3001, add my OpenAI key withnyxid service add llm-openai --credential-env OPENAI_API_KEY, and verify withnyxid proxy request llm-openai models. If I say no, walk me through adding the same OpenAI credential in the web console instead.- Finish by connecting my AI tool to NyxID's MCP endpoint at
http://localhost:3001/mcp. For Claude Code:claude mcp add --transport http nyxid http://localhost:3001/mcp. For Codex:codex mcp add nyxid --url http://localhost:3001/mcp. For Cursor: open Settings > MCP in the web console and click Install to Cursor.
Prefer to run each step yourself? Follow the manual path below.
Manual (step-by-step)
Step 1 of 3 — Check your system (paste this into your terminal):
bash << 'CHECK'
err=0
for cmd in git docker openssl curl; do
if ! command -v "$cmd" >/dev/null 2>&1; then echo "Missing: $cmd"; err=1; fi
done
if ! docker compose version >/dev/null 2>&1; then echo "Missing: docker compose (v2 plugin)"; err=1; fi
if ! docker info >/dev/null 2>&1; then echo "Docker is not running. Start Docker Desktop and re-run."; err=1; fi
if [ "$err" -eq 1 ]; then exit 1; fi
echo "All good — proceed to Step 2."
CHECK
Step 2 of 3 — Install and start (paste after Step 1 passes):
This is a first-time install. If you already have NyxID set up locally, run
./scripts/uninstall.sh --yesfrom insideNyxID/first (see Uninstall & reinstall below), then come back here.
The block below is wrapped in bash << 'INSTALL' ... INSTALL so it runs under bash regardless of your outer shell — no zsh: command not found: # errors on macOS. The trailing cd NyxID runs in your interactive shell after the bash subshell exits, so you land inside the checkout for later commands (stop, uninstall, CLI install).
bash << 'INSTALL'
set -e
# ── Pre-flight: refuse to run on an existing install ──
# Checks for install STATE (.env.dev or any nyx-flavored Mongo volume), NOT
# the NyxID/ source tree — so re-running this block after ./scripts/uninstall.sh
# works cleanly. The volume grep matches nyxid_mongodb_data (default compose
# project), nyx_mongodb_data, or any other nyx*_mongodb_data variant from a
# renamed checkout, without false-positing on unrelated MongoDB projects.
if [ -f NyxID/.env.dev ] \
|| docker volume ls --format '{{.Name}}' 2>/dev/null | grep -qE 'nyx.*_mongodb_data$'; then
echo "Existing NyxID install state detected."
if [ -d NyxID ]; then
echo "Uninstall first, then re-paste this block:"
echo " cd NyxID && ./scripts/uninstall.sh --yes && cd .."
else
echo "NyxID/ is gone but a stale MongoDB volume remains. Remove it, then re-paste:"
echo " docker volume ls --format '{{.Name}}' | grep -E 'nyx.*_mongodb_data\$' | xargs -r docker volume rm"
fi
exit 0
fi
# Clone only if the source tree isn't already here (post-uninstall reinstall
# reuses the existing checkout; uninstall.sh doesn't delete the repo itself).
[ -d NyxID ] || git clone https://github.com/ChronoAIProject/NyxID.git
cd NyxID
# ── Generate .env.dev (dev config) and link for Docker ──
EK=$(openssl rand -hex 32)
cat > .env.dev << EOF
MONGO_ROOT_PASSWORD=$(openssl rand -hex 24)
ENCRYPTION_KEY=$EK
BASE_URL=http://localhost:3001
FRONTEND_URL=http://localhost:3000
ENVIRONMENT=development
JWT_PRIVATE_KEY_PATH=/app/keys/private.pem
JWT_PUBLIC_KEY_PATH=/app/keys/public.pem
INVITE_CODE_REQUIRED=false
AUTO_VERIFY_EMAIL=true
EMAIL_AUTH_ENABLED=true
RUST_LOG=nyxid=info,tower_http=info
EOF
ln -sf .env.dev .env.production
# ── Generate signing keys (LibreSSL fallback for macOS) ──
mkdir -p keys
openssl genrsa -out keys/private.pem 4096 2>/dev/null
openssl rsa -in keys/private.pem -RSAPublicKey_out -out keys/public.pem 2>/dev/null \
|| openssl rsa -in keys/private.pem -pubout -out keys/public.pem 2>/dev/null
# ── Pull images and start the stack ──
echo "Downloading NyxID (this may take a few minutes on first run)..."
docker compose -f docker-compose.yml -f docker-compose.prod.yml \
--env-file .env.production pull
docker compose -f docker-compose.yml -f docker-compose.prod.yml \
--env-file .env.production up -d
# ── Wait for the server (up to 90s) ──
# Track success explicitly so we print EXACTLY ONE of the two outcome
# messages below, never both. Fixes #282 where timeout + success printed
# together when /health didn't come up in time.
echo "Waiting for NyxID to start..."
ok=0
n=0
while [ "$n" -lt 45 ]; do
if curl -sf http://localhost:3001/health >/dev/null 2>&1; then
ok=1
break
fi
n=$((n+1))
sleep 2
done
if [ "$ok" -eq 1 ]; then
echo ""
echo "✓ NyxID is running at http://localhost:3000"
echo " Save your encryption key (needed if you reset the database): $EK"
else
echo ""
echo "✗ Timed out waiting for NyxID to start."
echo " Check logs: docker logs nyxid-backend"
echo " Reset state: see the 'Uninstall & reinstall' section in README.md"
fi
INSTALL
cd NyxID 2>/dev/null || true
Step 3 of 3 — Register and connect
- Open
http://localhost:3000in your browser - Register with your name, email, and a password — no email verification needed (accounts are auto-verified in dev mode)
- Log in and connect your AI agent using one of the methods below
To stop NyxID: docker compose -f docker-compose.yml -f docker-compose.prod.yml down
Uninstall & reinstall
Quickstart is a first-time install. To reinstall — e.g. to try a new config, wipe test data, or recover from a broken state — uninstall first, then re-run Step 2.
cd NyxID
./scripts/uninstall.sh # interactive: type "wipe" to confirm
./scripts/uninstall.sh --yes # non-interactive (CI / repeat testing)
./scripts/uninstall.sh --keep-config # keep .env.dev and keys/*.pem across reinstall
By default this removes:
- Docker containers (
nyxid-mongodb,nyxid-mailpit,nyxid-backend,nyxid-frontend) - The MongoDB named volume (
nyxid_mongodb_data) — all NyxID accounts, encrypted credentials, and audit log entries .env.dev,.env.production,keys/private.pem,keys/public.pem
Docker images are preserved (no re-download). Pass --keep-config if you want to preserve your existing ENCRYPTION_KEY across reinstall (e.g. to keep encrypted database backups readable).
After uninstall, cd .. out of NyxID/ and re-paste Step 2 above. The pre-flight now checks for install state (.env.dev or the Mongo volume), not the source tree — so the existing NyxID/ checkout is reused and only regeneration runs.
Recovering an orphan volume: If you hit issue #280 on an older quickstart and manually deleted your NyxID/ checkout, but a stale MongoDB volume survived, you don't need to re-clone just to run uninstall.sh. Remove any nyx-flavored volume directly — this matches nyxid_mongodb_data (default), nyx_mongodb_data, or any nyx*_mongodb_data variant from a renamed checkout:
docker volume ls --format '{{.Name}}' | grep -E 'nyx.*_mongodb_data$' | xargs -r docker volume rm
docker rm -f nyxid-mongodb nyxid-mailpit nyxid-backend nyxid-frontend 2>/dev/null || true
Then re-paste Step 2 — the pre-flight will pass and Step 2 will clone fresh.
Stuck on
SCRAM failure: Authentication failedindocker logs nyxid-backend? Your MongoDB volume still has the previousMONGO_ROOT_PASSWORDbaked in from a prior run, and.env.devno longer matches. Run./scripts/uninstall.sh --yesto wipe the volume, then re-run Step 2. See #280.
For production deployment (TLS (Transport Layer Security), custom domain, email verification), see docs/DEPLOYMENT.md.
Optional: Install the nyxid CLI
The server stack above is fully usable from the web console — the CLI (Command Line Interface) is only needed if you want to script credential setup, manage credential nodes, or drive NyxID from your terminal. Skip this section if you'd rather stay in the browser.
Heads-up: the installer builds from source via Cargo. It will install Rust automatically if you don't already have it (~300 MB) and then compile the CLI (~1 GB build cache, 3–10 minutes on first run). Make sure you have ~1.5 GB free.
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ChronoAIProject/NyxID/main/skills/nyxid/tools/install.sh)"
source ~/.cargo/env # make nyxid available in current shell
nyxid --version # verify
Once installed, jump to Manual CLI below for login and first-credential setup.
Finish the connection by picking one of these:
Manual CLI
# Install the CLI (installs Rust automatically if needed, takes a few minutes on first run)
bash -c "$(curl -fsSL https://raw.githubusercontent.com/ChronoAIProject/NyxID/main/skills/nyxid/tools/install.sh)"
source ~/.cargo/env # make nyxid available in current shell
# Log in (opens browser for authentication)
nyxid login --base-url http://localhost:3001
# Add your first API credential (e.g. OpenAI — make sure OPENAI_API_KEY is set in your shell)
nyxid service add llm-openai --credential-env OPENAI_API_KEY
# Verify — you should see a JSON response listing models
nyxid proxy request llm-openai models
If the proxy returns data, the full chain works: credential stored, injected, downstream accepted.
To connect your AI tool to NyxID's MCP endpoint (http://localhost:3001/mcp):
- Claude Code —
claude mcp add --transport http nyxid http://localhost:3001/mcp - Codex —
codex mcp add nyxid --url http://localhost:3001/mcp - Cursor — open Settings > MCP in the web console (
http://localhost:3000) and click Install to Cursor for a one-click deeplink install
Already have Rust? You can also install with:
cargo install --git https://github.com/ChronoAIProject/NyxID.git nyxid-cli
Web console
Prefer a GUI (Graphical User Interface)? Everything above can also be done through the web console at http://localhost:3000:
- AI Services — add API credentials (OpenAI, Anthropic, GitHub, etc.)
- Settings > MCP — one-click install for Cursor, or grab the
claude mcp add/codex mcp addcommand for Claude Code and Codex
Reach local services (optional)
Services behind a firewall? Deploy a credential node to punch through NAT and expose them as MCP tools:
# Register and start a node (outbound WebSocket — no port forwarding, no VPN)
nyxid node register --token <reg-token> --url wss://<your-server>/api/v1/nodes/ws
nyxid node credentials add --service my-local-api --header Authorization --secret-format bearer
nyxid node start
# Register the service and link it to the node
nyxid node credentials setup --service my-local-api --api-url http://localhost:8080
# Import endpoints as MCP tools (if the service has an OpenAPI spec)
nyxid catalog endpoints my-local-api
Use Cases
- Give Claude Code access to your private APIs without sharing keys
- Expose internal microservices to AI agents through a single MCP endpoint
- Secure AI agent access to self-hosted tools (Grafana, Jenkins, n8n) behind your firewall
Resources
| Topic | Link | |
|---|---|---|
| Deployment | docs/DEPLOYMENT.md | Start here for production setup |
| AI Agent Playbook | docs/AI_AGENT_PLAYBOOK.md | Start here for agent integration |
| Architecture | docs/ARCHITECTURE.md | System design and data flows |
| API Reference | docs/API.md | Full endpoint documentation |
| Credential Nodes | docs/NODE_PROXY.md | NAT traversal setup |
| MCP Integration | docs/MCP_DELEGATION_FLOW.md | MCP protocol details |
| SSH Tunneling | docs/SSH_TUNNELING.md | |
| Security | docs/SECURITY.md | |
| Environment Variables | docs/ENV.md | |
| Developer Guide | docs/DEVELOPER_GUIDE.md |
Contributing
We welcome contributions. See CONTRIBUTING.md.