examples/team-governed-proxy.
Architecture
Project files
src/index.ts
app.mcp(...) or constructor-time mcp(...) declares an upstream server.
app.local(...) declares app-owned MCP capabilities. Both use the same policy
namespace and client-visible <namespace>__<tool> naming.
fentaris.json
Package scripts
Secrets manifest
The example has no upstream credential, so its committed manifest is empty:.fentaris/credentials.enc.json.
credentialJson(...) references API-key material in that encrypted auth store,
not upstream secrets scanned into the manifest. The committed empty manifest is
expected here: fentaris auth api-key add does not add credentialJson paths
to secrets.manifest.json, so a later static fentaris doctor may warn that
stored API-key hashes are “not listed in the secrets manifest”. That warning is
unrelated to this example’s empty upstream-secret manifest.
Install and validate
Provision local API keys
Let the CLI create a random project-local encryption key in the ignored.env
on the first credential write. Agents must leave the client API-key values to
the user.
x-fentaris-api-key.
Start and test
x-fentaris-api-key header.
Expected behavior:
- A reader sees and can call
workspace__status. - A reader does not see
workspace__release_notes. - A direct reader call to
workspace__release_notesreturns a policy denial. - A maintainer sees and can call both local tools.
specification__*tools are visible when the public upstream is reachable.
Runtime validation
With the proxy running, export the same client API key used for the curl tests so doctor can sendx-fentaris-api-key:
Security boundaries
- The endpoint remains bound to
127.0.0.1. - Raw API keys and
FENTARIS_AUTH_KEYnever appear in source or logs. - Policy filters both discovery and execution.
- JSON logging records subject and group tags, not credential values.
- Add explicit network and deployment controls before exposing the endpoint to other machines.