mcpelevator: Instructions file for Codex

AGENTS.md

mcpelevator AGENTS.md is an instructions file for Codex, OpenCode from pacnpal/mcpelevator. It costs 1,669 tokens per session, scanned A, original, MIT.

Project instructions for mcpelevator, a self-hosted service that turns command-line MCP servers into authenticated HTTP endpoints and includes a web interface.

In plain words
What is it for?
Use them when developing, testing, type-checking, building, or running mcpelevator locally or with Docker.
Why use it?
They give coding agents the commands, architecture, and conventions needed to work on the backend and frontend without guessing.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md.

This is pacnpal/mcpelevator's own configuration. It tells Codex and OpenCode how to work on mcpelevator itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything mcpelevator configures →

Reuse

Borrowing it

Nothing to install: this file belongs to pacnpal/mcpelevator. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/pacnpal/mcpelevator/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/pacnpal/mcpelevator

Made for: Codex, OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for mcpelevator AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/pacnpal/mcpelevator/agents-md/github.svg)](https://agentmods.dev/instructions/pacnpal/mcpelevator/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/pacnpal/mcpelevator/agents-md"><img src="https://agentmods.dev/badge/instructions/pacnpal/mcpelevator/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for mcpelevator AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/pacnpal/mcpelevator/agents-md"><img src="https://agentmods.dev/badge/instructions/pacnpal/mcpelevator/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,669 This file is loaded in full into every session.
When invoked 1,669 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.01669 $0.01669
Opus 5.5 $0.00668 $0.00668
Sonnet 5.5 $0.00334 $0.00334
Haiku 4.5 $0.00167 $0.00167

Measured 4d ago against content hash 43b593d815c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

mcpelevator AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 87 lines

How it starts

The opening of the file, as written. The whole thing — 87 lines — stays where its author put it; the contents beside it link to each section on GitHub.

mcpelevator — self-hosted control plane that elevates stdio MCP servers into authenticated HTTP endpoints

One container runs stdio (or already-remote) MCP servers and exposes each as a remote Streamable-HTTP endpoint (/s/<slug>/mcp) with a SvelteKit UI, process supervision, and auth.

Commands

Run backend commands from backend/, frontend commands from frontend/. The Makefile wraps the common ones.

  • Backend dev (autoreload, http://127.0.0.1:8080): cd backend && uv run uvicorn app.main:app --reload --port 8080 — make dev-backend
  • Frontend dev (HMR, http://localhost:5173, proxies /api and /s to :8080): cd frontend && npm install && npm run dev — make dev-frontend
  • Build SPA into frontend/build: cd frontend && npm ci && npm run build — make build
  • Backend tests: cd backend && uv run pytest -q — make test
  • Frontend tests: cd frontend && npm run test (vitest)
  • Frontend typecheck: cd frontend && npm run check (svelte-check)
  • Refresh the uv lockfile: cd backend && uv lock — make lock
  • Build + run everything in Docker: docker compose up --build — make docker

Architecture

One FastAPI process serves three surfaces in a single port (backend/app/main.py): /api/* control plane, /s/<slug>/mcp reverse proxy, and the built SPA as a catch-all mount.

  • Desired-state reconciliation. SQLite is the source of truth. A background supervisor task (supervisor/) converges running processes to the desired state (Kubernetes-style), so the system is idempotent and survives restarts. Operator lifecycle actions write desired state or queue an activation — they never spawn or kill directly. Supervisor.restart is the ONE restart primitive (stop the unit, queue a fresh activation, no config write); POST /api/servers/{id}/restart and POST /api/groups/{name}/restart (per enabled member) both go through it, and the UI's single RestartButton calls those.
  • One bridge process per enabled server (bridge/, runners/): each runs its own uvicorn on a loopback port hosting a FastMCP proxy of the stdio command (or an upstream HTTP/SSE URL), fault-isolated with a real PID and logs.
  • Upstream OAuth (auth/oauth_store.py, auth/oauth_flow.py): a remote server can authenticate to its upstream via OAuth instead of static env headers. The interactive authorization-code grant (DCR + PKCE) runs in the control plane (/api/servers/{id}/oauth/authorize → public /api/oauth/callback, anchored on the OAuth state) using the MCP SDK's OAuthClientProvider; tokens land in a 0600 file store (<data_dir>/oauth/<id>.json) shared with the bridge, which reads them and auto-refreshes. Tokens live off the DB, so authenticating never re-hashes the row or bounces the bridge.
  • Runners (runners/): npx, uvx, command, remote (proxy an already-remote MCP URL), and docker (image-packaged servers — opt-in + root-equivalent behind the docker_runner setting). Each runner is a pure Server -> ProcessSpec builder; docker stores the canonical image+container-args+env shape and synthesizes a hardened docker run (the bridge scrubs the child env for docker units so a -e KEY passthrough can't reach the control plane's secrets).
  • Groups (groups/): a SQLite-backed registry maps each group name to "*" or an ordered list of server IDs and serves it at /g/<name>/mcp; all is an ordinary, unreserved group name. GroupHub converges one namespaced FastMCP bundle per group from the running supervisor topology after each reconcile. Auth reuses enforce() with synthetic group:<name> identities, so bearer tokens may be scoped to that group or all; members whose effective auth is stricter than the group are excluded to prevent an auth downgrade.
  • Auth (auth/): two independent layers per request — a Host/Origin allowlist middleware (DNS-rebinding defense) plus pluggable per-server bearer auth on /s and control-plane bearer auth that gates the sensitive /api routers only when enforcement is on (default auto: when the box is exposed off-host); /api/health* and /api/auth/status stay public. See README "Security" for the full model.
  • Catalog (catalog/): backend proxies public MCP directories (official registry, Glama) into reviewable launch specs; the SPA stays same-origin.
  • Frontend (frontend/src/): SvelteKit (Svelte 5) SPA, adapter-static, no SSR — rendered entirely in the browser, served by the backend catch-all.

Read the full file on GitHub · 87 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago Changed · +21 tokens per session 43b593d815c0
  2. 1mo ago Changed · +4 lines · +91 tokens per session 13ab5e28212c
  3. 2mo ago First seen · 83 lines · 1,557 tokens per session scan A 4426834821e2

Subscribe to this mod's changes

mcpelevator AGENTS.md is an instructions file published in the GitHub repository pacnpal/mcpelevator (7 stars, last pushed today), licensed MIT. It adds 1,669 tokens to every session, about $0.0067 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

mcpelevator AGENTS.md compared with instructions from other repositories

mcpelevator AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
mcpelevator AGENTS.mdpacnpal/mcpelevatorInstructions file7todayMITA1,669Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143kyesterdayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode